Assertion in IO monad

Mitar mmitar at
Mon Mar 28 12:05:40 CEST 2011


On Fri, Mar 25, 2011 at 5:43 PM, Simon Marlow <marlowsd at> wrote:
> I think
>  evaluate (assert ...)
> is guaranteed to work.

I made something like:

assertIO :: Bool -> IO ()
assertIO cond = evaluate (assert cond ())

But the problem is that exception raised have line information of this
definition and not of the call itself.


More information about the Libraries mailing list