X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FhsSyn%2FHsDecls.lhs;h=273cc98c540ee03f8243cc4f6050fb7771210c87;hp=c7149211530904d24a0e947996c49030493dfdf3;hb=f96194794bf099020706c3816d1a5678b40addbb;hpb=431453c003b867a2fe33d8634ee830d062be5a96 diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs index c714921..273cc98 100644 --- a/compiler/hsSyn/HsDecls.lhs +++ b/compiler/hsSyn/HsDecls.lhs @@ -101,7 +101,7 @@ data HsDecl id | AnnD (AnnDecl id) | RuleD (RuleDecl id) | SpliceD (SpliceDecl id) - | DocD (DocDecl id) + | DocD (DocDecl) -- NB: all top-level fixity decls are contained EITHER @@ -136,7 +136,7 @@ data HsGroup id hs_annds :: [LAnnDecl id], hs_ruleds :: [LRuleDecl id], - hs_docs :: [LDocDecl id] + hs_docs :: [LDocDecl] } emptyGroup, emptyRdrGroup, emptyRnGroup :: HsGroup a @@ -225,7 +225,7 @@ instance OutputableBndr name => Outputable (HsGroup name) where ppr_ds foreign_decls] where ppr_ds [] = empty - ppr_ds ds = text "" $$ vcat (map ppr ds) + ppr_ds ds = blankLine $$ vcat (map ppr ds) data SpliceDecl id = SpliceDecl (Located (HsExpr id)) -- Top level splice @@ -476,7 +476,7 @@ data TyClDecl name -- only 'TyFamily' and -- 'TySynonym'; the -- latter for defaults - tcdDocs :: [LDocDecl name] -- ^ Haddock docs + tcdDocs :: [LDocDecl] -- ^ Haddock docs } data NewOrData @@ -716,7 +716,7 @@ data ConDecl name , con_res :: ResType name -- ^ Result type of the constructor - , con_doc :: Maybe (LHsDoc name) + , con_doc :: Maybe LHsDocString -- ^ A possible Haddock comment. , con_old_rec :: Bool @@ -1000,19 +1000,19 @@ instance OutputableBndr name => Outputable (RuleBndr name) where \begin{code} -type LDocDecl name = Located (DocDecl name) +type LDocDecl = Located (DocDecl) -data DocDecl name - = DocCommentNext (HsDoc name) - | DocCommentPrev (HsDoc name) - | DocCommentNamed String (HsDoc name) - | DocGroup Int (HsDoc name) +data DocDecl + = DocCommentNext HsDocString + | DocCommentPrev HsDocString + | DocCommentNamed String HsDocString + | DocGroup Int HsDocString -- Okay, I need to reconstruct the document comments, but for now: -instance Outputable (DocDecl name) where +instance Outputable DocDecl where ppr _ = text "" -docDeclDoc :: DocDecl name -> HsDoc name +docDeclDoc :: DocDecl -> HsDocString docDeclDoc (DocCommentNext d) = d docDeclDoc (DocCommentPrev d) = d docDeclDoc (DocCommentNamed _ d) = d