{"action":"created","comment":{"url":"https://api.github.com/repos/commercialhaskell/stack/pulls/comments/193554931","pull_request_review_id":126550114,"id":193554931,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzU1NDkzMQ==","diff_hunk":"@@ -19,7 +19,7 @@ benchOptsParser hide0 = BenchmarkOptsMonoid\n                                  help (\"Forward BENCH_ARGS to the benchmark suite. \" <>\n                                        \"Supports templates from `cabal bench`\") <>\n                                  hide))\n-        <*> optionalFirst (switch (long \"no-run-benchmarks\" <>\n+        <*> optionalFirst (flag' True (long \"no-run-benchmarks\" <>","path":"src/Stack/Options/BenchParser.hs","position":5,"original_position":5,"commit_id":"bf4711e3a28aee07b8511346f8e20dc740d8831e","original_commit_id":"29a87d28ad0efd8c6d302db9bbdd43e7347fc5ac","user":{"login":"markus1189","id":591567,"node_id":"MDQ6VXNlcjU5MTU2Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/591567?v=4","gravatar_id":"","url":"https://api.github.com/users/markus1189","html_url":"https://github.com/markus1189","followers_url":"https://api.github.com/users/markus1189/followers","following_url":"https://api.github.com/users/markus1189/following{/other_user}","gists_url":"https://api.github.com/users/markus1189/gists{/gist_id}","starred_url":"https://api.github.com/users/markus1189/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markus1189/subscriptions","organizations_url":"https://api.github.com/users/markus1189/orgs","repos_url":"https://api.github.com/users/markus1189/repos","events_url":"https://api.github.com/users/markus1189/events{/privacy}","received_events_url":"https://api.github.com/users/markus1189/received_events","type":"User","site_admin":false},"body":"done","created_at":"2018-06-06T20:51:07Z","updated_at":"2018-06-06T20:51:07Z","html_url":"https://github.com/commercialhaskell/stack/pull/4067#discussion_r193554931","pull_request_url":"https://api.github.com/repos/commercialhaskell/stack/pulls/4067","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/comments/193554931"},"html":{"href":"https://github.com/commercialhaskell/stack/pull/4067#discussion_r193554931"},"pull_request":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/4067"}},"in_reply_to_id":193550673},"pull_request":{"url":"https://api.github.com/repos/commercialhaskell/stack/pulls/4067","id":193120170,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMTIwMTcw","html_url":"https://github.com/commercialhaskell/stack/pull/4067","diff_url":"https://github.com/commercialhaskell/stack/pull/4067.diff","patch_url":"https://github.com/commercialhaskell/stack/pull/4067.patch","issue_url":"https://api.github.com/repos/commercialhaskell/stack/issues/4067","number":4067,"state":"open","locked":false,"title":"Change parsers to use `flag'` instead of `switch`","user":{"login":"markus1189","id":591567,"node_id":"MDQ6VXNlcjU5MTU2Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/591567?v=4","gravatar_id":"","url":"https://api.github.com/users/markus1189","html_url":"https://github.com/markus1189","followers_url":"https://api.github.com/users/markus1189/followers","following_url":"https://api.github.com/users/markus1189/following{/other_user}","gists_url":"https://api.github.com/users/markus1189/gists{/gist_id}","starred_url":"https://api.github.com/users/markus1189/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markus1189/subscriptions","organizations_url":"https://api.github.com/users/markus1189/orgs","repos_url":"https://api.github.com/users/markus1189/repos","events_url":"https://api.github.com/users/markus1189/events{/privacy}","received_events_url":"https://api.github.com/users/markus1189/received_events","type":"User","site_admin":false},"body":"This fixes #3959.\r\n\r\nThe problem is that the [switch](https://hackage.haskell.org/package/optparse-applicative/docs/Options-Applicative-Builder.html#v:switch) function returns a `Just False` which gets wrapped into `First`.\r\n\r\nThis means that the value is *always* set to either `True` or `False`\r\nand the `First` monoid means that during options parsing the order of\r\nthe flags suddenly matters as described in #3959, because `First (Just\r\nFalse)` is chosen when `mappend`ing with `First (Just True)`.\r\n\r\nThe fix is to use the [flag](https://hackage.haskell.org/package/optparse-applicative-0.14.2.0/docs/Options-Applicative-Builder.html#v:flag-39-) function that does not set a default value, so we get a `First Nothing` instead.\r\n\r\nNote: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the \"stable\" branch, not master.\r\n\r\nPlease include the following checklist in your PR:\r\n\r\n* [x] Any changes that could be relevant to users have been recorded in the ChangeLog.md\r\n  there should be no user relevant changes\r\n* [x] The documentation has been updated, if necessary.\r\n  no relevant changes\r\n\r\nPlease also shortly describe how you tested your change. Bonus points for added tests!\r\nThere is a new integration test in the `3959-order-of-flags` folder that makes sure that the order does not matter.","created_at":"2018-06-06T19:44:16Z","updated_at":"2018-06-06T20:51:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19858ecab7d5ce22fdeea376cde88fa8c774ccb5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/commercialhaskell/stack/pulls/4067/commits","review_comments_url":"https://api.github.com/repos/commercialhaskell/stack/pulls/4067/comments","review_comment_url":"https://api.github.com/repos/commercialhaskell/stack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/issues/4067/comments","statuses_url":"https://api.github.com/repos/commercialhaskell/stack/statuses/bf4711e3a28aee07b8511346f8e20dc740d8831e","head":{"label":"markus1189:3959-flag-order","ref":"3959-flag-order","sha":"bf4711e3a28aee07b8511346f8e20dc740d8831e","user":{"login":"markus1189","id":591567,"node_id":"MDQ6VXNlcjU5MTU2Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/591567?v=4","gravatar_id":"","url":"https://api.github.com/users/markus1189","html_url":"https://github.com/markus1189","followers_url":"https://api.github.com/users/markus1189/followers","following_url":"https://api.github.com/users/markus1189/following{/other_user}","gists_url":"https://api.github.com/users/markus1189/gists{/gist_id}","starred_url":"https://api.github.com/users/markus1189/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markus1189/subscriptions","organizations_url":"https://api.github.com/users/markus1189/orgs","repos_url":"https://api.github.com/users/markus1189/repos","events_url":"https://api.github.com/users/markus1189/events{/privacy}","received_events_url":"https://api.github.com/users/markus1189/received_events","type":"User","site_admin":false},"repo":{"id":38053469,"node_id":"MDEwOlJlcG9zaXRvcnkzODA1MzQ2OQ==","name":"stack","full_name":"markus1189/stack","owner":{"login":"markus1189","id":591567,"node_id":"MDQ6VXNlcjU5MTU2Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/591567?v=4","gravatar_id":"","url":"https://api.github.com/users/markus1189","html_url":"https://github.com/markus1189","followers_url":"https://api.github.com/users/markus1189/followers","following_url":"https://api.github.com/users/markus1189/following{/other_user}","gists_url":"https://api.github.com/users/markus1189/gists{/gist_id}","starred_url":"https://api.github.com/users/markus1189/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markus1189/subscriptions","organizations_url":"https://api.github.com/users/markus1189/orgs","repos_url":"https://api.github.com/users/markus1189/repos","events_url":"https://api.github.com/users/markus1189/events{/privacy}","received_events_url":"https://api.github.com/users/markus1189/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/markus1189/stack","description":"The Haskell Tool Stack","fork":true,"url":"https://api.github.com/repos/markus1189/stack","forks_url":"https://api.github.com/repos/markus1189/stack/forks","keys_url":"https://api.github.com/repos/markus1189/stack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/markus1189/stack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/markus1189/stack/teams","hooks_url":"https://api.github.com/repos/markus1189/stack/hooks","issue_events_url":"https://api.github.com/repos/markus1189/stack/issues/events{/number}","events_url":"https://api.github.com/repos/markus1189/stack/events","assignees_url":"https://api.github.com/repos/markus1189/stack/assignees{/user}","branches_url":"https://api.github.com/repos/markus1189/stack/branches{/branch}","tags_url":"https://api.github.com/repos/markus1189/stack/tags","blobs_url":"https://api.github.com/repos/markus1189/stack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/markus1189/stack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/markus1189/stack/git/refs{/sha}","trees_url":"https://api.github.com/repos/markus1189/stack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/markus1189/stack/statuses/{sha}","languages_url":"https://api.github.com/repos/markus1189/stack/languages","stargazers_url":"https://api.github.com/repos/markus1189/stack/stargazers","contributors_url":"https://api.github.com/repos/markus1189/stack/contributors","subscribers_url":"https://api.github.com/repos/markus1189/stack/subscribers","subscription_url":"https://api.github.com/repos/markus1189/stack/subscription","commits_url":"https://api.github.com/repos/markus1189/stack/commits{/sha}","git_commits_url":"https://api.github.com/repos/markus1189/stack/git/commits{/sha}","comments_url":"https://api.github.com/repos/markus1189/stack/comments{/number}","issue_comment_url":"https://api.github.com/repos/markus1189/stack/issues/comments{/number}","contents_url":"https://api.github.com/repos/markus1189/stack/contents/{+path}","compare_url":"https://api.github.com/repos/markus1189/stack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/markus1189/stack/merges","archive_url":"https://api.github.com/repos/markus1189/stack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/markus1189/stack/downloads","issues_url":"https://api.github.com/repos/markus1189/stack/issues{/number}","pulls_url":"https://api.github.com/repos/markus1189/stack/pulls{/number}","milestones_url":"https://api.github.com/repos/markus1189/stack/milestones{/number}","notifications_url":"https://api.github.com/repos/markus1189/stack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/markus1189/stack/labels{/name}","releases_url":"https://api.github.com/repos/markus1189/stack/releases{/id}","deployments_url":"https://api.github.com/repos/markus1189/stack/deployments","created_at":"2015-06-25T14:13:46Z","updated_at":"2015-06-25T14:13:47Z","pushed_at":"2018-06-06T20:50:00Z","git_url":"git://github.com/markus1189/stack.git","ssh_url":"git@github.com:markus1189/stack.git","clone_url":"https://github.com/markus1189/stack.git","svn_url":"https://github.com/markus1189/stack","homepage":"https://www.stackage.org/","size":12171,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"commercialhaskell:master","ref":"master","sha":"8ba673f3657c9230e5ada6cee198a7a4842e3775","user":{"login":"commercialhaskell","id":10633049,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjMzMDQ5","avatar_url":"https://avatars1.githubusercontent.com/u/10633049?v=4","gravatar_id":"","url":"https://api.github.com/users/commercialhaskell","html_url":"https://github.com/commercialhaskell","followers_url":"https://api.github.com/users/commercialhaskell/followers","following_url":"https://api.github.com/users/commercialhaskell/following{/other_user}","gists_url":"https://api.github.com/users/commercialhaskell/gists{/gist_id}","starred_url":"https://api.github.com/users/commercialhaskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercialhaskell/subscriptions","organizations_url":"https://api.github.com/users/commercialhaskell/orgs","repos_url":"https://api.github.com/users/commercialhaskell/repos","events_url":"https://api.github.com/users/commercialhaskell/events{/privacy}","received_events_url":"https://api.github.com/users/commercialhaskell/received_events","type":"Organization","site_admin":false},"repo":{"id":34817922,"node_id":"MDEwOlJlcG9zaXRvcnkzNDgxNzkyMg==","name":"stack","full_name":"commercialhaskell/stack","owner":{"login":"commercialhaskell","id":10633049,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjMzMDQ5","avatar_url":"https://avatars1.githubusercontent.com/u/10633049?v=4","gravatar_id":"","url":"https://api.github.com/users/commercialhaskell","html_url":"https://github.com/commercialhaskell","followers_url":"https://api.github.com/users/commercialhaskell/followers","following_url":"https://api.github.com/users/commercialhaskell/following{/other_user}","gists_url":"https://api.github.com/users/commercialhaskell/gists{/gist_id}","starred_url":"https://api.github.com/users/commercialhaskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercialhaskell/subscriptions","organizations_url":"https://api.github.com/users/commercialhaskell/orgs","repos_url":"https://api.github.com/users/commercialhaskell/repos","events_url":"https://api.github.com/users/commercialhaskell/events{/privacy}","received_events_url":"https://api.github.com/users/commercialhaskell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/commercialhaskell/stack","description":"The Haskell Tool Stack","fork":false,"url":"https://api.github.com/repos/commercialhaskell/stack","forks_url":"https://api.github.com/repos/commercialhaskell/stack/forks","keys_url":"https://api.github.com/repos/commercialhaskell/stack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/commercialhaskell/stack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/commercialhaskell/stack/teams","hooks_url":"https://api.github.com/repos/commercialhaskell/stack/hooks","issue_events_url":"https://api.github.com/repos/commercialhaskell/stack/issues/events{/number}","events_url":"https://api.github.com/repos/commercialhaskell/stack/events","assignees_url":"https://api.github.com/repos/commercialhaskell/stack/assignees{/user}","branches_url":"https://api.github.com/repos/commercialhaskell/stack/branches{/branch}","tags_url":"https://api.github.com/repos/commercialhaskell/stack/tags","blobs_url":"https://api.github.com/repos/commercialhaskell/stack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/commercialhaskell/stack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/commercialhaskell/stack/git/refs{/sha}","trees_url":"https://api.github.com/repos/commercialhaskell/stack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/commercialhaskell/stack/statuses/{sha}","languages_url":"https://api.github.com/repos/commercialhaskell/stack/languages","stargazers_url":"https://api.github.com/repos/commercialhaskell/stack/stargazers","contributors_url":"https://api.github.com/repos/commercialhaskell/stack/contributors","subscribers_url":"https://api.github.com/repos/commercialhaskell/stack/subscribers","subscription_url":"https://api.github.com/repos/commercialhaskell/stack/subscription","commits_url":"https://api.github.com/repos/commercialhaskell/stack/commits{/sha}","git_commits_url":"https://api.github.com/repos/commercialhaskell/stack/git/commits{/sha}","comments_url":"https://api.github.com/repos/commercialhaskell/stack/comments{/number}","issue_comment_url":"https://api.github.com/repos/commercialhaskell/stack/issues/comments{/number}","contents_url":"https://api.github.com/repos/commercialhaskell/stack/contents/{+path}","compare_url":"https://api.github.com/repos/commercialhaskell/stack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/commercialhaskell/stack/merges","archive_url":"https://api.github.com/repos/commercialhaskell/stack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/commercialhaskell/stack/downloads","issues_url":"https://api.github.com/repos/commercialhaskell/stack/issues{/number}","pulls_url":"https://api.github.com/repos/commercialhaskell/stack/pulls{/number}","milestones_url":"https://api.github.com/repos/commercialhaskell/stack/milestones{/number}","notifications_url":"https://api.github.com/repos/commercialhaskell/stack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/commercialhaskell/stack/labels{/name}","releases_url":"https://api.github.com/repos/commercialhaskell/stack/releases{/id}","deployments_url":"https://api.github.com/repos/commercialhaskell/stack/deployments","created_at":"2015-04-29T20:56:42Z","updated_at":"2018-06-05T12:28:15Z","pushed_at":"2018-06-06T20:50:02Z","git_url":"git://github.com/commercialhaskell/stack.git","ssh_url":"git@github.com:commercialhaskell/stack.git","clone_url":"https://github.com/commercialhaskell/stack.git","svn_url":"https://github.com/commercialhaskell/stack","homepage":"http://haskellstack.org","size":12681,"stargazers_count":2714,"watchers_count":2714,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":580,"mirror_url":null,"archived":false,"open_issues_count":786,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":580,"open_issues":786,"watchers":2714,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/4067"},"html":{"href":"https://github.com/commercialhaskell/stack/pull/4067"},"issue":{"href":"https://api.github.com/repos/commercialhaskell/stack/issues/4067"},"comments":{"href":"https://api.github.com/repos/commercialhaskell/stack/issues/4067/comments"},"review_comments":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/4067/comments"},"review_comment":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/commercialhaskell/stack/pulls/4067/commits"},"statuses":{"href":"https://api.github.com/repos/commercialhaskell/stack/statuses/bf4711e3a28aee07b8511346f8e20dc740d8831e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"markus1189"}}