Hets - the Heterogeneous Tool Set

Copyright(c) Christian Maeder and Uni Bremen 2003-2005
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityexperimental
Portabilityportable
Safe HaskellNone

HasCASL.Unify

Description

substitution and unification of types

Synopsis

Documentation

compSubst :: Subst -> Subst -> Subst

composition (reversed: first substitution first!)

instScheme :: TypeMap -> Int -> TypeScheme -> TypeScheme -> Bool

test if second scheme is a substitution instance

toEnvState :: State Int a -> State Env a

lift State Int to State Env

toSchemes :: (Type -> Type -> a) -> TypeScheme -> TypeScheme -> State Int a

asSchemes :: Int -> (Type -> Type -> a) -> TypeScheme -> TypeScheme -> a

mapArgs :: Subst -> [(Id, Type)] -> [TypeArg] -> [(Type, VarKind)]

type Subst = Map Int Type

match :: TypeMap -> (Id -> Id -> Bool) -> (Bool, Type) -> (Bool, Type) -> Result Subst

substGen :: Subst -> Type -> Type

substitute generic variables with negative index

getTypeOf :: Monad m => Term -> m Type

subst :: Subst -> Type -> Type

substitute variables with positive index

generalize :: [TypeArg] -> Type -> Type

make representation of bound variables unique