Acutis_internals.TypecheckerType-checks the untyped Ast.t and constructs a typed tree.
module Type : sig ... endManages the type definitions.
type scalar_sum = | Scalar_sum_none| Scalar_sum_int of set_int Type.sum| Scalar_sum_string of set_string Type.sumtype union_tag = | Union_tag_none| Union_tag_int of string * int * Type.sum_union_int| Union_tag_string of string * string * Type.sum_union_stringtype _ pat = | Scalar : scalar * scalar_sum -> 'a pat| Nil : 'a pat| Cons : 'a pat -> 'a pat| Tuple : 'a pat list -> 'a pat| Record : union_tag * 'a pat map_string * Type.record -> 'a pat| Dict : 'a pat map_string * set_string Stdlib.ref -> 'a pat| Var : string -> 'a pat| Block : nodes -> [ `Construct ] pat| Field : [ `Construct ] pat * string -> [ `Construct ] pat| Any : [ `Destruct ] patWe use a GADT to prove that certain patterns may only appear when constructing and certain patterns may only appear when destructuring.
and node = | Text of string * Ast.trim * Ast.trim| Echo of (Ast.echo_format * echo) list * Ast.echo_format * echo * Ast.escape| Match of Ast.loc
* [ `Construct ] pat Nonempty.t
* Type.t Nonempty.t
* case Nonempty.t| Map_list of Ast.loc * [ `Construct ] pat * Type.t Nonempty.t * case Nonempty.t| Map_dict of Ast.loc * [ `Construct ] pat * Type.t Nonempty.t * case Nonempty.t| Component of string * [ `Construct ] pat map_stringand case = {pats : (Ast.loc * [ `Destruct ] pat Nonempty.t) Nonempty.t;bindings : string list;The binding list is needed to help produce runtime instructions.
*)nodes : nodes;}and nodes = node listval make_components :
(Ast.t, 'a) source map_string ->
(t, 'a) source map_stringval make : (t, 'a) source map_string -> Ast.t -> tval make_interface_standalone : Ast.interface -> Type.interface