# HG changeset patch # User Adam Chlipala # Date 1220803013 14400 # Node ID 550100a44ccab4344258132bb1f77da3790269b8 # Parent df00701f2323fb459be12149b0f2942f7f5a6bef 'read' for strings diff -r df00701f2323 -r 550100a44cca src/prepare.sml --- a/src/prepare.sml Sun Sep 07 11:53:30 2008 -0400 +++ b/src/prepare.sml Sun Sep 07 11:56:53 2008 -0400 @@ -60,6 +60,12 @@ in ((ECon (dk, pc, SOME e), loc), sns) end + | ESome (t, e) => + let + val (e, sns) = prepExp (e, sns) + in + ((ESome (t, e), loc), sns) + end | EFfi _ => (e, sns) | EFfiApp (m, x, es) => let diff -r df00701f2323 -r 550100a44cca tests/fromString.ur --- a/tests/fromString.ur Sun Sep 07 11:53:30 2008 -0400 +++ b/tests/fromString.ur Sun Sep 07 11:56:53 2008 -0400 @@ -8,6 +8,11 @@ None => 0.0 | Some n => n +fun s2s s = + case read _ s of + None => "Error" + | Some s => s + fun s2b s = case read _ s of None => False @@ -23,4 +28,6 @@ Error = {cdata (show _ (s2b "Error"))}
False = {cdata (show _ (s2b "false"))}
True = {cdata (show _ (s2b "trUE"))}
+
+ Hi = {cdata (s2s "Hi")}