[nem-en] subtyping of -> and tuples

Kamil Dworakowski kamil.dworakowski at googlemail.com
Fri Jun 15 11:37:31 CEST 2007


Why there is no subtyping for -> and tuples?

code from MType.Require:

    | (Fun (f1, t1), Fun (f2, t2)) =>
      // f2.Require (f1) && t1.Require (t2)
      f1.Unify (f2) && t1.Unify (t2)
      
    | (Tuple (l1), Tuple (l2))
      when List.Length (l1) == List.Length (l2) =>
      List.ForAll2 (l1, l2, fun (x : TyVar, y : TyVar) { x.Unify (y) })


-- Kamil Dworakowski



More information about the devel-en mailing list