On Dec 1, 2016, 5:33 PM -0800, Matthew Flatt <[email protected]>, wrote:
> Assuming that "without lexical context" means "no scopes"[*], I don't > think there's a simpler way right now than walking through the syntax > object and making sure that each scope set is empty. And maybe there's > no easier way to check for an empty scope set than using > `bound-identifier=?` on an identifier with a scope set to test and an > identifier that definitely has an empty scope set. Specifically, what I was trying to do was write a contract for the return value of `read-syntax` that's narrower than just `syntax?` (which is insufficient, since `read-syntax` has to return a stx object without bindings). One can make such a stx object with `(datum->syntax #f ···)` or `(strip-context ···)`. So the mystery predicate here would return #t for stx objects made either of those ways. PS is the name of `strip-context` obsolete? Should it be `strip-scope-sets`? -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/1162e8a6-00e6-4e9d-9af1-a8897f756446%40Spark. For more options, visit https://groups.google.com/d/optout.
