projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove an #ifdef DEBUG
[ghc-hetmet.git]
/
compiler
/
typecheck
/
TcGadt.lhs
diff --git
a/compiler/typecheck/TcGadt.lhs
b/compiler/typecheck/TcGadt.lhs
index
b3156ed
..
48b2b06
100644
(file)
--- a/
compiler/typecheck/TcGadt.lhs
+++ b/
compiler/typecheck/TcGadt.lhs
@@
-40,7
+40,7
@@
import Control.Monad
import Outputable
import TcType
import Unique
import Outputable
import TcType
import Unique
-import LazyUniqFM
+import UniqFM
\end{code}
\end{code}
@@
-237,11
+237,15
@@
fixTvCoEnv in_scope env
-- then use transitivity with the original coercion
-----------------------------
-- then use transitivity with the original coercion
-----------------------------
+-- XXX Can we do this more nicely, by exploiting laziness?
+-- Or avoid needing it in the first place?
fixTvSubstEnv :: InScopeSet -> TvSubstEnv -> TvSubstEnv
fixTvSubstEnv :: InScopeSet -> TvSubstEnv -> TvSubstEnv
-fixTvSubstEnv in_scope env
- = fixpt
+fixTvSubstEnv in_scope env = f env
where
where
- fixpt = mapVarEnv (substTy (mkTvSubst in_scope fixpt)) env
+ f e = let e' = mapUFM (substTy (mkTvSubst in_scope e)) e
+ in if and $ eltsUFM $ intersectUFM_C tcEqType e e'
+ then e
+ else f e'
----------------------------
tryToBind :: TyVarSet -> TyVar -> BindFlag
----------------------------
tryToBind :: TyVarSet -> TyVar -> BindFlag