- dispType :: TypeExpr -> String
- adjustTypeInfo :: Prog -> Prog
- labelVarsWithTypes :: Prog -> Prog
- uniqueTypeIndices :: Prog -> Prog
- genEquations :: Prog -> Prog
- elimFreeTypes :: Prog -> Prog

# Documentation

adjustTypeInfo :: Prog -> ProgSource

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 -> ProgSource

All identifiers that do not have type annotations are labelled with new type variables

uniqueTypeIndices :: Prog -> ProgSource

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 -> ProgSource

Specialises all type variables (part of adjustTypeInfo)

elimFreeTypes :: Prog -> ProgSource

Type variables that occur in the right hand side of a declaration
but not in its type signature are replaced by the unit type ().
This function requires that proper type information has been made
available by function `adjustTypeInfo`