Hostname: page-component-cd9895bd7-dk4vv Total loading time: 0 Render date: 2024-12-26T07:58:42.778Z Has data issue: false hasContentIssue false

A static semantics for Haskell

Published online by Cambridge University Press:  08 July 2003

KARL-FILIP FAXÉN
Affiliation:
KTH/IMIT/LECS, Electrum 229, S-164 40 Kista, Sweden (e-mail: kff@it.kth.se)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

This paper gives a static semantics for Haskell 98, a non-strict purely functional programming language. The semantics formally specifies nearly all the details of the Haskell 98 type system, including the resolution of overloading, kind inference (including defaulting) and polymorphic recursion, the only major omission being a proper treatment of ambiguous overloading and its resolution. Overloading is translated into explicit dictionary passing, as in all current implementations of Haskell. The target language of this translation is a variant of the Girard–Reynolds polymorphic lambda calculus featuring higher order polymorphism and explicit type abstraction and application in the term language. Translated programs can thus still be type checked, although the implicit version of this system is impredicative. A surprising result of this formalization effort is that the monomorphism restriction, when rendered in a system of inference rules, compromises the principal type property.

Type
Research Article
Copyright
© 2002 Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.