Proposal: Add throwSTM and generalize catchSTM
marlowsd at gmail.com
Sun Sep 26 15:46:23 EDT 2010
On 26/09/10 13:55, Bas van Dijk wrote:
> On Sun, Sep 26, 2010 at 6:13 PM, Antoine Latter<aslatter at gmail.com> wrote:
>> Your new catchSTM can be written from the old one:
>>> newCatchSTM stm h = catchSTM stm (h . fromJust . fromException . toException)
Agree in principle, but I don't think that implementation works, does
it? If the exception is the wrong type, fromJust will throw an error,
whereas you want to just re-throw the original exception.
> I will make a patch out of this and attach it to the ticket. We'll see
> what the GHC devs think of it.
Fine by me.
More information about the Libraries