Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/c5550e84dfd149e08536e9a3a6bb265c5fffc433

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

commit c5550e84dfd149e08536e9a3a6bb265c5fffc433
Author: Ian Lynagh <[email protected]>
Date:   Fri Jun 22 22:27:05 2012 +0100

    Remove another sortLe use

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

 compiler/simplCore/CoreMonad.lhs |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/compiler/simplCore/CoreMonad.lhs b/compiler/simplCore/CoreMonad.lhs
index 272bdfb..b1429c5 100644
--- a/compiler/simplCore/CoreMonad.lhs
+++ b/compiler/simplCore/CoreMonad.lhs
@@ -95,9 +95,10 @@ import UniqSupply
 import UniqFM       ( UniqFM, mapUFM, filterUFM )
 import MonadUtils
 
-import Util            ( split, sortLe )
+import Util ( split )
 import ListSetOps      ( runs )
-import Data.List       ( intersperse )
+import Data.List
+import Data.Ord
 import Data.Dynamic
 import Data.IORef
 import Data.Map (Map)
@@ -581,9 +582,8 @@ pprTickGroup :: [(Tick, Int)] -> SDoc
 pprTickGroup group@((tick1,_):_)
   = hang (int (sum [n | (_,n) <- group]) <+> text (tickString tick1))
        2 (vcat [ int n <+> pprTickCts tick  
-               | (tick,n) <- sortLe le group])
-  where
-    le (_,n1) (_,n2) = n2 <= n1   -- We want largest first
+                                    -- flip as we want largest first
+               | (tick,n) <- sortBy (flip (comparing snd)) group])
 pprTickGroup [] = panic "pprTickGroup"
 \end{code}
 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to