Comments only
authorsimonpj@microsoft.com <unknown>
Wed, 3 Jan 2007 08:25:17 +0000 (08:25 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 3 Jan 2007 08:25:17 +0000 (08:25 +0000)
compiler/hsSyn/HsDecls.lhs

index 6d49bd8..09d8d0a 100644 (file)
@@ -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