Explicitly Typed Exceptions for Haskell

نویسنده

  • José Iborra
چکیده

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.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Signed and sealed

Language constructs for defining abstract types commonly come in two varieties: those that add and remove seals dynamically as values cross the abstraction boundary, and those that define the boundary statically using a type signature. Abstract types in dynamically-typed languages are generally defined using seals whereas statically-typed languages more typically use a signature; two prominent ...

متن کامل

A Specification for Dependently-Typed Haskell (Extended version)

We propose a semantics for Dependent Haskell, an extension of Haskell with full-spectrum dependent types. Our semantics consists of two strongly related languages. The rst is a Curry-style dependently-typed language with nontermination, irrelevant arguments, and equality abstraction. The second, strongly inspired by GHC’s core language FC, is its explicitly-typed analogue, suitable for implemen...

متن کامل

A Tutorial Implementation of a Dependently Typed Lambda Calculus

We present the type rules for a dependently typed core calculus together with a straightforward implementation in Haskell. We explicitly highlight the changes necessary to shift from a simply-typed lambda calculus to the dependently typed lambda calculus. We also describe how to extend our core language with data types and write several small example programs. The article is accompanied by an e...

متن کامل

Exception Handlers as Extensible Cases

Exceptions are an indispensable part of modern programming languages. They are, however, handled poorly, especially by higherorder languages such as Standard ML and Haskell: in both languages a well-typed program can unexpectedly fail due to an uncaught exception. In this paper, we propose a technique for type-safe exception handling. Our approach relies on representing exceptions as sums and a...

متن کامل

Explicit implicit parameters

In almost all languages arguments to functions are to be given explicitly in the program text. There are however a few interesting exceptions to this rule. In Haskell functions take arguments which are either passed explicitly or implicitly. An instance of the latter is the class system in Haskell where dictionaries are passed as evidence for class predicates. However, the construction as well ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010