Skip to content
  • Simon Marlow's avatar
    Add -foptimal-applicative-do · 2f45cf3f
    Simon Marlow authored
    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
    2f45cf3f