curry-base-0.2.3: Functions for manipulating Curry programs

Curry.ExtendedFlat.TypeInference

Synopsis

Documentation

dispType :: TypeExpr -> StringSource

Displays a TypeExpr as a string

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