[GHC] #10260: last uses too much space with optimizations disabled

GHC ghc-devs at haskell.org
Fri Apr 17 07:54:50 UTC 2015


#10260: last uses too much space with optimizations disabled
-------------------------------------+-------------------------------------
        Reporter:  rwbarton          |                   Owner:  nomeata
            Type:  bug               |                  Status:  patch
        Priority:  normal            |               Milestone:
       Component:  Core Libraries    |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:  Phab:D847
-------------------------------------+-------------------------------------

Comment (by nomeata):

 >  And yet the comment is reasonably convincing. I'm not sure what to do
 here.

 I think we are doing the right thing here. As far as I know, we also take
 the number of arguments given by the user as an indication when things
 should inline or not; if we eta-expand PAPs, we take this possibility of
 control away from the user.

 In this particular case: What if I had written `last` this way
 intentional, so that the rule for `foldl` would _not_ fire here, but only
 after `last` was inlined at a position where it is passed an argument?

 (Or am I talking non-sense if we are talking about PAPs, in contrast to
 functions that might be eta-expanded more.)

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


More information about the ghc-tickets mailing list