projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Monadify typecheck/TcMType: use do, return, applicative, standard monad functions
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcTyFuns.lhs
diff --git
a/compiler/typecheck/TcTyFuns.lhs
b/compiler/typecheck/TcTyFuns.lhs
index
ca3c4a8
..
82e397f
100644
(file)
--- a/
compiler/typecheck/TcTyFuns.lhs
+++ b/
compiler/typecheck/TcTyFuns.lhs
@@
-40,7
+40,7
@@
import Maybes
-- standard
import Data.List
-- standard
import Data.List
-import Control.Monad (liftM)
+import Control.Monad
\end{code}
\end{code}
@@
-233,7
+233,7
@@
tcGenericNormaliseFamInst fun (ForAllTy tyvar ty1)
}
tcGenericNormaliseFamInst fun (NoteTy note ty1)
= do { (coi,nty1) <- tcGenericNormaliseFamInst fun ty1
}
tcGenericNormaliseFamInst fun (NoteTy note ty1)
= do { (coi,nty1) <- tcGenericNormaliseFamInst fun ty1
- ; return (mkNoteTyCoI note coi, NoteTy note nty1)
+ ; return (coi, NoteTy note nty1)
}
tcGenericNormaliseFamInst fun ty@(TyVarTy tv)
| isTcTyVar tv
}
tcGenericNormaliseFamInst fun ty@(TyVarTy tv)
| isTcTyVar tv
@@
-663,7
+663,7
@@
The following rules exploits the reflexivity of equality:
\begin{code}
trivialRule :: IdemRewriteRule
trivialRule insts
\begin{code}
trivialRule :: IdemRewriteRule
trivialRule insts
- = liftM catMaybes $ mappM trivial insts
+ = liftM catMaybes $ mapM trivial insts
where
trivial inst
| ASSERT( isEqInst inst )
where
trivial inst
| ASSERT( isEqInst inst )