[GHC] #13233: typePrimRep panic while compiling GHC with profiling

GHC ghc-devs at haskell.org
Mon Feb 6 20:20:44 UTC 2017


#13233: typePrimRep panic while compiling GHC with profiling
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.2.1
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 Ahhh, I see what is happening here. `CoreArity.mkEtaWW` is refusing to eta
 expand the value-level arguments of `(#,#)` as they are levity
 polymorphic,
 {{{#!hs
        | otherwise       -- We have an expression of arity > 0,
                          -- but its type isn't a function, or a binder
                          -- is levity-polymorphic
        = WARN( True, (ppr orig_n <+> ppr orig_ty) $$ ppr orig_expr )
          (getTCvInScope subst, reverse eis)
 }}}

 Had I been compiling with `DEBUG` this would have been plainly obvious but
 I was lazily merely building with `BuildFlavour=prof`. Serves me right, I
 suppose.

 Anyways, this is a little hairy. Indeed eta expanding here would be quite
 suspicious. Really, it seems like we never should have produced the lambda
 being scrutinised in comment:7 at all given that it is levity polymorphic.
 I'll have to look into where this is coming from.

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


More information about the ghc-tickets mailing list