Re: [MLton] substring an eq type?
Matthew Fluet <[email protected]> Thu, 21 Nov 2013 15:17:27 -0500
| Newsgroups | gmane.comp.lang.ml.mlton.devel |
|---|---|
| Message-ID | <CAMrhFL5AV5ms6idpt0FnV+Kc8yzp2e+NCWXMudsKQh00e08VOA@mail.gmail.com> |
On Wed, Nov 20, 2013 at 6:12 PM, Henry Cejtin <[email protected]> wrote: > In MLton, as opposed to SML/NJ, substring is an equality type. > My reading of the basis library book seems to indicate that this is > incorrect. > Am I missing something? Agreed that Substring.substring should not be an equality type. I think that the reason that it is showing up as an equality type in MLton, despite the fact that "signature SUBSTRING" has "type subsstring" (and not "eqtype substring"), is that we consistently use "where type" constraints to propagate the type equality with the originally defined CharVectorSlice.slice type, which can be inferred to have equality status. It might be possible to hide the equality status of the CharVectorSlice.slice type at its definition point, which would solve the issue. ------------------------------------------------------------------------------ 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