Chatml_typechecker
module TypeUF : sig ... end
module RowUF : sig ... end
module PolyVarUF : sig ... end
val next_tvar_id : int Core.ref
val fresh_tvar : unit -> ttype
val next_rvar_id : int Core.ref
val next_pvvar_id : int Core.ref
val expand_poly_row_with : Core.Int.Hash_set.t -> poly_row -> poly_row
val unify_poly_bounds : poly_row_bound -> poly_row_bound -> poly_row_bound
val unify_poly_tags :
poly_row_bound ->
poly_row_bound ->
(Core.String.Map.Key.t * ttype list) list ->
(Core.String.Map.Key.t * ttype list) list ->
(Core.String.Set.Elt.t * ttype list) list
val unify_rows :
row ->
record_bound ->
row ->
record_bound ->
row * record_bound
unify_rows: Given (rowA, boundA) and (rowB, boundB), produce a unified row shape that is consistent with both.
val row_to_map : row -> ttype Core.String.Map.t * Base.Int.t Base.Option.t
val row_of_map : ttype Core.String.Map.t -> Base.Int.t option -> row
val show_type : ttype -> string
val show_row : row -> string
val show_poly_variant : poly_row -> string
val free_tvars : ttype -> Core.Int.Set.t
val free_row_tvars : row -> Core.Int.Set.t
val free_tvars_scheme :
scheme ->
(Core.Int.Set.Elt.t, Core.Int.Set.Elt.comparator_witness) Core.Set.t
val free_tvars_env : (string, scheme) Core.Hashtbl.t -> Core.Int.Set.t
val generalize : (string, scheme) Core.Hashtbl.t -> ttype -> scheme
val lookup_env : (string, scheme) Core.Hashtbl.t -> string -> ttype
val add_to_env : (string, scheme) Core.Hashtbl.t -> string -> ttype -> unit
val infer_expr :
(string, scheme) Core.Hashtbl.t ->
Chatml.Chatml_lang.expr ->
ttype
val infer_pattern :
(string, scheme) Core.Hashtbl.t ->
Chatml.Chatml_lang.pattern ->
ttype
val infer_stmt :
(string, scheme) Core.Hashtbl.t ->
Chatml.Chatml_lang.stmt ->
unit
val add_builtins : (string, scheme) Core.Hashtbl.t -> unit
val infer_program : Chatml.Chatml_lang.program -> unit