TcSplice

ghc-7.10.3: 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)

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 ()

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

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

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