From fc4bd44ff012a705ba7d1a26828335310e84f88d Mon Sep 17 00:00:00 2001 From: Aaro Koivukangas Date: Fri, 26 Dec 2025 19:15:56 +0200 Subject: [PATCH] 6 ex2 --- exercises/Set6.hs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/exercises/Set6.hs b/exercises/Set6.hs index 24f78fa..9939d99 100644 --- a/exercises/Set6.hs +++ b/exercises/Set6.hs @@ -25,10 +25,17 @@ instance Eq Country where -- Remember minimal complete definitions! instance Ord Country where - compare = todo -- implement me? - (<=) = todo -- and me? - min = todo -- and me? - max = todo -- and me? + compare Finland Norway = LT + compare Finland Switzerland = LT + compare Norway Switzerland = LT + compare Finland Finland = EQ + compare Norway Norway = EQ + compare Switzerland Switzerland = EQ + compare _ _ = GT + + --(<=) = todo -- and me? + --min = todo -- and me? + --max = todo -- and me? ------------------------------------------------------------------------------ -- Ex 3: Implement an Eq instance for the type Name which contains a String.