17 Oct
2004
17 Oct
'04
4:11 p.m.
Remi Turk wrote:
It definitely sounds nice, but is it actually possible to generalize e.g. MVar from "RealWorld" to "forall s" or are we always going to have to say:
v <- unsafeIOToST (newMVar / newChan ... )
I hadn't thought of that, but I don't think there's any problem with type MVar = STMVar RealWorld newMVar :: a -> ST s (STMVar s a) withMVar :: STMVar s a -> (a -> ST s b) -> ST s b ... For that matter it seems like we could (should?) have forkST :: ST s () -> ST s (STThreadId s) forkIO = forkST and so on. -- Ben