A Pattern Logic for Prompt Lazy Assertions in Haskell

  • Olaf Chitil
  • Frank Huch
Conference paper

DOI: 10.1007/978-3-540-74130-5_8

Part of the Lecture Notes in Computer Science book series (LNCS, volume 4449)
Cite this paper as:
Chitil O., Huch F. (2007) A Pattern Logic for Prompt Lazy Assertions in Haskell. In: Horváth Z., Zsók V., Butterfield A. (eds) Implementation and Application of Functional Languages. IFL 2006. Lecture Notes in Computer Science, vol 4449. Springer, Berlin, Heidelberg


Assertions test expected properties of run-time values without disrupting the normal computation of a program. Here we present a library for enriching programs in the lazy language Haskell with assertions. Expected properties are written in an expressive pattern logic that combines pattern matching with logical operations and predicates. The presented assertions are lazy: they do not force evaluation but only examine what is evaluated by other parts of the program. They are also prompt: assertion failure is reported as early as possible, before a faulty value is used by the main computation.


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.CAU KielGermany

Personalised recommendations