[GHC] #11760: runST with lazy blackholing breaks referential transparency

GHC ghc-devs at haskell.org
Fri Apr 15 11:09:59 UTC 2016


#11760: runST with lazy blackholing breaks referential transparency
-------------------------------------+-------------------------------------
        Reporter:  Yuras             |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect result  |  Unknown/Multiple
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by obadz):

 My 2 cents is that we shouldn't have pure values that evaluate to non-
 deterministic/thread-dependent values unless an function marked `unsafe`
 was called.

 Maybe the current implementation of `Control.Monad.ST.Lazy.runST` can be
 moved to  `Control.Monad.ST.Lazy.unsafeRunST` and replaced by one that use
 `noDuplicate#`?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11760#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list