On Apr 27, 2008, at 10:05 AM, Jake Mcarthur wrote:
On Apr 27, 2008, at 9:36 AM, Conal Elliott wrote:
I think we *do* want unsafeNewEmptyTMVar inlined. Here's a
convenient caching wrapper:
cached :: STM a - TIVal a
cached m = TIVal m (unsafePerformIO newEmptyTMVarIO)
Yes, this is
Here's another angle on part of Jake's question:
Can we implement a type 'TIVal a' (preferably without unsafePerformIO) with
the following interface:
newIVal :: STM (TIVal a, a - STM ()) -- or IO (...)
force :: TIVal a - STM a
instance Functor IVal
instance Applicative
Conal Elliott said:
Can we implement a type 'TIVal a' (preferably without unsafePerformIO)
with the following interface:
newIVal :: STM (TIVal a, a - STM ()) -- or IO (...)
force :: TIVal a - STM a
instance Functor IVal
instance Applicative IVal
instance Monad
On Apr 26, 2008, at 7:18 PM, Conal Elliott wrote:
Here's another angle on part of Jake's question:
Can we implement a type 'TIVal a' (preferably without
unsafePerformIO) with the following interface:
newIVal :: STM (TIVal a, a - STM ()) -- or IO (...)
force :: TIVal a - STM a