package um-abt

  1. Overview
  2. Docs
module Subst : sig ... end
type error = [
  1. | `Unification of Var.t option * t * t
  2. | `Occurs of Var.t * t
  3. | `Cycle of Subst.t
]

Errors returned when unification fails

val unify : t -> t -> (t * Subst.t, error) Stdlib.Result.t

unify a b is Ok (union, substitution) when a and b can be unified into the term union and substitution is the most general unifier. Otherwise it is Error err), for which, see error

val (=.=) : t -> t -> (t, error) Stdlib.Result.t

a =.= b is unify a b |> Result.map fst

val (=?=) : t -> t -> bool

a =?= b is true iff a =.= b is an Ok _ value

OCaml

Innovation. Community. Security.