ghc-lib-parser-8.8.2.20200205: The GHC API, decoupled from GHC versions

Safe HaskellNone
LanguageHaskell2010

PatSyn

Contents

Synopsis

Main data types

data PatSyn Source #

Pattern Synonym

See Note [Pattern synonym representation] See Note [Pattern synonym signature contexts]

Instances
Eq PatSyn Source # 
Instance details

Defined in PatSyn

Methods

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

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

Data PatSyn Source # 
Instance details

Defined in PatSyn

Methods

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

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

toConstr :: PatSyn -> Constr #

dataTypeOf :: PatSyn -> DataType #

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

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

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

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

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

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

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

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

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

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

OutputableBndr PatSyn Source # 
Instance details

Defined in PatSyn

Outputable PatSyn Source # 
Instance details

Defined in PatSyn

Uniquable PatSyn Source # 
Instance details

Defined in PatSyn

NamedThing PatSyn Source # 
Instance details

Defined in PatSyn

mkPatSyn Source #

Arguments

:: Name 
-> Bool

Is the pattern synonym declared infix?

-> ([TyVarBinder], ThetaType)

Universially-quantified type variables and required dicts

-> ([TyVarBinder], ThetaType)

Existentially-quantified type variables and provided dicts

-> [Type]

Original arguments

-> Type

Original result type

-> (Id, Bool)

Name of matcher

-> Maybe (Id, Bool)

Name of builder

-> [FieldLabel]

Names of fields for a record pattern synonym

-> PatSyn 

Build a new pattern synonym

Type deconstruction

patSynName :: PatSyn -> Name Source #

The Name of the PatSyn, giving it a unique, rooted identification

patSynArity :: PatSyn -> Arity Source #

Arity of the pattern synonym

patSynIsInfix :: PatSyn -> Bool Source #

Should the PatSyn be presented infix?

patSynFieldType :: PatSyn -> FieldLabelString -> Type Source #

Extract the type for any given labelled field of the DataCon

pprPatSynType :: PatSyn -> SDoc Source #

Print the type of a pattern synonym. The foralls are printed explicitly