[commit: ghc] master: Fix order of PrelRule (1f052c5)

git at git.haskell.org git at git.haskell.org
Fri Sep 1 14:58:33 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1f052c50c1bcdfb838774eba5a83ae95a54f4702/ghc

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

commit 1f052c50c1bcdfb838774eba5a83ae95a54f4702
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Fri Sep 1 10:52:34 2017 -0400

    Fix order of PrelRule
    
    Test Plan: Added testcase in D3905.
    
    Reviewers: austin
    
    Subscribers: angerman, rwbarton, thomie
    
    GHC Trac Issues: #14178
    
    Differential Revision: https://phabricator.haskell.org/D3904


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

1f052c50c1bcdfb838774eba5a83ae95a54f4702
 compiler/prelude/PrelRules.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs
index 2dbc5e8..8ee0f82 100644
--- a/compiler/prelude/PrelRules.hs
+++ b/compiler/prelude/PrelRules.hs
@@ -1423,7 +1423,7 @@ caseRules dflags (App (App (Var f) (Lit l)) v)   -- x# `op` v
   , Just x  <- isLitValue_maybe l
   , Just adjust_lit <- adjustDyadicLeft x op
   = Just (v, tx_lit_con dflags adjust_lit
-           , \v -> (App (App (Var f) (Var v)) (Lit l)))
+           , \v -> (App (App (Var f) (Lit l)) (Var v)))
 
 
 caseRules dflags (App (Var f) v              )   -- op v



More information about the ghc-commits mailing list