projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more fixups to make a stage 3 build do the right thing with the ghc package
[ghc-hetmet.git]
/
compiler
/
coreSyn
/
MkExternalCore.lhs
diff --git
a/compiler/coreSyn/MkExternalCore.lhs
b/compiler/coreSyn/MkExternalCore.lhs
index
c8885f7
..
467cff5
100644
(file)
--- a/
compiler/coreSyn/MkExternalCore.lhs
+++ b/
compiler/coreSyn/MkExternalCore.lhs
@@
-1,5
+1,5
@@
-% (c) The University of Glasgow 2001
+% (c) The University of Glasgow 2001-2006
%
\begin{code}
%
\begin{code}
@@
-18,19
+18,18
@@
import TyCon
import TypeRep
import Type
import PprExternalCore -- Instances
import TypeRep
import Type
import PprExternalCore -- Instances
-import DataCon ( DataCon, dataConExTyVars, dataConRepArgTys,
- dataConName, dataConTyCon )
+import DataCon
import CoreSyn
import Var
import IdInfo
import Literal
import Name
import CoreSyn
import Var
import IdInfo
import Literal
import Name
-import NameSet ( NameSet, emptyNameSet )
-import UniqSet ( elementOfUniqSet )
+import NameSet
+import UniqSet
import Outputable
import ForeignCall
import Outputable
import ForeignCall
-import DynFlags ( DynFlags(..) )
-import StaticFlags ( opt_EmitExternalCore )
+import DynFlags
+import StaticFlags
import IO
import FastString
import IO
import FastString
@@
-69,7
+68,7
@@
collect_tdefs tcon tdefs
-- | null (tyConDataCons tcon) = error "MkExternalCore died: can't handle datatype declarations with no data constructors"
| otherwise =
C.Data (make_con_qid (tyConName tcon)) (map make_tbind tyvars) (map make_cdef (tyConDataCons tcon))
-- | null (tyConDataCons tcon) = error "MkExternalCore died: can't handle datatype declarations with no data constructors"
| otherwise =
C.Data (make_con_qid (tyConName tcon)) (map make_tbind tyvars) (map make_cdef (tyConDataCons tcon))
- where repclause | isRecursiveTyCon tcon = Nothing
+ where repclause | isRecursiveTyCon tcon || isOpenTyCon tcon= Nothing
| otherwise = Just (make_ty rep)
where (_, rep) = newTyConRep tcon
tyvars = tyConTyVars tcon
| otherwise = Just (make_ty rep)
where (_, rep) = newTyConRep tcon
tyvars = tyConTyVars tcon
@@
-175,11
+174,11
@@
make_ty (NoteTy _ t) = make_ty t
make_kind :: Kind -> C.Kind
make_kind :: Kind -> C.Kind
+make_kind (PredTy p) | isEqPred p = panic "coercion kinds in external core not implemented!"
make_kind (FunTy k1 k2) = C.Karrow (make_kind k1) (make_kind k2)
make_kind k
| isLiftedTypeKind k = C.Klifted
| isUnliftedTypeKind k = C.Kunlifted
make_kind (FunTy k1 k2) = C.Karrow (make_kind k1) (make_kind k2)
make_kind k
| isLiftedTypeKind k = C.Klifted
| isUnliftedTypeKind k = C.Kunlifted
--- | isUnboxedTypeKind k = C.Kunboxed Fix me
| isOpenTypeKind k = C.Kopen
make_kind _ = error "MkExternalCore died: make_kind"
| isOpenTypeKind k = C.Kopen
make_kind _ = error "MkExternalCore died: make_kind"