GHC.Rename.Splice

ghc-9.10.0.20240426: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Rename.Splice

Synopsis

- rnTopSpliceDecls :: HsUntypedSplice GhcPs -> RnM ([LHsDecl GhcPs], FreeVars)
- rnTypedSplice :: LHsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars)
- rnSpliceType :: HsUntypedSplice GhcPs -> RnM (HsType GhcRn, FreeVars)
- rnUntypedSpliceExpr :: HsUntypedSplice GhcPs -> RnM (HsExpr GhcRn, FreeVars)
- rnSplicePat :: HsUntypedSplice GhcPs -> RnM ((HsUntypedSplice GhcRn, HsUntypedSpliceResult (LPat GhcPs)), FreeVars)
- rnSpliceTyPat :: HsUntypedSplice GhcPs -> RnM ((HsUntypedSplice GhcRn, HsUntypedSpliceResult (LHsType GhcPs)), FreeVars)
- rnSpliceDecl :: SpliceDecl GhcPs -> RnM (SpliceDecl GhcRn, FreeVars)
- rnTypedBracket :: HsExpr GhcPs -> LHsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars)
- rnUntypedBracket :: HsExpr GhcPs -> HsQuote GhcPs -> RnM (HsExpr GhcRn, FreeVars)
- checkThLocalName :: Name -> RnM ()
- traceSplice :: SpliceInfo -> TcM ()
- data SpliceInfo = SpliceInfo {
  - spliceDescription :: String
  - spliceSource :: Maybe (LHsExpr GhcRn)
  - spliceIsDecl :: Bool
  - spliceGenerated :: SDoc
  }
- checkThLocalTyName :: Name -> RnM ()

# Documentation

rnTopSpliceDecls :: HsUntypedSplice GhcPs -> RnM ([LHsDecl GhcPs], FreeVars) Source #

rnTypedSplice :: LHsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars) Source #

rnSpliceType :: HsUntypedSplice GhcPs -> RnM (HsType GhcRn, FreeVars) Source #

rnUntypedSpliceExpr :: HsUntypedSplice GhcPs -> RnM (HsExpr GhcRn, FreeVars) Source #

rnSplicePat :: HsUntypedSplice GhcPs -> RnM ((HsUntypedSplice GhcRn, HsUntypedSpliceResult (LPat GhcPs)), FreeVars) Source #

Rename a splice pattern. See Note [rnSplicePat]

rnSpliceTyPat :: HsUntypedSplice GhcPs -> RnM ((HsUntypedSplice GhcRn, HsUntypedSpliceResult (LHsType GhcPs)), FreeVars) Source #

Rename a splice type pattern. Much the same as `rnSplicePat`, but works with LHsType instead of LPat

rnSpliceDecl :: SpliceDecl GhcPs -> RnM (SpliceDecl GhcRn, FreeVars) Source #

rnTypedBracket :: HsExpr GhcPs -> LHsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars) Source #

rnUntypedBracket :: HsExpr GhcPs -> HsQuote GhcPs -> RnM (HsExpr GhcRn, FreeVars) Source #

checkThLocalName :: Name -> RnM () Source #

traceSplice :: SpliceInfo -> TcM () Source #

outputs splice information for 2 flags which have different output formats: `-ddump-splices` and `-dth-dec-file`

data SpliceInfo Source #

The splice data to be logged

Constructors

SpliceInfo |
Fields spliceDescription :: String spliceSource :: Maybe (LHsExpr GhcRn) spliceIsDecl :: Bool spliceGenerated :: SDoc

checkThLocalTyName :: Name -> RnM () Source #