ghc-lib-parser-9.6.2.20230523: The GHC API, decoupled from GHC versions
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Core.Lint

Contents

Synopsis

Documentation

data LintFlags Source #

Constructors

LF 

Fields

data StaticPtrCheck Source #

Constructors

AllowAnywhere

Allow makeStatic to occur anywhere.

AllowAtTopLevel

Allow makeStatic calls at the top-level only.

RejectEverywhere

Reject any makeStatic occurrence.

Instances

Instances details
Eq StaticPtrCheck Source # 
Instance details

Defined in GHC.Core.Lint

data LintConfig Source #

Constructors

LintConfig 

Fields

lintCoreBindings' :: LintConfig -> CoreProgram -> WarnsAndErrs Source #

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

lintUnfolding Source #

Arguments

:: Bool

True = is a compulsory unfolding

-> LintConfig 
-> SrcLoc 
-> CoreExpr 
-> Maybe (Bag SDoc) 

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 
-> LintConfig 
-> SDoc

The source of the linted axioms

-> [CoAxiom Branched] 
-> IO () 

Debug output

data EndPassConfig Source #

Configuration for boilerplate operations at the end of a compilation pass producing Core.

Constructors

EndPassConfig 

Fields

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