[GHC] #10830: maximumBy has a space leak
GHC
ghc-devs at haskell.org
Tue Sep 22 11:46:36 UTC 2015
#10830: maximumBy has a space leak
-------------------------------------+-------------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.10.3
Component: libraries/base | Version: 7.10.2
Resolution: | Keywords:
Operating System: Windows | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions: Phab:D1205
-------------------------------------+-------------------------------------
Changes (by nomeata):
* status: closed => new
* resolution: fixed =>
Comment:
> I'm a little confused.
So am I :-)
Looks like I modified `foldr1`, while the test case still tested
`maximumBy` from `Data.OldList` which still goes via `foldl1`, and thus
was always ok for the test case.
The `maximumBy` that one gets from `Data.List` is the one from `Foldable`,
which goes via `foldr1`, so it stills blows the stack.
But I’m not sure what to do here. We might be able to special-case `Int`
and `Integer`, but that does not seem to be a good solution...
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10830#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list