[Haskell-cafe] Relaxing atomicity of STM transactions
aslatter at gmail.com
Tue Sep 28 10:16:22 EDT 2010
On Tue, Sep 28, 2010 at 9:05 AM, Felipe Lessa <felipe.lessa at gmail.com> wrote:
> On Tue, Sep 28, 2010 at 11:01 AM, Antoine Latter <aslatter at gmail.com> wrote:
>> Isn't there an 'unsafeIOToSTM' function somewhere? Something like:
>>> unsafeIOToSTM (IO k) = STM k
>> Then you might not need the case statement.
> I thought there was, but I couldn't find it in the 'stm' package ,
> using Hoogle  nor using Hayoo .
Funny - I had the module open in another window as I wrote my response.
It's in GHC.Conc:
> unsafeIOToSTM :: IO a -> STM a
defined as I had guessed.
More information about the Haskell-Cafe