[MLton-commit] r6235
Matthew Fluet
fluet at mlton.org
Sat Dec 1 11:43:29 PST 2007
Check that magic converts properly; yields 'better' error message if program has stdout output before show-sources data
----------------------------------------------------------------------
U mlton/trunk/mlprof/main.sml
----------------------------------------------------------------------
Modified: mlton/trunk/mlprof/main.sml
===================================================================
--- mlton/trunk/mlprof/main.sml 2007-12-01 14:37:29 UTC (rev 6234)
+++ mlton/trunk/mlprof/main.sml 2007-12-01 19:43:28 UTC (rev 6235)
@@ -127,7 +127,10 @@
case In.inputLine ins of
NONE => Error.bug "unexpected end of show-sources data"
| SOME l => l
- val magic = valOf (Word.fromString (line ()))
+ val magic =
+ case Word.fromString (line ()) of
+ NONE => Error.bug "expected magic"
+ | SOME w => w
fun vector (f: string -> 'a): 'a vector =
Vector.tabulate (valOf (Int.fromString (line ())),
fn _ => f (line ()))
More information about the MLton-commit
mailing list