[MLton] Specification of scan in STRING

Vesa Karvonen vesa.a.j.k at gmail.com
Tue Mar 6 03:14:52 PST 2007


On 3/5/07, Matthew Fluet <fluet at tti-c.org> wrote:
> Vesa Karvonen wrote:
> > [...] MLton Basis library implementation of the STRING signature is
> >
> > val scan: (Char.char, 'a) StringCvt.reader -> (string, 'a) StringCvt.reader
> >            ^^^^^^^^^
> >
> > while the Basis spec says that it should be
> >
> > val scan : (char, 'a) StringCvt.reader -> (string, 'a) StringCvt.reader
> >             ^^^^
> >
> > Which one needs to be fixed?
>
> When Wesley submitted the WideChar patch, we noted the discrepancy:
>    http://mlton.org/pipermail/mlton/2007-February/029579.html

Oh, I should've spotted that while skimming the mails.

> Our conclusion is that the Basis spec is incorrect here, since every
> 'scan' function in the Basis Library is in terms of Char.char (many
> times via the top-level 'char' type).  In particular, in the CHAR
> signature, which has a local 'char' type, the 'scan' function is in
> terms of Char.char.  And, although the Basis specification notes that
> STRING.scan cannot be implemented as a simple iterative application of
> CHAR.scan, the implication is that STRING.scan and CHAR.scan are closely
> related.

Yeah, I agree with your conclusions.

-Vesa Karvonen

P.S. I started using/trying Gmail and I wonder where some of my posts
to the mlton-user list might be (spam filter, I guess).



More information about the MLton mailing list