ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Core.Opt.OccurAnal

Synopsis

- occurAnalysePgm :: Module -> (Id -> Bool) -> (Activation -> Bool) -> [CoreRule] -> CoreProgram -> CoreProgram
- occurAnalyseExpr :: CoreExpr -> CoreExpr
- zapLambdaBndrs :: CoreExpr -> FullArgCount -> CoreExpr
- data BinderSwapDecision
  - = NoBinderSwap
  - | DoBinderSwap OutVar MCoercion
- scrutOkForBinderSwap :: OutExpr -> BinderSwapDecision

# Documentation

occurAnalysePgm :: Module -> (Id -> Bool) -> (Activation -> Bool) -> [CoreRule] -> CoreProgram -> CoreProgram Source #

occurAnalyseExpr :: CoreExpr -> CoreExpr Source #

Do occurrence analysis, and discard occurrence info returned

zapLambdaBndrs :: CoreExpr -> FullArgCount -> CoreExpr Source #

data BinderSwapDecision Source #

See bBinderSwaOk.

Constructors

NoBinderSwap |
DoBinderSwap OutVar MCoercion |

scrutOkForBinderSwap :: OutExpr -> BinderSwapDecision Source #