Re: [MLton] substring an eq type?
Matthew Fluet <[email protected]> Fri, 22 Nov 2013 09:35:49 -0500
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <CAMrhFL4hGxiHbNDrnGiHqzN=1D9CGRL-z155ubT4+77t75X_Wg@mail.gmail.com> |
On Thu, Nov 21, 2013 at 7:09 PM, Henry Cejtin <[email protected]> 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. ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk