X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FhsSyn%2FHsDecls.lhs;h=8827f3ab64269240c623cda24af62b5541384be7;hp=dff8ce730199f7d9b7ba2883f293afa9572d7a09;hb=6ea06bbf08517d9805feb82df65cc56ecbaf23a4;hpb=617a845f9574185f71db0cad7cfcb2e54fcb9db4 diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs index dff8ce7..8827f3a 100644 --- a/compiler/hsSyn/HsDecls.lhs +++ b/compiler/hsSyn/HsDecls.lhs @@ -126,7 +126,12 @@ data HsDecl id data HsGroup id = HsGroup { hs_valds :: HsValBinds id, - hs_tyclds :: [LTyClDecl id], + + hs_tyclds :: [[LTyClDecl id]], + -- A list of mutually-recursive groups + -- Parser generates a singleton list; + -- renamer does dependency analysis + hs_instds :: [LInstDecl id], hs_derivds :: [LDerivDecl id], @@ -228,10 +233,12 @@ instance OutputableBndr name => Outputable (HsGroup name) where if isEmptyValBinds val_decls then Nothing else Just (ppr val_decls), - ppr_ds tycl_decls, ppr_ds inst_decls, + ppr_ds (concat tycl_decls), + ppr_ds inst_decls, ppr_ds deriv_decls, ppr_ds foreign_decls] where + ppr_ds :: Outputable a => [a] -> Maybe SDoc ppr_ds [] = Nothing ppr_ds ds = Just (vcat (map ppr ds)) @@ -636,6 +643,7 @@ instance OutputableBndr name top_matter = ptext (sLit "class") <+> pp_decl_head (unLoc context) lclas tyvars Nothing <+> pprFundeps (map unLoc fds) + ppr_semi :: Outputable a => a -> SDoc ppr_semi decl = ppr decl <> semi pp_decl_head :: OutputableBndr name @@ -895,7 +903,7 @@ data ForeignImport = -- import of a C entity -- * `Safety' is irrelevant for `CLabel' and `CWrapper' -- CImport CCallConv -- ccall or stdcall - Safety -- safe or unsafe + Safety -- interruptible, safe or unsafe FastString -- name of C header CImportSpec -- details of the C entity deriving (Data, Typeable)