Skip to content

Commit 678fe4a

Browse files
Added explanatory comment to 'derive' statement
1 parent 690b9d1 commit 678fe4a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

exercises/chapter7/src/Data/AddressBook.purs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ data PhoneType
1717
| CellPhone
1818
| OtherPhone
1919

20+
{-| derive has not been discussed yet but will be
21+
covered in Ch 10. Here it is needed by the unit
22+
tests to define how to compare the PhoneType values
23+
(HomePhone, WorkPhone, etc).
24+
-}
2025
derive instance eqPhoneType :: Eq PhoneType
2126

2227
instance showPhoneType :: Show PhoneType where

0 commit comments

Comments
 (0)