{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/342","repository_url":"https://api.github.com/repos/ocaml/ocaml","labels_url":"https://api.github.com/repos/ocaml/ocaml/issues/342/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/342/comments","events_url":"https://api.github.com/repos/ocaml/ocaml/issues/342/events","html_url":"https://github.com/ocaml/ocaml/pull/342","id":121277935,"number":342,"title":"Shortcut for extension and attributes","user":{"login":"Drup","id":801124,"avatar_url":"https://avatars.githubusercontent.com/u/801124?v=3","gravatar_id":"","url":"https://api.github.com/users/Drup","html_url":"https://github.com/Drup","followers_url":"https://api.github.com/users/Drup/followers","following_url":"https://api.github.com/users/Drup/following{/other_user}","gists_url":"https://api.github.com/users/Drup/gists{/gist_id}","starred_url":"https://api.github.com/users/Drup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drup/subscriptions","organizations_url":"https://api.github.com/users/Drup/orgs","repos_url":"https://api.github.com/users/Drup/repos","events_url":"https://api.github.com/users/Drup/events{/privacy}","received_events_url":"https://api.github.com/users/Drup/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ocaml/ocaml/labels/approved","name":"approved","color":"009800"},{"url":"https://api.github.com/repos/ocaml/ocaml/labels/caml-weekly-news","name":"caml-weekly-news","color":"c7def8"}],"state":"open","locked":false,"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":8,"closed_issues":46,"state":"open","created_at":"2015-12-17T12:42:44Z","updated_at":"2016-02-05T14:47:08Z","due_on":"2016-02-07T23:00:00Z","closed_at":null},"comments":32,"created_at":"2015-12-09T15:58:49Z","updated_at":"2016-02-05T16:06:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/342","html_url":"https://github.com/ocaml/ocaml/pull/342","diff_url":"https://github.com/ocaml/ocaml/pull/342.diff","patch_url":"https://github.com/ocaml/ocaml/pull/342.patch"},"body":"Since we are just finished with https://github.com/ocaml/ocaml/pull/326, Let's move on. :]\r\n\r\nIn current OCaml, instead of writing\r\n```ocaml \r\n[%foo \r\n  let x = ...\r\n]\r\n```\r\nit is possible to write\r\n```ocaml\r\nlet%foo x = ...\r\n```\r\n\r\nFor some reason, this shortcut was added only for the `let`, but not for the other structure. Additionally, it is possible to write `let[@foo] x = ... in ...` but it's not possible to use it on structure items. This patchset adds extension and attributes shortcut on every structure and signature items.\r\n\r\nExample of use cases:\r\n- In eliom, for location annotations\r\n- In [ppx_inline_test](https://github.com/janestreet/ppx_inline_test), it allows to replace the akward \r\n```ocaml \r\nlet%test_module \"name\" = (module <module-expr>)\r\n```\r\nby the more natural\r\n ```ocaml \r\nmodule%test My_test = <module-expr>\r\n```\r\n\r\nI will add tests/changelog when the conversation reaches a fixpoint."},"comment":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/comments/180418969","html_url":"https://github.com/ocaml/ocaml/pull/342#issuecomment-180418969","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/342","id":180418969,"user":{"login":"alainfrisch","id":3305274,"avatar_url":"https://avatars.githubusercontent.com/u/3305274?v=3","gravatar_id":"","url":"https://api.github.com/users/alainfrisch","html_url":"https://github.com/alainfrisch","followers_url":"https://api.github.com/users/alainfrisch/followers","following_url":"https://api.github.com/users/alainfrisch/following{/other_user}","gists_url":"https://api.github.com/users/alainfrisch/gists{/gist_id}","starred_url":"https://api.github.com/users/alainfrisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alainfrisch/subscriptions","organizations_url":"https://api.github.com/users/alainfrisch/orgs","repos_url":"https://api.github.com/users/alainfrisch/repos","events_url":"https://api.github.com/users/alainfrisch/events{/privacy}","received_events_url":"https://api.github.com/users/alainfrisch/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T16:06:43Z","updated_at":"2016-02-05T16:06:43Z","body":"I'm fine with the proposal and it is properly documented.  I did not read the implementation, but this is low risk and there seems to be a good test, so let's merge!"}}