ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

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 = 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 Source #

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 = MetaRequest -> LHsExpr GhcTc -> f MetaResult Source #

data MetaResult Source #

data constructors not exported to ensure correct result type

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

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

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

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

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