Re: [Haskell-cafe] Weak pointers and referential transparency???

2006-09-13 Thread tpledger
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

[Haskell-cafe] Weak pointers and referential transparency???

2006-09-12 Thread tpledger
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

Re: [Haskell-cafe] Weak pointers and referential transparency???

2006-09-12 Thread Brian Hulley
[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

[Haskell-cafe] Weak pointers and referential transparency???

2006-09-09 Thread Brian Hulley
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 =