HsExpr.lhs-boot 1.45 KB
Newer Older
1
\begin{code}
2
{-# LANGUAGE CPP, KindSignatures #-}
3 4
module HsExpr where

Ian Lynagh's avatar
Ian Lynagh committed
5
import SrcLoc     ( Located )
6
import Outputable ( SDoc, OutputableBndr, Outputable )
7
import {-# SOURCE #-} HsPat  ( LPat )
8 9

import Data.Data
dreixel's avatar
dreixel committed
10 11

data HsExpr (i :: *)
12
data HsCmd  (i :: *)
dreixel's avatar
dreixel committed
13
data HsSplice (i :: *)
14 15
data MatchGroup (a :: *) (body :: *)
data GRHSs (a :: *) (body :: *)
16

17 18 19 20 21 22
#if __GLASGOW_HASKELL__ > 706
instance Typeable HsSplice
instance Typeable HsExpr
instance Typeable MatchGroup
instance Typeable GRHSs
#else
23 24
instance Typeable1 HsSplice
instance Typeable1 HsExpr
25 26 27
instance Typeable1 HsCmd
instance Typeable2 MatchGroup
instance Typeable2 GRHSs
28 29 30 31 32 33
#endif

instance Data i => Data (HsSplice i)
instance Data i => Data (HsExpr i)
instance Data i => Data (HsCmd i)
instance (Data i, Data body) => Data (MatchGroup i body)
34 35 36 37
instance (Data i, Data body) => Data (GRHSs i body)

instance OutputableBndr id => Outputable (HsExpr id)
instance OutputableBndr id => Outputable (HsCmd id)
38

39
type LHsExpr a = Located (HsExpr a)
40
type SyntaxExpr a = HsExpr a
41

42
pprLExpr :: (OutputableBndr i) => 
Ian Lynagh's avatar
Ian Lynagh committed
43
        LHsExpr i -> SDoc
44

45
pprExpr :: (OutputableBndr i) => 
Ian Lynagh's avatar
Ian Lynagh committed
46
        HsExpr i -> SDoc
47

48 49
pprUntypedSplice :: (OutputableBndr i) => 
                    HsSplice i -> SDoc
50

51 52
pprPatBind :: (OutputableBndr bndr, OutputableBndr id, Outputable body)
           => LPat bndr -> GRHSs id body -> SDoc
53

54 55
pprFunBind :: (OutputableBndr idL, OutputableBndr idR, Outputable body) 
           => idL -> Bool -> MatchGroup idR body -> SDoc
56
\end{code}