projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
#2528: reverse the order of args to (==) in nubBy to match nub
[ghc-base.git]
/
Data
/
List.hs
diff --git
a/Data/List.hs
b/Data/List.hs
index
af6b3f5
..
aca5cac
100644
(file)
--- a/
Data/List.hs
+++ b/
Data/List.hs
@@
-342,7
+342,7
@@
nubBy eq l = nubBy' l []
-- 'y' is the potential new element
elem_by :: (a -> a -> Bool) -> a -> [a] -> Bool
elem_by _ _ [] = False
-elem_by eq y (x:xs) = x `eq` y || elem_by eq y xs
+elem_by eq y (x:xs) = y `eq` x || elem_by eq y xs
#endif