the unlifted kind
[ghc-hetmet.git] / compiler / coreSyn / MkExternalCore.lhs
index 291b16e..3315240 100644 (file)
@@ -64,7 +64,8 @@ collect_tdefs tcon tdefs
   where
     tdef | isNewTyCon tcon = 
                 C.Newtype (make_con_qid (tyConName tcon)) (map make_tbind tyvars) repclause 
-         | null (tyConDataCons tcon) = error "MkExternalCore died: can't handle datatype declarations with no data constructors"
+-- 20060420 GHC handles empty data types just fine. ExtCore should too! jds
+--         | 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
@@ -116,7 +117,6 @@ make_exp (Let b e) = C.Let (make_vdef b) (make_exp e)
 make_exp (Case e v ty alts) = C.Case (make_exp e) (make_vbind v) (make_ty ty) (map make_alt alts)
 make_exp (Note (SCC cc) e) = C.Note "SCC"  (make_exp e) -- temporary
 make_exp (Note (Coerce t_to t_from) e) = C.Coerce (make_ty t_to) (make_exp e)
-make_exp (Note InlineCall e) = C.Note "InlineCall" (make_exp e)
 make_exp (Note (CoreNote s) e) = C.Note s (make_exp e)  -- hdaume: core annotations
 make_exp (Note InlineMe e) = C.Note "InlineMe" (make_exp e)
 make_exp _ = error "MkExternalCore died: make_exp"
@@ -174,6 +174,7 @@ make_ty (NoteTy _ t)        = make_ty t
 make_kind :: Kind -> C.Kind
 make_kind (FunKind k1 k2)  = C.Karrow (make_kind k1) (make_kind k2)
 make_kind LiftedTypeKind   = C.Klifted
+make_kind UnboxedTypeKind  = C.Kunboxed
 make_kind UnliftedTypeKind = C.Kunlifted
 make_kind OpenTypeKind     = C.Kopen
 make_kind _ = error "MkExternalCore died: make_kind"