GHC.Core.Opt.DmdAnal

ghc-9.2.0.20210422: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Core.Opt.DmdAnal

Synopsis

- newtype DmdAnalOpts = DmdAnalOpts {
  - dmd_strict_dicts :: Bool
  }
- dmdAnalProgram :: DmdAnalOpts -> FamInstEnvs -> [CoreRule] -> CoreProgram -> CoreProgram

# Documentation

newtype DmdAnalOpts Source #

Options for the demand analysis

Constructors

DmdAnalOpts |
Fields dmd_strict_dicts :: Bool Use strict dictionaries

dmdAnalProgram :: DmdAnalOpts -> FamInstEnvs -> [CoreRule] -> CoreProgram -> CoreProgram Source #

Outputs a new copy of the Core program in which binders have been annotated with demand and strictness information.

Note: use `seqBinds` on the result to avoid leaks due to lazyness (cf Note [Stamp out space leaks in demand analysis])