2008
DOI: 10.1007/978-3-540-89330-1_14
|View full text |Cite
|
Sign up to set email alerts
|

ML Modules and Haskell Type Classes: A Constructive Comparison

Abstract: Abstract. Researchers repeatedly observed that the module system of ML and the type class mechanism of Haskell are related. So far, this relationship has received little formal investigation. The work at hand fills this gap: It introduces type-preserving translations from modules to type classes and vice versa, which enable a thorough comparison of the two concepts.

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1
1

Citation Types

0
9
0

Year Published

2010
2010
2022
2022

Publication Types

Select...
3
2
1

Relationship

1
5

Authors

Journals

citations
Cited by 8 publications
(9 citation statements)
references
References 22 publications
0
9
0
Order By: Relevance
“…Haskell's deriving is tied to type classes, which have no direct parallel in OCaml. However, there is a well-known correspondence [6,21,30] between ML's modules and Haskell's type classes, which we use to guide our design. The relevant facets of the correspondence are illustrated in Figure 3:…”
Section: Modules and Type Classesmentioning
confidence: 99%
“…Haskell's deriving is tied to type classes, which have no direct parallel in OCaml. However, there is a well-known correspondence [6,21,30] between ML's modules and Haskell's type classes, which we use to guide our design. The relevant facets of the correspondence are illustrated in Figure 3:…”
Section: Modules and Type Classesmentioning
confidence: 99%
“…Wehr et al [21] give a comparison and translation between modules and type classes. This translation does not consider the implicit aspect of type classes, but does illustrate the relationship between type class features (e.g.…”
Section: Modular Type Classesmentioning
confidence: 99%
“…An interesting alternative to the classic dictionary translation formalized above is Wehr's representation of dictionaries as ML modules [21]. This avoids polymorphic recursion which may otherwise arise in the translation (although this is rare in practice).…”
Section: Dictionary Translationmentioning
confidence: 99%
“…Well-typedness is frequently dealt with in the type class literature (e.g. [20]) and we concentrate on semantic arguments.…”
Section: Correctnessmentioning
confidence: 99%