Copyright | (c) 2009, Holger Siegel |
---|---|
License | BSD-3-clause |
Maintainer | bjp@informatik.uni-kiel.de |
Stability | experimental |
Portability | non-portable (FlexibleContexts, PatternGuards) |
Safe Haskell | None |
Language | Haskell2010 |
Curry.ExtendedFlat.TypeInference
Description
The function adjustTypeInfos annotates every declaration, identifier, and application with exact type information.
This information is derived from the more general information found in the AST.
- dispType :: TypeExpr -> String
- adjustTypeInfo :: Prog -> Prog
- labelVarsWithTypes :: Prog -> Prog
- uniqueTypeIndices :: Prog -> Prog
- genEquations :: Prog -> Prog
Documentation
adjustTypeInfo :: Prog -> Prog Source #
For every identifier that occurs in the right hand side of a declaration, the polymorphic type variables in its type label are replaced by concrete types.
labelVarsWithTypes :: Prog -> Prog Source #
All identifiers that do not have type annotations are labelled with new type variables
uniqueTypeIndices :: Prog -> Prog Source #
Type variables that occur in the type annotations of QNames are replaced by newly introduced type variables, so that further unification steps will not interfere with parametric polymorphism
genEquations :: Prog -> Prog Source #
Specialises all type variables (part of adjustTypeInfo)