[project @ 1996-03-22 09:24:22 by partain]
[ghc-hetmet.git] / ghc / compiler / yaccParser / impidt.h
1 #ifndef impidt_defined
2 #define impidt_defined
3
4 #include <stdio.h>
5
6 #ifndef PROTO
7 #ifdef __STDC__
8 #define PROTO(x) x
9 #else
10 #define PROTO(x) /**/
11 #endif
12 #endif
13
14 typedef enum {
15         impid,
16         imptype,
17         impsyn,
18         impeqtype,
19         impclass,
20         impinst,
21         impmod
22 } Timpidt;
23
24 typedef struct { Timpidt tag; } *impidt;
25
26 /* Compatibility defines */
27 extern Timpidt timpidt PROTO((impidt));
28
29 struct Simpid {
30         Timpidt tag;
31         id Xgimpid;
32         ttype Xgimptype;
33         finfot Xgimpfinfo;
34         long Xgivline;
35 };
36
37 struct Simptype {
38         Timpidt tag;
39         list Xgimptypec;
40         ttype Xgimptypet;
41         list Xgimptyped;
42         long Xgitline;
43 };
44
45 struct Simpsyn {
46         Timpidt tag;
47         ttype Xgimpsynti;
48         ttype Xgimpsynts;
49         long Xgisline;
50 };
51
52 struct Simpeqtype {
53         Timpidt tag;
54         binding Xgimpeqtype;
55 };
56
57 struct Simpclass {
58         Timpidt tag;
59         list Xgimpclassc;
60         ttype Xgimpclasst;
61         list Xgimpclassw;
62         long Xgicline;
63 };
64
65 struct Simpinst {
66         Timpidt tag;
67         list Xgimpinstc;
68         id Xgimpinstid;
69         ttype Xgimpinstt;
70         long Xgiiline;
71 };
72
73 struct Simpmod {
74         Timpidt tag;
75         id Xgimpmodn;
76         list Xgimpmodimp;
77         list Xgimpmodren;
78         long Xgimline;
79 };
80
81 #endif
82 extern impidt mkimpid PROTO((id, ttype, finfot, long));
83 extern id *Rgimpid PROTO((struct Simpid *));
84 #define gimpid(xyzxyz) (*Rgimpid((struct Simpid *) (xyzxyz)))
85 extern ttype *Rgimptype PROTO((struct Simpid *));
86 #define gimptype(xyzxyz) (*Rgimptype((struct Simpid *) (xyzxyz)))
87 extern finfot *Rgimpfinfo PROTO((struct Simpid *));
88 #define gimpfinfo(xyzxyz) (*Rgimpfinfo((struct Simpid *) (xyzxyz)))
89 extern long *Rgivline PROTO((struct Simpid *));
90 #define givline(xyzxyz) (*Rgivline((struct Simpid *) (xyzxyz)))
91
92 extern impidt mkimptype PROTO((list, ttype, list, long));
93 extern list *Rgimptypec PROTO((struct Simptype *));
94 #define gimptypec(xyzxyz) (*Rgimptypec((struct Simptype *) (xyzxyz)))
95 extern ttype *Rgimptypet PROTO((struct Simptype *));
96 #define gimptypet(xyzxyz) (*Rgimptypet((struct Simptype *) (xyzxyz)))
97 extern list *Rgimptyped PROTO((struct Simptype *));
98 #define gimptyped(xyzxyz) (*Rgimptyped((struct Simptype *) (xyzxyz)))
99 extern long *Rgitline PROTO((struct Simptype *));
100 #define gitline(xyzxyz) (*Rgitline((struct Simptype *) (xyzxyz)))
101
102 extern impidt mkimpsyn PROTO((ttype, ttype, long));
103 extern ttype *Rgimpsynti PROTO((struct Simpsyn *));
104 #define gimpsynti(xyzxyz) (*Rgimpsynti((struct Simpsyn *) (xyzxyz)))
105 extern ttype *Rgimpsynts PROTO((struct Simpsyn *));
106 #define gimpsynts(xyzxyz) (*Rgimpsynts((struct Simpsyn *) (xyzxyz)))
107 extern long *Rgisline PROTO((struct Simpsyn *));
108 #define gisline(xyzxyz) (*Rgisline((struct Simpsyn *) (xyzxyz)))
109
110 extern impidt mkimpeqtype PROTO((binding));
111 extern binding *Rgimpeqtype PROTO((struct Simpeqtype *));
112 #define gimpeqtype(xyzxyz) (*Rgimpeqtype((struct Simpeqtype *) (xyzxyz)))
113
114 extern impidt mkimpclass PROTO((list, ttype, list, long));
115 extern list *Rgimpclassc PROTO((struct Simpclass *));
116 #define gimpclassc(xyzxyz) (*Rgimpclassc((struct Simpclass *) (xyzxyz)))
117 extern ttype *Rgimpclasst PROTO((struct Simpclass *));
118 #define gimpclasst(xyzxyz) (*Rgimpclasst((struct Simpclass *) (xyzxyz)))
119 extern list *Rgimpclassw PROTO((struct Simpclass *));
120 #define gimpclassw(xyzxyz) (*Rgimpclassw((struct Simpclass *) (xyzxyz)))
121 extern long *Rgicline PROTO((struct Simpclass *));
122 #define gicline(xyzxyz) (*Rgicline((struct Simpclass *) (xyzxyz)))
123
124 extern impidt mkimpinst PROTO((list, id, ttype, long));
125 extern list *Rgimpinstc PROTO((struct Simpinst *));
126 #define gimpinstc(xyzxyz) (*Rgimpinstc((struct Simpinst *) (xyzxyz)))
127 extern id *Rgimpinstid PROTO((struct Simpinst *));
128 #define gimpinstid(xyzxyz) (*Rgimpinstid((struct Simpinst *) (xyzxyz)))
129 extern ttype *Rgimpinstt PROTO((struct Simpinst *));
130 #define gimpinstt(xyzxyz) (*Rgimpinstt((struct Simpinst *) (xyzxyz)))
131 extern long *Rgiiline PROTO((struct Simpinst *));
132 #define giiline(xyzxyz) (*Rgiiline((struct Simpinst *) (xyzxyz)))
133
134 extern impidt mkimpmod PROTO((id, list, list, long));
135 extern id *Rgimpmodn PROTO((struct Simpmod *));
136 #define gimpmodn(xyzxyz) (*Rgimpmodn((struct Simpmod *) (xyzxyz)))
137 extern list *Rgimpmodimp PROTO((struct Simpmod *));
138 #define gimpmodimp(xyzxyz) (*Rgimpmodimp((struct Simpmod *) (xyzxyz)))
139 extern list *Rgimpmodren PROTO((struct Simpmod *));
140 #define gimpmodren(xyzxyz) (*Rgimpmodren((struct Simpmod *) (xyzxyz)))
141 extern long *Rgimline PROTO((struct Simpmod *));
142 #define gimline(xyzxyz) (*Rgimline((struct Simpmod *) (xyzxyz)))
143