comparison tests/option.ur @ 284:77a28e7430bf

intToString
author Adam Chlipala <adamc@hcoop.net>
date Sun, 07 Sep 2008 10:13:02 -0400
parents 71bafe66dbe1
children
comparison
equal deleted inserted replaced
283:c0e4ac23522d 284:77a28e7430bf
7 7
8 val show = fn x => case x of None => "None" | Some x => x 8 val show = fn x => case x of None => "None" | Some x => x
9 9
10 val show2 = fn x => case x of None => "None'" | Some x => show x 10 val show2 = fn x => case x of None => "None'" | Some x => show x
11 11
12 val page = fn x => <html><body> 12 val page = fn x => return <html><body>
13 {cdata (show x)} 13 {cdata (show x)}
14 </body></html> 14 </body></html>
15 15
16 val page2 = fn x => <html><body> 16 val page2 = fn x => return <html><body>
17 {cdata (show2 x)} 17 {cdata (show2 x)}
18 </body></html> 18 </body></html>
19 19
20 val main : unit -> page = fn () => <html><body> 20 val main : unit -> transaction page = fn () => return <html><body>
21 <li><a link={page none_Hi}>None1</a></li> 21 <li><a link={page none_Hi}>None1</a></li>
22 <li><a link={page some_Hi}>Some1</a></li> 22 <li><a link={page some_Hi}>Some1</a></li>
23 <li><a link={page2 none_some_Hi}>None2</a></li> 23 <li><a link={page2 none_some_Hi}>None2</a></li>
24 <li><a link={page2 some_some_Hi}>Some2</a></li> 24 <li><a link={page2 some_some_Hi}>Some2</a></li>
25 </body></html> 25 </body></html>