Nice use of QualifiedDo, this seems like a cool approach!
There's one detail that I wondered about, though (might just be that I'm missing something).
The current type of catch is:
catch
:: forall e a e1 e2
. Exception e
=> EIO e1 a
-> (e -> EIO e2 a)
-> EIO (Delete e (e1 <> e2)) a
Shouldn't it result in EIO (Delete e e1 <> e2) instead? If another exception of the type e is thrown in the exception handler, it will not be caught as far as I know.
For example the following will still result in an uncaught exception:
Nice use of
QualifiedDo
, this seems like a cool approach!There's one detail that I wondered about, though (might just be that I'm missing something). The current type of
catch
is:Shouldn't it result in
EIO (Delete e e1 <> e2)
instead? If another exception of the typee
is thrown in the exception handler, it will not be caught as far as I know.For example the following will still result in an uncaught exception: