Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Modular generic function customisation -- Draft
[go: Go Back, main page]

Modular generic function customisation -- Draft

Authors
Ralf Lämmel

Note
The "Scrap your boilerplate approach" is all joint work with Simon Peyton Jones.
See the Scrap your boilerplate website.

Abstract
We enhance the "Scrap your boilerplate" approach to generic programming in Haskell by introducing a complementary technique for generic function customisation. The programmer can hand in type-specific cases in terms of Haskell's type classes, which implies that these cases can be scattered over different modules. Such modularity was out of reach for the preexisting customisation technique, which is based on type-safe cast and often combined with parameterisation. The new technique also improves on the preexisting technique in terms of efficiency: no runtime type checks have to be performed. Still the two techniques complement each other in terms of convenience and expressiveness. While the addition of modular customisation is a major improvement for the generic programmer, its implementation does not require any new language extension.

Bibtex entries
@unpublished{SYB3,
 author = "Ralf L{\"a}mmel",
 title = "{Modular generic function customisation}",
 year = 2004,
 notes = "Draft; To be submitted; Online since 08 Dec 2004"
}

View draft paper

Download Haskell code from paper


Website maintained by Ralf Lämmel (Email: ralf@cwi.nl)