Re: [GHC] #1600: Optimisation: CPR the results of IO

error "I’m still alive?"`.
#1600: Optimisation: CPR the results of IO
-------------------------------------+-------------------------------------
Reporter: simonmar | Owner: nomeata
Type: task | Status: new
Priority: lowest | Milestone: 7.6.2
Component: Compiler | Version: 6.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: Runtime | Difficulty: Moderate (less
performance bug | than a day)
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+-------------------------------------
Changes (by nomeata):
* owner: => nomeata
Comment:
Interesting corner case: With nested CPR enabled, `GHC.TopHandler` in base
fails to compile with:
{{{
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 7.7.20131203 for x86_64-unknown-linux):
mkWWcpr:
non-algebraic or open body type a{tv a28d} [tv] but CPR type tm1()
}}}
The problem is this code:
{{{
#!haskell
case {__pkg_ccall_GC base shutdownHaskellAndExit
GHC.Prim.Int#
-> GHC.Prim.Int#
-> GHC.Prim.State#
GHC.Prim.RealWorld
-> (# GHC.Prim.State#
GHC.Prim.RealWorld #)}_d2VI
255 ds_d2VF eta_XG
of _ [Occ=Dead, Dmd=
participants (1)
-
GHC