derive-2.0.0: A program and library to derive instances for data typesSource codeContentsIndex
A pseudo derivation. Derive a (non-recursive) fold function for the type which takes one function per alternative constructor. Each function takes the same arguments as the constructor and returns a value. When applied to a value the fold function applies the function for the matching constructor to the constructor fields. This provides a first-class alternative to pattern matching to deconstruct the data type.
makeFold :: DerivationSource
Produced by Haddock version 2.4.2