projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
generalise the type of "on"
[ghc-hetmet.git]
/
compiler
/
utils
/
Util.lhs
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}