- tyConArgVrcs :: ArgVrcs,
- algTyConTheta :: ClassContext,
-
- dataCons :: [DataCon],
- -- Its data constructors, with fully polymorphic types
- -- This list can be empty, when we import a data type abstractly,
- -- either (a) the interface is hand-written and doesn't give
- -- the constructors, or
- -- (b) in a quest for fast compilation we don't import
- -- the constructors
-
- noOfDataCons :: Int, -- Number of data constructors
- -- Usually this is the same as the length of the
- -- dataCons field, but the latter may be empty if
- -- we imported the type abstractly. But even if we import
- -- abstractly we still need to know the number of constructors
- -- so we can get the return convention right. Tiresome!
-
- algTyConDerivings :: [Class], -- Classes which have derived instances
-
- algTyConFlavour :: AlgTyConFlavour,
- algTyConRec :: RecFlag, -- Tells whether the data type is part of
- -- a mutually-recursive group or not
-
- algTyConClass_maybe :: Maybe Class -- Nothing for ordinary types;
- -- Just c for the type constructor
- -- for dictionaries of class c.
+ argVrcs :: ArgVrcs,
+ algTyConTheta :: [PredType],
+
+ selIds :: [Id], -- Its record selectors (if any)
+
+ algRhs :: AlgTyConRhs, -- Data constructors in here
+
+ algTyConRec :: RecFlag, -- Tells whether the data type is part of
+ -- a mutually-recursive group or not
+
+ hasGenerics :: Bool, -- True <=> generic to/from functions are available
+ -- (in the exports of the data type's source module)