[MLton] Real.scan (and Real.fromString)

Stephen Weeks sweeks at sweeks.com
Wed Sep 6 16:09:31 PDT 2006


> According to my reading of the regular expression in the basis book, the
> string "~0" should be accepted (completely) by Real.scan, but it is rejected.
> On the other hand, "-0" is completely accepted.

I agree that "~0" should be accepted.  I just tested the following
program on MLton 20060213 and it worked fine.  What version of MLton
is failing for you?


  val s =
     case StringCvt.scanString Real.scan "~0" of
        NONE => "NONE"
      | SOME x => Real.toString x
  
  val () = print (concat [s, "\n"])



More information about the MLton mailing list