Programming Languages and Systems

Volume 4807 of the series Lecture Notes in Computer Science pp 38-53

Monadic, Prompt Lazy Assertions in Haskell

  • Olaf ChitilAffiliated withUniversity of Kent
  • , Frank HuchAffiliated withUniversity of Kiel

* Final gross prices may vary according to local VAT.

Get Access


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.