Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
2ab5e6cb
Commit
2ab5e6cb
authored
Aug 20, 2009
by
Simon Marlow
Browse files
generalise the type of "on"
parent
cb913bbf
Changes
1
Show whitespace changes
Inline
Side-by-side
compiler/utils/Util.lhs
View file @
2ab5e6cb
...
@@ -523,7 +523,7 @@ sortWith get_key xs = sortLe le xs
...
@@ -523,7 +523,7 @@ sortWith get_key xs = sortLe le xs
where
where
x `le` y = get_key x < get_key y
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
on cmp sel = \x y -> sel x `cmp` sel y
\end{code}
\end{code}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment