diff options
Diffstat (limited to 'src/ast.ml')
| -rw-r--r-- | src/ast.ml | 87 |
1 files changed, 45 insertions, 42 deletions
@@ -109,12 +109,6 @@ quant_item = type -effects_aux = (* effect set, of kind $_$ *) - Effects_var of id - | Effects_set of (efct) list (* effect set *) - - -type order_aux = (* vector order specifications, of kind $_$ *) Ord_id of id (* identifier *) | Ord_inc (* increasing (little-endian) *) @@ -122,19 +116,25 @@ order_aux = (* vector order specifications, of kind $_$ *) type +effects_aux = (* effect set, of kind $_$ *) + Effects_var of id + | Effects_set of (efct) list (* effect set *) + + +type typquant_aux = (* type quantifiers and constraints *) TypQ_tq of (quant_item) list | TypQ_no_forall (* sugar, omitting quantifier and constraints *) type -effects = - Effects_aux of effects_aux * l +order = + Ord_aux of order_aux * l type -order = - Ord_aux of order_aux * l +effects = + Effects_aux of effects_aux * l type @@ -281,6 +281,16 @@ and 'a letbind = type +ne = (* internal numeric expressions *) + Ne_var of id + | Ne_const of int + | Ne_mult of ne * ne + | Ne_add of ne * ne + | Ne_exp of ne + | Ne_unary of ne + + +type naming_scheme_opt_aux = (* Optional variable-naming-scheme specification for variables of defined type *) Name_sect_none | Name_sect_some of string @@ -309,6 +319,28 @@ rec_opt_aux = (* Optional recursive annotation for functions *) type +k = (* Internal kinds *) + Ki_typ + | Ki_nat + | Ki_ord + | Ki_efct + | Ki_val (* Representing values, for use in identifier checks *) + | Ki_ctor of (k) list * k + | Ki_infer (* Representing an unknown kind, inferred by context *) + + +type +t_arg = (* Argument to type constructors *) + Typ of t + | Nexp of ne + | Effect of effects + | Order of order + +and t_args = (* Arguments to type constructors *) + T_args of (t_arg) list + + +type naming_scheme_opt = Name_sect_aux of naming_scheme_opt_aux * l @@ -344,27 +376,6 @@ rec_opt = type -ne = (* internal numeric expressions *) - Ne_var of id - | Ne_const of int - | Ne_mult of ne * ne - | Ne_add of ne * ne - | Ne_exp of ne - | Ne_unary of ne - - -type -k = (* Internal kinds *) - Ki_typ - | Ki_nat - | Ki_ord - | Ki_efct - | Ki_val (* Representing values, for use in identifier checks *) - | Ki_ctor of (k) list * k - | Ki_infer (* Representing an unknown kind, inferred by context *) - - -type 'a type_def_aux = (* Type definition body *) TD_abbrev of id * naming_scheme_opt * typschm (* type abbreviation *) | TD_record of id * naming_scheme_opt * typquant * ((typ * id)) list * bool (* struct type definition *) @@ -390,17 +401,6 @@ type type -t_arg = (* Argument to type constructors *) - Typ of t - | Nexp of ne - | Effect of effects - | Order of order - -and t_args = (* Arguments to type constructors *) - T_args of (t_arg) list - - -type 'a type_def = TD_aux of 'a type_def_aux * 'a annot @@ -480,5 +480,8 @@ type (** definitions *) (** definitions *) (** definitions *) +(** definitions *) +(** definitions *) +(** definitions *) |
