summaryrefslogtreecommitdiff
path: root/compiler/utils/GhcPrelude.hs
Commit message (Collapse)AuthorAgeFilesLines
* Comments only, in GhcPreludeSimon Peyton Jones2019-02-201-1/+5
|
* Drop GHC 8.2 compatibilityRyan Scott2018-10-031-6/+0
| | | | | | | | | | | | | | | | | Summary: GHC 8.6.1 is out, so now GHC's support window only extends back to GHC 8.4. This means we can delete gobs of code that were only used for GHC 8.2 support. Hooray! Test Plan: ./validate Reviewers: bgamari, Phyx, erikd Reviewed By: bgamari, Phyx Subscribers: rwbarton, erikd, carter Differential Revision: https://phabricator.haskell.org/D5192
* NoImplicitPrelude in ghc-boot-th, ghc-boot, ghc-heap, ghciShayne Fletcher2018-09-181-0/+13
| | | | PR: https://github.com/ghc/ghc/pull/184
* Replace most occurences of foldl with foldl'.klebinger.andreas@gmx.at2018-08-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds foldl' to GhcPrelude and changes must occurences of foldl to foldl'. This leads to better performance especially for quick builds where GHC does not perform strictness analysis. It does change strictness behaviour when we use foldl' to turn a argument list into function applications. But this is only a drawback if code looks ONLY at the last argument but not at the first. And as the benchmarks show leads to fewer allocations in practice at O2. Compiler performance for Nofib: O2 Allocations: -1 s.d. ----- -0.0% +1 s.d. ----- -0.0% Average ----- -0.0% O2 Compile Time: -1 s.d. ----- -2.8% +1 s.d. ----- +1.3% Average ----- -0.8% O0 Allocations: -1 s.d. ----- -0.2% +1 s.d. ----- -0.1% Average ----- -0.2% Test Plan: ci Reviewers: goldfire, bgamari, simonmar, tdammers, monoidal Reviewed By: bgamari, monoidal Subscribers: tdammers, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4929
* Reexport Semigroup's <> operator from Prelude (#14191)Herbert Valerio Riedel2017-09-221-0/+11
| | | | | | | This completes the 2nd phase of the Semigroup=>Monoid Proposal (SMP) initiated in 8ae263ceb3566a7c82336400b09cb8f381217405. This updates a couple submodules to address <> naming clashes.
* compiler: introduce custom "GhcPrelude" PreludeHerbert Valerio Riedel2017-09-191-0/+9
This switches the compiler/ component to get compiled with -XNoImplicitPrelude and a `import GhcPrelude` is inserted in all modules. This is motivated by the upcoming "Prelude" re-export of `Semigroup((<>))` which would cause lots of name clashes in every modulewhich imports also `Outputable` Reviewers: austin, goldfire, bgamari, alanz, simonmar Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari Differential Revision: https://phabricator.haskell.org/D3989