[project @ 1996-03-19 08:58:34 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_coresyn        ( U_coresyn )   -- interface only
12 import U_hpragma        ( U_hpragma )   -- interface only
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                     ghmodline   : long; >;
26         fixop   : < gfixop      : unkId;
27                     gfixinfx    : long;
28                     gfixprec    : long; >;
29
30         ident   : < gident      : qid; >;
31         lit     : < glit        : literal; >;
32
33         ap      : < gfun        : tree;
34                     garg        : tree; >;
35         infixap : < ginffun     : qid;
36                     ginfarg1    : tree;
37                     ginfarg2    : tree; >;
38         negate  : < gnexp       : tree;
39                     gnxxx1      : VOID_STAR;
40                     gnxxx2      : VOID_STAR; >;
41         /*
42           infixap and negate have the same size
43           so they can be rearranged in precparse
44         */
45
46         lambda  : < glampats    : list;
47                     glamexpr    : tree;
48                     glamline    : long; >;
49
50         let     : < gletvdefs   : binding;
51                     gletvexpr   : tree; >;
52         casee   : < gcaseexpr   : tree;
53                     gcasebody   : list;
54                     gcaseline   : long; >;
55         ife     : < gifpred     : tree;
56                     gifthen     : tree;
57                     gifelse     : tree;
58                     gifline     : long; >;
59         doe     : < gdo         : list;
60                     gdoline     : long; >;
61
62         dobind  : < gdobindpat  : tree;
63                     gdobindexp  : tree;
64                     gdobindline : long; >;
65         doexp   : < gdoexp      : tree;
66                     gdoexpline  : long; >;
67         seqlet  : < gseqlet     : binding; >;
68
69         record  : < grcon       : qid;
70                     grbinds     : list; >;      /* [rbind] */ 
71         rupdate : < gupdexp     : tree;
72                     gupdbinds   : list; >;      /* [rbind] */ 
73         rbind   : < grbindvar   : qid;
74                     grbindexp   : maybe; >;     /* Maybe expr */
75
76         par     : < gpare       : tree; >;
77         as      : < gasid       : qid;
78                     gase        : tree; >;
79         lazyp   : < glazyp      : tree; >;
80         wildp   : < >;
81
82         restr   : < grestre     : tree;
83                     grestrt     : ttype; >;
84
85         tuple   : < gtuplelist  : list; >;
86         llist   : < gllist      : list; >;
87         eenum   : < gefrom      : tree;
88                     gestep      : maybe;
89                     geto        : maybe; >;
90         comprh  : < gcexp       : tree;
91                     gcquals     : list; >;
92         qual    : < gqpat       : tree;
93                     gqexp       : tree; >;
94         guard   : < ggexp       : tree; >;
95
96         lsection: < glsexp      : tree; 
97                     glsop       : qid; >;
98         rsection: < grsop       : qid;
99                     grsexp      : tree; >;
100
101         ccall   : < gccid       : stringId;
102                     gccinfo     : stringId;
103                     gccargs     : list; >;
104         scc     : < gsccid      : hstring;
105                     gsccexp     : tree; >;
106 end;