On Tue, Sep 28, 2010 at 9:05 AM, Felipe Lessa <[email protected]> wrote: > On Tue, Sep 28, 2010 at 11:01 AM, Antoine Latter <[email protected]> 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 [1], > using Hoogle [2] nor using Hayoo [3]. >
Funny - I had the module open in another window as I wrote my response. It's in GHC.Conc[1]: > unsafeIOToSTM :: IO a -> STM a defined as I had guessed. Antoine [1] http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/GHC-Conc.html#v%3AunsafeIOToSTM _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
