ghc-9.2.3: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.HsToCore.Expr

Synopsis

Documentation

dsLExpr :: LHsExpr GhcTc -> DsM CoreExpr Source #

Replace the body of the function 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 "compiler.GHCHsToCoreExpr.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