parent
cbf565d4c0
commit
a6585b6e91
16
AST.mli
16
AST.mli
@ -161,7 +161,8 @@ type ('a, 'type_expr_typecheck) gadt_if =
|
|||||||
sufficient.
|
sufficient.
|
||||||
*)
|
*)
|
||||||
type 'x x_sig = 'x
|
type 'x x_sig = 'x
|
||||||
constraint 'x = 'type_annotation * 'type_expr_typecheck
|
constraint 'x = < annot: 'type_annotation;
|
||||||
|
type_expr_typecheck: 'bool1 >
|
||||||
|
|
||||||
type 'x ast = {
|
type 'x ast = {
|
||||||
types : 'x type_decl reg list;
|
types : 'x type_decl reg list;
|
||||||
@ -220,7 +221,8 @@ and 'x type_expr =
|
|||||||
| Function of (('x type_expr list) * 'x type_expr, 'type_expr_typecheck) gadt_if
|
| Function of (('x type_expr list) * 'x type_expr, 'type_expr_typecheck) gadt_if
|
||||||
| Mutable of ('x type_expr, 'type_expr_typecheck) gadt_if
|
| Mutable of ('x type_expr, 'type_expr_typecheck) gadt_if
|
||||||
| Unit of (unit, 'type_expr_typecheck) gadt_if
|
| Unit of (unit, 'type_expr_typecheck) gadt_if
|
||||||
constraint 'x = ('type_annotation * 'type_expr_typecheck)
|
constraint 'x = < type_expr_typecheck: 'type_expr_typecheck;
|
||||||
|
.. >
|
||||||
constraint 'x = 'x x_sig
|
constraint 'x = 'x x_sig
|
||||||
|
|
||||||
and 'x cartesian = ('x type_expr, times) nsepseq reg
|
and 'x cartesian = ('x type_expr, times) nsepseq reg
|
||||||
@ -503,9 +505,15 @@ constraint 'x = 'x x_sig
|
|||||||
|
|
||||||
(* Variations on the AST *)
|
(* Variations on the AST *)
|
||||||
|
|
||||||
type parse_phase = (unit * tfalse)
|
type parse_phase = <
|
||||||
|
annot: unit;
|
||||||
|
type_expr_typecheck: tfalse;
|
||||||
|
>
|
||||||
|
|
||||||
type typecheck_phase = (parse_phase type_expr * ttrue)
|
type typecheck_phase = <
|
||||||
|
annot: typecheck_phase type_expr;
|
||||||
|
type_expr_typecheck: ttrue;
|
||||||
|
>
|
||||||
|
|
||||||
type t = parse_phase ast
|
type t = parse_phase ast
|
||||||
|
|
||||||
|
@ -3,7 +3,10 @@ module SMap = Map.Make(String)
|
|||||||
open AST
|
open AST
|
||||||
|
|
||||||
type i = parse_phase
|
type i = parse_phase
|
||||||
type typecheck_phase = (parse_phase type_expr * tfalse)
|
type typecheck_phase = <
|
||||||
|
annot: typecheck_phase type_expr;
|
||||||
|
type_expr_typecheck: tfalse;
|
||||||
|
>
|
||||||
type o = typecheck_phase
|
type o = typecheck_phase
|
||||||
|
|
||||||
type te = o type_expr list SMap.t (* Type environment *)
|
type te = o type_expr list SMap.t (* Type environment *)
|
||||||
|
Loading…
Reference in New Issue
Block a user