[GHC] #13176: Deprecate the realWorld#

GHC ghc-devs at haskell.org
Tue Jan 24 03:20:03 UTC 2017


#13176: Deprecate the realWorld#
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by dfeuer:

@@ -1,3 +1,3 @@
- There's some about that's intended to prevent problems with the real
- world. What if we deprecate `realWorld#`? People will still be able to
- shoot themselves in the foot by ''defining'' `realWorld#` in terms of
+ There's some messy code about that's intended to prevent problems with the
+ real world. What if we deprecate `realWorld#`? People will still be able
+ to shoot themselves in the foot by ''defining'' `realWorld#` in terms of

New description:

 There's some messy code about that's intended to prevent problems with the
 real world. What if we deprecate `realWorld#`? People will still be able
 to shoot themselves in the foot by ''defining'' `realWorld#` in terms of
 `runRW#`, but a warning in the documentation should hopefully be
 sufficient to prevent that.

 Another, considerably more invasive, option might be to use something like

 {{{#!hs
 runST# :: (forall s . State# s -> o) -> o

 data RealWorld :: * -> *
 runIO# :: (forall i . State# (RealWorld i) -> o) -> o
 }}}

 This would (I believe) provide a much stronger guarantee that the real
 world can't escape. But it would probably break considerably more code, so
 I doubt it would be worth the trouble.

--

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


More information about the ghc-tickets mailing list