Mercurial > urweb
annotate demo/listShop.ur @ 400:e756d3a47726
Fix a nasty driver bug, involving memory restarts and marked-up request strings
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 21 Oct 2008 13:54:48 -0400 |
parents | ab3177746c78 |
children | 8084fa9216de |
rev | line source |
---|---|
adamc@397 | 1 structure I = struct |
adamc@397 | 2 type t = int |
adamc@398 | 3 val toString = show _ |
adamc@398 | 4 val fromString = read _ |
adamc@397 | 5 end |
adamc@397 | 6 |
adamc@397 | 7 structure S = struct |
adamc@397 | 8 type t = string |
adamc@398 | 9 val toString = show _ |
adamc@398 | 10 val fromString = read _ |
adamc@397 | 11 end |
adamc@397 | 12 |
adamc@397 | 13 structure IL = ListFun.Make(I) |
adamc@397 | 14 structure SL = ListFun.Make(S) |
adamc@397 | 15 |
adamc@397 | 16 fun main () = return <xml><body> |
adamc@397 | 17 Pick your poison:<br/> |
adamc@397 | 18 <li> <a link={IL.main ()}>Integers</a></li> |
adamc@397 | 19 <li> <a link={SL.main ()}>Strings</a></li> |
adamc@397 | 20 </body></xml> |