[project @ 2001-08-15 15:57:20 by simonmar]
[ghc-hetmet.git] / ghc / compiler / hsSyn / HsDecls.lhs
index 28778b7..6d1befb 100644 (file)
@@ -32,8 +32,7 @@ import HsCore         ( UfExpr, UfBinder, HsIdInfo, pprHsIdInfo,
                          eq_ufBinders, eq_ufExpr, pprUfExpr 
                        )
 import CoreSyn         ( CoreRule(..) )
-import BasicTypes      ( NewOrData(..) )
-import Demand          ( StrictnessMark(..) )
+import BasicTypes      ( NewOrData(..), StrictnessMark(..) )
 import ForeignCall     ( CExportSpec, CCallSpec, DNCallSpec, CCallConv )
 
 -- others:
@@ -42,7 +41,9 @@ import FunDeps                ( pprFundeps )
 import Class           ( FunDep, DefMeth(..) )
 import CStrings                ( CLabelString )
 import Outputable      
+import Util            ( eqListBy )
 import SrcLoc          ( SrcLoc )
+import FastString
 \end{code}
 
 
@@ -261,9 +262,10 @@ data TyClDecl name pat
                tcdLoc :: SrcLoc
     }
 
-  | ForeignType { tcdName   :: name,           -- See remarks about IfaceSig above
-                 tcdFoType :: FoType,
-                 tcdLoc    :: SrcLoc }
+  | ForeignType { tcdName    :: name,          -- See remarks about IfaceSig above
+                 tcdExtName :: Maybe FastString,
+                 tcdFoType  :: FoType,
+                 tcdLoc     :: SrcLoc }
 
   | TyData {   tcdND     :: NewOrData,
                tcdCtxt   :: HsContext name,     -- context
@@ -604,7 +606,7 @@ ppr_con_details con (VanillaCon tys)
   = ppr con <+> hsep (map (ppr_bang) tys)
 
 ppr_con_details con (RecCon fields)
-  = ppr con <+> braces (hsep (punctuate comma (map ppr_field fields)))
+  = ppr con <+> braces (sep (punctuate comma (map ppr_field fields)))
   where
     ppr_field (ns, ty) = hsep (map (ppr) ns) <+> 
                         dcolon <+>