The assert-failure package

[ Tags: bsd3, contract, control, library ] [ Propose Tags ]

This library contains syntactic sugar that makes it easier to write simple contracts with assert and error and report the values that violate contracts.


[Skip to Readme]

Properties

Versions 0.1, 0.1.1.0, 0.1.2.0, 0.1.2.1, 0.1.2.2
Dependencies base (>=4.6 && <5), pretty-show (>=1.6 && <2), text (>=0.11.2.3 && <2) [details]
License BSD3
Author Mikolaj Konarski
Maintainer Mikolaj Konarski <mikolaj.konarski@funktory.com>
Category Control, Contract
Home page https://github.com/Mikolaj/assert-failure
Bug tracker https://github.com/Mikolaj/assert-failure/issues
Source repository head: git clone git://github.com/Mikolaj/assert-failure.git
Uploaded Fri Sep 15 20:14:17 UTC 2017 by MikolajKonarski
Distributions NixOS:0.1.2.1
Downloads 2978 total (53 in the last 30 days)
Rating 2.0 (1 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-09-15 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for assert-failure-0.1.2.2

[back to package description]

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.