X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FhsSyn%2FHsDecls.lhs;h=bd2593f86f9b5538e8433aedc8e895b80224bcc1;hb=b1ab4b8a607addc4d097588db5761313c996a41f;hp=1822b58775adff36686358916c593737595b9c05;hpb=5d0b2bba1dfc0b2786162927ed7b3d4911f1cc54;p=ghc-hetmet.git diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs index 1822b58..bd2593f 100644 --- a/compiler/hsSyn/HsDecls.lhs +++ b/compiler/hsSyn/HsDecls.lhs @@ -358,7 +358,7 @@ Interface file code: -- -- * If it is 'Just pats', we have the definition of an indexed type. Then, -- 'pats' are type patterns for the type-indexes of the type constructor --- and 'tcdVars' are the variables in those patterns. Hence, the arity of +-- and 'tcdTyVars' are the variables in those patterns. Hence, the arity of -- the indexed type (ie, the number of indexes) is 'length tcdTyPats' and -- *not* 'length tcdVars'. -- @@ -373,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 @@ -406,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