diff options
author | Simon Marlow <marlowsd@gmail.com> | 2017-06-12 17:00:39 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-06-12 17:00:40 -0400 |
commit | 7e0ef11324712b4ff3ac8f39259e5ecbd63c2356 (patch) | |
tree | d06d025418efe93308d428ca0c06390975cd859a /compiler/rename/RnExpr.hs | |
parent | 0d94a3e0dc23bfcdb23b14c1af059a19e9d636ac (diff) | |
download | haskell-7e0ef11324712b4ff3ac8f39259e5ecbd63c2356.tar.gz |
Fix a bug in -foptimal-applicative-do
Test Plan: validate
Reviewers: bgamari, niteria, austin, erikd
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3640
Diffstat (limited to 'compiler/rename/RnExpr.hs')
-rw-r--r-- | compiler/rename/RnExpr.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rename/RnExpr.hs b/compiler/rename/RnExpr.hs index e1a314f029..2c779d2853 100644 --- a/compiler/rename/RnExpr.hs +++ b/compiler/rename/RnExpr.hs @@ -1605,7 +1605,7 @@ mkStmtTreeOptimal stmts = (StmtTreeOne (stmt_arr ! hi), 1)) | left_cost < right_cost = ((left,left_cost), (StmtTreeOne (stmt_arr ! hi), 1)) - | otherwise -- left_cost > right_cost + | left_cost > right_cost = ((StmtTreeOne (stmt_arr ! lo), 1), (right,right_cost)) | otherwise = minimumBy (comparing cost) alternatives where |