[commit: ghc] wip/ghc-8.0-det: Add -foptimal-applicative-do (43ea95f)

git at git.haskell.org git at git.haskell.org
Mon Jul 18 17:58:37 UTC 2016


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

On branch  : wip/ghc-8.0-det
Link       : http://ghc.haskell.org/trac/ghc/changeset/43ea95f2d42a27bee2293ee975ecd1a7aa011e3f/ghc

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

commit 43ea95f2d42a27bee2293ee975ecd1a7aa011e3f
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


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

43ea95f2d42a27bee2293ee975ecd1a7aa011e3f
 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 43ea95f2d42a27bee2293ee975ecd1a7aa011e3f


More information about the ghc-commits mailing list