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