diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-08-08 17:55:51 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-08-08 17:55:51 -0400 |
commit | b9b67597324deb6e6dfc8ef33c60c110abc2af7b (patch) | |
tree | 2ff5f7417692c2590916a6eeb55aa38bbb47516f /tests | |
parent | e2a9136ed7123cb8e5cac4a20cbce5467643ecd6 (diff) |
Specialization of single-parameter datatypes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/datatypeP.lac | 11 |
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> |