{"action":"opened","issue":{"url":"https://api.github.com/repos/racket/racket/issues/2052","repository_url":"https://api.github.com/repos/racket/racket","labels_url":"https://api.github.com/repos/racket/racket/issues/2052/labels{/name}","comments_url":"https://api.github.com/repos/racket/racket/issues/2052/comments","events_url":"https://api.github.com/repos/racket/racket/issues/2052/events","html_url":"https://github.com/racket/racket/issues/2052","id":316416956,"number":2052,"title":"syntax-local-lift-require is permitted in a 'module-begin context in Racket 7, but does not actually work","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-20T21:27:29Z","updated_at":"2018-04-20T21:27:29Z","closed_at":null,"author_association":"MEMBER","body":"The following program fails with an error:\r\n\r\n```racket\r\n#lang racket/base\r\n\r\n(require (for-syntax racket/base\r\n                     syntax/strip-context)\r\n         syntax/parse/define)\r\n\r\n(provide #%module-begin)\r\n\r\n(define-syntax-parser #%module-begin\r\n  [(_ . body)\r\n   (syntax-local-lift-require\r\n    'racket\r\n    (datum->syntax #f (cons '#%module-begin (strip-context #'body))))])\r\n\r\n(module* test (submod \"..\")\r\n  (match-define _ #f))\r\n```\r\n```\r\nexpand: namespace mismatch; cannot locate module instance\r\n  module: #<module-path-index:racket/match/match>\r\n  use phase: 0\r\n  definition phase: 0\r\n  for identifier: #<syntax:bad.rkt:16:3 match-define>\r\n```\r\n\r\nIt fails on Racket 6.12 as well, but much earlier and with a different (less confusing) error:\r\n\r\n```racket\r\nsyntax-local-lift-requires: could not find target context\r\n  context...:\r\n   standard-module-name-resolver\r\n```\r\n\r\nI would actually very much appreciate it if `syntax-local-lift-require` was made to work properly in a `'module-begin` context, but if that doesn’t make any sense, it should signal an error like it does in Racket 6.12."}}
{"actor":{"display_login":"lexi-lambda"}}