diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 11:53:30 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-09-07 11:53:30 -0400 |
commit | f8d1a7fcf13f655200be366733c24233b5df7f9a (patch) | |
tree | d2b1505cfdcef966f5410d29930821ab39fa1818 /tests | |
parent | 9ae8932c978ab9c12f683745b47b3e0898581635 (diff) |
'read' type class
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fromString.ur | 6 | ||||
-rw-r--r-- | tests/show.ur | 6 | ||||
-rw-r--r-- | tests/show.urp | 5 | ||||
-rw-r--r-- | tests/toString.ur | 7 |
4 files changed, 7 insertions, 17 deletions
diff --git a/tests/fromString.ur b/tests/fromString.ur index 673503ae..7c1c5a34 100644 --- a/tests/fromString.ur +++ b/tests/fromString.ur @@ -1,15 +1,15 @@ fun s2i s = - case stringToInt s of + case read _ s of None => 0 | Some n => n fun s2f s = - case stringToFloat s of + case read _ s of None => 0.0 | Some n => n fun s2b s = - case stringToBool s of + case read _ s of None => False | Some b => b diff --git a/tests/show.ur b/tests/show.ur deleted file mode 100644 index 6a22fe64..00000000 --- a/tests/show.ur +++ /dev/null @@ -1,6 +0,0 @@ -fun main () : transaction page = return <html><body> - 6 = {cdata (show _ 6)}<br/> - 12.34 = {cdata (show _ 12.34)}<br/> - Hi = {cdata (show _ "Hi")}<br/> - False = {cdata (show _ False)}<br/> -</body></html> diff --git a/tests/show.urp b/tests/show.urp deleted file mode 100644 index fa69257a..00000000 --- a/tests/show.urp +++ /dev/null @@ -1,5 +0,0 @@ -debug -database dbname=test -exe /tmp/webapp - -show diff --git a/tests/toString.ur b/tests/toString.ur index f51ef098..6a22fe64 100644 --- a/tests/toString.ur +++ b/tests/toString.ur @@ -1,5 +1,6 @@ fun main () : transaction page = return <html><body> - 6 = {cdata (intToString 6)}<br/> - 12.34 = {cdata (floatToString 12.34)}<br/> - False = {cdata (boolToString False)}<br/> + 6 = {cdata (show _ 6)}<br/> + 12.34 = {cdata (show _ 12.34)}<br/> + Hi = {cdata (show _ "Hi")}<br/> + False = {cdata (show _ False)}<br/> </body></html> |