From: Matthew F. <mat...@gm...> - 2013-11-22 14:35:57
|
On Thu, Nov 21, 2013 at 7:09 PM, Henry Cejtin <hen...@sb...> wrote: > Reading your mail I checked, and I see that MLton believes that ''a > VectorSlice.slice > is also an eq type (when ''a is). That doesn't seem to be what the > basis library says, > nor is it what SML/NJ does. I.e., neither the polymorphic nor the monomorphic > vector slices should be eq types but both are. > > For the polymorphic versions, the fact that the basis library book > says (on pages 122 > and 405) says > structure ArraySlice:> ARRAY_SLICE > structure VectorSlice:> VECTOR_SLICE > and that the interface is > type 'a slice > for each of them, that seems to be explicitly disallowed. > > Unfortunately, that logic would also apply to all of the monomorphic > vectors (except > for CharVector and WideCharVector) since page 211 just says that MONO_VECTOR > specifies `type vector' and only those two have where type vector = and eq type. > > I must be missing something here. I don't think that you are missing anything. MLton is exposing more equality status than it should. I tried throwing a few ":>" opaque signature matchings for some of the slice functors, but there were a lot of type errors. Will probably take a bit more tweaking to hide the equality status all the way through. |