Open MathiasBartl opened 9 years ago
Aren't normal Haskell asserts turned off automatically when compiling with optimization?
I just want to kind of assertions, one that are checked during every test, and one that are onky checked during single threated tests.
Ah well then it sounds like you just need a runtime boolean flag that controls whether the asserts are active -- i.e. passed in as an argument to the function that builds the test suite, or via a Reader monad.
Yes technically its simple, but should be an very usefull idea.
Regarding the problems with resize, I thought about making some assertions that hold for single thread use, like f.e. adding a value increses the size by one (dumb example). Since otherwise there are very few assertions that can be made in multi threted code. How do I best realize assertions that depend on some flag?