summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIavor S. Diatchki <diatchki@galois.com>2012-05-25 17:26:58 -0700
committerIavor S. Diatchki <diatchki@galois.com>2012-05-25 17:26:58 -0700
commit2bc826b0f86103c5163cdc5bf99c533cf06bdcb6 (patch)
tree2b54ef1d083974248b2880c640509eee047aae2d
parenta9ea1fe7cae8760e75e128da4f2589309fea9bec (diff)
downloadhaskell-2bc826b0f86103c5163cdc5bf99c533cf06bdcb6.tar.gz
Change `isIPPred` to test for the new `IP` class.
-rw-r--r--compiler/types/Type.lhs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/types/Type.lhs b/compiler/types/Type.lhs
index 62cc7bbfd1..97e869b3a8 100644
--- a/compiler/types/Type.lhs
+++ b/compiler/types/Type.lhs
@@ -157,7 +157,7 @@ import Class
import TyCon
import TysPrim
import {-# SOURCE #-} TysWiredIn ( eqTyCon, mkBoxedTupleTy )
-import PrelNames ( eqTyConKey )
+import PrelNames ( eqTyConKey, ipClassName )
-- others
import {-# SOURCE #-} IParam ( ipTyCon )
@@ -851,9 +851,10 @@ isClassPred ty = case tyConAppTyCon_maybe ty of
isEqPred ty = case tyConAppTyCon_maybe ty of
Just tyCon -> tyCon `hasKey` eqTyConKey
_ -> False
+
isIPPred ty = case tyConAppTyCon_maybe ty of
- Just tyCon | Just _ <- tyConIP_maybe tyCon -> True
- _ -> False
+ Just tyCon -> tyConName tyCon == ipClassName
+ _ -> False
\end{code}
Make PredTypes