zephyr-0.1.4: Zephyr tree shaking for PureScript Language

Safe HaskellNone
LanguageHaskell2010

Language.PureScript.DCE.Eval

Description

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

Synopsis

Documentation

dceEval :: forall m. (MonadError (DCEError Error) m, MonadWriter [DCEError Warning] m) => [Module Ann] -> m [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.