#1236: System.Mem.Weak breaks referential transparency
------------------------------+---------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |          Owner:         
     Type:  bug               |         Status:  closed 
 Priority:  normal            |      Milestone:         
Component:  libraries/base    |        Version:  6.6    
 Severity:  normal            |     Resolution:  invalid
 Keywords:                    |     Difficulty:  Unknown
 Testcase:                    |   Architecture:  Unknown
       Os:  Unknown           |  
------------------------------+---------------------------------------------
Changes (by simonmar):

  * resolution:  => invalid
  * status:  new => closed

Comment:

 `mkWeakPtr` does not break referential transparency.  You cannot use it to
 write a function that returns a non-deterministic result.

 Think of it as being similar to `forkIO`, in that it postpones an `IO`
 action until some time in the future.  This is one of the reasons that
 `mkWeakPtr` must be in the `IO` monad, incedentally.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1236>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to