Type substitutions on type-annotated AnnotatedFlatCurry
Author: Bjoern Peemoeller
Version: September 2014
showAFCSubst
:: Map Int TypeExpr -> String
|
emptyAFCSubst
:: Map Int TypeExpr
The empty substitution |
lookupAFCSubst
:: Map Int TypeExpr -> Int -> Maybe TypeExpr
Searches the substitution for a mapping from the given variable index to a term. |
substFunc
:: Map Int TypeExpr -> AFuncDecl TypeExpr -> AFuncDecl TypeExpr
Applies a substitution to a function. |
substRule
:: Map Int TypeExpr -> ARule TypeExpr -> ARule TypeExpr
Applies a substitution to a type expression. |
substExpr
:: Map Int TypeExpr -> AExpr TypeExpr -> AExpr TypeExpr
Applies a substitution to a type expression. |
substSnd
:: Map Int TypeExpr -> (a,TypeExpr) -> (a,TypeExpr)
|
substBranch
:: Map Int TypeExpr -> ABranchExpr TypeExpr -> ABranchExpr TypeExpr
Applies a substitution to a branch expression. |
substPattern
:: Map Int TypeExpr -> APattern TypeExpr -> APattern TypeExpr
Applies a substitution to a pattern. |
subst
:: Map Int TypeExpr -> TypeExpr -> TypeExpr
Looks up a type in a substitution and converts the resulting Term to a TypeExpr. |
The (abstract) data type for substitutions on TypeExpr.
Type synonym: AFCSubst = Map TVarIndex TypeExpr
|
The empty substitution
|
Searches the substitution for a mapping from the given variable index to a term.
|
Applies a substitution to a function.
|
Applies a substitution to a type expression.
|
Applies a substitution to a type expression.
|
Applies a substitution to a branch expression.
|
Applies a substitution to a pattern.
|
Looks up a type in a substitution and converts the resulting Term to a TypeExpr. Returns a given default value if the lookup fails.
|