[GHC] #13104: runRW# ruins join points

GHC ghc-devs at haskell.org
Wed Jan 11 00:23:17 UTC 2017


#13104: runRW# ruins join points
-------------------------------------+-------------------------------------
        Reporter:  lukemaurer        |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:  JoinPoints
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 Where does this occurence of `runRW#` come from?

 Before adding hacks to the simplifier, it might be sufficient to eta-
 expand the argument there. For example, instead of
 {{{
 runST (ST st_rep) = case runRW# st_rep of (# _, a #) -> a
 }}}
 write
 {{{
 runST (ST st_rep) = case runRW# (\s. st_rep s) of (# _, a #) -> a
 }}}
 or, for good measure,
 {{{
 runST (ST st_rep) = case runRW# (oneShot (\s. st_rep s)) of (# _, a #) ->
 a
 }}}
 Have you tried that?

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


More information about the ghc-tickets mailing list