{"action":"created","issue":{"url":"https://api.github.com/repos/racket/racket/issues/1949","repository_url":"https://api.github.com/repos/racket/racket","labels_url":"https://api.github.com/repos/racket/racket/issues/1949/labels{/name}","comments_url":"https://api.github.com/repos/racket/racket/issues/1949/comments","events_url":"https://api.github.com/repos/racket/racket/issues/1949/events","html_url":"https://github.com/racket/racket/pull/1949","id":295238530,"number":1949,"title":"define-simple-macro now works with an ~or macro.","user":{"login":"LeifAndersen","id":285926,"avatar_url":"https://avatars2.githubusercontent.com/u/285926?v=4","gravatar_id":"","url":"https://api.github.com/users/LeifAndersen","html_url":"https://github.com/LeifAndersen","followers_url":"https://api.github.com/users/LeifAndersen/followers","following_url":"https://api.github.com/users/LeifAndersen/following{/other_user}","gists_url":"https://api.github.com/users/LeifAndersen/gists{/gist_id}","starred_url":"https://api.github.com/users/LeifAndersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeifAndersen/subscriptions","organizations_url":"https://api.github.com/users/LeifAndersen/orgs","repos_url":"https://api.github.com/users/LeifAndersen/repos","events_url":"https://api.github.com/users/LeifAndersen/events{/privacy}","received_events_url":"https://api.github.com/users/LeifAndersen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-02-07T18:08:43Z","updated_at":"2018-02-08T18:37:29Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/racket/racket/pulls/1949","html_url":"https://github.com/racket/racket/pull/1949","diff_url":"https://github.com/racket/racket/pull/1949.diff","patch_url":"https://github.com/racket/racket/pull/1949.patch"},"body":"The previous definition of define-simple-macro would fail (with\r\na very poor error message) if the user made a simple macro like:\r\n\r\n(define-simple-macro (~or a b)\r\n  (let ([tmp a])\r\n    (if tmp tmp b)))\r\n\r\nWhile the define-simple-macro form does allow syntax-parse patterns,\r\nthis should not be enabled for the initial head pattern, as described\r\nin the define-simple-macro documentation."},"comment":{"url":"https://api.github.com/repos/racket/racket/issues/comments/364207307","html_url":"https://github.com/racket/racket/pull/1949#issuecomment-364207307","issue_url":"https://api.github.com/repos/racket/racket/issues/1949","id":364207307,"user":{"login":"lexi-lambda","id":759911,"avatar_url":"https://avatars0.githubusercontent.com/u/759911?v=4","gravatar_id":"","url":"https://api.github.com/users/lexi-lambda","html_url":"https://github.com/lexi-lambda","followers_url":"https://api.github.com/users/lexi-lambda/followers","following_url":"https://api.github.com/users/lexi-lambda/following{/other_user}","gists_url":"https://api.github.com/users/lexi-lambda/gists{/gist_id}","starred_url":"https://api.github.com/users/lexi-lambda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lexi-lambda/subscriptions","organizations_url":"https://api.github.com/users/lexi-lambda/orgs","repos_url":"https://api.github.com/users/lexi-lambda/repos","events_url":"https://api.github.com/users/lexi-lambda/events{/privacy}","received_events_url":"https://api.github.com/users/lexi-lambda/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T18:37:29Z","updated_at":"2018-02-08T18:37:29Z","author_association":"MEMBER","body":"According to the existing documentation, this code:\r\n\r\n```racket\r\n(define-simple-macro (~or a b)\r\n  (begin\r\n    (displayln 'a)\r\n    (displayln 'b)))\r\n\r\n(~or 1 2)\r\n```\r\n\r\n…should be equivalent to this code:\r\n\r\n```racket\r\n(define-syntax (~or stx)\r\n  (syntax-parse stx\r\n    [(~or . (a b))\r\n     #'(begin\r\n         (displayln 'a)\r\n         (displayln 'b))]))\r\n\r\n(~or 1 2)\r\n```\r\n\r\n…which indeed it currently is (it produces the same exact error message you describe). So the existing behavior aligns with the current documentation, but the new behavior does not. I’m not sure which part of this you are taking issue with."}}
{"actor":{"display_login":"lexi-lambda"}}