[GHC] #11444: 8.0 rc1 panics in applyTypeToArgs

GHC ghc-devs at haskell.org
Thu Jan 12 08:47:03 UTC 2017


#11444: 8.0 rc1 panics in applyTypeToArgs
-------------------------------------+-------------------------------------
        Reporter:  osa1              |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.2.1
       Component:  Compiler          |              Version:  8.0.1-rc1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #13027            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Aha!  This is closely linked to #13027; read esp comment:23 on that
 ticket.

 In that comment I quote this Note from `CoreUtils`
 {{{
 Note [dataToTag speculation]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Is this OK?
    f x = let v::Int# = dataToTag# x
          in ...
 We say "yes", even though 'x' may not be evaluated.  Reasons

   * dataToTag#'s strictness means that its argument often will be
     evaluated, but FloatOut makes that temporarily untrue
          case x of y -> let v = dataToTag# y in ...
     -->
          case x of y -> let v = dataToTag# x in ...
     Note that we look at 'x' instead of 'y' (this is to improve
     floating in FloatOut).  So Lint complains.

     Moreover, it really *might* improve floating to let the
     v-binding float out
 }}}
 The remark about `FloatOut` is ''exactly'' what is happening here.

 So if we follow the "alternative path" described in comment:23, that'll
 fix this ticket too.

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


More information about the ghc-tickets mailing list