{"action":"created","comment":{"url":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/comments/50638488","id":50638488,"diff_hunk":"@@ -87,14 +116,157 @@ let wrap_expr k e =\n     else\n       let marked = List.mem line c.CommentsPpx.marked_lines in\n       let marker_file = !Location.input_name in\n-      match marker marker_file ofs k marked with\n+      match marker must_be_unique marker_file ofs k marked with\n       | Some w -> Exp.sequence ~loc w e\n       | None   -> e\n \n+(* Given a pattern and a location, transforms the pattern into a list of\n+   patterns by transforming or-patterns into cases (i.e., promoting them to the\n+   top). Each resulting case pattern is paired with a list of locations to mark\n+   should that case be reached. The location argument to this function is the\n+   location of the closest enclosing or-pattern clause, or, if there is no such\n+   clause, of the entire enclosing pattern. *)\n+let translate_pattern =","path":"src/syntax/instrumentPpx.ml","position":90,"original_position":90,"commit_id":"6ebf9564c1406d37f76379bf647fa47776bbca7d","original_commit_id":"6ebf9564c1406d37f76379bf647fa47776bbca7d","user":{"login":"aantron","id":12073668,"avatar_url":"https://avatars.githubusercontent.com/u/12073668?v=3","gravatar_id":"","url":"https://api.github.com/users/aantron","html_url":"https://github.com/aantron","followers_url":"https://api.github.com/users/aantron/followers","following_url":"https://api.github.com/users/aantron/following{/other_user}","gists_url":"https://api.github.com/users/aantron/gists{/gist_id}","starred_url":"https://api.github.com/users/aantron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aantron/subscriptions","organizations_url":"https://api.github.com/users/aantron/orgs","repos_url":"https://api.github.com/users/aantron/repos","events_url":"https://api.github.com/users/aantron/events{/privacy}","received_events_url":"https://api.github.com/users/aantron/received_events","type":"User","site_admin":false},"body":"Confused here, the proposed wording seems ungrammatical.. ?","created_at":"2016-01-24T17:16:56Z","updated_at":"2016-01-24T17:16:56Z","html_url":"https://github.com/rleonid/bisect_ppx/pull/56#discussion_r50638488","pull_request_url":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/comments/50638488"},"html":{"href":"https://github.com/rleonid/bisect_ppx/pull/56#discussion_r50638488"},"pull_request":{"href":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/56","id":56920369,"html_url":"https://github.com/rleonid/bisect_ppx/pull/56","diff_url":"https://github.com/rleonid/bisect_ppx/pull/56.diff","patch_url":"https://github.com/rleonid/bisect_ppx/pull/56.patch","issue_url":"https://api.github.com/repos/rleonid/bisect_ppx/issues/56","number":56,"state":"open","locked":false,"title":"Independent points for each clause of or-patterns","user":{"login":"aantron","id":12073668,"avatar_url":"https://avatars.githubusercontent.com/u/12073668?v=3","gravatar_id":"","url":"https://api.github.com/users/aantron","html_url":"https://github.com/aantron","followers_url":"https://api.github.com/users/aantron/followers","following_url":"https://api.github.com/users/aantron/following{/other_user}","gists_url":"https://api.github.com/users/aantron/gists{/gist_id}","starred_url":"https://api.github.com/users/aantron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aantron/subscriptions","organizations_url":"https://api.github.com/users/aantron/orgs","repos_url":"https://api.github.com/users/aantron/repos","events_url":"https://api.github.com/users/aantron/events{/privacy}","received_events_url":"https://api.github.com/users/aantron/received_events","type":"User","site_admin":false},"body":"Resolves #43.\r\n\r\nHere are some before and afters.\r\n\r\nI think this is much more useful (after):\r\n\r\n![screen shot 2016-01-22 at 11 36 32](https://cloud.githubusercontent.com/assets/12073668/12518531/d45a7ee2-c0fe-11e5-94a6-4147548136eb.png)\r\n\r\nThan this (before):\r\n\r\n![screen shot 2016-01-22 at 11 41 56](https://cloud.githubusercontent.com/assets/12073668/12518536/da1edf3a-c0fe-11e5-889b-8d0340af8875.png)\r\n\r\nAlso, even for cases without or-patterns, I think the new output is easier to read and make sense of:\r\n\r\n![screen shot 2016-01-22 at 11 38 42](https://cloud.githubusercontent.com/assets/12073668/12518539/e0fcab52-c0fe-11e5-9400-f90760e8d725.png)\r\n\r\nBefore:\r\n\r\n![screen shot 2016-01-22 at 11 41 24](https://cloud.githubusercontent.com/assets/12073668/12518544/e573ff6e-c0fe-11e5-968e-909cbb4eeba9.png)\r\n\r\nThis took Markup.ml coverage from 78% to 65%, which I think is a good thing. It will encourage me to write much more thorough tests.\r\n\r\nHere is a sketch of the translation implemented. If you have\r\n\r\n```ocaml\r\nmatch x with\r\n| (Foo | Bar), (Foo | Bar) -> e\r\n```\r\n\r\nBisect_ppx will now replace it with\r\n\r\n```ocaml\r\nmatch x with\r\n| ((* p1 *) Foo | (* p2 *) Bar),\r\n  ((* p3 *) Foo | (* p4 *) Bar) as ___bisect_matched_value___ ->\r\n  begin match ___bisect_matched_value___ with\r\n  | Foo, Foo -> mark p1; mark p3\r\n  | Foo, Bar -> mark p1; mark p4\r\n  | Bar, Foo -> mark p2; mark p3\r\n  | Bar, Bar -> mark p2; mark p4\r\n  end [@ocaml.warning \"-8\"];\r\n  e\r\n```\r\n\r\nThis PR currently includes all the commits of #55. Only the last commit is unique to here. I will rebase this PR after #55 is merged.\r\n","created_at":"2016-01-22T17:57:53Z","updated_at":"2016-01-24T17:16:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b05acf6cf925a603ecc9ce428f592206d4f27eed","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/56/commits","review_comments_url":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/56/comments","review_comment_url":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rleonid/bisect_ppx/issues/56/comments","statuses_url":"https://api.github.com/repos/rleonid/bisect_ppx/statuses/6ebf9564c1406d37f76379bf647fa47776bbca7d","head":{"label":"rleonid:or-elimination","ref":"or-elimination","sha":"6ebf9564c1406d37f76379bf647fa47776bbca7d","user":{"login":"rleonid","id":6570317,"avatar_url":"https://avatars.githubusercontent.com/u/6570317?v=3","gravatar_id":"","url":"https://api.github.com/users/rleonid","html_url":"https://github.com/rleonid","followers_url":"https://api.github.com/users/rleonid/followers","following_url":"https://api.github.com/users/rleonid/following{/other_user}","gists_url":"https://api.github.com/users/rleonid/gists{/gist_id}","starred_url":"https://api.github.com/users/rleonid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleonid/subscriptions","organizations_url":"https://api.github.com/users/rleonid/orgs","repos_url":"https://api.github.com/users/rleonid/repos","events_url":"https://api.github.com/users/rleonid/events{/privacy}","received_events_url":"https://api.github.com/users/rleonid/received_events","type":"User","site_admin":false},"repo":{"id":34832664,"name":"bisect_ppx","full_name":"rleonid/bisect_ppx","owner":{"login":"rleonid","id":6570317,"avatar_url":"https://avatars.githubusercontent.com/u/6570317?v=3","gravatar_id":"","url":"https://api.github.com/users/rleonid","html_url":"https://github.com/rleonid","followers_url":"https://api.github.com/users/rleonid/followers","following_url":"https://api.github.com/users/rleonid/following{/other_user}","gists_url":"https://api.github.com/users/rleonid/gists{/gist_id}","starred_url":"https://api.github.com/users/rleonid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleonid/subscriptions","organizations_url":"https://api.github.com/users/rleonid/orgs","repos_url":"https://api.github.com/users/rleonid/repos","events_url":"https://api.github.com/users/rleonid/events{/privacy}","received_events_url":"https://api.github.com/users/rleonid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rleonid/bisect_ppx","description":"Bisect Code coverage via PPX.","fork":false,"url":"https://api.github.com/repos/rleonid/bisect_ppx","forks_url":"https://api.github.com/repos/rleonid/bisect_ppx/forks","keys_url":"https://api.github.com/repos/rleonid/bisect_ppx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rleonid/bisect_ppx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rleonid/bisect_ppx/teams","hooks_url":"https://api.github.com/repos/rleonid/bisect_ppx/hooks","issue_events_url":"https://api.github.com/repos/rleonid/bisect_ppx/issues/events{/number}","events_url":"https://api.github.com/repos/rleonid/bisect_ppx/events","assignees_url":"https://api.github.com/repos/rleonid/bisect_ppx/assignees{/user}","branches_url":"https://api.github.com/repos/rleonid/bisect_ppx/branches{/branch}","tags_url":"https://api.github.com/repos/rleonid/bisect_ppx/tags","blobs_url":"https://api.github.com/repos/rleonid/bisect_ppx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rleonid/bisect_ppx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rleonid/bisect_ppx/git/refs{/sha}","trees_url":"https://api.github.com/repos/rleonid/bisect_ppx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rleonid/bisect_ppx/statuses/{sha}","languages_url":"https://api.github.com/repos/rleonid/bisect_ppx/languages","stargazers_url":"https://api.github.com/repos/rleonid/bisect_ppx/stargazers","contributors_url":"https://api.github.com/repos/rleonid/bisect_ppx/contributors","subscribers_url":"https://api.github.com/repos/rleonid/bisect_ppx/subscribers","subscription_url":"https://api.github.com/repos/rleonid/bisect_ppx/subscription","commits_url":"https://api.github.com/repos/rleonid/bisect_ppx/commits{/sha}","git_commits_url":"https://api.github.com/repos/rleonid/bisect_ppx/git/commits{/sha}","comments_url":"https://api.github.com/repos/rleonid/bisect_ppx/comments{/number}","issue_comment_url":"https://api.github.com/repos/rleonid/bisect_ppx/issues/comments{/number}","contents_url":"https://api.github.com/repos/rleonid/bisect_ppx/contents/{+path}","compare_url":"https://api.github.com/repos/rleonid/bisect_ppx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rleonid/bisect_ppx/merges","archive_url":"https://api.github.com/repos/rleonid/bisect_ppx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rleonid/bisect_ppx/downloads","issues_url":"https://api.github.com/repos/rleonid/bisect_ppx/issues{/number}","pulls_url":"https://api.github.com/repos/rleonid/bisect_ppx/pulls{/number}","milestones_url":"https://api.github.com/repos/rleonid/bisect_ppx/milestones{/number}","notifications_url":"https://api.github.com/repos/rleonid/bisect_ppx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rleonid/bisect_ppx/labels{/name}","releases_url":"https://api.github.com/repos/rleonid/bisect_ppx/releases{/id}","deployments_url":"https://api.github.com/repos/rleonid/bisect_ppx/deployments","created_at":"2015-04-30T03:42:09Z","updated_at":"2016-01-17T18:57:23Z","pushed_at":"2016-01-24T16:34:05Z","git_url":"git://github.com/rleonid/bisect_ppx.git","ssh_url":"git@github.com:rleonid/bisect_ppx.git","clone_url":"https://github.com/rleonid/bisect_ppx.git","svn_url":"https://github.com/rleonid/bisect_ppx","homepage":null,"size":1935,"stargazers_count":22,"watchers_count":22,"language":"OCaml","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":22,"default_branch":"master"}},"base":{"label":"rleonid:master","ref":"master","sha":"7292ced8515c42d4bd95ff46582b302c479e6ae8","user":{"login":"rleonid","id":6570317,"avatar_url":"https://avatars.githubusercontent.com/u/6570317?v=3","gravatar_id":"","url":"https://api.github.com/users/rleonid","html_url":"https://github.com/rleonid","followers_url":"https://api.github.com/users/rleonid/followers","following_url":"https://api.github.com/users/rleonid/following{/other_user}","gists_url":"https://api.github.com/users/rleonid/gists{/gist_id}","starred_url":"https://api.github.com/users/rleonid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleonid/subscriptions","organizations_url":"https://api.github.com/users/rleonid/orgs","repos_url":"https://api.github.com/users/rleonid/repos","events_url":"https://api.github.com/users/rleonid/events{/privacy}","received_events_url":"https://api.github.com/users/rleonid/received_events","type":"User","site_admin":false},"repo":{"id":34832664,"name":"bisect_ppx","full_name":"rleonid/bisect_ppx","owner":{"login":"rleonid","id":6570317,"avatar_url":"https://avatars.githubusercontent.com/u/6570317?v=3","gravatar_id":"","url":"https://api.github.com/users/rleonid","html_url":"https://github.com/rleonid","followers_url":"https://api.github.com/users/rleonid/followers","following_url":"https://api.github.com/users/rleonid/following{/other_user}","gists_url":"https://api.github.com/users/rleonid/gists{/gist_id}","starred_url":"https://api.github.com/users/rleonid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleonid/subscriptions","organizations_url":"https://api.github.com/users/rleonid/orgs","repos_url":"https://api.github.com/users/rleonid/repos","events_url":"https://api.github.com/users/rleonid/events{/privacy}","received_events_url":"https://api.github.com/users/rleonid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rleonid/bisect_ppx","description":"Bisect Code coverage via PPX.","fork":false,"url":"https://api.github.com/repos/rleonid/bisect_ppx","forks_url":"https://api.github.com/repos/rleonid/bisect_ppx/forks","keys_url":"https://api.github.com/repos/rleonid/bisect_ppx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rleonid/bisect_ppx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rleonid/bisect_ppx/teams","hooks_url":"https://api.github.com/repos/rleonid/bisect_ppx/hooks","issue_events_url":"https://api.github.com/repos/rleonid/bisect_ppx/issues/events{/number}","events_url":"https://api.github.com/repos/rleonid/bisect_ppx/events","assignees_url":"https://api.github.com/repos/rleonid/bisect_ppx/assignees{/user}","branches_url":"https://api.github.com/repos/rleonid/bisect_ppx/branches{/branch}","tags_url":"https://api.github.com/repos/rleonid/bisect_ppx/tags","blobs_url":"https://api.github.com/repos/rleonid/bisect_ppx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rleonid/bisect_ppx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rleonid/bisect_ppx/git/refs{/sha}","trees_url":"https://api.github.com/repos/rleonid/bisect_ppx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rleonid/bisect_ppx/statuses/{sha}","languages_url":"https://api.github.com/repos/rleonid/bisect_ppx/languages","stargazers_url":"https://api.github.com/repos/rleonid/bisect_ppx/stargazers","contributors_url":"https://api.github.com/repos/rleonid/bisect_ppx/contributors","subscribers_url":"https://api.github.com/repos/rleonid/bisect_ppx/subscribers","subscription_url":"https://api.github.com/repos/rleonid/bisect_ppx/subscription","commits_url":"https://api.github.com/repos/rleonid/bisect_ppx/commits{/sha}","git_commits_url":"https://api.github.com/repos/rleonid/bisect_ppx/git/commits{/sha}","comments_url":"https://api.github.com/repos/rleonid/bisect_ppx/comments{/number}","issue_comment_url":"https://api.github.com/repos/rleonid/bisect_ppx/issues/comments{/number}","contents_url":"https://api.github.com/repos/rleonid/bisect_ppx/contents/{+path}","compare_url":"https://api.github.com/repos/rleonid/bisect_ppx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rleonid/bisect_ppx/merges","archive_url":"https://api.github.com/repos/rleonid/bisect_ppx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rleonid/bisect_ppx/downloads","issues_url":"https://api.github.com/repos/rleonid/bisect_ppx/issues{/number}","pulls_url":"https://api.github.com/repos/rleonid/bisect_ppx/pulls{/number}","milestones_url":"https://api.github.com/repos/rleonid/bisect_ppx/milestones{/number}","notifications_url":"https://api.github.com/repos/rleonid/bisect_ppx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rleonid/bisect_ppx/labels{/name}","releases_url":"https://api.github.com/repos/rleonid/bisect_ppx/releases{/id}","deployments_url":"https://api.github.com/repos/rleonid/bisect_ppx/deployments","created_at":"2015-04-30T03:42:09Z","updated_at":"2016-01-17T18:57:23Z","pushed_at":"2016-01-24T16:34:05Z","git_url":"git://github.com/rleonid/bisect_ppx.git","ssh_url":"git@github.com:rleonid/bisect_ppx.git","clone_url":"https://github.com/rleonid/bisect_ppx.git","svn_url":"https://github.com/rleonid/bisect_ppx","homepage":null,"size":1935,"stargazers_count":22,"watchers_count":22,"language":"OCaml","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/56"},"html":{"href":"https://github.com/rleonid/bisect_ppx/pull/56"},"issue":{"href":"https://api.github.com/repos/rleonid/bisect_ppx/issues/56"},"comments":{"href":"https://api.github.com/repos/rleonid/bisect_ppx/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rleonid/bisect_ppx/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/rleonid/bisect_ppx/statuses/6ebf9564c1406d37f76379bf647fa47776bbca7d"}}}}