Infer type arguments required to properly know the types of free variables
Author: Marc Andre Wittorf
usedImportsExp
:: [((String,String),(TypeExpr,[Int]))] -> AExpr TypeExpr -> [Int]
Find all type variables used for free variables in an expression |
unifyTypes
:: TypeExpr -> TypeExpr -> [(Int,TypeExpr)]
Unify two types |
findNeededImports
:: [((String,String),(TypeExpr,[Int]))] -> AProg TypeExpr -> [((String,String),(TypeExpr,[Int]))]
Infer type arguments a function needs for all functions in a modules This function iterates over all functions until it has reached a fixpoint, so it even finds a correct solution for mutually recursive function calls |
Find all type variables used for free variables in an expression
|
Unify two types
|
Infer type arguments a function needs for all functions in a modules This function iterates over all functions until it has reached a fixpoint, so it even finds a correct solution for mutually recursive function calls
|