diff tests/datatypeP.lac @ 193:8a70e2919e86

Specialization of single-parameter datatypes
author Adam Chlipala <adamc@hcoop.net>
date Fri, 08 Aug 2008 17:55:51 -0400
parents aa54250f58ac
children
line wrap: on
line diff
--- a/tests/datatypeP.lac	Fri Aug 08 10:59:06 2008 -0400
+++ b/tests/datatypeP.lac	Fri Aug 08 17:55:51 2008 -0400
@@ -8,3 +8,14 @@
 
 val none_again = f none
 val some_1_again = f some_1
+
+val show = fn t ::: Type => fn x : option t => case x of None => "None" | Some _ => "Some"
+
+val page = fn x => <html><body>
+        {cdata (show x)}
+</body></html>
+
+val main : unit -> page = fn () => <html><body>
+        <li><a link={page none_again}>None</a></li>
+        <li><a link={page some_1_again}>Some 1</a></li>
+</body></html>