Copyright | (c) 1999 - 2004 Wolfgang Lux Martin Engelke Björn Peemöller 2015 Jan Tikovsky 2016 Finn Teegen |
---|---|
License | BSD-3-clause |
Maintainer | bjp@informatik.uni-kiel.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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.
Documentation
syntaxCheck :: [KnownExtension] -> TCEnv -> ValueEnv -> Module () -> ((Module (), [KnownExtension]), [Message]) Source #