skip to main content
10.1145/1159842.1159854acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

An extensible dynamically-typed hierarchy of exceptions

Published: 17 September 2006 Publication History

Abstract

In this paper we address the lack of extensibility of the exception type in Haskell. We propose a lightweight solution involving the use of existential types and the Typeable class only, and show how our solution allows a fully extensible hierarchy of exception types to be declared, in which a single overloaded catch operator can be used to catch either specific exception types, or exceptions belonging to any subclass in the hierarchy. We also show how to combine the existing object-oriented framework OOHaskell with our design, such that OOHaskell objects can be thrown and caught as exceptions, with full support for implicit OOHaskell subtyping in the catch operator.

References

[1]
F. W. Burton. Type extension through polymorphism. ACM Trans. Program. Lang. Syst., 12(1):135--138, 1990.]]
[2]
S. Finne, D. Leijen, E. Meijer, and S. Peyton Jones. Calling Hell from Heaven and Heaven from Hell. In ACM SIGPLAN International Conference on Functional Programming (ICFP'99), pages 114--125, Paris, Sept. 1999. ACM.]]
[3]
M. Fluet and R. Pucella. Phantom types and subtyping. In TCS '02: Proceedings of the IFIP 17th World Computer Congress - TC1 Stream / 2nd IFIP International Conference on Theoretical Computer Science, pages 448--460, Deventer, The Netherlands, The Netherlands, 2002. Kluwer, B.V.]]
[4]
O. Kiselyov and R. Lammel. Haskell's overlooked object system, 2005. http://homepages.cwi.nl/~ralf/OOHaskell/.]]
[5]
R. Lammel and S. Peyton Jones. Scrap your boilerplate: a practical approach to generic programming. In ACM SIGPLAN International Workshop on Types in Language Design and Implementation (TLDI'03), pages 26--37, New Orleans, Jan. 2003. ACM.]]
[6]
A. Loh and R. Hinze. Open data types and open functions. In Eighth ACM-SIGPLAN International Symposium on Principles and Practice of Declarative Programming (PPDP'06), Venice, Italy, July 2006. ACM.]]
[7]
S. Marlow, S. Peyton Jones, A. Moran, and J. Reppy. Asynchronous exceptions in Haskell. In ACM Conference on Programming Languages Design and Implementation (PLDI'01), pages 274--285, Snowbird, Utah, June 2001. ACM.]]
[8]
J. Nordlander. O'Haskell. http://www.cs.chalmers.se/nordland/ohaskell/.]]
[9]
J. Nordlander. O'Haskell rationale. http://www.cs.chalmers.se/nordland/ohaskell/rationale.html.]]
[10]
S. Peyton Jones, A. Reid, C. Hoare, S. Marlow, and F. Henderson. A semantics for imprecise exceptions. In ACM Conference on Programming Languages Design and Implementation (PLDI'99), pages 25--36, Atlanta, May 1999. ACM.]]
[11]
M. Pil. Dynamic types and type dependent functions. In Implementation of Functional Languages, pages 169--185, 1998.]]
[12]
M. Shields and S. L. P. Jones. Object-oriented style overloading for haskell. Electronic Notes in Theoretical Computer Science, 59(1), 2001.]]

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
Haskell '06: Proceedings of the 2006 ACM SIGPLAN workshop on Haskell
September 2006
131 pages
ISBN:1595934898
DOI:10.1145/1159842
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 17 September 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Haskell
  2. exceptions

Qualifiers

  • Article

Conference

ICFP06
Sponsor:

Acceptance Rates

Overall Acceptance Rate 57 of 143 submissions, 40%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 19 Feb 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media