{"action":"closed","number":477,"pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/477","id":60159641,"html_url":"https://github.com/ocaml/ocaml/pull/477","diff_url":"https://github.com/ocaml/ocaml/pull/477.diff","patch_url":"https://github.com/ocaml/ocaml/pull/477.patch","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/477","number":477,"state":"closed","locked":false,"title":"docstrings","user":{"login":"trefis","id":118852,"avatar_url":"https://avatars.githubusercontent.com/u/118852?v=3","gravatar_id":"","url":"https://api.github.com/users/trefis","html_url":"https://github.com/trefis","followers_url":"https://api.github.com/users/trefis/followers","following_url":"https://api.github.com/users/trefis/following{/other_user}","gists_url":"https://api.github.com/users/trefis/gists{/gist_id}","starred_url":"https://api.github.com/users/trefis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trefis/subscriptions","organizations_url":"https://api.github.com/users/trefis/orgs","repos_url":"https://api.github.com/users/trefis/repos","events_url":"https://api.github.com/users/trefis/events{/privacy}","received_events_url":"https://api.github.com/users/trefis/received_events","type":"User","site_admin":false},"body":"This PR adds support for documentation comments in the following positions:\r\n\r\n1. on the parameters of a function type:  \r\n`type 'a with_optionnal = ?optionnal:unit (** optionnal! *) -> 'a`  \r\n`val f : ?foo:int (** default [0] *) -> bar:string (** doc *) -> unit (** doc *) -> unit`\r\n2. inside polymorphic variant types:  \r\n```type t = [ `Foo (** foo! *) | `Bar of int * string (** bar? *) ]```\r\n3. inside object types:  \r\n`type t = < foo: int -> int (** foo *) ; bar: int -> int; (** bar *) .. >`\r\n\r\nCurrently if warning 50 is enabled it will be emitted for every comment of the examples above.\r\nThis is unfortunate because people have not only been asking support for this for a while (see various issues on mantis), but have also been using that style while waiting for tooling support, see:\r\n\r\n- examples of polymorphic variants documentation: [here](https://github.com/mirage/ocaml-cohttp/blob/master/lib/code.mli) and [there](https://github.com/janestreet/core/blob/master/src/signal.mli#L29)\r\n- examples of function parameters annotations: [here](https://github.com/janestreet/core_kernel/blob/master/src/debug.mli#L46) and [there](https://github.com/janestreet/core_kernel/blob/master/src/in_channel.mli#L42),\r\n- example of an object type definition with annotations on methods: [here](https://github.com/the-lambda-church/dmlenu/blob/master/lib/completion.mli#L9)\r\n\r\nOne should note that the warning inside object types as support was added in ocamldoc with [this commit](https://github.com/ocaml/ocaml/commit/1a3b58be2b3acd53a83e3afde36d3ac55041b3fc) (cf. [mantis PR#6274](http://caml.inria.fr/mantis/view.php?id=6274)).\r\n\r\nThe other two cases were not supported but remove an unnecessary limitation and conforms with the style people are already using.","created_at":"2016-02-22T11:31:40Z","updated_at":"2016-03-03T13:18:33Z","closed_at":"2016-03-03T13:18:33Z","merged_at":"2016-03-03T13:18:33Z","merge_commit_sha":"33e2be929695552c3a5efcd1c6dfb4236f296870","assignee":null,"milestone":{"url":"https://api.github.com/repos/ocaml/ocaml/milestones/1","html_url":"https://github.com/ocaml/ocaml/milestones/4.03.0","labels_url":"https://api.github.com/repos/ocaml/ocaml/milestones/1/labels","id":1464887,"number":1,"title":"4.03.0","description":"","creator":{"login":"damiendoligez","id":19104,"avatar_url":"https://avatars.githubusercontent.com/u/19104?v=3","gravatar_id":"","url":"https://api.github.com/users/damiendoligez","html_url":"https://github.com/damiendoligez","followers_url":"https://api.github.com/users/damiendoligez/followers","following_url":"https://api.github.com/users/damiendoligez/following{/other_user}","gists_url":"https://api.github.com/users/damiendoligez/gists{/gist_id}","starred_url":"https://api.github.com/users/damiendoligez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damiendoligez/subscriptions","organizations_url":"https://api.github.com/users/damiendoligez/orgs","repos_url":"https://api.github.com/users/damiendoligez/repos","events_url":"https://api.github.com/users/damiendoligez/events{/privacy}","received_events_url":"https://api.github.com/users/damiendoligez/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":62,"state":"open","created_at":"2015-12-17T12:42:44Z","updated_at":"2016-03-03T13:18:33Z","due_on":"2016-02-07T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ocaml/ocaml/pulls/477/commits","review_comments_url":"https://api.github.com/repos/ocaml/ocaml/pulls/477/comments","review_comment_url":"https://api.github.com/repos/ocaml/ocaml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/477/comments","statuses_url":"https://api.github.com/repos/ocaml/ocaml/statuses/3fee64a34f141cb174927d0f4ce4df08ee0f3f1c","head":{"label":"trefis:4.03-docstrings","ref":"4.03-docstrings","sha":"3fee64a34f141cb174927d0f4ce4df08ee0f3f1c","user":{"login":"trefis","id":118852,"avatar_url":"https://avatars.githubusercontent.com/u/118852?v=3","gravatar_id":"","url":"https://api.github.com/users/trefis","html_url":"https://github.com/trefis","followers_url":"https://api.github.com/users/trefis/followers","following_url":"https://api.github.com/users/trefis/following{/other_user}","gists_url":"https://api.github.com/users/trefis/gists{/gist_id}","starred_url":"https://api.github.com/users/trefis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trefis/subscriptions","organizations_url":"https://api.github.com/users/trefis/orgs","repos_url":"https://api.github.com/users/trefis/repos","events_url":"https://api.github.com/users/trefis/events{/privacy}","received_events_url":"https://api.github.com/users/trefis/received_events","type":"User","site_admin":false},"repo":{"id":12464626,"name":"ocaml","full_name":"trefis/ocaml","owner":{"login":"trefis","id":118852,"avatar_url":"https://avatars.githubusercontent.com/u/118852?v=3","gravatar_id":"","url":"https://api.github.com/users/trefis","html_url":"https://github.com/trefis","followers_url":"https://api.github.com/users/trefis/followers","following_url":"https://api.github.com/users/trefis/following{/other_user}","gists_url":"https://api.github.com/users/trefis/gists{/gist_id}","starred_url":"https://api.github.com/users/trefis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trefis/subscriptions","organizations_url":"https://api.github.com/users/trefis/orgs","repos_url":"https://api.github.com/users/trefis/repos","events_url":"https://api.github.com/users/trefis/events{/privacy}","received_events_url":"https://api.github.com/users/trefis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trefis/ocaml","description":"Read-only mirror of INRIA SVN","fork":true,"url":"https://api.github.com/repos/trefis/ocaml","forks_url":"https://api.github.com/repos/trefis/ocaml/forks","keys_url":"https://api.github.com/repos/trefis/ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trefis/ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trefis/ocaml/teams","hooks_url":"https://api.github.com/repos/trefis/ocaml/hooks","issue_events_url":"https://api.github.com/repos/trefis/ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/trefis/ocaml/events","assignees_url":"https://api.github.com/repos/trefis/ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/trefis/ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/trefis/ocaml/tags","blobs_url":"https://api.github.com/repos/trefis/ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trefis/ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trefis/ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/trefis/ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trefis/ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/trefis/ocaml/languages","stargazers_url":"https://api.github.com/repos/trefis/ocaml/stargazers","contributors_url":"https://api.github.com/repos/trefis/ocaml/contributors","subscribers_url":"https://api.github.com/repos/trefis/ocaml/subscribers","subscription_url":"https://api.github.com/repos/trefis/ocaml/subscription","commits_url":"https://api.github.com/repos/trefis/ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/trefis/ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/trefis/ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/trefis/ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/trefis/ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/trefis/ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trefis/ocaml/merges","archive_url":"https://api.github.com/repos/trefis/ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trefis/ocaml/downloads","issues_url":"https://api.github.com/repos/trefis/ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/trefis/ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/trefis/ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/trefis/ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trefis/ocaml/labels{/name}","releases_url":"https://api.github.com/repos/trefis/ocaml/releases{/id}","deployments_url":"https://api.github.com/repos/trefis/ocaml/deployments","created_at":"2013-08-29T15:55:41Z","updated_at":"2015-06-03T15:50:30Z","pushed_at":"2016-03-03T12:55:54Z","git_url":"git://github.com/trefis/ocaml.git","ssh_url":"git@github.com:trefis/ocaml.git","clone_url":"https://github.com/trefis/ocaml.git","svn_url":"https://github.com/trefis/ocaml","homepage":null,"size":160124,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"4.01-perf-annotate"}},"base":{"label":"ocaml:4.03","ref":"4.03","sha":"6e223fd92b14970906f701f6ff6a87d9d1b11784","user":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars.githubusercontent.com/u/1841483?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"repo":{"id":6786166,"name":"ocaml","full_name":"ocaml/ocaml","owner":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars.githubusercontent.com/u/1841483?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ocaml/ocaml","description":"The core OCaml system: compilers, runtime system, base libraries","fork":false,"url":"https://api.github.com/repos/ocaml/ocaml","forks_url":"https://api.github.com/repos/ocaml/ocaml/forks","keys_url":"https://api.github.com/repos/ocaml/ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocaml/ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocaml/ocaml/teams","hooks_url":"https://api.github.com/repos/ocaml/ocaml/hooks","issue_events_url":"https://api.github.com/repos/ocaml/ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/ocaml/ocaml/events","assignees_url":"https://api.github.com/repos/ocaml/ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/ocaml/ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/ocaml/ocaml/tags","blobs_url":"https://api.github.com/repos/ocaml/ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocaml/ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocaml/ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocaml/ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocaml/ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/ocaml/ocaml/languages","stargazers_url":"https://api.github.com/repos/ocaml/ocaml/stargazers","contributors_url":"https://api.github.com/repos/ocaml/ocaml/contributors","subscribers_url":"https://api.github.com/repos/ocaml/ocaml/subscribers","subscription_url":"https://api.github.com/repos/ocaml/ocaml/subscription","commits_url":"https://api.github.com/repos/ocaml/ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocaml/ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocaml/ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocaml/ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocaml/ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/ocaml/ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocaml/ocaml/merges","archive_url":"https://api.github.com/repos/ocaml/ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocaml/ocaml/downloads","issues_url":"https://api.github.com/repos/ocaml/ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/ocaml/ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/ocaml/ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/ocaml/ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocaml/ocaml/labels{/name}","releases_url":"https://api.github.com/repos/ocaml/ocaml/releases{/id}","deployments_url":"https://api.github.com/repos/ocaml/ocaml/deployments","created_at":"2012-11-20T22:18:22Z","updated_at":"2016-03-02T15:46:44Z","pushed_at":"2016-03-03T13:18:34Z","git_url":"git://github.com/ocaml/ocaml.git","ssh_url":"git@github.com:ocaml/ocaml.git","clone_url":"https://github.com/ocaml/ocaml.git","svn_url":"https://github.com/ocaml/ocaml","homepage":"","size":226737,"stargazers_count":689,"watchers_count":689,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":224,"mirror_url":null,"open_issues_count":73,"forks":224,"open_issues":73,"watchers":689,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/477"},"html":{"href":"https://github.com/ocaml/ocaml/pull/477"},"issue":{"href":"https://api.github.com/repos/ocaml/ocaml/issues/477"},"comments":{"href":"https://api.github.com/repos/ocaml/ocaml/issues/477/comments"},"review_comments":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/477/comments"},"review_comment":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/477/commits"},"statuses":{"href":"https://api.github.com/repos/ocaml/ocaml/statuses/3fee64a34f141cb174927d0f4ce4df08ee0f3f1c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"mshinwell","id":1315488,"avatar_url":"https://avatars.githubusercontent.com/u/1315488?v=3","gravatar_id":"","url":"https://api.github.com/users/mshinwell","html_url":"https://github.com/mshinwell","followers_url":"https://api.github.com/users/mshinwell/followers","following_url":"https://api.github.com/users/mshinwell/following{/other_user}","gists_url":"https://api.github.com/users/mshinwell/gists{/gist_id}","starred_url":"https://api.github.com/users/mshinwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshinwell/subscriptions","organizations_url":"https://api.github.com/users/mshinwell/orgs","repos_url":"https://api.github.com/users/mshinwell/repos","events_url":"https://api.github.com/users/mshinwell/events{/privacy}","received_events_url":"https://api.github.com/users/mshinwell/received_events","type":"User","site_admin":false},"comments":5,"review_comments":0,"commits":4,"additions":196,"deletions":9,"changed_files":4}}