Modular generic programming with extensible superclasses

Martin Sulzmann, Meng Wang

    Research output: Chapter in Book/Report/Conference proceedingConference Contribution (Conference Proceeding)

    2 Citations (Scopus)
    235 Downloads (Pure)

    Abstract

    "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.
    Original languageEnglish
    Title of host publicationWGP '06 Proceedings of the 2006 ACM SIGPLAN workshop on Generic programming
    PublisherAssociation for Computing Machinery
    Pages55-65
    Number of pages11
    DOIs
    Publication statusPublished - 16 Sept 2016

    Research Groups and Themes

    • Programming Languages

    Keywords

    • generic programming
    • type classes

    Fingerprint

    Dive into the research topics of 'Modular generic programming with extensible superclasses'. Together they form a unique fingerprint.

    Cite this