{"action":"created","comment":{"url":"https://api.github.com/repos/haskell/cabal/pulls/comments/48324512","id":48324512,"diff_hunk":"@@ -127,7 +127,8 @@ explore pref (ChoiceNode _ choices)  =\n       where\n         isInstalled (SourceOnly _) = False\n         isInstalled _              = True\n-        isPreferred p = packageVersion p `withinRange` preferredVersions\n+        isPreferred p = packageVersion p `withinRange`\n+                        combinePrefRanges preferredVersions\n         (PackagePreferences preferredVersions packageInstalledPreference)","path":"cabal-install/Distribution/Client/Dependency/TopDown.hs","position":16,"original_position":16,"commit_id":"4bf16adbccd397b1d52217cb7dff170b9ff04e04","original_commit_id":"4bf16adbccd397b1d52217cb7dff170b9ff04e04","user":{"login":"grayjay","id":4276753,"avatar_url":"https://avatars.githubusercontent.com/u/4276753?v=3","gravatar_id":"","url":"https://api.github.com/users/grayjay","html_url":"https://github.com/grayjay","followers_url":"https://api.github.com/users/grayjay/followers","following_url":"https://api.github.com/users/grayjay/following{/other_user}","gists_url":"https://api.github.com/users/grayjay/gists{/gist_id}","starred_url":"https://api.github.com/users/grayjay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grayjay/subscriptions","organizations_url":"https://api.github.com/users/grayjay/orgs","repos_url":"https://api.github.com/users/grayjay/repos","events_url":"https://api.github.com/users/grayjay/events{/privacy}","received_events_url":"https://api.github.com/users/grayjay/received_events","type":"User","site_admin":false},"body":"The comment in `resolveWithoutDependencies` also applies here, and on the next change in this file.  I think that it would be better to either keep the old behavior or use the same comparison as in the modular solver, as long as the change isn't much larger.","created_at":"2015-12-23T06:42:03Z","updated_at":"2015-12-23T06:42:03Z","html_url":"https://github.com/haskell/cabal/pull/2984#discussion_r48324512","pull_request_url":"https://api.github.com/repos/haskell/cabal/pulls/2984","_links":{"self":{"href":"https://api.github.com/repos/haskell/cabal/pulls/comments/48324512"},"html":{"href":"https://github.com/haskell/cabal/pull/2984#discussion_r48324512"},"pull_request":{"href":"https://api.github.com/repos/haskell/cabal/pulls/2984"}}},"pull_request":{"url":"https://api.github.com/repos/haskell/cabal/pulls/2984","id":54413479,"html_url":"https://github.com/haskell/cabal/pull/2984","diff_url":"https://github.com/haskell/cabal/pull/2984.diff","patch_url":"https://github.com/haskell/cabal/pull/2984.patch","issue_url":"https://api.github.com/repos/haskell/cabal/issues/2984","number":2984,"state":"open","locked":false,"title":"Fix #2645 - make cabal merge package preferences if more than one is specified","user":{"login":"martinvlk","id":4638575,"avatar_url":"https://avatars.githubusercontent.com/u/4638575?v=3","gravatar_id":"","url":"https://api.github.com/users/martinvlk","html_url":"https://github.com/martinvlk","followers_url":"https://api.github.com/users/martinvlk/followers","following_url":"https://api.github.com/users/martinvlk/following{/other_user}","gists_url":"https://api.github.com/users/martinvlk/gists{/gist_id}","starred_url":"https://api.github.com/users/martinvlk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinvlk/subscriptions","organizations_url":"https://api.github.com/users/martinvlk/orgs","repos_url":"https://api.github.com/users/martinvlk/repos","events_url":"https://api.github.com/users/martinvlk/events{/privacy}","received_events_url":"https://api.github.com/users/martinvlk/received_events","type":"User","site_admin":false},"body":"Creating PR for this fix, need to discuss one thing before it is ready for merge. I will comment below.","created_at":"2015-12-22T20:50:31Z","updated_at":"2015-12-23T06:42:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a50262ce64b4f4ce72c7fb2cd8260b037a279e0f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/haskell/cabal/pulls/2984/commits","review_comments_url":"https://api.github.com/repos/haskell/cabal/pulls/2984/comments","review_comment_url":"https://api.github.com/repos/haskell/cabal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/haskell/cabal/issues/2984/comments","statuses_url":"https://api.github.com/repos/haskell/cabal/statuses/4bf16adbccd397b1d52217cb7dff170b9ff04e04","head":{"label":"martinvlk:fix#2645","ref":"fix#2645","sha":"4bf16adbccd397b1d52217cb7dff170b9ff04e04","user":{"login":"martinvlk","id":4638575,"avatar_url":"https://avatars.githubusercontent.com/u/4638575?v=3","gravatar_id":"","url":"https://api.github.com/users/martinvlk","html_url":"https://github.com/martinvlk","followers_url":"https://api.github.com/users/martinvlk/followers","following_url":"https://api.github.com/users/martinvlk/following{/other_user}","gists_url":"https://api.github.com/users/martinvlk/gists{/gist_id}","starred_url":"https://api.github.com/users/martinvlk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinvlk/subscriptions","organizations_url":"https://api.github.com/users/martinvlk/orgs","repos_url":"https://api.github.com/users/martinvlk/repos","events_url":"https://api.github.com/users/martinvlk/events{/privacy}","received_events_url":"https://api.github.com/users/martinvlk/received_events","type":"User","site_admin":false},"repo":{"id":46357745,"name":"cabal","full_name":"martinvlk/cabal","owner":{"login":"martinvlk","id":4638575,"avatar_url":"https://avatars.githubusercontent.com/u/4638575?v=3","gravatar_id":"","url":"https://api.github.com/users/martinvlk","html_url":"https://github.com/martinvlk","followers_url":"https://api.github.com/users/martinvlk/followers","following_url":"https://api.github.com/users/martinvlk/following{/other_user}","gists_url":"https://api.github.com/users/martinvlk/gists{/gist_id}","starred_url":"https://api.github.com/users/martinvlk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinvlk/subscriptions","organizations_url":"https://api.github.com/users/martinvlk/orgs","repos_url":"https://api.github.com/users/martinvlk/repos","events_url":"https://api.github.com/users/martinvlk/events{/privacy}","received_events_url":"https://api.github.com/users/martinvlk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martinvlk/cabal","description":"Official upstream development repository for Cabal and cabal-install","fork":true,"url":"https://api.github.com/repos/martinvlk/cabal","forks_url":"https://api.github.com/repos/martinvlk/cabal/forks","keys_url":"https://api.github.com/repos/martinvlk/cabal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martinvlk/cabal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martinvlk/cabal/teams","hooks_url":"https://api.github.com/repos/martinvlk/cabal/hooks","issue_events_url":"https://api.github.com/repos/martinvlk/cabal/issues/events{/number}","events_url":"https://api.github.com/repos/martinvlk/cabal/events","assignees_url":"https://api.github.com/repos/martinvlk/cabal/assignees{/user}","branches_url":"https://api.github.com/repos/martinvlk/cabal/branches{/branch}","tags_url":"https://api.github.com/repos/martinvlk/cabal/tags","blobs_url":"https://api.github.com/repos/martinvlk/cabal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martinvlk/cabal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martinvlk/cabal/git/refs{/sha}","trees_url":"https://api.github.com/repos/martinvlk/cabal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martinvlk/cabal/statuses/{sha}","languages_url":"https://api.github.com/repos/martinvlk/cabal/languages","stargazers_url":"https://api.github.com/repos/martinvlk/cabal/stargazers","contributors_url":"https://api.github.com/repos/martinvlk/cabal/contributors","subscribers_url":"https://api.github.com/repos/martinvlk/cabal/subscribers","subscription_url":"https://api.github.com/repos/martinvlk/cabal/subscription","commits_url":"https://api.github.com/repos/martinvlk/cabal/commits{/sha}","git_commits_url":"https://api.github.com/repos/martinvlk/cabal/git/commits{/sha}","comments_url":"https://api.github.com/repos/martinvlk/cabal/comments{/number}","issue_comment_url":"https://api.github.com/repos/martinvlk/cabal/issues/comments{/number}","contents_url":"https://api.github.com/repos/martinvlk/cabal/contents/{+path}","compare_url":"https://api.github.com/repos/martinvlk/cabal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martinvlk/cabal/merges","archive_url":"https://api.github.com/repos/martinvlk/cabal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martinvlk/cabal/downloads","issues_url":"https://api.github.com/repos/martinvlk/cabal/issues{/number}","pulls_url":"https://api.github.com/repos/martinvlk/cabal/pulls{/number}","milestones_url":"https://api.github.com/repos/martinvlk/cabal/milestones{/number}","notifications_url":"https://api.github.com/repos/martinvlk/cabal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martinvlk/cabal/labels{/name}","releases_url":"https://api.github.com/repos/martinvlk/cabal/releases{/id}","created_at":"2015-11-17T15:54:40Z","updated_at":"2015-11-17T15:54:44Z","pushed_at":"2015-12-22T20:45:43Z","git_url":"git://github.com/martinvlk/cabal.git","ssh_url":"git@github.com:martinvlk/cabal.git","clone_url":"https://github.com/martinvlk/cabal.git","svn_url":"https://github.com/martinvlk/cabal","homepage":"http://haskell.org/cabal","size":27470,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"haskell:master","ref":"master","sha":"0d6e71edc21d54ddc49c6acdcc922c19fc9cf278","user":{"login":"haskell","id":450574,"avatar_url":"https://avatars.githubusercontent.com/u/450574?v=3","gravatar_id":"","url":"https://api.github.com/users/haskell","html_url":"https://github.com/haskell","followers_url":"https://api.github.com/users/haskell/followers","following_url":"https://api.github.com/users/haskell/following{/other_user}","gists_url":"https://api.github.com/users/haskell/gists{/gist_id}","starred_url":"https://api.github.com/users/haskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haskell/subscriptions","organizations_url":"https://api.github.com/users/haskell/orgs","repos_url":"https://api.github.com/users/haskell/repos","events_url":"https://api.github.com/users/haskell/events{/privacy}","received_events_url":"https://api.github.com/users/haskell/received_events","type":"Organization","site_admin":false},"repo":{"id":3728161,"name":"cabal","full_name":"haskell/cabal","owner":{"login":"haskell","id":450574,"avatar_url":"https://avatars.githubusercontent.com/u/450574?v=3","gravatar_id":"","url":"https://api.github.com/users/haskell","html_url":"https://github.com/haskell","followers_url":"https://api.github.com/users/haskell/followers","following_url":"https://api.github.com/users/haskell/following{/other_user}","gists_url":"https://api.github.com/users/haskell/gists{/gist_id}","starred_url":"https://api.github.com/users/haskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haskell/subscriptions","organizations_url":"https://api.github.com/users/haskell/orgs","repos_url":"https://api.github.com/users/haskell/repos","events_url":"https://api.github.com/users/haskell/events{/privacy}","received_events_url":"https://api.github.com/users/haskell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/haskell/cabal","description":"Official upstream development repository for Cabal and cabal-install","fork":false,"url":"https://api.github.com/repos/haskell/cabal","forks_url":"https://api.github.com/repos/haskell/cabal/forks","keys_url":"https://api.github.com/repos/haskell/cabal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haskell/cabal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haskell/cabal/teams","hooks_url":"https://api.github.com/repos/haskell/cabal/hooks","issue_events_url":"https://api.github.com/repos/haskell/cabal/issues/events{/number}","events_url":"https://api.github.com/repos/haskell/cabal/events","assignees_url":"https://api.github.com/repos/haskell/cabal/assignees{/user}","branches_url":"https://api.github.com/repos/haskell/cabal/branches{/branch}","tags_url":"https://api.github.com/repos/haskell/cabal/tags","blobs_url":"https://api.github.com/repos/haskell/cabal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haskell/cabal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haskell/cabal/git/refs{/sha}","trees_url":"https://api.github.com/repos/haskell/cabal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haskell/cabal/statuses/{sha}","languages_url":"https://api.github.com/repos/haskell/cabal/languages","stargazers_url":"https://api.github.com/repos/haskell/cabal/stargazers","contributors_url":"https://api.github.com/repos/haskell/cabal/contributors","subscribers_url":"https://api.github.com/repos/haskell/cabal/subscribers","subscription_url":"https://api.github.com/repos/haskell/cabal/subscription","commits_url":"https://api.github.com/repos/haskell/cabal/commits{/sha}","git_commits_url":"https://api.github.com/repos/haskell/cabal/git/commits{/sha}","comments_url":"https://api.github.com/repos/haskell/cabal/comments{/number}","issue_comment_url":"https://api.github.com/repos/haskell/cabal/issues/comments{/number}","contents_url":"https://api.github.com/repos/haskell/cabal/contents/{+path}","compare_url":"https://api.github.com/repos/haskell/cabal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haskell/cabal/merges","archive_url":"https://api.github.com/repos/haskell/cabal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haskell/cabal/downloads","issues_url":"https://api.github.com/repos/haskell/cabal/issues{/number}","pulls_url":"https://api.github.com/repos/haskell/cabal/pulls{/number}","milestones_url":"https://api.github.com/repos/haskell/cabal/milestones{/number}","notifications_url":"https://api.github.com/repos/haskell/cabal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haskell/cabal/labels{/name}","releases_url":"https://api.github.com/repos/haskell/cabal/releases{/id}","created_at":"2012-03-15T12:53:38Z","updated_at":"2015-12-21T16:05:31Z","pushed_at":"2015-12-23T05:04:59Z","git_url":"git://github.com/haskell/cabal.git","ssh_url":"git@github.com:haskell/cabal.git","clone_url":"https://github.com/haskell/cabal.git","svn_url":"https://github.com/haskell/cabal","homepage":"http://haskell.org/cabal","size":30682,"stargazers_count":569,"watchers_count":569,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":305,"mirror_url":null,"open_issues_count":673,"forks":305,"open_issues":673,"watchers":569,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/haskell/cabal/pulls/2984"},"html":{"href":"https://github.com/haskell/cabal/pull/2984"},"issue":{"href":"https://api.github.com/repos/haskell/cabal/issues/2984"},"comments":{"href":"https://api.github.com/repos/haskell/cabal/issues/2984/comments"},"review_comments":{"href":"https://api.github.com/repos/haskell/cabal/pulls/2984/comments"},"review_comment":{"href":"https://api.github.com/repos/haskell/cabal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/haskell/cabal/pulls/2984/commits"},"statuses":{"href":"https://api.github.com/repos/haskell/cabal/statuses/4bf16adbccd397b1d52217cb7dff170b9ff04e04"}}}}