[MLton] Re: Windows ports and paths

Stephen Weeks MLton@mlton.org
Sun, 1 May 2005 02:34:49 -0700


> lib/mlton/basic/string0.sml defines toString as the identity.
> That is wrong

It's hardly fair to call it wrong since there's no spec :-).
String.toString means something different to the MLton library than it
does to the Basis library.  What you're looking for is called
String.escapeSML (a better name, I think, since is inserts SML escapes
into the string).

I've committed a fix that has the same effect as your patch, but uses
escapeSML and is structured differently, using types to help keep
track of when a string should contain mlb syntax.

> PS. Why does the MLton compiler reimplement tons of SML basis methods?

I developed a lot of the MLton libraries while doing other SML coding
years before MLton existed, and roughly in parallel with the
development of the Basis Library.  So it really wasn't
reimplementation.  We've stuck with the MLton libraries partly due to
of inertia and partly because they have a certain uniformity to
grouping, naming, and argument ordering that is an improvement over
the Basis Library and makes code easier to write and read.