From abb5d050e3c4175dde65a96e5f8cf7c822d5e2ec Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 5 Nov 2015 16:37:13 +0100 Subject: saving boilerplate --- ws2015/FFP/blaetter/03/FFP_U03_Funktoren.hs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'ws2015') diff --git a/ws2015/FFP/blaetter/03/FFP_U03_Funktoren.hs b/ws2015/FFP/blaetter/03/FFP_U03_Funktoren.hs index df5de5a..88ee00f 100644 --- a/ws2015/FFP/blaetter/03/FFP_U03_Funktoren.hs +++ b/ws2015/FFP/blaetter/03/FFP_U03_Funktoren.hs @@ -182,20 +182,10 @@ check l x = (map length . groupBy ((==) `on` length)) (take x l) instance Eq a => Eq (Options a) where None == None = True - None == _ = False One a == One a' = a == a' - One _ == _ = False Two a b == Two a' b' = a == a' && b == b' - Two _ _ == _ = False Three a b c == Three a' b' c' = a == a' && b == b' && c == c' - Three _ _ _ == _ = False + _ == _ = False instance Ord a => Ord (Tree a) where compare (Node x xs) (Node x' xs') = compare x x' `mappend` compare xs xs' - where - -- Siehe Data.Monoid - mappend LT _ = LT - mappend EQ EQ = EQ - mappend EQ LT = LT - mappend EQ GT = GT - mappend GT _ = GT -- cgit v1.2.3