
On Sat, Sep 25, 2010 at 2:21 AM, Antoine Latter
Why is this patch a good thing?
Maybe it isn't. However the documentation of throwIO states that it should be used in preference of throw because it guarantees ordering with respect to other IO actions: http://haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/Control-Excep... Now the question is does it matter whether we use throw or throwIO in (for example): catchJust :: Exception e => (e -> Maybe b) -- ^ Predicate to select exceptions -> IO a -- ^ Computation to run -> (b -> IO a) -- ^ Handler -> IO a catchJust p a handler = catch a handler' where handler' e = case p e of Nothing -> throwIO e Just b -> handler b Maybe I'm missing something obvious. In that case, sorry for the noise. Regards, Bas