From: Simon Marlow Date: Thu, 20 Aug 2009 09:45:16 +0000 (+0000) Subject: generalise the type of "on" X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=2ab5e6cb18accfb2f59d5b0f0f2c5cf33f4adb27 generalise the type of "on" --- diff --git a/compiler/utils/Util.lhs b/compiler/utils/Util.lhs index 5cf020f..37aedc8 100644 --- a/compiler/utils/Util.lhs +++ b/compiler/utils/Util.lhs @@ -523,7 +523,7 @@ sortWith get_key xs = sortLe le xs where x `le` y = get_key x < get_key y -on :: (a -> a -> Ordering) -> (b -> a) -> b -> b -> Ordering +on :: (a -> a -> c) -> (b -> a) -> b -> b -> c on cmp sel = \x y -> sel x `cmp` sel y \end{code}