ghc-lib-parser-8.10.6.20210814: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

ConLike

Synopsis

Documentation

data ConLike Source #

A constructor-like thing

Instances

Instances details
Eq ConLike Source # 
Instance details

Defined in ConLike

Methods

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

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

Data ConLike Source # 
Instance details

Defined in ConLike

Methods

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

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

toConstr :: ConLike -> Constr #

dataTypeOf :: ConLike -> DataType #

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

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

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

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

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

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

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

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

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

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

OutputableBndr ConLike Source # 
Instance details

Defined in ConLike

Outputable ConLike Source # 
Instance details

Defined in ConLike

Uniquable ConLike Source # 
Instance details

Defined in ConLike

NamedThing ConLike Source # 
Instance details

Defined in ConLike

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)

conLikeExTyCoVars :: ConLike -> [TyCoVar] Source #

Existentially quantified type/coercion variables

conLikeStupidTheta :: ConLike -> ThetaType Source #

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 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], [TyCoVar], [EqSpec], ThetaType, ThetaType, [Type], Type) Source #

The "full signature" of the ConLike returns, in order:

1) The universally quantified type variables

2) The existentially quantified type/coercion 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 Source #

Returns the type of the whole pattern

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