[commit: ghc] master: base: Refactor/clean-up *List modules (75979f3)
git at git.haskell.org
git at git.haskell.org
Tue Oct 28 14:36:46 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/75979f3661ff16ec44528a23005ac1be2b9683fe/ghc
>---------------------------------------------------------------
commit 75979f3661ff16ec44528a23005ac1be2b9683fe
Author: David Feuer <David.Feuer at gmail.com>
Date: Tue Oct 28 15:26:39 2014 +0100
base: Refactor/clean-up *List modules
This gets rid of all hand-unboxing in `GHC.List` and moves `Foldable`
requirements from `Data.OldList` into `GHC.List` (preparatory work for
addressing #9716). Specifically, this moves the definition of
`maximum`, `minimum`, `foldl'`, `foldl1`, `foldl1'`, `sum`, and
`product` into `GHC.List` (which now needs to import `GHC.Num`)
Make `take`, `drop`, `length`, and `!!` generally saner (see also #9510)
Performance overall seems minimally affected. Some things go up; some
things go down; nothing moves horribly much. The code is much easier to
read.
Differential Revision: https://phabricator.haskell.org/D380
>---------------------------------------------------------------
75979f3661ff16ec44528a23005ac1be2b9683fe
libraries/base/Data/Foldable.hs | 2 +-
libraries/base/Data/OldList.hs | 72 -----
libraries/base/GHC/List.lhs | 348 +++++++++++++--------
testsuite/tests/perf/compiler/T4007.stdout | 2 +-
.../tests/simplCore/should_compile/T3772.stdout | 25 +-
.../tests/simplCore/should_compile/T7360.stderr | 8 +-
6 files changed, 238 insertions(+), 219 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 75979f3661ff16ec44528a23005ac1be2b9683fe
More information about the ghc-commits
mailing list