diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-08-08 10:28:32 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-08-08 10:28:32 -0400 |
commit | baf22271ef6e646c97ddfa1e4193a8857816c67d (patch) | |
tree | 1d34bf6404d3e94e6862c5fedbc4e53ed6bab883 /tests/datatypeP.lac | |
parent | 51fd5b1af6b2af7706c0c8604129d99e504a2d36 (diff) |
Parametrized datatypes through explify
Diffstat (limited to 'tests/datatypeP.lac')
-rw-r--r-- | tests/datatypeP.lac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/datatypeP.lac b/tests/datatypeP.lac new file mode 100644 index 00000000..12389322 --- /dev/null +++ b/tests/datatypeP.lac @@ -0,0 +1,10 @@ +datatype option a = None | Some of a + +val none : option int = None +val some_1 : option int = Some 1 + +val f = fn t ::: Type => fn x : option t => + case x of None => None | Some x => Some (Some x) + +val none_again = f none +val some_1_again = f some_1 |