Re: [Haskell-cafe] Re: Tying a simple circularly STM linked list

2009-01-07 Thread John Ky
Thanks Chris, The undefined works for me. -John On Wed, Jan 7, 2009 at 11:11 AM, ChrisK hask...@list.mightyreason.comwrote: You can use undefined or error ... : {-# LANGUAGE RecursiveDo #-} import Control.Concurrent.STM import Control.Monad.Fix -- Transactional loop. A loop is a

[Haskell-cafe] Re: Tying a simple circularly STM linked list

2009-01-06 Thread ChrisK
You can use undefined or error ... : {-# LANGUAGE RecursiveDo #-} import Control.Concurrent.STM import Control.Monad.Fix -- Transactional loop. A loop is a circular link list. data Loop a = ItemLink { item :: a , prev :: TVar (Loop a) , next :: TVar (Loop a) } --