[project @ 1996-01-08 20:28:12 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         {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _F_ _IF_ARGS_ 0 1 C 6 \ (u0 :: Bind Id TypecheckedPat) -> case u0 of { _ALG_ _ORIG_ HsBinds EmptyBind  -> _!_ False [] []; _ORIG_ HsBinds NonRecBind (u1 :: MonoBinds Id TypecheckedPat) -> _!_ False [] []; _ORIG_ HsBinds RecBind (u2 :: MonoBinds Id TypecheckedPat) -> _!_ True [] []; _NO_DEFLT_ } _N_ #-}
37 nullBind :: Bind a b -> Bool
38         {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-}
39 nullBinds :: Binds a b -> Bool
40         {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-}
41 nullMonoBinds :: MonoBinds a b -> Bool
42         {-# GHC_PRAGMA _A_ 1 _U_ 1 _N_ _S_ "S" _N_ _N_ #-}
43 instance (NamedThing a, Outputable a, NamedThing b, Outputable b) => Outputable (Bind a b)
44         {-# GHC_PRAGMA _M_ HsBinds {-dfun-} _A_ 4 _U_ 2222 _N_ _N_ _N_ _N_ #-}
45 instance (NamedThing a, Outputable a, NamedThing b, Outputable b) => Outputable (Binds a b)
46         {-# GHC_PRAGMA _M_ HsBinds {-dfun-} _A_ 4 _U_ 2222 _N_ _N_ _N_ _N_ #-}
47 instance (NamedThing a, Outputable a, NamedThing b, Outputable b) => Outputable (MonoBinds a b)
48         {-# GHC_PRAGMA _M_ HsBinds {-dfun-} _A_ 4 _U_ 2222 _N_ _N_ _N_ _N_ #-}
49 instance Outputable a => Outputable (Sig a)
50         {-# GHC_PRAGMA _M_ HsBinds {-dfun-} _A_ 0 _U_ 2 _N_ _N_ _N_ _N_ #-}
51