package libsail

  1. Overview
  2. Docs

Type error utilities

This file wraps the functions in Type_check, so they return Fatal_error exceptions from the Reporting module rather than Type_errors.

val opt_explain_all_variables : bool Stdlib.ref

If false (default), we'll only explain generated variables, not variables written explicitly by the user in the source.

val opt_explain_constraints : bool Stdlib.ref

If false (default), we'll list relevant constraints, but not go into detail about how they were derived

type suggestion =
  1. | Suggest_add_constraint of Ast.n_constraint
  2. | Suggest_none
val analyze_unresolved_quant : (Ast_util.mut * Ast.typ) Ast_util.Bindings.t -> Ast.n_constraint list -> Ast.quant_item -> suggestion

Analyze an unresolved quantifier type error

val string_of_type_error : Type_check.type_error -> string