Skip to content

Commit 961b4d7

Browse files
committed
[exercise] 8.7
1 parent 8122d6d commit 961b4d7

File tree

1 file changed

+8
-0
lines changed
  • chapter08-Declaring-types-and-classes

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)