
23 Feb
2011
23 Feb
'11
7:15 p.m.
On Thu, 24 Feb 2011, Mitar wrote:
In Haskell there is difference between throw and throwIO. Because of that I searched for a way to assure ordering in a similar manner of my assertions. But I have not found any. Wouldn't it be useful to have also assertIO counterpart of assert?
I would propose "Bool -> IO ()" type.
'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.