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

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.Meta

Description

Metaprogramming types

Synopsis

- data MetaRequest
  - = MetaE (LHsExpr GhcPs -> MetaResult)
  - | MetaP (LPat GhcPs -> MetaResult)
  - | MetaT (LHsType GhcPs -> MetaResult)
  - | MetaD ([LHsDecl GhcPs] -> MetaResult)
  - | MetaAW (Serialized -> MetaResult)
- type MetaHook (f :: Type -> Type) = MetaRequest -> LHsExpr GhcTc -> f MetaResult
- data MetaResult
- metaRequestE :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsExpr GhcPs)
- metaRequestP :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LPat GhcPs)
- metaRequestT :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsType GhcPs)
- metaRequestD :: Functor f => MetaHook f -> LHsExpr GhcTc -> f [LHsDecl GhcPs]
- metaRequestAW :: Functor f => MetaHook f -> LHsExpr GhcTc -> f Serialized

# Documentation

data MetaRequest #

The supported metaprogramming result types

Constructors

MetaE (LHsExpr GhcPs -> MetaResult) |
MetaP (LPat GhcPs -> MetaResult) |
MetaT (LHsType GhcPs -> MetaResult) |
MetaD ([LHsDecl GhcPs] -> MetaResult) |
MetaAW (Serialized -> MetaResult) |

type MetaHook (f :: Type -> Type) = MetaRequest -> LHsExpr GhcTc -> f MetaResult #

data MetaResult #

data constructors not exported to ensure correct result type

#### Instances

Instances details

Outputable MetaResult # |
Instance details Defined in GHC.Types.Meta Methods ppr :: MetaResult -> SDoc #

metaRequestE :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsExpr GhcPs) #

metaRequestP :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LPat GhcPs) #

metaRequestT :: Functor f => MetaHook f -> LHsExpr GhcTc -> f (LHsType GhcPs) #

metaRequestD :: Functor f => MetaHook f -> LHsExpr GhcTc -> f [LHsDecl GhcPs] #

metaRequestAW :: Functor f => MetaHook f -> LHsExpr GhcTc -> f Serialized #