Skip to main content

Modular Generic Programming with Extensible Superclasses

Sulzmann, Martin and Wang, Meng (2006) Modular Generic Programming with Extensible Superclasses. In: Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming. ACM, New York, USA, pp. 55-65. ISBN 1-59593-492-8. (doi:10.1145/1159861.1159869) (KAR id:47466)

PDF Author's Accepted Manuscript
Language: English
Download (151kB) Preview
[thumbnail of local_143540.pdf]
This file may not be suitable for users of assistive technology.
Request an accessible format
Official URL:


"Generics for the Masses" (GM) and "Scrap your Boilerplate" (SYB) are generic programming approaches based on some inenious applications of Haskell type classes. To achieve modularity, the GM and SYB approach have been extended by using some experimental language extensions such as abstraction over type classes and recursive instances. Hence, the type class encodings behind the GM and SYB approach become less practical and harder to understand.We show that none of these type class features are necessary if we use the single feature of extensible superclasses, the complement of subclass extension. We formalize type classes with extensible superclasses as the combination of a previously introduced type-passing translation scheme and a general type class framework. Our results shed some new light on the use of type classes to support generic programming.

Item Type: Book section
DOI/Identification number: 10.1145/1159861.1159869
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 75 Electronic computers. Computer science
Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: Meng Wang
Date Deposited: 28 Feb 2015 15:50 UTC
Last Modified: 16 Nov 2021 10:19 UTC
Resource URI: (The current URI for this page, for reference purposes)
  • Depositors only (login required):


Downloads per month over past year