Assertion in IO monad

Simon Marlow marlowsd at gmail.com
Fri Mar 25 17:43:59 CET 2011


On 24/02/2011 03:28, Mitar wrote:
> Hi!
>
> On Thu, Feb 24, 2011 at 1:15 AM, Henning Thielemann
> <lemming at henning-thielemann.de>  wrote:
>> 'throw' is for exception handling, 'assert' is for debugging. What do you
>> intend to use 'assert' for? 'assert' is not a combination of 'if' and
>> 'throw'. It can be disabled by a GHC flag, if you think you do not need
>> debugging anymore.
>
> Exactly, I need it for debugging. But I would like to have ordering
> assured when debugging.

I think

   evaluate (assert ...)

is guaranteed to work.

Cheers,
	Simon



More information about the Libraries mailing list