3b130aedae5285da0a05fb2c465900a8a23607a1
[ghc-hetmet.git] / ghc / compiler / parser / binding.ugn
1 %{
2 #include "hspincl.h"
3 %}
4 %{{
5 module U_binding where
6 import Ubiq --  debugging consistency check
7 import UgenUtil
8
9 import U_constr
10 import U_list
11 import U_maybe
12 import U_qid
13 import U_ttype
14 %}}
15 type binding;
16         tbind   : < gtbindc     : list;         /* [context entries] */
17                     gtbindid    : ttype;        /* applied tycon */
18                     gtbindl     : list;         /* [constr] */
19                     gtbindd     : maybe;        /* Maybe [deriving] */
20                     gtline      : long; >;
21         ntbind  : < gntbindc    : list;         /* [context entries] */
22                     gntbindid   : ttype;        /* applied tycon */
23                     gntbindcty  : list;         /* [constr]  (only 1 constrnew) */ 
24                     gntbindd    : maybe;        /* Maybe [deriving] */
25                     gntline     : long; >;
26         nbind   : < gnbindid    : ttype;
27                     gnbindas    : ttype;
28                     gnline      : long; >;
29         pbind   : < gpbindl     : list;
30                     gpline      : long; >;
31         fbind   : < gfbindl     : list;
32                     gfline      : long; >;
33         abind   : < gabindfst   : binding;
34                     gabindsnd   : binding; >;
35         ibind   : < gibindc     : list;
36                     gibindid    : qid;
37                     gibindi     : ttype;
38                     gibindw     : binding;
39                     giline      : long; >;
40         dbind   : < gdbindts    : list;
41                     gdline      : long; >;
42         cbind   : < gcbindc     : list;
43                     gcbindid    : ttype;
44                     gcbindw     : binding;
45                     gcline      : long; >;
46         sbind   : < gsbindids   : list;
47                     gsbindid    : ttype;
48                     gsline      : long; >;
49
50         nullbind : < >;
51
52         import  : < gibindimod  : stringId;
53                     gibindqual  : long;
54                     gibindas    : maybe;
55                     gibindspec  : maybe;
56                     gibindline  : long; >;
57
58         /* user-specified pragmas:XXXX */
59
60         vspec_uprag : < gvspec_id   : qid;
61                         gvspec_tys  : list;
62                         gvspec_line : long; >;
63
64         vspec_ty_and_id : < gvspec_ty : ttype;
65                         gvspec_tyid : maybe; /* nil or singleton */ >;
66
67         ispec_uprag : < gispec_clas : qid;
68                         gispec_ty   : ttype;
69                         gispec_line : long; >;
70
71         inline_uprag: < ginline_id   : qid;
72                         ginline_line : long; >;
73
74         deforest_uprag: < gdeforest_id : qid;
75                         gdeforest_line : long; >;
76
77         magicuf_uprag:< gmagicuf_id   : qid;
78                         gmagicuf_str  : stringId;
79                         gmagicuf_line : long; >;
80
81         dspec_uprag : < gdspec_id   : qid;
82                         gdspec_tys  : list;
83                         gdspec_line : long; >;
84
85 end;