[project @ 2005-01-26 15:04:08 by simonmar]
[ghc-hetmet.git] / ghc / compiler / coreSyn / MkExternalCore.lhs
index 03049fb..d148b2b 100644 (file)
@@ -186,7 +186,7 @@ make_ty (FunTy t1 t2)                = make_ty (TyConApp funTyCon [t1,t2])
 make_ty (ForAllTy tv t)         = C.Tforall (make_tbind tv) (make_ty t)
 make_ty (TyConApp tc ts)        = foldl C.Tapp (C.Tcon (make_con_qid (tyConName tc))) 
                                         (map make_ty ts)
--- The special case for newtypes says "do not expand newtypes".
+-- Newtypes are treated just like any other type constructor; not expanded
 -- Reason: predTypeRep does substitution and, while substitution deals
 --        correctly with name capture, it's only correct if you see the uniques!
 --        If you just see occurrence names, name capture may occur.
@@ -198,9 +198,6 @@ make_ty (TyConApp tc ts)     = foldl C.Tapp (C.Tcon (make_con_qid (tyConName tc)))
 -- expose the representation in interface files, which definitely isn't right.
 -- Maybe CoreTidy should know whether to expand newtypes or not?
 
-make_ty (NewTcApp tc ts) = foldl C.Tapp (C.Tcon (make_con_qid (tyConName tc))) 
-                                        (map make_ty ts)
-
 make_ty (PredTy p)     = make_ty (predTypeRep p)
 make_ty (NoteTy _ t)   = make_ty t
 
@@ -235,7 +232,7 @@ make_var_id :: Name -> C.Id
 make_var_id = make_id True
 
 make_mid :: Module -> C.Id
-make_mid = moduleNameString . moduleName
+make_mid = moduleString
 
 make_qid :: Bool -> Name -> C.Qual C.Id
 make_qid is_var n = (mname,make_id is_var n)