Copyright | (c) 2001 - 2004 Wolfgang Lux 2011 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 |
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.
Documentation
DataConstructor QualIdent Int [Ident] TypeScheme | Data constructor with original name, arity, list of record labels and type |
NewtypeConstructor QualIdent Ident TypeScheme | Newtype constructor with original name, record label and type (arity is always 1) |
Value QualIdent Bool Int TypeScheme | Value with original name, class method flag, 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) |
bindGlobalInfo :: (QualIdent -> a -> ValueInfo) -> ModuleIdent -> Ident -> a -> ValueEnv -> ValueEnv Source #
bindFun :: ModuleIdent -> Ident -> Bool -> Int -> TypeScheme -> ValueEnv -> ValueEnv Source #
qualBindFun :: ModuleIdent -> Ident -> Bool -> Int -> TypeScheme -> ValueEnv -> ValueEnv Source #
rebindFun :: ModuleIdent -> Ident -> Bool -> Int -> TypeScheme -> ValueEnv -> ValueEnv Source #
qualLookupValueUnique :: ModuleIdent -> QualIdent -> ValueEnv -> [ValueInfo] Source #