[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / yaccParser / hpragma.ugn
1 %{
2 #include "hspincl.h"
3 %}
4 %{{
5 module U_hpragma where
6 import UgenUtil
7 import Util
8
9 import U_coresyn
10 import U_list
11 import U_literal        ( U_literal )   -- ditto
12 import U_ttype          ( U_ttype )     -- interface only
13 %}}
14 type hpragma;
15         no_pragma:          < > ;
16
17         idata_pragma:       < gprag_data_constrs : list;  /*of con decls*/
18                               gprag_data_specs   : list;  /*specialisations*/ >;
19
20         itype_pragma:       < >;
21         
22         iclas_pragma:       < gprag_clas : list;    /*of gen pragmas*/ >;
23
24         iclasop_pragma:     < gprag_dsel : hpragma; /* gen pragma: dict selector */
25                               gprag_defm : hpragma; /* gen pragma: default method */ >;
26
27         iinst_simpl_pragma: < gprag_imod_simpl : stringId;
28                               gprag_dfun_simpl : hpragma; /* gen pragma: of dfun */ >;
29
30         iinst_const_pragma: < gprag_imod_const : stringId;
31                               gprag_dfun_const : hpragma; /* gen pragma: of dfun */
32                               gprag_constms    : list; /* (name, gen pragma) pairs */ >;
33
34         iinst_spec_pragma:  < gprag_imod_spec  : stringId;
35                               gprag_dfun_spec  : hpragma; /* gen pragma: of dfun */
36                               gprag_inst_specs : list; /* (type, inst_pragma) pairs */ >;
37
38         igen_pragma:        < gprag_arity      : hpragma; /* arity */
39                               gprag_update     : hpragma; /* update info */
40                               gprag_deforest   : hpragma; /* deforest info */
41                               gprag_strictness : hpragma; /* strictness info */
42                               gprag_unfolding  : hpragma; /* unfolding */
43                               gprag_specs      : list; /* (type, gen pragma) pairs */ >;
44
45         iarity_pragma:      < gprag_arity_val  : numId; >;
46         iupdate_pragma:     < gprag_update_val : stringId; >;
47         ideforest_pragma:   < >;
48         istrictness_pragma: < gprag_strict_spec : hstring;
49                               gprag_strict_wrkr : hpragma; /*about worker*/ >;
50         imagic_unfolding_pragma:  < gprag_magic_str : stringId; >;
51                         
52         iunfolding_pragma:  < gprag_unfold_guide : hpragma; /* guidance */
53                               gprag_unfold_core : coresyn; >;
54
55         iunfold_always:     < >;
56         iunfold_if_args:    < gprag_unfold_if_t_args : numId;
57                               gprag_unfold_if_v_args : numId;
58                               gprag_unfold_if_con_args : stringId;
59                               gprag_unfold_if_size : numId; >;
60
61         iname_pragma_pr:    < gprag_name_pr1    : unkId;
62                               gprag_name_pr2    : hpragma; >;
63         itype_pragma_pr:    < gprag_type_pr1    : list;   /* of maybe types */
64                               gprag_type_pr2    : numId; /* # dicts to ignore */
65                               gprag_type_pr3    : hpragma; >;
66         iinst_pragma_3s:    < gprag_inst_pt1    : list; /* of maybe types */
67                               gprag_inst_pt2    : numId;
68                               gprag_inst_pt3    : hpragma;
69                               gprag_inst_pt4    : list; >;
70         
71         idata_pragma_4s:    < gprag_data_spec   : list; /* of maybe types */ >;
72
73 end;