ML Modules and Haskell Type Classes:

  • Wehr S
N/ACitations
Citations of this article
12Readers
Mendeley users who have this article in their library.

Abstract

Researchers repeatedly observed that the module system of ML and the type class mechanism of Haskell are related. So far, this relationship has not been formally investigated. The work at hand fills this gap by presenting a constructive comparison between ML modules and Haskell type classes; that is, it introduces two formal translations from modules to type classes and vice versa, which enable a thorough comparison of the two concepts.The source language of the first translation is a subset of Standard ML. The target language is Haskell with common extensions and one new feature, which was developed as part of this work. The second translation maps a subset of Haskell 98 to ML with well-established extensions. I prove that the translations preserve type correctness and provide implementations for both.Building on the insights obtained from the translations, I present a thorough comparison between ML modules and Haskell type classes. Moreover, I evaluate to what extent the techniques used in the translations can be exploited for modular programming in Haskell and for programming with ad-hoc polymorphism in ML.

Cite

CITATION STYLE

APA

Wehr, S. (2005). ML Modules and Haskell Type Classes:, (November), 1–16.

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free