diff options
-rw-r--r-- | src/prepare.sml | 6 | ||||
-rw-r--r-- | tests/fromString.ur | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/prepare.sml b/src/prepare.sml index 64ccb465..f74b8747 100644 --- a/src/prepare.sml +++ b/src/prepare.sml @@ -60,6 +60,12 @@ fun prepExp (e as (_, loc), sns) = 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 --git a/tests/fromString.ur b/tests/fromString.ur index 7c1c5a34..dd7fb89d 100644 --- a/tests/fromString.ur +++ b/tests/fromString.ur @@ -8,6 +8,11 @@ fun s2f s = 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 @@ fun main () : transaction page = return <html><body> Error = {cdata (show _ (s2b "Error"))}<br/> False = {cdata (show _ (s2b "false"))}<br/> True = {cdata (show _ (s2b "trUE"))}<br/> + <br/> + Hi = {cdata (s2s "Hi")}<br/> </body></html> |