Copyright | (c) 2001 - 2003 Wolfgang Lux 2011 - 2015 Björn Peemöller 2016 - 2017 Finn Teegen |
---|---|
License | BSD-3-clause |
Maintainer | bjp@informatik.uni-kiel.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
After desugaring and simplifying the code, the compiler lifts all local function declarations to the top-level keeping only local variable declarations. The algorithm used here is similar to Johnsson's, consisting of two phases. First, we abstract each local function declaration, adding its free variables as initial parameters and update all calls to take these variables into account. Second, all local function declarations are collected and lifted to the top-level.