[MLton] Extending the SML Basis library (Library project)
Vesa Karvonen
vesa.karvonen at cs.helsinki.fi
Wed Oct 18 03:00:06 PDT 2006
Quoting Stephen Weeks <sweeks at sweeks.com>:
[...]
> > The major problem with [...] making Iso.t an abstract type [...] is
> > that one can no longer make polymorphic isomorphisms (courtesy of the
> > value restriction). [...]
>
> In my experience, relying on the value restriction, which is quite
> syntactically sensitive, is often, although not always, a design
> mistake. [...]
You are probably right about the general case. However, I think that this
is a special case where the value restriction isn't that problematic.
Unless you really need to perform some side-effect to make the isomorphism,
you should be able to just eta-expand the elements (injection and projection
functions) of the isomorphism.
-Vesa Karvonen
More information about the MLton
mailing list