[project @ 1997-03-14 07:52:06 by simonpj]
[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         plusp   : < gplusp      : qid; 
76                     gplusi      : literal; >;
77         wildp   : < >;
78         restr   : < grestre     : tree;
79                     grestrt     : ttype; >;
80
81         tuple   : < gtuplelist  : list; >;
82         llist   : < gllist      : list; >;
83         eenum   : < gefrom      : tree;
84                     gestep      : maybe;
85                     geto        : maybe; >;
86         comprh  : < gcexp       : tree;
87                     gcquals     : list; >;
88         qual    : < gqpat       : tree;
89                     gqexp       : tree; >;
90         guard   : < ggexp       : tree; >;
91
92         lsection: < glsexp      : tree; 
93                     glsop       : qid; >;
94         rsection: < grsop       : qid;
95                     grsexp      : tree; >;
96
97         ccall   : < gccid       : stringId;
98                     gccinfo     : stringId;
99                     gccargs     : list; >;
100         scc     : < gsccid      : hstring;
101                     gsccexp     : tree; >;
102 end;