ghc-8.0.0.20160204: The GHC API

Safe HaskellNone
LanguageHaskell2010

ConLike

Synopsis

Documentation

data ConLike

A constructor-like thing

Instances

Eq ConLike 

Methods

(==) :: ConLike -> ConLike -> Bool

(/=) :: ConLike -> ConLike -> Bool

Data ConLike 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConLike -> c ConLike Source

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ConLike Source

toConstr :: ConLike -> Constr Source

dataTypeOf :: ConLike -> DataType Source

dataCast1 :: Typeable (TYPE Lifted -> TYPE Lifted) t => (forall d. Data d => c (t d)) -> Maybe (c ConLike) Source

dataCast2 :: Typeable (TYPE Lifted -> TYPE Lifted -> TYPE Lifted) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConLike) Source

gmapT :: (forall b. Data b => b -> b) -> ConLike -> ConLike Source

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConLike -> r Source

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConLike -> r Source

gmapQ :: (forall d. Data d => d -> u) -> ConLike -> [u] Source

gmapQi :: Int -> (forall d. Data d => d -> u) -> ConLike -> u Source

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike Source

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike Source

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConLike -> m ConLike Source

Ord ConLike 
OutputableBndr ConLike 
Outputable ConLike 

Methods

ppr :: ConLike -> SDoc

pprPrec :: Rational -> ConLike -> SDoc

Uniquable ConLike 

Methods

getUnique :: ConLike -> Unique

NamedThing ConLike 

conLikeArity :: ConLike -> Arity

Number of arguments

conLikeFieldLabels :: ConLike -> [FieldLabel]

Names of fields used for selectors

conLikeInstOrigArgTys :: ConLike -> [Type] -> [Type]

Returns just the instantiated value argument types of a ConLike, (excluding dictionary args)

conLikeExTyVars :: ConLike -> [TyVar]

Existentially quantified type variables

conLikeStupidTheta :: ConLike -> ThetaType

The "stupid theta" of the ConLike, such as data Eq a in:

data Eq a => T a = ...

It is empty for PatSynCon as they do not allow such contexts.

conLikeWrapId_maybe :: ConLike -> Maybe Id

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]

Returns the strictness information for each constructor

conLikeFullSig :: ConLike -> ([TyVar], [TyVar], [EqSpec], ThetaType, ThetaType, [Type], Type)

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

conLikeResTy :: ConLike -> [Type] -> Type

Returns the type of the whole pattern

conLikeFieldType :: ConLike -> FieldLabelString -> Type

Extract the type for any given labelled field of the ConLike

conLikesWithFields :: [ConLike] -> [FieldLabelString] -> [ConLike]

The ConLikes that have *all* the given fields