diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 11:56:53 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 11:56:53 -0400 |
commit | f2829abe30366bc78ce8e5bd6272fac06a7f5b84 (patch) | |
tree | b846e8bd29afc109cab20c1e0ee9c5cda2fd1028 /tests | |
parent | f8d1a7fcf13f655200be366733c24233b5df7f9a (diff) |
'read' for strings
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fromString.ur | 7 |
1 files changed, 7 insertions, 0 deletions
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> |