diff options
Diffstat (limited to 'compiler/utils/Util.lhs')
-rw-r--r-- | compiler/utils/Util.lhs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 1268c52e54..b750a54354 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -569,9 +569,7 @@ sortLe :: (a->a->Bool) -> [a] -> [a] sortLe le = generalNaturalMergeSort le sortWith :: Ord b => (a->b) -> [a] -> [a] -sortWith get_key xs = sortLe le xs - where - x `le` y = get_key x < get_key y +sortWith get_key xs = sortBy (comparing get_key) xs minWith :: Ord b => (a -> b) -> [a] -> a minWith get_key xs = ASSERT( not (null xs) ) |