[project @ 1996-01-18 16:33:17 by partain]
[ghc-hetmet.git] / ghc / compiler / typecheck / TcInstDcls.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface TcInstDcls where
3 import Bag(Bag)
4 import Class(Class, ClassOp)
5 import CmdLineOpts(GlobalSwitch)
6 import E(E)
7 import HsBinds(Binds, MonoBinds, Sig)
8 import HsDecls(InstDecl, SpecialisedInstanceSig)
9 import HsExpr(Expr)
10 import HsPat(InPat, TypecheckedPat)
11 import HsPragmas(InstancePragmas)
12 import Id(Id)
13 import IdInfo(SpecEnv)
14 import Inst(Inst)
15 import InstEnv(InstTemplate)
16 import LIE(LIE)
17 import Name(Name)
18 import PreludePS(_PackedString)
19 import Pretty(PprStyle, PrettyRep)
20 import SplitUniq(SplitUniqSupply)
21 import SrcLoc(SrcLoc)
22 import Subst(Subst)
23 import TcMonad(TcResult)
24 import TyCon(TyCon)
25 import TyVar(TyVar, TyVarTemplate)
26 import UniType(UniType)
27 import UniqFM(UniqFM)
28 data InstInfo   = InstInfo Class [TyVarTemplate] UniType [(Class, UniType)] [(Class, UniType)] Id [Id] (MonoBinds Name (InPat Name)) Bool _PackedString SrcLoc [Sig Name]
29 buildInstanceEnvs :: Bag InstInfo -> (GlobalSwitch -> Bool) -> [UniType] -> Subst -> SplitUniqSupply -> Bag (PprStyle -> Int -> Bool -> PrettyRep) -> SrcLoc -> TcResult (Class -> ([(UniType, InstTemplate)], ClassOp -> SpecEnv))
30 mkInstanceRelatedIds :: E -> Bool -> _PackedString -> InstancePragmas Name -> a -> Class -> [TyVarTemplate] -> UniType -> [(Class, UniType)] -> [Sig Name] -> (GlobalSwitch -> Bool) -> [UniType] -> Subst -> SplitUniqSupply -> Bag (PprStyle -> Int -> Bool -> PrettyRep) -> SrcLoc -> TcResult (Id, [(Class, UniType)], [Id])
31 processInstBinds :: E -> [TyVar] -> (Int -> (GlobalSwitch -> Bool) -> [UniType] -> Subst -> SplitUniqSupply -> Bag (PprStyle -> Int -> Bool -> PrettyRep) -> SrcLoc -> (Expr Id TypecheckedPat, Subst, Bag (PprStyle -> Int -> Bool -> PrettyRep))) -> [TyVar] -> [Inst] -> [Id] -> MonoBinds Name (InPat Name) -> (GlobalSwitch -> Bool) -> [UniType] -> Subst -> SplitUniqSupply -> Bag (PprStyle -> Int -> Bool -> PrettyRep) -> SrcLoc -> TcResult ([Inst], MonoBinds Id TypecheckedPat)
32 tcInstDecls1 :: E -> UniqFM Class -> UniqFM TyCon -> [InstDecl Name (InPat Name)] -> (GlobalSwitch -> Bool) -> [UniType] -> Subst -> SplitUniqSupply -> Bag (PprStyle -> Int -> Bool -> PrettyRep) -> SrcLoc -> (Bag InstInfo, Subst, Bag (PprStyle -> Int -> Bool -> PrettyRep))
33 tcInstDecls2 :: E -> Bag InstInfo -> (GlobalSwitch -> Bool) -> [UniType] -> Subst -> SplitUniqSupply -> Bag (PprStyle -> Int -> Bool -> PrettyRep) -> SrcLoc -> ((LIE, Binds Id TypecheckedPat), Subst, Bag (PprStyle -> Int -> Bool -> PrettyRep))
34 tcSpecInstSigs :: E -> UniqFM Class -> UniqFM TyCon -> Bag InstInfo -> [SpecialisedInstanceSig Name] -> (GlobalSwitch -> Bool) -> [UniType] -> Subst -> SplitUniqSupply -> Bag (PprStyle -> Int -> Bool -> PrettyRep) -> SrcLoc -> TcResult (Bag InstInfo)
35