Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

maximumBy has a space leak
Given the program: ```hs import Data.List main = print $ maximumBy compare [1..10000] ``` Compiling with `-O2`, on GHC 7.8.3 this runs in constant stack space (works fine with `+RTS -K1K`). With GHC 7.10.2 I get: ``` $ ghc --make Test.hs -O2 -rtsopts [1 of 1] Compiling Main ( Test.hs, Test.o ) Linking Test.exe ... $ Test +RTS -K100K Stack space overflow: current size 33680 bytes. Use `+RTS -Ksize -RTS' to increase it. ``` Not sure why it's failing at 33K instead of 100K, but it's certainly taking more than 1K as GHC 7.8.3 did. See #3416 for previous discussion of this issue. My guess is that in older versions of GHC the strictness analysis managed to kick in and optimise things. With the burnt bridges that no longer works. <details><summary>Trac metadata</summary> | Trac field | Value | | ---------------------- | -------------- | | Version | 7.10.2 | | Type | Bug | | TypeOfFailure | OtherFailure | | Priority | normal | | Resolution | Unresolved | | Component | libraries/base | | Test case | | | Differential revisions | | | BlockedBy | | | Related | | | Blocking | | | CC | | | Operating system | Windows | | Architecture | | </details> <!-- {"blocked_by":[],"summary":"maximumBy has a space leak","status":"New","operating_system":"Windows","component":"libraries/base","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.10.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Given the program:\r\n\r\n{{{#!hs\r\nimport Data.List\r\nmain = print $ maximumBy compare [1..10000]\r\n}}}\r\n\r\nCompiling with {{{-O2}}}, on GHC 7.8.3 this runs in constant stack space (works fine with {{{+RTS -K1K}}}). With GHC 7.10.2 I get:\r\n\r\n{{{\r\n$ ghc --make Test.hs -O2 -rtsopts\r\n[1 of 1] Compiling Main ( Test.hs, Test.o )\r\nLinking Test.exe ...\r\n\r\n$ Test +RTS -K100K\r\nStack space overflow: current size 33680 bytes.\r\nUse `+RTS -Ksize -RTS' to increase it.\r\n}}}\r\n\r\nNot sure why it's failing at 33K instead of 100K, but it's certainly taking more than 1K as GHC 7.8.3 did.\r\n\r\nSee #3416 for previous discussion of this issue. My guess is that in older versions of GHC the strictness analysis managed to kick in and optimise things. With the burnt bridges that no longer works.","type_of_failure":"OtherFailure","blocking":[]} -->
issue