[GHC] #1236: System.Mem.Weak breaks referential transparency
GHC
trac at galois.com
Mon Mar 26 06:14:32 EDT 2007
#1236: System.Mem.Weak breaks referential transparency
------------------------------+---------------------------------------------
Reporter: drtomc at gmail.com | 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
More information about the Glasgow-haskell-bugs
mailing list