Authors
Ralf Hinze, Johan Jeuring, Andres Löh
Publication date
2006/4/24
Conference
International Symposium on Functional and Logic Programming
Pages
208-225
Publisher
Springer Berlin Heidelberg
Description
A robust software component fulfills a contract: it expects data satisfying a certain property and promises to return data satisfying another property. The object-oriented community uses the design-by-contract approach extensively. Proposals for language extensions that add contracts to higher-order functional programming have appeared recently. In this paper we propose an embedded domain-specific language for typed, higher-order and first-class contracts, which is both more expressive than previous proposals, and allows for a more informative blame assignment. We take some first steps towards an algebra of contracts, and we show how to define a generic contract combinator for arbitrary algebraic data types. The contract language is implemented as a library in Haskell using the concept of generalised algebraic data types.
Total citations
20062007200820092010201120122013201420152016201720182019202020212022202320242746681184924561321
Scholar articles
R Hinze, J Jeuring, A Löh - Functional and Logic Programming: 8th International …, 2006