curry-frontend-0.4.2: Lexer, parser, type checker, etc. for the Curry language

Copyright(c) 2003 Wolfgang Lux Martin Engelke 2011 - 2015 Björn Peemöller
LicenseBSD-3-clause
Maintainerbjp@informatik.uni-kiel.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Transformations.Simplify

Description

After desugaring the source code, but before lifting local declarations, the compiler performs a few simple optimizations to improve the efficiency of the generated code. In addition, the optimizer replaces pattern bindings with simple variable bindings and selector functions.

Currently, the following optimizations are implemented:

  • Under certain conditions, inline local function definitions.
  • Remove unused declarations.
  • Compute minimal binding groups for let expressions.
  • Remove pattern bindings to constructor terms
  • Inline simple constants.

Documentation