Skip to content
Snippets Groups Projects
unifyType.mli 760 B
Newer Older
(** Time-stamp: <modified the 28/08/2008 (at 15:58) by Erwan Jahier> *)

(** 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.
    
    [unify] 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 = 
  | Equal
  | Unif of Eff.type_
  | Ko of string (* a msg explaining why the unification failed *)

val f : Eff.type_ list -> Eff.type_ list -> t