[MLton] getting String.fromString to return NONE

Michael Norrish Michael Norrish <Michael.Norrish@nicta.com.au>
Wed, 26 Jul 2006 11:50:54 +1000


mlton 20041109 doesn't seem to want to ever return NONE from this
function.  Rather it seems to be returning an acceptable prefix of the
string I pass it.  For example

  String.fromString "4\t"

just returns SOME "4", and String.fromString "\n" returns SOME "". 

(As opposed to String.fromString "4\\t", which returns SOME "4\t", and
String.fromString "\\n", which returns SOME "\n", as you might
expect.)

This return of a prefix doesn't seem called for by the Basis
description, and it certainly makes it difficult to tell if the input
is well-formed or not.  

>From looking at the change-log on the wiki, I'd guess that 20051202
has the same behaviour.

Michael.