ghc-9.10.3: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Tc.Gen.Splice

Contents

- Orphan instances

Description

Template Haskell splices

Synopsis

- tcTypedSplice :: Name -> LHsExpr GhcRn -> ExpRhoType -> TcM (HsExpr GhcTc)
- tcTypedBracket :: HsExpr GhcRn -> LHsExpr GhcRn -> ExpRhoType -> TcM (HsExpr GhcTc)
- tcUntypedBracket :: HsExpr GhcRn -> HsQuote GhcRn -> [PendingRnSplice] -> ExpRhoType -> TcM (HsExpr GhcTc)
- runAnnotation :: CoreAnnTarget -> LHsExpr GhcRn -> TcM Annotation
- getUntypedSpliceBody :: HsUntypedSpliceResult (HsExpr GhcRn) -> TcM (HsExpr GhcRn)
- runMetaE :: LHsExpr GhcTc -> TcM (LHsExpr GhcPs)
- runMetaP :: LHsExpr GhcTc -> TcM (LPat GhcPs)
- runMetaT :: LHsExpr GhcTc -> TcM (LHsType GhcPs)
- runMetaD :: LHsExpr GhcTc -> TcM [LHsDecl GhcPs]
- runQuasi :: Q a -> TcM a
- tcTopSpliceExpr :: SpliceType -> TcM (LHsExpr GhcTc) -> TcM (LHsExpr GhcTc)
- lookupThName_maybe :: Name -> TcM (Maybe Name)
- defaultRunMeta :: MetaHook TcM
- runMeta' :: Bool -> (hs_syn -> SDoc) -> (SrcSpan -> ForeignHValue -> TcM (Either RunSpliceFailReason hs_syn)) -> LHsExpr GhcTc -> TcM hs_syn
- runRemoteModFinalizers :: ThModFinalizers -> TcM ()
- finishTH :: TcM ()
- runTopSplice :: DelayedSplice -> TcM (HsExpr GhcTc)

# Documentation

tcTypedSplice :: Name -> LHsExpr GhcRn -> ExpRhoType -> TcM (HsExpr GhcTc) Source #

tcTypedBracket :: HsExpr GhcRn -> LHsExpr GhcRn -> ExpRhoType -> TcM (HsExpr GhcTc) Source #

tcUntypedBracket :: HsExpr GhcRn -> HsQuote GhcRn -> [PendingRnSplice] -> ExpRhoType -> TcM (HsExpr GhcTc) Source #

runAnnotation :: CoreAnnTarget -> LHsExpr GhcRn -> TcM Annotation Source #

getUntypedSpliceBody :: HsUntypedSpliceResult (HsExpr GhcRn) -> TcM (HsExpr GhcRn) Source #

runMetaE :: LHsExpr GhcTc -> TcM (LHsExpr GhcPs) Source #

runMetaP :: LHsExpr GhcTc -> TcM (LPat GhcPs) Source #

runMetaT :: LHsExpr GhcTc -> TcM (LHsType GhcPs) Source #

runMetaD :: LHsExpr GhcTc -> TcM [LHsDecl GhcPs] Source #

runQuasi :: Q a -> TcM a Source #

tcTopSpliceExpr :: SpliceType -> TcM (LHsExpr GhcTc) -> TcM (LHsExpr GhcTc) Source #

lookupThName_maybe :: Name -> TcM (Maybe Name) Source #

defaultRunMeta :: MetaHook TcM Source #

runMeta' :: Bool -> (hs_syn -> SDoc) -> (SrcSpan -> ForeignHValue -> TcM (Either RunSpliceFailReason hs_syn)) -> LHsExpr GhcTc -> TcM hs_syn Source #

runRemoteModFinalizers :: ThModFinalizers -> TcM () Source #

finishTH :: TcM () Source #

Releases the external interpreter state.

runTopSplice :: DelayedSplice -> TcM (HsExpr GhcTc) Source #

# Orphan instances

Quasi TcM Source # |

Instance details

Methods

qNewName :: String -> TcM Name Source #

qReport :: Bool -> String -> TcM () Source #

qRecover :: TcM a -> TcM a -> TcM a Source #

qLookupName :: Bool -> String -> TcM (Maybe Name) Source #

qReify :: Name -> TcM Info Source #

qReifyFixity :: Name -> TcM (Maybe Fixity) Source #

qReifyType :: Name -> TcM Type Source #

qReifyInstances :: Name -> [Type] -> TcM [Dec] Source #

qReifyRoles :: Name -> TcM [Role] Source #

qReifyAnnotations :: Data a => AnnLookup -> TcM [a] Source #

qReifyModule :: Module -> TcM ModuleInfo Source #

qReifyConStrictness :: Name -> TcM [DecidedStrictness] Source #

qLocation :: TcM Loc Source #

qRunIO :: IO a -> TcM a Source #

qGetPackageRoot :: TcM FilePath Source #

qAddDependentFile :: FilePath -> TcM () Source #

qAddTempFile :: String -> TcM FilePath Source #

qAddTopDecls :: [Dec] -> TcM () Source #

qAddForeignFilePath :: ForeignSrcLang -> String -> TcM () Source #

qAddModFinalizer :: Q () -> TcM () Source #

qAddCorePlugin :: String -> TcM () Source #

qGetQ :: Typeable a => TcM (Maybe a) Source #

qPutQ :: Typeable a => a -> TcM () Source #

qIsExtEnabled :: Extension -> TcM Bool Source #

qExtsEnabled :: TcM [Extension] Source #

qPutDoc :: DocLoc -> String -> TcM () Source #

qGetDoc :: DocLoc -> TcM (Maybe String) Source #