assert-failure

Syntactic sugar improving 'assert' and 'error'

https://github.com/Mikolaj/assert-failure

Version on this page:0.1.2.2
LTS Haskell 22.37:0.1.3.0
Stackage Nightly 2024-10-08:0.1.3.0
Latest on Hackage:0.1.3.0

See all snapshots assert-failure appears in

BSD-3-Clause licensed by Mikolaj Konarski
Maintained by Mikolaj Konarski
This version can be pinned in stack with:assert-failure-0.1.2.2@sha256:58d9502cb922357b0697ee4d06dabf216ce6e8959950ad8b11c6eb7a1ae579a5,2054

Module documentation for 0.1.2.2

Depends on 3 packages(full list with versions):
Used by 1 package in lts-13.19(full list with versions):

assert-failure Build Status Hackage

This library contains syntactic sugar that makes it easier to write simple contracts with ‘assert’ and ‘error’ and report the values that violate contracts. The original ‘assert’ function is here re-exported for convenience.

Make sure to enable assertions for your cabal package, e.g., by setting

ghc-options: -fno-ignore-asserts

in your .cabal file. Otherwise, some of the functions will have no effect at all.

The library emerged from the chaos of the tons of assertions (sometimes augmented by comments and trace printouts) and ‘error’ calls in the LambdaHack game engine.