
#13104: runRW# ruins join points -------------------------------------+------------------------------------- Reporter: lukemaurer | Owner: chessai Type: bug | Status: infoneeded Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: JoinPoints Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by sgraf): * status: new => infoneeded Comment: Actually, I don't think this reproduces any longer. What's actually the regression test here? The argument to `runST` in #12781 is properly eta- expanded in GHC 8.4.3. Any attempt to manually reproduce the issue with similar code as in the OP, e.g. {{{ f = runST (loop (0 :: Int)) where loop 1000 = return 42 loop n = loop (n+1) }}} leads to this Core for `f`: {{{ Rec { -- RHS size: {terms: 14, types: 11, coercions: 0, joins: 0/0} $wloop $wloop = \ ww_s2DT w_s2DQ -> case ww_s2DT of wild_Xk { __DEFAULT -> $wloop (+# wild_Xk 1#) w_s2DQ; 1000# -> (# w_s2DQ, lvl_r2Eo #) } end Rec } -- RHS size: {terms: 4, types: 2, coercions: 0, joins: 0/0} f1 f1 = \ w_s2DQ -> $wloop 0# w_s2DQ -- RHS size: {terms: 5, types: 30, coercions: 0, joins: 0/0} f f = case runRW# f1 of { (# ipv_a2Bw, ipv1_a2Bx #) -> ipv1_a2Bx } }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13104#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler