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

Safe Haskell | Ignore
Language | GHC2021

GHC.Hs.Binds

Contents

- Orphan instances

Synopsis

- module Language.Haskell.Syntax.Binds
- data NamespaceSpecifier
  - = NoNamespaceSpecifier
  - | TypeNamespaceSpecifier (EpToken "type")
  - | DataNamespaceSpecifier (EpToken "data")
- ppr_sig :: forall (p :: Pass). OutputableBndrId p => Sig (GhcPass p) -> SDoc
- data ActivationAnn = ActivationAnn {
  - aa_openc :: EpToken "["
  - aa_closec :: EpToken "]"
  - aa_tilde :: Maybe (EpToken "~")
  - aa_val :: Maybe EpaLocation
  }
- data NHsValBindsLR idL = NValBinds [(RecFlag, LHsBinds idL)] [LSig GhcRn]
- data AbsBinds = AbsBinds {
  - abs_tvs :: [TyVar]
  - abs_ev_vars :: [EvVar]
  - abs_exports :: [ABExport]
  - abs_ev_binds :: [TcEvBinds]
  - abs_binds :: LHsBinds GhcTc
  - abs_sig :: Bool
  }
- data ABExport = ABE {
  - abe_poly :: Id
  - abe_mono :: Id
  - abe_wrap :: HsWrapper
  - abe_prags :: TcSpecPrags
  }
- type family XVarBindGhc (pL :: Pass) (pR :: Pass) where ...
- data AnnPSB = AnnPSB {
  - ap_pattern :: EpToken "pattern"
  - ap_openc :: Maybe (EpToken "{")
  - ap_closec :: Maybe (EpToken "}")
  - ap_larrow :: Maybe (EpUniToken "<-" "\8592")
  - ap_equal :: Maybe (EpToken "=")
  }
- setTcMultAnn :: Mult -> HsMultAnn GhcRn -> HsMultAnn GhcTc
- getTcMultAnn :: HsMultAnn GhcTc -> Mult
- data TcSpecPrags
  - = IsDefaultMethod
  - | SpecPrags [LTcSpecPrag]
- pprDeclList :: [SDoc] -> SDoc
- pprLHsBindsForUser :: forall (idL :: Pass) (idR :: Pass) (id2 :: Pass). (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc]
- pprLHsBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- isEmptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR -> Bool
- emptyLocalBinds :: forall (a :: Pass) (b :: Pass). HsLocalBindsLR (GhcPass a) (GhcPass b)
- eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool
- isEmptyValBinds :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
- emptyValBindsIn :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b)
- emptyValBindsOut :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b)
- emptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR
- plusHsValBinds :: forall (a :: Pass). HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
- pprHsMultAnn :: forall (id :: Pass). OutputableBndrId id => HsMultAnn (GhcPass id) -> SDoc
- ppr_monobind :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
- pprTicks :: SDoc -> SDoc -> SDoc
- pprTcSpecPrags :: TcSpecPrags -> SDoc
- isEmptyIPBindsPR :: forall (p :: Pass). HsIPBinds (GhcPass p) -> Bool
- isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool
- data AnnSig = AnnSig {
  - asDcolon :: EpUniToken "::" "\8759"
  - asPattern :: Maybe (EpToken "pattern")
  - asDefault :: Maybe (EpToken "default")
  }
- data AnnSpecSig = AnnSpecSig {
  - ass_open :: EpaLocation
  - ass_close :: EpToken "#-}"
  - ass_dcolon :: TokDcolon
  - ass_act :: ActivationAnn
  }
- newtype IdSig = IdSig {
  - unIdSig :: Id
  }
- overlappingNamespaceSpecifiers :: NamespaceSpecifier -> NamespaceSpecifier -> Bool
- coveredByNamespaceSpecifier :: NamespaceSpecifier -> NameSpace -> Bool
- type LTcSpecPrag = Located TcSpecPrag
- data TcSpecPrag = SpecPrag Id HsWrapper InlinePragma
- noSpecPrags :: TcSpecPrags
- hasSpecPrags :: TcSpecPrags -> Bool
- isDefaultMethod :: TcSpecPrags -> Bool
- pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc
- pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc
- pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc
- extractSpecPragName :: SourceText -> String
- pprMinimalSig :: OutputableBndr name => LBooleanFormula (GenLocated l name) -> SDoc
- hsSigDoc :: forall (p :: Pass). IsPass p => Sig (GhcPass p) -> SDoc
- pragBrackets :: SDoc -> SDoc

# Documentation

module Language.Haskell.Syntax.Binds

data NamespaceSpecifier Source #

Optional namespace specifier for fixity signatures, WARNINIG and DEPRECATED pragmas.

Examples:

{-# WARNING in "x-partial" data Head "don't use this pattern synonym" #-} -- ↑ DataNamespaceSpecifier

{-# DEPRECATED type D "This type was deprecated" #-} -- ↑ TypeNamespaceSpecifier

infixr 6 data $ -- ↑ DataNamespaceSpecifier

Constructors

NoNamespaceSpecifier |
TypeNamespaceSpecifier (EpToken "type") |
DataNamespaceSpecifier (EpToken "data") |

#### Instances

Instances details

Data NamespaceSpecifier Source # |

Instance details

Defined in GHC.Hs.Binds

Methods

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

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

toConstr :: NamespaceSpecifier -> Constr Source #

dataTypeOf :: NamespaceSpecifier -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable NamespaceSpecifier Source # |
Instance details Defined in GHC.Hs.Binds Methods ppr :: NamespaceSpecifier -> SDoc Source #
Eq NamespaceSpecifier Source # |
Instance details Defined in GHC.Hs.Binds Methods (==) :: NamespaceSpecifier -> NamespaceSpecifier -> Bool Source # (/=) :: NamespaceSpecifier -> NamespaceSpecifier -> Bool Source #

ppr_sig :: forall (p :: Pass). OutputableBndrId p => Sig (GhcPass p) -> SDoc Source #

data ActivationAnn Source #

Constructors

ActivationAnn |

Fields

- aa_openc :: EpToken "["
- aa_closec :: EpToken "]"
- aa_tilde :: Maybe (EpToken "~")
- aa_val :: Maybe EpaLocation

#### Instances

Instances details

Data ActivationAnn Source # |

Instance details

Defined in GHC.Hs.Binds

Methods

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

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

toConstr :: ActivationAnn -> Constr Source #

dataTypeOf :: ActivationAnn -> DataType Source #

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

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

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

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

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

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

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

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

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

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

NoAnn ActivationAnn Source # |
Instance details Defined in GHC.Hs.Binds Methods noAnn :: ActivationAnn Source #
Eq ActivationAnn Source # |
Instance details Defined in GHC.Hs.Binds Methods (==) :: ActivationAnn -> ActivationAnn -> Bool Source # (/=) :: ActivationAnn -> ActivationAnn -> Bool Source #

data NHsValBindsLR idL Source #

Constructors

NValBinds [(RecFlag, LHsBinds idL)] [LSig GhcRn] |

#### Instances

Instances details

Data (NHsValBindsLR GhcPs) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NHsValBindsLR GhcPs -> c (NHsValBindsLR GhcPs) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NHsValBindsLR GhcPs) Source #

toConstr :: NHsValBindsLR GhcPs -> Constr Source #

dataTypeOf :: NHsValBindsLR GhcPs -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> NHsValBindsLR GhcPs -> NHsValBindsLR GhcPs Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcPs -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcPs -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> NHsValBindsLR GhcPs -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NHsValBindsLR GhcPs -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcPs -> m (NHsValBindsLR GhcPs) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcPs -> m (NHsValBindsLR GhcPs) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcPs -> m (NHsValBindsLR GhcPs) Source #

Data (NHsValBindsLR GhcRn) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NHsValBindsLR GhcRn -> c (NHsValBindsLR GhcRn) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NHsValBindsLR GhcRn) Source #

toConstr :: NHsValBindsLR GhcRn -> Constr Source #

dataTypeOf :: NHsValBindsLR GhcRn -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> NHsValBindsLR GhcRn -> NHsValBindsLR GhcRn Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcRn -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcRn -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> NHsValBindsLR GhcRn -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NHsValBindsLR GhcRn -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcRn -> m (NHsValBindsLR GhcRn) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcRn -> m (NHsValBindsLR GhcRn) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcRn -> m (NHsValBindsLR GhcRn) Source #

Data (NHsValBindsLR GhcTc) Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NHsValBindsLR GhcTc -> c (NHsValBindsLR GhcTc) Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NHsValBindsLR GhcTc) Source #

toConstr :: NHsValBindsLR GhcTc -> Constr Source #

dataTypeOf :: NHsValBindsLR GhcTc -> DataType Source #

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

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

gmapT :: (forall b. Data b => b -> b) -> NHsValBindsLR GhcTc -> NHsValBindsLR GhcTc Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcTc -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NHsValBindsLR GhcTc -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> NHsValBindsLR GhcTc -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NHsValBindsLR GhcTc -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcTc -> m (NHsValBindsLR GhcTc) Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcTc -> m (NHsValBindsLR GhcTc) Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NHsValBindsLR GhcTc -> m (NHsValBindsLR GhcTc) Source #

data AbsBinds Source #

Typechecked, generalised bindings, used in the output to the type checker. See Note [AbsBinds].

Constructors

AbsBinds |

Fields

- abs_tvs :: [TyVar]
- abs_ev_vars :: [EvVar]

  Includes equality constraints

- abs_exports :: [ABExport]

  AbsBinds only gets used when idL = idR after renaming, but these need to be idL's for the collect... code in HsUtil to have the right type

- abs_ev_binds :: [TcEvBinds]

  Evidence bindings Why a list? See GHC.Tc.TyCl.Instance Note [Typechecking plan for instance declarations]

- abs_binds :: LHsBinds GhcTc

  Typechecked user bindings

- abs_sig :: Bool

#### Instances

Instances details

Data AbsBinds Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

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

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

toConstr :: AbsBinds -> Constr Source #

dataTypeOf :: AbsBinds -> DataType Source #

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

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

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

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

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

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

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

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

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

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

data ABExport Source #

Abstraction Bindings Export

Constructors

ABE |

Fields

- abe_poly :: Id

  Any INLINE pragma is attached to this Id

- abe_mono :: Id
- abe_wrap :: HsWrapper

  See Note [ABExport wrapper] Shape: (forall abs_tvs. abs_ev_vars => abe_mono) ~ abe_poly

- abe_prags :: TcSpecPrags

  SPECIALISE pragmas

#### Instances

Instances details

Data ABExport Source # |

Instance details

Defined in GHC.Hs.Instances

Methods

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

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

toConstr :: ABExport -> Constr Source #

dataTypeOf :: ABExport -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable ABExport Source # |
Instance details Defined in GHC.Hs.Binds Methods ppr :: ABExport -> SDoc Source #

type family XVarBindGhc (pL :: Pass) (pR :: Pass) where ... Source #

Equations

XVarBindGhc 'Typechecked 'Typechecked = NoExtField |
XVarBindGhc _1 _2 = DataConCantHappen |

data AnnPSB Source #

Constructors

AnnPSB |

Fields

- ap_pattern :: EpToken "pattern"
- ap_openc :: Maybe (EpToken "{")
- ap_closec :: Maybe (EpToken "}")
- ap_larrow :: Maybe (EpUniToken "<-" "\8592")
- ap_equal :: Maybe (EpToken "=")

#### Instances

Instances details

Data AnnPSB Source # |

Instance details

Defined in GHC.Hs.Binds

Methods

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

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

toConstr :: AnnPSB -> Constr Source #

dataTypeOf :: AnnPSB -> DataType Source #

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

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

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

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

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

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

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

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

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

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

NoAnn AnnPSB Source # |
Instance details Defined in GHC.Hs.Binds Methods noAnn :: AnnPSB Source #

setTcMultAnn :: Mult -> HsMultAnn GhcRn -> HsMultAnn GhcTc Source #

getTcMultAnn :: HsMultAnn GhcTc -> Mult Source #

data TcSpecPrags Source #

Type checker Specialisation Pragmas

`TcSpecPrags` conveys `SPECIALISE` pragmas from the type checker to the desugarer

Constructors

IsDefaultMethod | Super-specialised: a default method should be macro-expanded at every call site
SpecPrags [LTcSpecPrag] |

#### Instances

Instances details

Data TcSpecPrags Source # |

Instance details

Defined in GHC.Hs.Binds

Methods

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

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

toConstr :: TcSpecPrags -> Constr Source #

dataTypeOf :: TcSpecPrags -> DataType Source #

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

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

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

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

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

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

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

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

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

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

pprDeclList :: [SDoc] -> SDoc Source #

pprLHsBindsForUser :: forall (idL :: Pass) (idR :: Pass) (id2 :: Pass). (OutputableBndrId idL, OutputableBndrId idR, OutputableBndrId id2) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> [LSig (GhcPass id2)] -> [SDoc] Source #

pprLHsBinds :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc Source #

isEmptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR -> Bool Source #

emptyLocalBinds :: forall (a :: Pass) (b :: Pass). HsLocalBindsLR (GhcPass a) (GhcPass b) Source #

eqEmptyLocalBinds :: HsLocalBindsLR a b -> Bool Source #

isEmptyValBinds :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) -> Bool Source #

emptyValBindsIn :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) Source #

emptyValBindsOut :: forall (a :: Pass) (b :: Pass). HsValBindsLR (GhcPass a) (GhcPass b) Source #

emptyLHsBinds :: forall (idL :: Pass) idR. LHsBindsLR (GhcPass idL) idR Source #

plusHsValBinds :: forall (a :: Pass). HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) Source #

pprHsMultAnn :: forall (id :: Pass). OutputableBndrId id => HsMultAnn (GhcPass id) -> SDoc Source #

ppr_monobind :: forall (idL :: Pass) (idR :: Pass). (OutputableBndrId idL, OutputableBndrId idR) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc Source #

pprTicks :: SDoc -> SDoc -> SDoc Source #

pprTcSpecPrags :: TcSpecPrags -> SDoc Source #

isEmptyIPBindsPR :: forall (p :: Pass). HsIPBinds (GhcPass p) -> Bool Source #

isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool Source #

data AnnSig Source #

Constructors

AnnSig |

Fields

- asDcolon :: EpUniToken "::" "\8759"
- asPattern :: Maybe (EpToken "pattern")
- asDefault :: Maybe (EpToken "default")

#### Instances

Instances details

Data AnnSig Source # |

Instance details

Defined in GHC.Hs.Binds

Methods

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

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

toConstr :: AnnSig -> Constr Source #

dataTypeOf :: AnnSig -> DataType Source #

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

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

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

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

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

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

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

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

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

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

NoAnn AnnSig Source # |
Instance details Defined in GHC.Hs.Binds Methods noAnn :: AnnSig Source #

data AnnSpecSig Source #

Constructors

AnnSpecSig |

Fields

- ass_open :: EpaLocation
- ass_close :: EpToken "#-}"
- ass_dcolon :: TokDcolon
- ass_act :: ActivationAnn

#### Instances

Instances details

Data AnnSpecSig Source # |

Instance details

Defined in GHC.Hs.Binds

Methods

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

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

toConstr :: AnnSpecSig -> Constr Source #

dataTypeOf :: AnnSpecSig -> DataType Source #

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

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

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

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

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

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

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

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

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

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

NoAnn AnnSpecSig Source # |
Instance details Defined in GHC.Hs.Binds Methods noAnn :: AnnSpecSig Source #

newtype IdSig Source #

A type signature in generated code, notably the code generated for record selectors. We simply record the desired Id itself, replete with its name, type and IdDetails. Otherwise it's just like a type signature: there should be an accompanying binding

Constructors

IdSig |

Fields

- unIdSig :: Id

#### Instances

Instances details

Data IdSig Source # |

Instance details

Defined in GHC.Hs.Binds

Methods

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

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

toConstr :: IdSig -> Constr Source #

dataTypeOf :: IdSig -> DataType Source #

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

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

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

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

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

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

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

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

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

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

overlappingNamespaceSpecifiers :: NamespaceSpecifier -> NamespaceSpecifier -> Bool Source #

Check if namespace specifiers overlap, i.e. if they are equal or if at least one of them doesn't specify a namespace

coveredByNamespaceSpecifier :: NamespaceSpecifier -> NameSpace -> Bool Source #

Check if namespace is covered by a namespace specifier: * NoNamespaceSpecifier covers both namespaces * TypeNamespaceSpecifier covers the type namespace only * DataNamespaceSpecifier covers the data namespace only

type LTcSpecPrag = Located TcSpecPrag Source #

Located Type checker Specification Pragmas

data TcSpecPrag Source #

Type checker Specification Pragma

Constructors

SpecPrag Id HsWrapper InlinePragma | The Id to be specialised, a wrapper that specialises the polymorphic function, and inlining spec for the specialised function

#### Instances

Instances details

Data TcSpecPrag Source # |

Instance details

Defined in GHC.Hs.Binds

Methods

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

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

toConstr :: TcSpecPrag -> Constr Source #

dataTypeOf :: TcSpecPrag -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable TcSpecPrag Source # |
Instance details Defined in GHC.Hs.Binds Methods ppr :: TcSpecPrag -> SDoc Source #

noSpecPrags :: TcSpecPrags Source #

hasSpecPrags :: TcSpecPrags -> Bool Source #

isDefaultMethod :: TcSpecPrags -> Bool Source #

pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc Source #

pragSrcBrackets :: SourceText -> String -> SDoc -> SDoc Source #

Using SourceText in case the pragma was spelled differently or used mixed case

pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc Source #

extractSpecPragName :: SourceText -> String Source #

Extracts the name for a SPECIALIZE instance pragma. In `hsSigDoc`, the src field of `SpecInstSig` signature contains the SourceText for a SPECIALIZE instance pragma of the form: "SourceText {-# SPECIALIZE"

Extraction ensures that all variants of the pragma name (with a `Z` or an `S`) are output exactly as used in the pragma.

pprMinimalSig :: OutputableBndr name => LBooleanFormula (GenLocated l name) -> SDoc Source #

hsSigDoc :: forall (p :: Pass). IsPass p => Sig (GhcPass p) -> SDoc Source #

pragBrackets :: SDoc -> SDoc Source #

# Orphan instances

OutputableBndrId p => Outputable (FixitySig (GhcPass p)) Source # |
Instance details Methods ppr :: FixitySig (GhcPass p) -> SDoc Source #
OutputableBndrId p => Outputable (HsIPBinds (GhcPass p)) Source # |
Instance details Methods ppr :: HsIPBinds (GhcPass p) -> SDoc Source #
OutputableBndrId p => Outputable (IPBind (GhcPass p)) Source # |
Instance details Methods ppr :: IPBind (GhcPass p) -> SDoc Source #
Outputable (XRec pass (IdP pass)) => Outputable (RecordPatSynField pass) Source # |
Instance details Methods ppr :: RecordPatSynField pass -> SDoc Source #
OutputableBndrId p => Outputable (Sig (GhcPass p)) Source # |
Instance details Methods ppr :: Sig (GhcPass p) -> SDoc Source #
(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsBindLR (GhcPass pl) (GhcPass pr)) Source # |
Instance details Methods ppr :: HsBindLR (GhcPass pl) (GhcPass pr) -> SDoc Source #
(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsLocalBindsLR (GhcPass pl) (GhcPass pr)) Source # |
Instance details Methods ppr :: HsLocalBindsLR (GhcPass pl) (GhcPass pr) -> SDoc Source #
(OutputableBndrId pl, OutputableBndrId pr) => Outputable (HsValBindsLR (GhcPass pl) (GhcPass pr)) Source # |
Instance details Methods ppr :: HsValBindsLR (GhcPass pl) (GhcPass pr) -> SDoc Source #
(OutputableBndrId l, OutputableBndrId r) => Outputable (PatSynBind (GhcPass l) (GhcPass r)) Source # |
Instance details Methods ppr :: PatSynBind (GhcPass l) (GhcPass r) -> SDoc Source #