Catch me if you can Looking for type-safe, hierarchical, lightweight, polymorphic and efficient error management in OCaml - Archive ouverte HAL Access content directly
Conference Papers Year : 2008

Catch me if you can Looking for type-safe, hierarchical, lightweight, polymorphic and efficient error management in OCaml

Abstract

This is the year 2008 and ML-style exceptions are everywhere. Most modern languages, whether academic or industrial, feature some variant of this mechanism. Languages such as Java even feature static coverage-checking for such exceptions, something not available for ML languages, at least not without resorting to external tools. In this document, we demonstrate a design principle and a tiny library for managing errors in a functional manner, with static coverage-checking, automatically-inferred, structurally typed and hierarchical exceptional cases, with a reasonable run-time penalty. Our work is based on OCaml and features monads, polymorphic variants, compile-time code rewriting and trace elements of black magic.
Fichier principal
Vignette du fichier
monad.pdf (192.23 Ko) Télécharger le fichier
Origin Files produced by the author(s)
Loading...

Dates and versions

inria-00432575 , version 1 (16-11-2009)

Identifiers

  • HAL Id : inria-00432575 , version 1

Cite

David Teller, Arnaud Spiwack, Till Varoquaux. Catch me if you can Looking for type-safe, hierarchical, lightweight, polymorphic and efficient error management in OCaml. IFL 2008, Sep 2008, Hertfordshire, United Kingdom. 21 p. ⟨inria-00432575⟩
1400 View
2004 Download

Share

Gmail Mastodon Facebook X LinkedIn More