[GHC] #10830: maximumBy has a space leak

GHC ghc-devs at haskell.org
Fri Feb 5 23:21:45 UTC 2016


#10830: maximumBy has a space leak
-------------------------------------+-------------------------------------
        Reporter:  NeilMitchell      |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.0.1
       Component:  libraries/base    |              Version:  7.10.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1205
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 This is also a semantic bug because the Haskell Report specifies that
 `maximumBy` has the behavior of `foldl1`.

 We fixed this for `sum` and `maximum` and so on by making them instance
 methods of Foldable. We should just do the same for `maximumBy` and
 `minimumBy`.

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


More information about the ghc-tickets mailing list