X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FhsSyn%2FHsDecls.lhs;h=b1c64efc6fea2f2a05f3e005391585fe9efc8b18;hb=d38a30cb5e7a946f7a5e02fb6e601d2d37ea4374;hp=2b97668031c4819f10c20244457b347f3c1b3ee0;hpb=e3dd39bf230380f02d73efc287226117bb2eb47f;p=ghc-hetmet.git diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs index 2b97668..b1c64ef 100644 --- a/compiler/hsSyn/HsDecls.lhs +++ b/compiler/hsSyn/HsDecls.lhs @@ -18,7 +18,7 @@ module HsDecls ( ForeignDecl(..), LForeignDecl, ForeignImport(..), ForeignExport(..), CImportSpec(..), FoType(..), ConDecl(..), ResType(..), LConDecl, - DocDecl(..), LDocDecl, docDeclDoc, DocEntity(..), + DocDecl(..), LDocDecl, docDeclDoc, DeprecDecl(..), LDeprecDecl, HsGroup(..), emptyRdrGroup, emptyRnGroup, appendGroups, tcdName, tyClDeclNames, tyClDeclTyVars, @@ -111,9 +111,7 @@ data HsGroup id hs_depds :: [LDeprecDecl id], hs_ruleds :: [LRuleDecl id], - hs_docs :: [DocEntity id] - -- Used to remember the module structure, - -- which is needed to produce Haddock documentation + hs_docs :: [LDocDecl id] } emptyGroup, emptyRdrGroup, emptyRnGroup :: HsGroup a @@ -375,12 +373,16 @@ data TyClDecl name tcdFoType :: FoType } + -- type/data/newtype family T :: *->* | TyFamily { tcdFlavour:: FamilyFlavour, -- type, new, or data tcdLName :: Located name, -- type constructor tcdTyVars :: [LHsTyVarBndr name], -- type variables tcdKind :: Maybe Kind -- result kind } + -- Declares a data type or newtype, giving its construcors + -- data/newtype T a = + -- data/newtype instance T [a] = | TyData { tcdND :: NewOrData, tcdCtxt :: LHsContext name, -- Context tcdLName :: Located name, -- Type constructor @@ -408,9 +410,6 @@ data TyClDecl name -- Typically the foralls and ty args are empty, but they -- are non-empty for the newtype-deriving case } - -- data instance: tcdPats = Just tys - -- - -- data: tcdPats = Nothing, | TySynonym { tcdLName :: Located name, -- type constructor tcdTyVars :: [LHsTyVarBndr name], -- type variables @@ -431,7 +430,7 @@ data TyClDecl name -- only 'TyData', -- 'TyFunction', -- and 'TySynonym' - tcdDocs :: [DocEntity name] -- Haddock docs + tcdDocs :: [LDocDecl name] -- Haddock docs } data NewOrData @@ -935,11 +934,6 @@ instance OutputableBndr name => Outputable (RuleBndr name) where \begin{code} --- source code entities, for representing the module structure -data DocEntity name - = DeclEntity name - | DocEntity (DocDecl name) - type LDocDecl name = Located (DocDecl name) data DocDecl name