[commit: ghc] master: Remove another sortLe use (c5550e8)
Ian Lynagh
igloo at earth.li
Sat Jun 23 14:36:30 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/c5550e84dfd149e08536e9a3a6bb265c5fffc433
>---------------------------------------------------------------
commit c5550e84dfd149e08536e9a3a6bb265c5fffc433
Author: Ian Lynagh <igloo at earth.li>
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}
More information about the Cvs-ghc
mailing list