[commit: ghc] master: Add -foptimal-applicative-do (2f45cf3)

git at git.haskell.org git at git.haskell.org
Fri Mar 11 16:12:30 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2f45cf3f48162a5f843005755dafa1c5c1b451a7/ghc

>---------------------------------------------------------------

commit 2f45cf3f48162a5f843005755dafa1c5c1b451a7
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


>---------------------------------------------------------------

2f45cf3f48162a5f843005755dafa1c5c1b451a7
 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 2f45cf3f48162a5f843005755dafa1c5c1b451a7


More information about the ghc-commits mailing list