Remove old FFI syntax
[ghc-hetmet.git] / compiler / hsSyn / HsDecls.lhs
index 8ff3985..e9ee026 100644 (file)
@@ -462,7 +462,7 @@ instance OutputableBndr name
 
       | otherwise      -- Laid out
       = sep [hsep [top_matter, ptext SLIT("where {")],
-            nest 4 (sep [sep (map ppr_sig sigs), ppr methods, char '}'])]
+            nest 4 (sep [sep (map ppr_sig sigs), pprLHsBinds methods, char '}'])]
       where
         top_matter  = ptext SLIT("class") <+> pp_decl_head (unLoc context) lclas tyvars <+> pprFundeps (map unLoc fds)
        ppr_sig sig = ppr sig <> semi
@@ -569,13 +569,13 @@ pprConDecl (ConDecl con expl tvs cxt details ResTyH98)
     ppr_details con (PrefixCon tys)  = hsep (pprHsVar con : map ppr tys)
     ppr_details con (RecCon fields)  = ppr con <+> ppr_fields fields
 
-pprConDecl (ConDecl con expl tvs cxt details (ResTyGADT res_ty))
-  = sep [pprHsForAll expl tvs cxt, ppr con <+> ppr_details details]
+pprConDecl (ConDecl con expl tvs cxt (PrefixCon arg_tys) (ResTyGADT res_ty))
+  = ppr con <+> dcolon <+> 
+    sep [pprHsForAll expl tvs cxt, ppr (foldr mk_fun_ty res_ty arg_tys)]
   where
-    ppr_details (PrefixCon arg_tys) = dcolon <+> ppr (foldr mk_fun_ty res_ty arg_tys)
-    ppr_details (RecCon fields)     = ppr fields <+> dcolon <+> ppr res_ty
-
     mk_fun_ty a b = noLoc (HsFunTy a b)
+pprConDecl (ConDecl con expl tvs cxt (RecCon fields) (ResTyGADT res_ty))
+  = sep [pprHsForAll expl tvs cxt, ppr con <+> ppr fields <+> dcolon <+> ppr res_ty]
 
 ppr_fields fields = braces (sep (punctuate comma (map ppr_field fields)))
 ppr_field (n, ty) = ppr n <+> dcolon <+> ppr ty
@@ -645,10 +645,10 @@ instance (OutputableBndr name)
 type LForeignDecl name = Located (ForeignDecl name)
 
 data ForeignDecl name
-  = ForeignImport (Located name) (LHsType name) ForeignImport Bool  -- defines name
-  | ForeignExport (Located name) (LHsType name) ForeignExport Bool  -- uses name
+  = ForeignImport (Located name) (LHsType name) ForeignImport  -- defines name
+  | ForeignExport (Located name) (LHsType name) ForeignExport  -- uses name
 
--- specification of an imported external entity in dependence on the calling
+-- Specification Of an imported external entity in dependence on the calling
 -- convention 
 --
 data ForeignImport = -- import of a C entity
@@ -698,10 +698,10 @@ data FoType = DNType              -- In due course we'll add subtype stuff
 --
 
 instance OutputableBndr name => Outputable (ForeignDecl name) where
-  ppr (ForeignImport n ty fimport _) =
+  ppr (ForeignImport n ty fimport) =
     ptext SLIT("foreign import") <+> ppr fimport <+> 
     ppr n <+> dcolon <+> ppr ty
-  ppr (ForeignExport n ty fexport _) =
+  ppr (ForeignExport n ty fexport) =
     ptext SLIT("foreign export") <+> ppr fexport <+> 
     ppr n <+> dcolon <+> ppr ty