Use oneShot in the definition of foldl etc.
authorJoachim Breitner <mail@joachim-breitner.de>
Sat, 25 Oct 2014 10:27:06 +0000 (12:27 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Sun, 2 Nov 2014 18:03:34 +0000 (19:03 +0100)
commit072259c78f77d6fe7c36755ebe0123e813c34457
tree0293da214bf788770cc3f799ad9d7b42b0a4867f
parentc271e32eac65ee95ba1aacc72ed1b24b58ef17ad
Use oneShot in the definition of foldl etc.

This increases the chance of good code after fusing a left fold. See
ticket #7994 and the new Note [Left folds via right fold]

Differential Revision: https://phabricator.haskell.org/D393
libraries/base/Data/OldList.hs
libraries/base/GHC/List.lhs