projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb913bb
)
generalise the type of "on"
author
Simon Marlow
<marlowsd@gmail.com>
Thu, 20 Aug 2009 09:45:16 +0000
(09:45 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Thu, 20 Aug 2009 09:45:16 +0000
(09:45 +0000)
compiler/utils/Util.lhs
patch
|
blob
|
history
diff --git
a/compiler/utils/Util.lhs
b/compiler/utils/Util.lhs
index
5cf020f
..
37aedc8
100644
(file)
--- 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}