[project @ 1996-01-11 14:06:51 by partain]
[ghc-hetmet.git] / ghc / compiler / abstractSyn / HsPat.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface HsPat where
3 import HsExpr(Expr)
4 import HsLit(Literal)
5 import Id(Id)
6 import Name(Name)
7 import Outputable(NamedThing, Outputable)
8 import Pretty(PprStyle, PrettyRep)
9 import ProtoName(ProtoName)
10 import UniType(UniType)
11 data InPat a   = WildPatIn | VarPatIn a | LitPatIn Literal | LazyPatIn (InPat a) | AsPatIn a (InPat a) | ConPatIn a [InPat a] | ConOpPatIn (InPat a) a (InPat a) | ListPatIn [InPat a] | TuplePatIn [InPat a] | NPlusKPatIn a Literal
12 type ProtoNamePat = InPat ProtoName
13 type RenamedPat = InPat Name
14 data TypecheckedPat   = 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)
15 irrefutablePat :: TypecheckedPat -> Bool
16 isConPat :: TypecheckedPat -> Bool
17 isLitPat :: TypecheckedPat -> Bool
18 only_con :: Id -> Bool
19 patsAreAllCons :: [TypecheckedPat] -> Bool
20 patsAreAllLits :: [TypecheckedPat] -> Bool
21 pprConPatTy :: PprStyle -> UniType -> Int -> Bool -> PrettyRep
22 pprInPat :: Outputable a => PprStyle -> InPat a -> Int -> Bool -> PrettyRep
23 pprTypecheckedPat :: PprStyle -> TypecheckedPat -> Int -> Bool -> PrettyRep
24 typeOfPat :: TypecheckedPat -> UniType
25 unfailablePat :: TypecheckedPat -> Bool
26 unfailablePats :: [TypecheckedPat] -> Bool
27 instance NamedThing a => NamedThing (InPat a)
28 instance NamedThing TypecheckedPat
29 instance Outputable a => Outputable (InPat a)
30 instance Outputable TypecheckedPat
31