generalise the type of "on"
authorSimon Marlow <marlowsd@gmail.com>
Thu, 20 Aug 2009 09:45:16 +0000 (09:45 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 20 Aug 2009 09:45:16 +0000 (09:45 +0000)
compiler/utils/Util.lhs

index 5cf020f..37aedc8 100644 (file)
@@ -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}