Assertion in IO monad

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


Hi!

On Fri, Mar 25, 2011 at 5:43 PM, Simon Marlow <marlowsd at gmail.com> 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.


Mitar



More information about the Libraries mailing list