Middleend.InferencerCopyright 2024-2025, Danil Usoltsev
SPDX-License-Identifier: LGPL-3.0-or-later
type error = | OccursCheck of string * Frontend.Ast.ty| NoVariable of string| UnificationFailed of Frontend.Ast.ty * Frontend.Ast.ty| SeveralBounds of string| LHS of string| RHS of string| UnexpectedFunction of Frontend.Ast.tyval pp_error : Stdlib.Format.formatter -> error -> unitmodule ResultMonad : sig ... endmodule Substitution : sig ... endmodule Scheme : sig ... endmodule TypeEnv : sig ... endval infer_structure :
TypeEnv.t ->
Frontend.Ast.program ->
(Substitution.t * TypeEnv.t) ResultMonad.tval infer_simple_expression :
Frontend.Ast.expr ->
(Frontend.Ast.ty, error) Stdlib.Result.tval run_infer : Frontend.Ast.program -> (TypeEnv.t, error) Stdlib.Result.t