From 1a39672b01dc236068475e2d1a8a6f21814cba7e Mon Sep 17 00:00:00 2001 From: Artyom Shalkhakov Date: Sat, 22 Dec 2018 14:15:51 +0200 Subject: More tests. --- tests/case.ur | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'tests/case.ur') diff --git a/tests/case.ur b/tests/case.ur index b131b27b..a6f4c700 100644 --- a/tests/case.ur +++ b/tests/case.ur @@ -11,6 +11,22 @@ datatype nat = O | S of nat 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)) +val shw = fn x : t => + case x of A => "A" | B => "B" + +fun main (): transaction page = return +
+

zero is two: {[shw (is_two O)]}

+

one is two: {[shw (is_two (S O))]}

+

two is two: {[shw (is_two (S (S O)))]}

+
+ + +
-- cgit v1.2.3