Add Applicative instance for STM

Bas van Dijk v.dijk.bas at
Sun May 16 07:54:28 EDT 2010


I was rewriting my threads package to use TVars instead of MVars when
I noticed that the following gave a type error:
new ∷ IO ThreadGroup
new = atomically $ ThreadGroup <$> newTVar 0 <*> newTMVar ()
because of a missing Applicative instance for STM.

So I propose adding one:

Discussion period: a few days, since I think this is hardly controversial.



More information about the Libraries mailing list