summaryrefslogtreecommitdiff
path: root/tests/datatypeP.lac
diff options
context:
space:
mode:
Diffstat (limited to 'tests/datatypeP.lac')
-rw-r--r--tests/datatypeP.lac11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/datatypeP.lac b/tests/datatypeP.lac
index 12389322..171d8812 100644
--- a/tests/datatypeP.lac
+++ b/tests/datatypeP.lac
@@ -8,3 +8,14 @@ val f = fn t ::: Type => fn x : option t =>
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>