[project @ 1996-03-19 08:58:34 by partain]
[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_coresyn        ( U_coresyn ) -- for interfaces only
11 import U_hpragma
12 import U_list
13 import U_literal        ( U_literal ) -- for interfaces only
14 import U_maybe
15 import U_qid
16 import U_ttype
17 %}}
18 type binding;
19         tbind   : < gtbindc     : list;         /* [context entries] */
20                     gtbindid    : ttype;        /* applied tycon */
21                     gtbindl     : list;         /* [constr] */
22                     gtbindd     : maybe;        /* Maybe [deriving] */
23                     gtline      : long;
24                     gtpragma    : hpragma; >;
25         ntbind  : < gntbindc    : list;         /* [context entries] */
26                     gntbindid   : ttype;        /* applied tycon */
27                     gntbindcty  : list;         /* [constr]  (only 1 constrnew) */ 
28                     gntbindd    : maybe;        /* Maybe [deriving] */
29                     gntline     : long;
30                     gntpragma   : hpragma; >;
31         nbind   : < gnbindid    : ttype;
32                     gnbindas    : ttype;
33                     gnline      : long; >;
34         pbind   : < gpbindl     : list;
35                     gpline      : long; >;
36         fbind   : < gfbindl     : list;
37                     gfline      : long; >;
38         abind   : < gabindfst   : binding;
39                     gabindsnd   : binding; >;
40         ibind   : < gibindsrc   : long;         /* 1 => source; 0 => interface */
41                     gibindmod   : stringId;     /* the original module */
42                     gibindc     : list;
43                     gibindid    : qid;
44                     gibindi     : ttype;
45                     gibindw     : binding;
46                     giline      : long;
47                     gipragma    : hpragma; >;
48         dbind   : < gdbindts    : list;
49                     gdline      : long; >;
50         cbind   : < gcbindc     : list;
51                     gcbindid    : ttype;
52                     gcbindw     : binding;
53                     gcline      : long;
54                     gcpragma    : hpragma; >;
55         sbind   : < gsbindids   : list;
56                     gsbindid    : ttype;
57                     gsline      : long;
58                     gspragma    : hpragma; >;
59
60         mbind   : < gmbindmodn  : stringId;     /* import (in an interface) <mod> <entities> */
61                     gmbindimp   : list;         /* [entity] */
62                     gmline      : long; >;
63         mfbind  : < gmfixes     : list; >;      /* fixites in an import: [fixop] */
64
65         nullbind : < >;
66
67         import  : < gibindiface : stringId;
68                     gibindfile  : stringId;
69                     gibinddef   : binding;
70                     gibindimod  : stringId;
71                     gibindqual  : long;
72                     gibindas    : maybe;
73                     gibindspec  : maybe;
74                     gibindline  : long; >;
75
76         /* user-specified pragmas:XXXX */
77
78         vspec_uprag : < gvspec_id   : qid;
79                         gvspec_tys  : list;
80                         gvspec_line : long; >;
81
82         vspec_ty_and_id : < gvspec_ty : ttype;
83                         gvspec_tyid : maybe; /* nil or singleton */ >;
84
85         ispec_uprag : < gispec_clas : qid;
86                         gispec_ty   : ttype;
87                         gispec_line : long; >;
88
89         inline_uprag: < ginline_id   : qid;
90                         ginline_line : long; >;
91
92         deforest_uprag: < gdeforest_id : qid;
93                         gdeforest_line : long; >;
94
95         magicuf_uprag:< gmagicuf_id   : qid;
96                         gmagicuf_str  : stringId;
97                         gmagicuf_line : long; >;
98
99         dspec_uprag : < gdspec_id   : qid;
100                         gdspec_tys  : list;
101                         gdspec_line : long; >;
102
103 end;