[project @ 1996-01-11 14:06:51 by partain]
[ghc-hetmet.git] / ghc / compiler / abstractSyn / HsBinds.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface HsBinds where
3 import HsExpr(Expr)
4 import HsMatches(GRHSsAndBinds, Match)
5 import HsPat(InPat, TypecheckedPat)
6 import HsPragmas(ClassOpPragmas, GenPragmas)
7 import HsTypes(PolyType)
8 import Id(Id)
9 import Inst(Inst)
10 import Maybes(Labda)
11 import Name(Name)
12 import Outputable(NamedThing, Outputable)
13 import PreludePS(_PackedString)
14 import ProtoName(ProtoName)
15 import SimplEnv(UnfoldingGuidance)
16 import SrcLoc(SrcLoc)
17 import TyVar(TyVar)
18 data Bind a b   = EmptyBind | NonRecBind (MonoBinds a b) | RecBind (MonoBinds a b)
19 data Binds a b   = 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)
20 data MonoBinds a b   = 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
21 type ProtoNameBind = Bind ProtoName (InPat ProtoName)
22 type ProtoNameBinds = Binds ProtoName (InPat ProtoName)
23 type ProtoNameClassOpSig = Sig ProtoName
24 type ProtoNameMonoBinds = MonoBinds ProtoName (InPat ProtoName)
25 type ProtoNameSig = Sig ProtoName
26 type RenamedBind = Bind Name (InPat Name)
27 type RenamedBinds = Binds Name (InPat Name)
28 type RenamedClassOpSig = Sig Name
29 type RenamedMonoBinds = MonoBinds Name (InPat Name)
30 type RenamedSig = Sig Name
31 data Sig a   = Sig a (PolyType a) (GenPragmas a) SrcLoc | ClassOpSig a (PolyType a) (ClassOpPragmas a) SrcLoc | SpecSig a (PolyType a) (Labda a) SrcLoc | InlineSig a UnfoldingGuidance SrcLoc | DeforestSig a SrcLoc | MagicUnfoldingSig a _PackedString SrcLoc
32 type TypecheckedBind = Bind Id TypecheckedPat
33 type TypecheckedBinds = Binds Id TypecheckedPat
34 type TypecheckedMonoBinds = MonoBinds Id TypecheckedPat
35 bindIsRecursive :: Bind Id TypecheckedPat -> Bool
36 nullBind :: Bind a b -> Bool
37 nullBinds :: Binds a b -> Bool
38 nullMonoBinds :: MonoBinds a b -> Bool
39 instance (NamedThing a, Outputable a, NamedThing b, Outputable b) => Outputable (Bind a b)
40 instance (NamedThing a, Outputable a, NamedThing b, Outputable b) => Outputable (Binds a b)
41 instance (NamedThing a, Outputable a, NamedThing b, Outputable b) => Outputable (MonoBinds a b)
42 instance Outputable a => Outputable (Sig a)
43