Skip to content

syntactic sugar that improves the usability of 'assert' and 'error' in Haskell

License

Notifications You must be signed in to change notification settings

Mikolaj/assert-failure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

assert-failure 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.

About

syntactic sugar that improves the usability of 'assert' and 'error' in Haskell

Resources

License

Stars

Watchers

Forks

Packages

No packages published