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

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

Checks.TypeCheck

Description

This module implements the type checker of the Curry compiler. The type checker is invoked after the syntactic correctness of the program has been verified. Local variables have been renamed already. Thus the compiler can maintain a flat type environment (which is necessary in order to pass the type information to later phases of the compiler). The type checker now checks the correct typing of all expressions and also verifies that the type signatures given by the user match the inferred types. The type checker uses the algorithm by Damas and Milner (1982) for inferring the types of unannotated declarations, but allows for polymorphic recursion when a type annotation is present.

Documentation