projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove ASSERT from mkDataCon, and add comments to explain why
[ghc-hetmet.git]
/
compiler
/
ndpFlatten
/
Flattening.hs
diff --git
a/compiler/ndpFlatten/Flattening.hs
b/compiler/ndpFlatten/Flattening.hs
index
18daaa6
..
c339c76
100644
(file)
--- a/
compiler/ndpFlatten/Flattening.hs
+++ b/
compiler/ndpFlatten/Flattening.hs
@@
-65,6
+65,7
@@
import FlattenMonad (Flatten, runFlatten, mkBind, extendContext, packContext,
-- GHC
import TcType ( tcIsForAllTy, tcView )
import TypeRep ( Type(..) )
-- GHC
import TcType ( tcIsForAllTy, tcView )
import TypeRep ( Type(..) )
+import Coercion ( coercionKind )
import StaticFlags (opt_Flatten)
import Panic (panic)
import ErrUtils (dumpIfSet_dyn)
import StaticFlags (opt_Flatten)
import Panic (panic)
import ErrUtils (dumpIfSet_dyn)
@@
-448,11
+449,12
@@
lift cExpr@(Case expr b _ alts) =
else extendContext [lb] (liftCaseDataCon b alts)
letWrapper lExpr b lalts
else extendContext [lb] (liftCaseDataCon b alts)
letWrapper lExpr b lalts
-lift (Note (Coerce t1 t2) expr) =
- do
+lift (Cast expr co) =
+ do
(lexpr, t) <- lift expr
(lexpr, t) <- lift expr
- let lt1 = liftTy t1
- return ((Note (Coerce lt1 (liftTy t2)) lexpr), lt1)
+ let lco = liftTy co
+ let (t1, t2) = coercionKind lco
+ return ((Cast expr lco), t2)
lift (Note note expr) =
do
lift (Note note expr) =
do