Copyright | (c) Christian Maeder and Uni Bremen 2003-2005 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
substitution and unification of types
- compSubst :: Subst -> Subst -> Subst
- instScheme :: TypeMap -> Int -> TypeScheme -> TypeScheme -> Bool
- specializedScheme :: ClassMap -> [TypeArg] -> [TypeArg] -> Bool
- toEnvState :: State Int a -> State Env a
- toSchemes :: (Type -> Type -> a) -> TypeScheme -> TypeScheme -> State Int a
- asSchemes :: Int -> (Type -> Type -> a) -> TypeScheme -> TypeScheme -> a
- substTypeArg :: Subst -> TypeArg -> VarKind
- mapArgs :: Subst -> [(Id, Type)] -> [TypeArg] -> [(Type, VarKind)]
- freshInst :: TypeScheme -> State Int (Type, [(Type, VarKind)])
- inc :: State Int Int
- freshVar :: Id -> State Int (Id, Int)
- mkSingleSubst :: (Id, RawKind) -> State Int Type
- mkSubst :: [(Id, RawKind)] -> State Int [Type]
- type Subst = Map Int Type
- eps :: Subst
- flatKind :: Type -> RawKind
- noAbs :: Type -> Bool
- match :: TypeMap -> (Id -> Id -> Bool) -> (Bool, Type) -> (Bool, Type) -> Result Subst
- shapeMatch :: TypeMap -> Type -> Type -> Result Subst
- subsume :: TypeMap -> Type -> Type -> Bool
- substGen :: Subst -> Type -> Type
- getTypeOf :: Monad m => Term -> m Type
- subst :: Subst -> Type -> Type
- showDocWithPos :: Type -> ShowS
- uniResult :: String -> Type -> String -> Type -> Result Subst
- generalize :: [TypeArg] -> Type -> Type
- genTypeArgs :: [TypeArg] -> [TypeArg]
Documentation
instScheme :: TypeMap -> Int -> TypeScheme -> TypeScheme -> Bool
test if second scheme is a substitution instance
specializedScheme :: ClassMap -> [TypeArg] -> [TypeArg] -> Bool
toSchemes :: (Type -> Type -> a) -> TypeScheme -> TypeScheme -> State Int a
asSchemes :: Int -> (Type -> Type -> a) -> TypeScheme -> TypeScheme -> a
substTypeArg :: Subst -> TypeArg -> VarKind
showDocWithPos :: Type -> ShowS
generalize :: [TypeArg] -> Type -> Type
make representation of bound variables unique
genTypeArgs :: [TypeArg] -> [TypeArg]