[project @ 1996-02-06 14:32:22 by dnt]
[ghc-hetmet.git] / ghc / compiler / typecheck / Subst.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface Subst where
3 import Bag(Bag)
4 import Class(Class)
5 import Maybes(Labda)
6 import PreludeGlaST(_MutableArray)
7 import TyCon(TyCon)
8 import TyVar(TyVar, TyVarTemplate)
9 import UniType(UniType)
10 import Unique(Unique)
11 data Subst 
12 data SubstResult   = SubstOK | OccursCheck TyVar UniType | AlreadyBound UniType
13 data TyVar 
14 data UniType 
15 applySubstToThetaTy :: Subst -> [(Class, UniType)] -> (Subst, [(Class, UniType)])
16 applySubstToTy :: Subst -> UniType -> (Subst, UniType)
17 applySubstToTyVar :: Subst -> TyVar -> (Subst, UniType)
18 combineSubstUndos :: Subst -> Subst
19 extendSubst :: TyVar -> UniType -> Subst -> (Subst, SubstResult)
20 getSubstTyVarUnique :: Subst -> (Subst, Unique)
21 getSubstTyVarUniques :: Int -> Subst -> (Subst, [Unique])
22 mkEmptySubst :: Int -> Subst
23 pushSubstUndos :: Subst -> Subst
24 undoSubstUndos :: Subst -> Subst
25