diff options
author | Thomas Schilling <nominolo@googlemail.com> | 2008-11-22 14:30:18 +0000 |
---|---|---|
committer | Thomas Schilling <nominolo@googlemail.com> | 2008-11-22 14:30:18 +0000 |
commit | ed345a461ea63f0cfbefa49c13b9711b48d08ea3 (patch) | |
tree | a30fdb734bc7bf9e972bbf0f18567b1c018f1694 | |
parent | be86978a56a8d4c67093433ceb95d1a44ae6a7cf (diff) | |
download | haskell-ed345a461ea63f0cfbefa49c13b9711b48d08ea3.tar.gz |
Comments/Haddockification only.
-rw-r--r-- | compiler/hsSyn/HsDecls.lhs | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs index 644050e6b2..8ef3816c19 100644 --- a/compiler/hsSyn/HsDecls.lhs +++ b/compiler/hsSyn/HsDecls.lhs @@ -534,10 +534,10 @@ tcdName :: TyClDecl name -> name tcdName decl = unLoc (tcdLName decl) tyClDeclNames :: Eq name => TyClDecl name -> [Located name] --- Returns all the *binding* names of the decl, along with their SrcLocs --- The first one is guaranteed to be the name of the decl --- For record fields, the first one counts as the SrcLoc --- We use the equality to filter out duplicate field names +-- ^ Returns all the /binding/ names of the decl, along with their SrcLocs. +-- The first one is guaranteed to be the name of the decl. For record fields +-- mentioned in multiple constructors, the SrcLoc will be from the first +-- occurence. We use the equality to filter out duplicate field names tyClDeclNames (TyFamily {tcdLName = name}) = [name] tyClDeclNames (TySynonym {tcdLName = name}) = [name] @@ -693,22 +693,33 @@ type LConDecl name = Located (ConDecl name) data ConDecl name = ConDecl - { con_name :: Located name -- Constructor name; this is used for the - -- DataCon itself, and for the user-callable wrapper Id + { con_name :: Located name + -- ^ Constructor name. This is used for the DataCon itself, and for + -- the user-callable wrapper Id. - , con_explicit :: HsExplicitForAll -- Is there an user-written forall? (cf. HStypes.HsForAllTy) + , con_explicit :: HsExplicitForAll + -- ^ Is there an user-written forall? (cf. 'HsTypes.HsForAllTy') - , con_qvars :: [LHsTyVarBndr name] -- ResTyH98: the constructor's existential type variables - -- ResTyGADT: all the constructor's quantified type variables + , con_qvars :: [LHsTyVarBndr name] + -- ^ Type variables. Depending on 'con_res' this describes the + -- follewing entities + -- + -- - ResTyH98: the constructor's existential type variables + -- + -- - ResTyGADT: all the constructor's quantified type variables - , con_cxt :: LHsContext name -- The context. This *does not* include the - -- "stupid theta" which lives only in the TyData decl + , con_cxt :: LHsContext name + -- ^ The context. This /does not/ include the \"stupid theta\" which + -- lives only in the 'TyData' decl. - , con_details :: HsConDeclDetails name -- The main payload + , con_details :: HsConDeclDetails name + -- ^ The main payload - , con_res :: ResType name -- Result type of the constructor + , con_res :: ResType name + -- ^ Result type of the constructor - , con_doc :: Maybe (LHsDoc name) -- A possible Haddock comment + , con_doc :: Maybe (LHsDoc name) + -- ^ A possible Haddock comment. } type HsConDeclDetails name = HsConDetails (LBangType name) [ConDeclField name] |