There was an error while loading. Please reload this page.
1 parent 8122d6d commit 961b4d7Copy full SHA for 961b4d7
chapter08-Declaring-types-and-classes/7.hs
@@ -0,0 +1,8 @@
1
+data Maybe' a = Nothing' | Just' a
2
+
3
+instance Eq a => Eq (Maybe' a) where
4
+ Nothing' == Nothing' = True
5
+ (Just' x) == (Just' y) = x == y
6
+ _ == _ = False
7
8
+-- Instance declaration of list is omitted.
0 commit comments