Skip to content

Commit 7c3c841

Browse files
authored
Apply additional suggestions
1 parent 849e6a6 commit 7c3c841

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

language/Type-Classes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ derive newtype instance eqScore :: Eq Score
203203

204204
The compiler's built-in support for `Generic` unlocks convenient deriving for many other classes not listed above.
205205

206-
For example, if we wanted a `Show` instance for `MyADT`, it might seem like we're out of luck because neither `MyADT` is a `newtype` nor is `Show` listed as a class with built-in compiler support.
206+
For example, if we wanted to derive a `Show` instance for `MyADT` it might seem like we're out of luck: `Show` is not a class with built-in compiler support for deriving and `MyADT` is not a `newtype` (so we can't use newtype deriving).
207207

208208
But we _can_ use `genericShow`, which works with _any_ type that has a `Generic` instance. And recall that the compiler has built-in support for deriving a `Generic` instance for any type (including the `MyADT` type). We put all those pieces together like so:
209209

0 commit comments

Comments
 (0)