-- friends:
import HsTypes ( HsType, pprParendHsType, pprHsTyVarBndr, toHsType,
HsTupCon(..), EqHsEnv, hsTupParens,
- emptyEqHsEnv, extendEqHsEnv, eqListBy,
+ emptyEqHsEnv, extendEqHsEnv,
eq_hsType, eq_hsVars
)
import BasicTypes ( Arity )
import FiniteMap ( lookupFM )
import CostCentre
+import Util ( eqListBy )
import Outputable
\end{code}
import Class ( FunDep, DefMeth(..) )
import CStrings ( CLabelString )
import Outputable
+import Util ( eqListBy )
import SrcLoc ( SrcLoc )
import FastString
\end{code}
usOnceTyConName, usManyTyConName
)
import FiniteMap
+import Util ( eqListBy )
import Outputable
\end{code}
eq_hsPred env (HsIParam n1 ty1) (HsIParam n2 ty2)
= n1 == n2 && eq_hsType env ty1 ty2
eq_hsPred env _ _ = False
-
--------------------
-eqListBy :: (a->a->Bool) -> [a] -> [a] -> Bool
-eqListBy eq [] [] = True
-eqListBy eq (x:xs) (y:ys) = eq x y && eqListBy eq xs ys
-eqListBy eq xs ys = False
\end{code}
foldl2, count,
-- comparisons
- thenCmp, cmpList, prefixMatch, suffixMatch,
+ eqListBy, thenCmp, cmpList, prefixMatch, suffixMatch,
-- strictness
foldl', seqList,
%************************************************************************
\begin{code}
+eqListBy :: (a->a->Bool) -> [a] -> [a] -> Bool
+eqListBy eq [] [] = True
+eqListBy eq (x:xs) (y:ys) = eq x y && eqListBy eq xs ys
+eqListBy eq xs ys = False
+
thenCmp :: Ordering -> Ordering -> Ordering
{-# INLINE thenCmp #-}
thenCmp EQ any = any