[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / compiler / parser / binding.ugn
1 %{
2 #include "hspincl.h"
3 %}
4 %{{
5 module U_binding where
6
7 #include "HsVersions.h"
8
9 import UgenUtil
10
11 import U_constr
12 import U_list
13 import U_maybe
14 import U_qid
15 import U_ttype
16 %}}
17 type binding;
18         tbind   : < gtbindc     : list;         /* [context entries] */
19                     gtbindid    : ttype;        /* applied tycon */
20                     gtbindl     : list;         /* [constr] */
21                     gtbindd     : maybe;        /* Maybe [deriving] */
22                     gtline      : long; >;
23         ntbind  : < gntbindc    : list;         /* [context entries] */
24                     gntbindid   : ttype;        /* applied tycon */
25                     gntbindcty  : list;         /* [constr]  (only 1 constrnew) */ 
26                     gntbindd    : maybe;        /* Maybe [deriving] */
27                     gntline     : long; >;
28         nbind   : < gnbindid    : ttype;
29                     gnbindas    : ttype;
30                     gnline      : long; >;
31         pbind   : < gpbindl     : list;
32                     gpline      : long; >;
33         fbind   : < gfbindl     : list;
34                     gfline      : long; >;
35         abind   : < gabindfst   : binding;
36                     gabindsnd   : binding; >;
37         ibind   : < 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                     gibindsource : long;
57                     gibindline   : long; >;
58
59         /* FFI declarations */
60
61         fobind  : < gfobind_id   : qid;
62                     gfobind_ty   : ttype;
63                     gfobind_ext  : maybe;
64                     gfobind_flag : long;
65                     gfobind_cc   : long;
66                     gfobind_kind : long;
67                     gfobind_line : long; >;
68                     
69
70         /* user-specified pragmas:XXXX */
71
72         vspec_uprag : < gvspec_id   : qid;
73                         gvspec_tys  : list;
74                         gvspec_line : long; >;
75
76         vspec_ty_and_id : < gvspec_ty : ttype;
77                         gvspec_tyid : maybe; /* nil or singleton */ >;
78
79         ispec_uprag : < gispec_clas : qid;
80                         gispec_ty   : ttype;
81                         gispec_line : long; >;
82
83         inline_uprag: < ginline_id   : qid;
84                         ginline_line : long; >;
85
86         noinline_uprag: < gnoinline_id   : qid;
87                           gnoinline_line : long; >;
88
89         magicuf_uprag:< gmagicuf_id   : qid;
90                         gmagicuf_str  : stringId;
91                         gmagicuf_line : long; >;
92
93         dspec_uprag : < gdspec_id   : qid;
94                         gdspec_tys  : list;
95                         gdspec_line : long; >;
96
97 end;