X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FhsSyn%2FHsDecls.lhs;h=09d8d0a560ae92433061552d2bab9b7072d2e2f1;hb=91f37e6a9be2c17642f5beb0a4bdddef2cb6fb37;hp=6d49bd84332f501064385789d1d18b8903dbf524;hpb=84923cc7de2a93c22a2f72daf9ac863959efae13;p=ghc-hetmet.git diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs index 6d49bd8..09d8d0a 100644 --- a/compiler/hsSyn/HsDecls.lhs +++ b/compiler/hsSyn/HsDecls.lhs @@ -390,10 +390,11 @@ data TyClDecl name -- Nothing for everything else tcdKindSig:: Maybe Kind, -- Optional kind sig - -- (Just k) for - -- (a) GADT-style data type decls with user kind sig - -- (b) 'data instance' decls with user kind sig - -- (c) 'data family' decls, whether or not there is a kind sig + -- (Just k) for a + -- (a) GADT-style 'data', or 'data instance' decl + -- with explicit kind sig + -- (b) 'data family' decl, whether or not + -- there is an explicit kind sig -- (this is how we distinguish a data family decl) tcdCons :: [LConDecl name], -- Data constructors @@ -409,8 +410,11 @@ data TyClDecl name -- are non-empty for the newtype-deriving case } -- data family: tcdPats = Nothing, tcdCons = [], tcdKindSig = Just k + -- -- data instance: tcdPats = Just tys - -- data: tcdPats = Nothing, tcdCons is non-empty + -- + -- data: tcdPats = Nothing, + -- tcdCons is non-empty *or* tcdKindSig = Nothing | TyFunction {tcdLName :: Located name, -- type constructor tcdTyVars :: [LHsTyVarBndr name], -- type variables