File: README.md

package info (click to toggle)
haskell-assert-failure 0.1.2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 64 kB
  • sloc: haskell: 64; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 902 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
assert-failure [![Build Status](https://secure.travis-ci.org/Mikolaj/assert-failure.png)](http://travis-ci.org/Mikolaj/assert-failure) [![Hackage](https://img.shields.io/hackage/v/assert-failure.svg)](https://hackage.haskell.org/package/assert-failure)
==============

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](http://hackage.haskell.org/package/LambdaHack) game engine.