The assert-failure package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

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

Versions0.1, 0.1.1.0, 0.1.2.0, 0.1.2.0, 0.1.2.1, 0.1.2.2
Change logNone available
Dependenciesbase (==4.*), pretty-show (>=1.6 && <2), text (>=0.11.2.3 && <2) [details]
LicenseBSD3
AuthorMikolaj Konarski
MaintainerMikolaj Konarski <mikolaj.konarski@funktory.com>
CategoryControl, Contract
Home pagehttps://github.com/Mikolaj/assert-failure
Bug trackerhttps://github.com/Mikolaj/assert-failure/issues
Source repositoryhead: git clone git://github.com/Mikolaj/assert-failure.git
UploadedMon Sep 11 16:45:20 UTC 2017 by MikolajKonarski

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for assert-failure-0.1.2.0

[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.