Monadic, Prompt Lazy Assertions in Haskell

  • Olaf Chitil
  • Frank Huch
Conference paper

DOI: 10.1007/978-3-540-76637-7_4

Part of the Lecture Notes in Computer Science book series (LNCS, volume 4807)
Cite this paper as:
Chitil O., Huch F. (2007) Monadic, Prompt Lazy Assertions in Haskell. In: Shao Z. (eds) Programming Languages and Systems. APLAS 2007. Lecture Notes in Computer Science, vol 4807. Springer, Berlin, Heidelberg

Abstract

Assertions test expected properties of run-time values without disrupting the normal computation of a program. We present a library for enriching Haskell programs with assertions. Expected properties can be specified in a parser-combinator like language. The assertions are lazy: they do not force evaluation but only examine what is evaluated by the program. They are also prompt: assertion failure is reported as early as possible. The implementation is based on lazy observations and continuation-based coroutines.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2007

Authors and Affiliations

  • Olaf Chitil
    • 1
  • Frank Huch
    • 2
  1. 1.University of KentUK
  2. 2.University of KielGermany

Personalised recommendations