zephyr-0.5.3: Zephyr, tree-shaking for the PureScript language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.PureScript.DCE.Eval

Description

Evaluation of PureScript's expressions used in dead call elimnation.

Synopsis

Documentation

evaluate :: [Module Ann] -> [Module Ann] Source #

Evaluate expressions in a module:

  • Data.Eq.eq of two literals
  • Data.Array.index on a literal array
  • Object accessors
  • Semigroup operations (Array, String, Unit)
  • Semiring operations (Unit, Unit, Unit)

Keep stack of local identifiers from let and case expressions, ignoring the ones that are comming from abstractions (we are not reducing applications).