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

GHC.Core.Lint

Contents

Synopsis

Documentation

lintCoreBindings :: DynFlags -> CoreToDo -> [Var] -> CoreProgram -> WarnsAndErrs Source #

Type-check a CoreProgram. See Note [Core Lint guarantee].

lintUnfolding Source #

Arguments

:: Bool

True = is a compulsory unfolding

-> DynFlags 
-> SrcLoc 
-> VarSet

Treat these as in scope

-> CoreExpr 
-> Maybe (Bag SDoc) 

lintInteractiveExpr Source #

Arguments

:: SDoc

The source of the linted expression

-> HscEnv 
-> CoreExpr 
-> IO () 

lintAnnots :: SDoc -> (ModGuts -> CoreM ModGuts) -> ModGuts -> CoreM ModGuts Source #

This checks whether a pass correctly looks through debug annotations (SourceNote). This works a bit different from other consistency checks: We check this by running the given task twice, noting all differences between the results.

lintAxioms Source #

Arguments

:: Logger 
-> DynFlags 
-> SDoc

The source of the linted axioms

-> [CoAxiom Branched] 
-> IO () 

Debug output

displayLintResults Source #

Arguments

:: Logger 
-> Bool

If True, display linter warnings. If False, ignore linter warnings.

-> SDoc

The source of the linted program

-> SDoc

The linted program, pretty-printed

-> WarnsAndErrs 
-> IO ()