Abstract
We describe a monad for checked, explicitly typed exceptions, which provides as a simple Haskell library what for other languages is a native feature. Multi parameter type classes and overlapping instances are the only essential extensions to Haskell 98 required.
This work has been partially supported by the EU (FEDER) and Spanish MEC/MICINN under grant TIN2007-68093-C02-02, Generalitat Valenciana under grant Emergentes GV/2009/024, and UPV-VIDI grant 3249 PAID0607.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Chakravarty, M.T., Keller, G., Peyton Jones, S., Marlow, S.: Associated types with class. In: POPL 2005: Proceedings of the 32nd symposium on Principles of programming languages, pp. 1–13. ACM Press, New York (2005)
Garrigue, J.: Programming with polymorphic variants. In: ML Workshop (1998)
Gosling, J., Joy, B., Steele, G.: The Java Language Specification, ch. 11.2. Sun Microsystems (1996)
Iborra, J.: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/control-monad-exception
Jones, M.P.: Type classes with functional dependencies. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, pp. 230–244. Springer, Heidelberg (2000)
Leijen, D., Meijer, E.: Domain specific embedded compilers. In: DSL 1999: Proceedings of the 2nd conference on Conference on Domain-Specific Languages, Berkeley, CA, USA, p. 9. USENIX Association (1999)
Leroy, X., Pessaux, F.: Type-based analysis of uncaught exceptions. ACM Trans. Program. Lang. Syst. 22(2), 340–377 (2000)
Liang, S., Hudak, P., Jones, M.: Monad transformers and modular interpreters. In: Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages (January 1995)
Marlow, S.: An extensible dynamically-typed hierarchy of exceptions. In: Haskell 2006: Proceedings of the 2006 ACM SIGPLAN workshop on Haskell, pp. 96–106. ACM, New York (2006)
Conor McBride, http://www.mail-archive.com/haskell-cafe@haskell.org/msg62512.html
Mitchell, N., Runciman, C.: Not all patterns, but enough - an automatic verifier for partial but sufficient pattern matching. In: Proceedings of the first ACM SIGPLAN symposium on Haskell, Victoria, British Columbia, Canada, September 2008, pp. 49–60. ACM (2008)
Teller, D., Spiwack, A., Varoquaux, T.: Catch me if you can: Towards type-safe, hierarchical, lightweight, polymorphic and efficient error management in ocaml. In: ML Workshop 2008 (2008)
Wadler, P.: The essence of functional programming. In: POPL 1992: Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 1–14. ACM, New York (1992)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Iborra, J. (2010). Explicitly Typed Exceptions for Haskell. In: Carro, M., Peña, R. (eds) Practical Aspects of Declarative Languages. PADL 2010. Lecture Notes in Computer Science, vol 5937. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11503-5_6
Download citation
DOI: https://doi.org/10.1007/978-3-642-11503-5_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-11502-8
Online ISBN: 978-3-642-11503-5
eBook Packages: Computer ScienceComputer Science (R0)