summaryrefslogtreecommitdiff
path: root/compiler/hsSyn/HsExpr.lhs-boot
blob: a2ef6528b823c4b3b4a3527d197746a6f99a1a8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
\begin{code}
{-# LANGUAGE CPP, KindSignatures #-}
module HsExpr where

import SrcLoc     ( Located )
import Outputable ( SDoc, OutputableBndr, Outputable )
import {-# SOURCE #-} HsPat  ( LPat )

import Data.Data

data HsExpr (i :: *)
data HsCmd  (i :: *)
data HsSplice (i :: *)
data MatchGroup (a :: *) (body :: *)
data GRHSs (a :: *) (body :: *)

#if __GLASGOW_HASKELL__ > 706
instance Typeable HsSplice
instance Typeable HsExpr
instance Typeable MatchGroup
instance Typeable GRHSs
#else
instance Typeable1 HsSplice
instance Typeable1 HsExpr
instance Typeable1 HsCmd
instance Typeable2 MatchGroup
instance Typeable2 GRHSs
#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)
instance (Data i, Data body) => Data (GRHSs i body)

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

type LHsExpr a = Located (HsExpr a)
type SyntaxExpr a = HsExpr a

pprLExpr :: (OutputableBndr i) => 
        LHsExpr i -> SDoc

pprExpr :: (OutputableBndr i) => 
        HsExpr i -> SDoc

pprSplice :: (OutputableBndr i) => 
        HsSplice i -> SDoc

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

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