From 03bb6a8534324c24154297e6d62b6b437433c4a6 Mon Sep 17 00:00:00 2001 From: Martin Fredin Date: Mon, 3 Apr 2023 09:42:14 +0200 Subject: [PATCH] Fix sample-program --- sample-programs/basic-0 | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/sample-programs/basic-0 b/sample-programs/basic-0 index 35b9c04..bc71161 100644 --- a/sample-programs/basic-0 +++ b/sample-programs/basic-0 @@ -1,20 +1,15 @@ -data Bool () where { - True : Bool () +data Bool () where + True : Bool () False : Bool () -}; -even : Int -> Bool (); -even x = not (odd x) ; +not x = case x of + True => False + False => True + +even : Int -> Bool () +even x = not (odd x) +odd x = not (even x) -odd x = not (even x) ; - -not x = case x of { - True => False; - False => True; -}; - -f = g; -g = f;