ghc-7.10.2: The GHC API

Safe Haskell | None
Language | Haskell2010

TcSplice

Synopsis

- tcSpliceExpr :: HsSplice Name -> TcRhoType -> TcM (HsExpr TcId)
- tcTypedBracket :: HsBracket Name -> TcRhoType -> TcM (HsExpr TcId)
- tcUntypedBracket :: HsBracket Name -> [PendingRnSplice] -> TcRhoType -> TcM (HsExpr TcId)
- runQuasiQuoteExpr :: HsQuasiQuote RdrName -> RnM (LHsExpr RdrName)
- runQuasiQuotePat :: HsQuasiQuote RdrName -> RnM (LPat RdrName)
- runQuasiQuoteDecl :: HsQuasiQuote RdrName -> RnM [LHsDecl RdrName]
- runQuasiQuoteType :: HsQuasiQuote RdrName -> RnM (LHsType RdrName)
- runAnnotation :: CoreAnnTarget -> LHsExpr Name -> TcM Annotation
- runMetaE :: LHsExpr Id -> TcM (LHsExpr RdrName)
- runMetaP :: LHsExpr Id -> TcM (LPat RdrName)
- runMetaT :: LHsExpr Id -> TcM (LHsType RdrName)
- runMetaD :: LHsExpr Id -> TcM [LHsDecl RdrName]
- runQuasi :: Q a -> TcM a
- tcTopSpliceExpr :: Bool -> TcM (LHsExpr Id) -> TcM (LHsExpr Id)
- lookupThName_maybe :: Name -> TcM (Maybe Name)
- traceSplice :: SpliceInfo -> TcM ()
- data SpliceInfo = SpliceInfo {
  - spliceIsDeclaration :: Bool
  - spliceDescription :: String
  - spliceLocation :: Maybe SrcSpan
  - spliceSource :: Maybe SDoc
  - spliceGenerated :: SDoc
  }
- defaultRunMeta :: MetaHook TcM
- runMeta' :: Bool -> (hs_syn -> SDoc) -> (SrcSpan -> x -> TcM (Either MsgDoc hs_syn)) -> LHsExpr Id -> TcM hs_syn

# Documentation

tcSpliceExpr :: HsSplice Name -> TcRhoType -> TcM (HsExpr TcId) Source

tcTypedBracket :: HsBracket Name -> TcRhoType -> TcM (HsExpr TcId) Source

tcUntypedBracket :: HsBracket Name -> [PendingRnSplice] -> TcRhoType -> TcM (HsExpr TcId) Source

runQuasiQuoteExpr :: HsQuasiQuote RdrName -> RnM (LHsExpr RdrName) Source

runQuasiQuotePat :: HsQuasiQuote RdrName -> RnM (LPat RdrName) Source

runQuasiQuoteDecl :: HsQuasiQuote RdrName -> RnM [LHsDecl RdrName] Source

runQuasiQuoteType :: HsQuasiQuote RdrName -> RnM (LHsType RdrName) Source

runAnnotation :: CoreAnnTarget -> LHsExpr Name -> TcM Annotation Source

runMetaE :: LHsExpr Id -> TcM (LHsExpr RdrName) Source

runMetaP :: LHsExpr Id -> TcM (LPat RdrName) Source

runMetaT :: LHsExpr Id -> TcM (LHsType RdrName) Source

runMetaD :: LHsExpr Id -> TcM [LHsDecl RdrName] Source

runQuasi :: Q a -> TcM a Source

tcTopSpliceExpr :: Bool -> TcM (LHsExpr Id) -> TcM (LHsExpr Id) Source

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

traceSplice :: SpliceInfo -> TcM () Source

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

This duplicates code in RnSplice.lhs

data SpliceInfo Source

The splice data to be logged

duplicates code in RnSplice.lhs

Constructors

SpliceInfo |
Fields spliceIsDeclaration :: Bool spliceDescription :: String spliceLocation :: Maybe SrcSpan spliceSource :: Maybe SDoc spliceGenerated :: SDoc

defaultRunMeta :: MetaHook TcM Source

runMeta' :: Bool -> (hs_syn -> SDoc) -> (SrcSpan -> x -> TcM (Either MsgDoc hs_syn)) -> LHsExpr Id -> TcM hs_syn Source