Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ConLike
- conLikeArity :: ConLike -> Arity
- conLikeFieldLabels :: ConLike -> [FieldLabel]
- conLikeInstOrigArgTys :: ConLike -> [Type] -> [Type]
- conLikeExTyVars :: ConLike -> [TyVar]
- conLikeName :: ConLike -> Name
- conLikeStupidTheta :: ConLike -> ThetaType
- conLikeWrapId_maybe :: ConLike -> Maybe Id
- conLikeImplBangs :: ConLike -> [HsImplBang]
- conLikeFullSig :: ConLike -> ([TyVar], [TyVar], [EqSpec], ThetaType, ThetaType, [Type], Type)
- conLikeResTy :: ConLike -> [Type] -> Type
- conLikeFieldType :: ConLike -> FieldLabelString -> Type
- conLikesWithFields :: [ConLike] -> [FieldLabelString] -> [ConLike]
Documentation
A constructor-like thing
conLikeArity :: ConLike -> Arity Source #
Number of arguments
conLikeFieldLabels :: ConLike -> [FieldLabel] Source #
Names of fields used for selectors
conLikeInstOrigArgTys :: ConLike -> [Type] -> [Type] Source #
Returns just the instantiated value argument types of a ConLike
,
(excluding dictionary args)
conLikeExTyVars :: ConLike -> [TyVar] Source #
Existentially quantified type variables
conLikeName :: ConLike -> Name Source #
conLikeWrapId_maybe :: ConLike -> Maybe Id Source #
Returns the Id
of the wrapper. This is also known as the builder in
some contexts. The value is Nothing only in the case of unidirectional
pattern synonyms.
conLikeImplBangs :: ConLike -> [HsImplBang] Source #
Returns the strictness information for each constructor
conLikeFullSig :: ConLike -> ([TyVar], [TyVar], [EqSpec], ThetaType, ThetaType, [Type], Type) Source #
The "full signature" of the ConLike
returns, in order:
1) The universally quanitifed type variables
2) The existentially quantified type variables
3) The equality specification
4) The provided theta (the constraints provided by a match)
5) The required theta (the constraints required for a match)
6) The original argument types (i.e. before any change of the representation of the type)
7) The original result type
conLikeFieldType :: ConLike -> FieldLabelString -> Type Source #
Extract the type for any given labelled field of the ConLike
conLikesWithFields :: [ConLike] -> [FieldLabelString] -> [ConLike] Source #
The ConLikes that have *all* the given fields