A pattern logic for prompt lazy assertions in Haskell

  • Authors:
  • Olaf Chitil;Frank Huch

  • Affiliations:
  • University of Kent, UK;CAU Kiel, Germany

  • Venue:
  • IFL'06 Proceedings of the 18th international conference on Implementation and application of functional languages
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.