projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve External Core newtype syntax
[ghc-hetmet.git]
/
compiler
/
coreSyn
/
MkExternalCore.lhs
diff --git
a/compiler/coreSyn/MkExternalCore.lhs
b/compiler/coreSyn/MkExternalCore.lhs
index
861f501
..
34f39a5
100644
(file)
--- a/
compiler/coreSyn/MkExternalCore.lhs
+++ b/
compiler/coreSyn/MkExternalCore.lhs
@@
-90,12
+90,10
@@
collect_tdefs tcon tdefs
Nothing -> pprPanic ("MkExternalCore: newtype tcon\
should have a coercion: ") (ppr tcon))
(map make_tbind tyvars)
Nothing -> pprPanic ("MkExternalCore: newtype tcon\
should have a coercion: ") (ppr tcon))
(map make_tbind tyvars)
- repclause
+ (make_ty (snd (newTyConRhs tcon)))
| otherwise =
C.Data (qtc tcon) (map make_tbind tyvars)
(map make_cdef (tyConDataCons tcon))
| otherwise =
C.Data (qtc tcon) (map make_tbind tyvars)
(map make_cdef (tyConDataCons tcon))
- where repclause | isRecursiveTyCon tcon || isOpenTyCon tcon= Nothing
- | otherwise = Just (make_ty (snd (newTyConRhs tcon)))
tyvars = tyConTyVars tcon
collect_tdefs _ tdefs = tdefs
tyvars = tyConTyVars tcon
collect_tdefs _ tdefs = tdefs