[project @ 1998-12-02 13:17:09 by simonm]
[ghc-hetmet.git] / ghc / compiler / parser / constr.ugn
1 %{
2 #include "hspincl.h"
3 %}
4 %{{
5
6 module U_constr where
7
8 #include "HsVersions.h"
9
10 import UgenUtil
11
12 import U_maybe
13 import U_list
14 import U_qid
15 import U_ttype
16 %}}
17 type constr;
18         /* constr in prefix form: */
19         constrpre   : < gconcid     : qid;
20                         gconctypel  : list; /* [ttype] */
21                         gconcline   : long; >;
22
23         /* constr in infix form: */
24         constrinf   : < gconity1    : ttype;
25                         gconiop     : qid;
26                         gconity2    : ttype;
27                         gconiline   : long; >;
28
29         /* constr in record form: */
30         constrrec   : < gconrid     : qid;
31                         gconrfieldl : list; /* [field] */
32                         gconrline   : long; >;
33
34         /* constr in simple "newtype" form: */
35         constrnew   : < gconnid     : qid;
36                         gconnty     : ttype;
37                         gconnline   : long; >;
38
39         /* constr with a existential prefixed context C => ... */
40         constrex   : < gcontvs      : list;     /* tyvars */
41                         gconcxt     : list;     /* theta */
42                         gconcon     : constr; >;
43                         
44         field       : < gfieldn     : list;
45                         gfieldt     : ttype; >;
46 end;