Module UnifyTypeSource

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:

Sourcetype t =
  1. | Equal
  2. | Unif of Lic.type_
  3. | Ko of string
Sourceval f : Lic.type_ list -> Lic.type_ list -> t