Skip to content

aspiwack/assert-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assert plugin

What

Drop in replacement for GHC's assert feature.

How to use:

  • Use assert in your code.
  • Turn on assertion checking by calling GHC with -fplugin=With.Assertions (otherwise assert doesn't have any effect the generated code)

Why

GHC's native assert only supports boolean assertions. So assert failures are not very informative. I wanted richer assertions, which could build up an assertion failure message (such as Validation in the validity package, which are supported out of the box by the assert plugin).

About

A GHC plugin for rich, switchable assertions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published