[Haskell-cafe] Why is TChan GHC specific?

Peter Robinson thaldyron at gmail.com
Fri May 14 04:47:17 EDT 2010


On 14 May 2010 00:10, Derek Elkins <derek.a.elkins at gmail.com> wrote:
> On Thu, May 13, 2010 at 10:49 AM, Edward Amsden <eca7215 at cs.rit.edu> wrote:
>> On Wed, May 12, 2010 at 3:29 PM, Peter Robinson <thaldyron at gmail.com> wrote:
>>> As far as I know, TChan needs the 'retry' combinator which requires GHC's RTS.
>>> Same is true for TMVar, I think.
>>
>> (sorry for the doubling peter, I forgot reply-all)
>>
>> OK. I'm new to this and probably didn't know where to look, but I
>> didn't know that 'retry' was GHC specific.
>
> All of STM (Software Transactional Memory) is GHC-specific.

That's technically true for the "real" STM implementation, but the stm package
also contains the module 'Control.Sequential.STM' that provides a sequential
implementation which will work even without GHC's runtime.

  Peter


More information about the Haskell-Cafe mailing list