Brian Hulley wrote:
[EMAIL PROTECTED] wrote:
[...]
My reading of the semantics
(http://haskell.org/ghc/docs/latest/html/libraries/base/System-Mem-Weak.html#4)
is that you can be sure the proxy *object* is gone.
My problem is that I don't know what to make of the word
object in the
Brian Hulley wrote:
[...]
Ref.write proxiesRef $! (weakProxy : proxies)
(This is nothing to do with your main question, but the
strict application looks unnecessary there. Its right hand
side is already a constructor cell.)
[...]
In other words, if the entry for the proxy
in the
[EMAIL PROTECTED] wrote:
Brian Hulley wrote:
[...]
Ref.write proxiesRef $! (weakProxy : proxies)
(This is nothing to do with your main question, but the
strict application looks unnecessary there. Its right hand
side is already a constructor cell.)
Yes, thanks for pointing this
Hi,
I have the following data structures:
import System.Mem.Weak
data Proxy = ...
data Model = Model { _proxiesRef :: !(Ref.T [Weak Proxy]), ...}
(Ref.T is just a lifted IORef)
I was writing code like:
createProxy :: MonadIO m = Model - m Proxy
createProxy Model{_proxiesRef =