Generics as a Library. Oliveira, Hinze and Löh.
A generic function is a function that is defined on the structure of data types: with a single definition, we obtain a function that works for many data types. In contrast, an ad-hoc polymorphic function requires a separate implementation for each data type. Previous work by Hinze on lightweight generic programming has introduced techniques that allow the definition of generic functions directly in Haskell. A severe drawback of these approaches is that generic functions, once defined, cannot be extended with ad-hoc behaviour for new data types, precluding the design of a customizable generic programming library based on the se techniques. In this paper, we present a revised version of Hinze's Generics for the masses approach that overcomes this limitation. Using our new technique, writing a customizable generic programming library in Haskell 98 is possible.
Pushing forward the state of the generics art in Haskell 98. They also discuss the application of their technique to the expression problem.
(Thanks to Jacques Carette for pointing in this direction.)
Recent comments
15 weeks 5 days ago
20 weeks 21 hours ago
21 weeks 5 days ago
21 weeks 5 days ago
24 weeks 2 days ago
29 weeks 7 hours ago
29 weeks 9 hours ago
29 weeks 3 days ago
29 weeks 3 days ago
32 weeks 2 days ago