Useful GHC extensions
We have already used a number of extensions available in GHC, such as MultiParamTypeClasses, TypeFamilies, FlexibleInstances, and so on. The nice thing about most extensions in GHC is that, if you accidentally try to use a language feature that is behind an extension, GHC gives you a hint about which extension you forgot.
In this last section, we'll look at some more useful extensions available in reasonably modern GHC. There are other extensions, of course, and this is just a glimpse. For an exhaustive list of currently supported extensions, see the Language.Haskell.Extension
module from the Cabal
library.
Monomorphism Restriction
Some of the most confusing type errors originate from the monomorphism restriction (MR). Consider ...
Get Haskell High Performance Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.