86c5174c781d0de8670d7e2b02af803068a0161e
[ghc-hetmet.git] / ghc / compiler / parser / tree.ugn
1 %{
2 #include "hspincl.h"
3 %}
4 %{{
5 #include "HsVersions.h"
6
7 module U_tree where
8 IMP_Ubiq() --  debugging consistency check
9 import UgenUtil
10
11 import U_constr         ( U_constr )    -- interface only
12 import U_binding
13 import U_list
14 import U_literal
15 import U_maybe
16 import U_qid
17 import U_ttype
18 %}}
19 type tree;
20         hmodule : < ghname      : stringId;
21                     ghimplist   : list;         /* [import] */
22                     ghexplist   : maybe;        /* Maybe [entity] */
23                     ghfixes     : list;         /* [fixop] */
24                     ghmodlist   : binding;
25                     ghversion   : long;
26                     ghmodline   : long; >;
27         fixop   : < gfixop      : qid;
28                     gfixinfx    : long;
29                     gfixprec    : long; >;
30
31         ident   : < gident      : qid; >;
32         lit     : < glit        : literal; >;
33
34         ap      : < gfun        : tree;
35                     garg        : tree; >;
36         infixap : < ginffun     : qid;
37                     ginfarg1    : tree;
38                     ginfarg2    : tree; >;
39         negate  : < gnexp       : tree; >;
40
41         lambda  : < glampats    : list;
42                     glamexpr    : tree;
43                     glamline    : long; >;
44
45         let     : < gletvdefs   : binding;
46                     gletvexpr   : tree; >;
47         casee   : < gcaseexpr   : tree;
48                     gcasebody   : list;
49                     gcaseline   : long; >;
50         ife     : < gifpred     : tree;
51                     gifthen     : tree;
52                     gifelse     : tree;
53                     gifline     : long; >;
54         doe     : < gdo         : list;
55                     gdoline     : long; >;
56
57         dobind  : < gdobindpat  : tree;
58                     gdobindexp  : tree;
59                     gdobindline : long; >;
60         doexp   : < gdoexp      : tree;
61                     gdoexpline  : long; >;
62         seqlet  : < gseqlet     : binding; >;
63
64         record  : < grcon       : qid;
65                     grbinds     : list; >;      /* [rbind] */ 
66         rupdate : < gupdexp     : tree;
67                     gupdbinds   : list; >;      /* [rbind] */ 
68         rbind   : < grbindvar   : qid;
69                     grbindexp   : maybe; >;     /* Maybe expr */
70
71         par     : < gpare       : tree; >;
72         as      : < gasid       : qid;
73                     gase        : tree; >;
74         lazyp   : < glazyp      : tree; >;
75         wildp   : < >;
76
77         restr   : < grestre     : tree;
78                     grestrt     : ttype; >;
79
80         tuple   : < gtuplelist  : list; >;
81         llist   : < gllist      : list; >;
82         eenum   : < gefrom      : tree;
83                     gestep      : maybe;
84                     geto        : maybe; >;
85         comprh  : < gcexp       : tree;
86                     gcquals     : list; >;
87         qual    : < gqpat       : tree;
88                     gqexp       : tree; >;
89         guard   : < ggexp       : tree; >;
90
91         lsection: < glsexp      : tree; 
92                     glsop       : qid; >;
93         rsection: < grsop       : qid;
94                     grsexp      : tree; >;
95
96         ccall   : < gccid       : stringId;
97                     gccinfo     : stringId;
98                     gccargs     : list; >;
99         scc     : < gsccid      : hstring;
100                     gsccexp     : tree; >;
101 end;