[commit: ghc] wip/ghc-8.0-det: Add -foptimal-applicative-do (4a93d25)
git at git.haskell.org
git at git.haskell.org
Thu Jul 14 13:54:07 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/ghc-8.0-det
Link : http://ghc.haskell.org/trac/ghc/changeset/4a93d258b3948610e5389432af7c3d041cebbc87/ghc
>---------------------------------------------------------------
commit 4a93d258b3948610e5389432af7c3d041cebbc87
Author: Simon Marlow <marlowsd at gmail.com>
Date: Fri Mar 4 13:06:42 2016 +0000
Add -foptimal-applicative-do
Summary:
The algorithm for ApplicativeDo rearrangement is based on a heuristic
that runs in O(n^2). This patch adds the optimal algorithm, which is
O(n^3), selected by a flag (-foptimal-applicative-do). It finds better
solutions in a small number of cases (about 2% of the cases where
ApplicativeDo makes a difference), but it can be very slow for large do
expressions. I'm mainly adding it for experimental reasons.
ToDo: user guide docs
Test Plan: validate
Reviewers: simonpj, bgamari, austin, niteria, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1969
>---------------------------------------------------------------
4a93d258b3948610e5389432af7c3d041cebbc87
compiler/main/DynFlags.hs | 2 +
compiler/rename/RnExpr.hs | 226 ++++++++++++++++---------
docs/users_guide/glasgow_exts.rst | 17 ++
testsuite/tests/ado/ado-optimal.hs | 59 +++++++
testsuite/tests/ado/ado-optimal.stdout | 1 +
testsuite/tests/ado/ado004.hs | 9 +
testsuite/tests/ado/ado004.stderr | 6 +
testsuite/tests/ado/all.T | 1 +
utils/mkUserGuidePart/Options/Optimizations.hs | 6 +
9 files changed, 251 insertions(+), 76 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 4a93d258b3948610e5389432af7c3d041cebbc87
More information about the ghc-commits
mailing list