{"action":"created","issue":{"url":"https://api.github.com/repos/haskell/vector/issues/180","repository_url":"https://api.github.com/repos/haskell/vector","labels_url":"https://api.github.com/repos/haskell/vector/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/haskell/vector/issues/180/comments","events_url":"https://api.github.com/repos/haskell/vector/issues/180/events","html_url":"https://github.com/haskell/vector/pull/180","id":243353363,"number":180,"title":"Fix maximumBy comparison","user":{"login":"basile-henry","id":3369034,"avatar_url":"https://avatars6.githubusercontent.com/u/3369034?v=4","gravatar_id":"","url":"https://api.github.com/users/basile-henry","html_url":"https://github.com/basile-henry","followers_url":"https://api.github.com/users/basile-henry/followers","following_url":"https://api.github.com/users/basile-henry/following{/other_user}","gists_url":"https://api.github.com/users/basile-henry/gists{/gist_id}","starred_url":"https://api.github.com/users/basile-henry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basile-henry/subscriptions","organizations_url":"https://api.github.com/users/basile-henry/orgs","repos_url":"https://api.github.com/users/basile-henry/repos","events_url":"https://api.github.com/users/basile-henry/events{/privacy}","received_events_url":"https://api.github.com/users/basile-henry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-17T10:30:17Z","updated_at":"2017-07-17T15:39:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/haskell/vector/pulls/180","html_url":"https://github.com/haskell/vector/pull/180","diff_url":"https://github.com/haskell/vector/pull/180.diff","patch_url":"https://github.com/haskell/vector/pull/180.patch"},"body":"`maximumBy` for vectors does not behave like the list version:\n\n```\n> maximumBy (comparing snd) $ zip [0..10 :: Int] (repeat 'a')\n(10,'a')\n> V.maximumBy (comparing snd) . V.fromList $ zip [0..10 :: Int] (repeat 'a')\n(0,'a')\n```\n\nThis pull request fixes this issue by checking for `GT` rather than `LT` which changes the behavior in the `EQ` case."},"comment":{"url":"https://api.github.com/repos/haskell/vector/issues/comments/315792290","html_url":"https://github.com/haskell/vector/pull/180#issuecomment-315792290","issue_url":"https://api.github.com/repos/haskell/vector/issues/180","id":315792290,"user":{"login":"basile-henry","id":3369034,"avatar_url":"https://avatars6.githubusercontent.com/u/3369034?v=4","gravatar_id":"","url":"https://api.github.com/users/basile-henry","html_url":"https://github.com/basile-henry","followers_url":"https://api.github.com/users/basile-henry/followers","following_url":"https://api.github.com/users/basile-henry/following{/other_user}","gists_url":"https://api.github.com/users/basile-henry/gists{/gist_id}","starred_url":"https://api.github.com/users/basile-henry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basile-henry/subscriptions","organizations_url":"https://api.github.com/users/basile-henry/orgs","repos_url":"https://api.github.com/users/basile-henry/repos","events_url":"https://api.github.com/users/basile-henry/events{/privacy}","received_events_url":"https://api.github.com/users/basile-henry/received_events","type":"User","site_admin":false},"created_at":"2017-07-17T15:39:45Z","updated_at":"2017-07-17T15:39:45Z","body":"@cartazio I am not sure how version changes have been handle so far with the vector package. The type signature of `maximumBy` does not change so I'd be tempted to just call it a patch. However it is possible some use cases rely on the old implementation.\r\nAs far as I am concerned, I'd happily wait until the next major version bump for this to be added just to be on the safe side. I'll be using the patch for my own projects in the meantime."}}
{"actor":{"display_login":"basile-henry"}}