Deriving via: or, how to turn hand-written instances into an anti-pattern

Baldur Blöndal, Andres Löh, Ryan G. Scott

2018 · 14 citations · 9 references

Concepts

Abstract

Haskell's deriving construct is a cheap and cheerful way to quickly generate instances of type classes that follow common patterns. But at present, there is only a subset of such type class patterns that deriving supports, and if a particular class lies outside of this subset, then one cannot derive it at all, with no alternative except for laboriously declaring the instances by hand.

References

9