[GHC] #10176: Invalid core generated with GHC 7.10 RC3

GHC ghc-devs at haskell.org
Sat Mar 21 11:49:18 UTC 2015


#10176: Invalid core generated with GHC 7.10 RC3
-------------------------------------+-------------------------------------
        Reporter:  NeilMitchell      |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  high              |               Milestone:  7.10.1
       Component:  Compiler          |                 Version:  7.10.1-rc3
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by NeilMitchell):

 Running {{{ghc -outputdir obj -O -ddump-simpl Buggy.hs}}} produces the
 output:

 {{{
 case (\ _ [Occ=Dead] _ [Occ=Dead, OS=OneShot] ->
         case lvl_r1lh unit_XyJ of wild2_00 { })
      `cast` ((<()>_R -> Sym (GHC.Types.NTCo:IO[0] <GHC.Prim.Any>_R))
              ; Sym (Buggy.NTCo:ReaderT[0] <()>_R <GHC.Prim.Any>_R)
              :: (()
                  -> GHC.Prim.State# GHC.Prim.RealWorld
                  -> (# GHC.Prim.State# GHC.Prim.RealWorld, GHC.Prim.Any
 #))
                 ~R# ReaderT () GHC.Prim.Any)
 of _ [Occ=Dead] {
 }
 }}}

 Ignoring the cast (which I don't think is relevant) that is:

 {{{
 case (\_ _ -> ...) of {}
 }}}

 I've reduced the bug so the code only depends on {{{Prelude}}}, requiring
 no external libraries. I have not been able to remove the requirement for
 two modules. The partial implementation of {{{ReaderT}}} is taken from the
 {{{transformers}}} library then specialised to {{{IO}}}.

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


More information about the ghc-tickets mailing list