ghc-lib-0.20201101: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

GHC.HsToCore.Expr

Synopsis

Documentation

dsExpr :: HsExpr GhcTc -> DsM CoreExpr Source #

dsLExpr :: LHsExpr GhcTc -> DsM CoreExpr Source #

Replace the body of the fucntion with this block to test the hsExprType function in GHC.Tc.Utils.Zonk: putSrcSpanDs loc $ do { core_expr <- dsExpr e ; if debugIsOn && not ( exprType core_expr eqType hsExprType e -- ) then (assertPprPanic "compilerGHCHsToCore/Expr.hs" 249 ( ppr e + dcolon + ppr (hsExprType e) $$ -- ppr core_expr + dcolon + ppr (exprType core_expr) )) else return ()

dsLExprNoLP :: LHsExpr GhcTc -> DsM CoreExpr Source #

Variant of dsLExpr that ensures that the result is not levity polymorphic. This should be used when the resulting expression will be an argument to some other function. See Note [Levity polymorphism checking] in GHC.HsToCore.Monad See Note [Levity polymorphism invariants] in GHC.Core

dsLocalBinds :: LHsLocalBinds GhcTc -> CoreExpr -> DsM CoreExpr Source #

dsValBinds :: HsValBinds GhcTc -> CoreExpr -> DsM CoreExpr Source #

dsLit :: HsLit GhcRn -> DsM CoreExpr Source #

dsSyntaxExpr :: SyntaxExpr GhcTc -> [CoreExpr] -> DsM CoreExpr Source #