[project @ 1996-03-19 08:58:34 by partain]
[ghc-hetmet.git] / ghc / compiler / parser / hpragma.ugn
1 %{
2 #include "hspincl.h"
3 %}
4 %{{
5 module U_hpragma where
6 import Ubiq --  debugging consistency check
7 import UgenUtil
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_dfun_simpl : hpragma; /* gen pragma: of dfun */ >;
28
29         iinst_const_pragma: < gprag_dfun_const : hpragma; /* gen pragma: of dfun */
30                               gprag_constms    : list; /* (name, gen pragma) pairs */ >;
31
32         igen_pragma:        < gprag_arity      : hpragma; /* arity */
33                               gprag_update     : hpragma; /* update info */
34                               gprag_deforest   : hpragma; /* deforest info */
35                               gprag_strictness : hpragma; /* strictness info */
36                               gprag_unfolding  : hpragma; /* unfolding */
37                               gprag_specs      : list; /* (type, gen pragma) pairs */ >;
38
39         iarity_pragma:      < gprag_arity_val  : numId; >;
40         iupdate_pragma:     < gprag_update_val : stringId; >;
41         ideforest_pragma:   < >;
42         istrictness_pragma: < gprag_strict_spec : hstring;
43                               gprag_strict_wrkr : hpragma; /*about worker*/ >;
44         imagic_unfolding_pragma:  < gprag_magic_str : stringId; >;
45                         
46         iunfolding_pragma:  < gprag_unfold_guide : hpragma; /* guidance */
47                               gprag_unfold_core : coresyn; >;
48
49         iunfold_always:     < >;
50         iunfold_if_args:    < gprag_unfold_if_t_args : numId;
51                               gprag_unfold_if_v_args : numId;
52                               gprag_unfold_if_con_args : stringId;
53                               gprag_unfold_if_size : numId; >;
54
55         iname_pragma_pr:    < gprag_name_pr1    : unkId;
56                               gprag_name_pr2    : hpragma; >;
57         itype_pragma_pr:    < gprag_type_pr1    : list;   /* of maybe types */
58                               gprag_type_pr2    : numId; /* # dicts to ignore */
59                               gprag_type_pr3    : hpragma; >;
60
61         idata_pragma_4s:    < gprag_data_spec   : list; /* of maybe types */ >;
62
63 end;