diff tests/case.lac @ 171:c7a6e6dbc318

Elaborating some basic pattern matching
author Adam Chlipala <adamc@hcoop.net>
date Thu, 31 Jul 2008 10:06:27 -0400
parents a158f8c5aa55
children
line wrap: on
line diff
--- a/tests/case.lac	Tue Jul 29 16:38:15 2008 -0400
+++ b/tests/case.lac	Thu Jul 31 10:06:27 2008 -0400
@@ -8,5 +8,9 @@
 
 datatype nat = O | S of nat
 
-val is_two = fn x : int_list =>
+val is_two = fn x : nat =>
         case x of S (S O) => A | _ => B
+
+val zero_is_two = is_two O
+val one_is_two = is_two (S O)
+val two_is_two = is_two (S (S O))