Copyright | (c) 2003 Wolfgang Lux Martin Engelke 2011 - 2015 Björn Peemöller 2016 Finn Teegen |
---|---|
License | BSD-3-clause |
Maintainer | bjp@informatik.uni-kiel.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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.