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

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

Env.Value

Description

In order to test the type correctness of a module, the compiler needs to determine the type of every data constructor, function and variable in the module. For the purpose of type checking there is no need for distinguishing between variables and functions. For all objects their original names and their types are saved. In addition, the compiler also saves the (optional) list of field labels for data and newtype constructors. Data constructors and functions also contain arity information. On import two values are considered equal if their original names match.

Synopsis

Documentation

data ValueInfo Source #

Constructors

DataConstructor QualIdent Int [Ident] ExistTypeScheme

Data constructor with original name, arity, list of record labels and type

NewtypeConstructor QualIdent Ident ExistTypeScheme

Newtype constructor with original name, record label and type (arity is always 1)

Value QualIdent Int TypeScheme

Value with original name, arity and type

Label QualIdent [QualIdent] TypeScheme

Record label with original name, list of constructors for which label is valid field and type (arity is always 1)

ppTypes :: ModuleIdent -> ValueEnv -> Doc Source #

Pretty-printing the types from the type environment