[MLton-devel] hash-type.fun

Stephen Weeks MLton@mlton.org
Fri, 9 May 2003 10:09:10 -0700


> Anyways, reflecting on the change I made, it now seems to be equivalent
> to:
> 
>          val same: tree * tree -> bool =
>             fn (Var a, Var a') => Tyvar.equals (a, a')
>              | (Con (c, ts), Con (c', ts')) =>
>                   Tycon.equals (c, c')
>                   andalso Vector.equals (ts, ts', equals)
>              | _ => false

I like this version.

> and the only reason I can think that this wasn't the original code is that
> something was relying on the fact that type constructor arities wouldn't
> change.  (Now, that "something" might be the (minor) optimization of using
> Vector.forall2 and avoiding the length equality test.) 

I think this is it.  Type constructor arities had never changed before
phantom types.


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel