package lustre-v6

  1. Overview
  2. Docs

Define type-checking utilities

This unify function is quite specific. It can only unify 2 lists of types with at most one type variable (Any or Overload).

Moreover, it deals with the concept of overloaded variable. Currently, an overloaded variable is polymorphic var that can only be an int or a real.

f has 3 kinds of results:

  • the 2 lists are equal
  • the 2 lists are unifiable, via a substitution of one Any type
  • the 2 lists are not unifiable with one substitution
type t =
  1. | Equal
  2. | Unif of Lic.type_
  3. | Ko of string
val f : Lic.type_ list -> Lic.type_ list -> t