curry-frontend-1.0.4: Compile the functional logic language Curry to several intermediate formats

Copyright(c) 1999 - 2004 Wolfgang Lux
Martin Engelke
Björn Peemöller
2015 Jan Tikovsky
2016 Finn Teegen
Safe HaskellNone



After the type declarations have been checked, the compiler performs a syntax check on the remaining declarations. This check disambiguates nullary data constructors and variables which -- in contrast to Haskell -- is not possible on purely syntactic criteria. In addition, this pass checks for undefined as well as ambiguous variables and constructors. In order to allow lifting of local definitions in later phases, all local variables are renamed by adding a key identifying their scope. Therefore, all variables defined in the same scope share the same key so that multiple definitions can be recognized. Finally, all (adjacent) equations of a function are merged into a single definition.