85802bcc42118801529259ffa56b3635ab63cf75
[ghc-hetmet.git] / ghc / compiler / typecheck / BackSubst.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface BackSubst where
3 import Bag(Bag)
4 import CmdLineOpts(GlobalSwitch)
5 import HsBinds(Bind, Binds, MonoBinds, Sig)
6 import HsExpr(Expr)
7 import HsLit(Literal)
8 import HsMatches(GRHSsAndBinds, Match)
9 import HsPat(TypecheckedPat)
10 import Id(Id, IdDetails)
11 import IdInfo(IdInfo)
12 import Inst(Inst)
13 import Maybes(Labda)
14 import PreludeGlaST(_MutableArray)
15 import Pretty(PprStyle, PrettyRep)
16 import SplitUniq(SplitUniqSupply)
17 import SrcLoc(SrcLoc)
18 import Subst(Subst)
19 import TyVar(TyVar)
20 import UniType(UniType)
21 import Unique(Unique)
22 data Binds a b  {-# GHC_PRAGMA EmptyBinds | ThenBinds (Binds a b) (Binds a b) | SingleBind (Bind a b) | BindWith (Bind a b) [Sig a] | AbsBinds [TyVar] [Id] [(Id, Id)] [(Inst, Expr a b)] (Bind a b) #-}
23 data MonoBinds a b      {-# GHC_PRAGMA EmptyMonoBinds | AndMonoBinds (MonoBinds a b) (MonoBinds a b) | PatMonoBind b (GRHSsAndBinds a b) SrcLoc | VarMonoBind Id (Expr a b) | FunMonoBind a [Match a b] SrcLoc #-}
24 data TypecheckedPat     {-# GHC_PRAGMA WildPat UniType | VarPat Id | LazyPat TypecheckedPat | AsPat Id TypecheckedPat | ConPat Id UniType [TypecheckedPat] | ConOpPat TypecheckedPat Id TypecheckedPat UniType | ListPat UniType [TypecheckedPat] | TuplePat [TypecheckedPat] | LitPat Literal UniType | NPat Literal UniType (Expr Id TypecheckedPat) | NPlusKPat Id Literal UniType (Expr Id TypecheckedPat) (Expr Id TypecheckedPat) (Expr Id TypecheckedPat) #-}
25 data Id         {-# GHC_PRAGMA Id Unique UniType IdInfo IdDetails #-}
26 data Subst      {-# GHC_PRAGMA MkSubst (_MutableArray _RealWorld Int (Labda UniType)) [(Int, Bag (Int, Labda UniType))] (_State _RealWorld) Int #-}
27 applyTcSubstToBinds :: Binds Id TypecheckedPat -> (GlobalSwitch -> Bool) -> [UniType] -> Subst -> SplitUniqSupply -> Bag (PprStyle -> Int -> Bool -> PrettyRep) -> SrcLoc -> (Binds Id TypecheckedPat, Subst, Bag (PprStyle -> Int -> Bool -> PrettyRep))
28         {-# GHC_PRAGMA _A_ 1 _U_ 2222222 _N_ _S_ "S" _N_ _N_ #-}
29