Re: [racket-users] Find the source location of the syntax error in DrRacket

2021-08-13 Thread Sorawee Porncharoenwase
Isn’t that a matter of putting more syntax/loc? I tried: (-define-syntax let-syntaxes (lambda (stx) (syntax-case stx () [(_ ([(id ...) expr] ...) body1 body ...) (with-syntax ([((tmp ...) ...) (map generate-temporaries (syntax->list (syntax

[racket-users] Find the source location of the syntax error in DrRacket

2021-08-13 Thread Shu-Hung You
Here are two syntax errors that behave differently in DrRacket: #lang racket (define-syntax (m-late stx) #'(let () (define x 0))) (define-syntax (m-early stx) #'(let-syntax () (define x 0))) ; (m-late) ; (m-early) DrRacket *correctly* highlights the source location of the errors in both

Re: [racket-users] Re: Is this "inside out" macro technique common?

2021-08-13 Thread Ryan Kramer
The name `with-quasisyntax` is not very good, because it is not simply a quasi version of `with-syntax`. The most interesting part is that it calls `eval-syntax` up front. The result feels like a "universal macro" -- it can be used to implement both foo->assoc and assoc->foo which look like they

[racket-users] Re: Is this "inside out" macro technique common?

2021-08-13 Thread D. Ben Knoble
Ah, I'm now seeing that with-quasi implicitly #`s the body; I believe with syntax-parse, #:with, and #' + template vars + #` when needed you might be ok. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop

[racket-users] Re: Is this "inside out" macro technique common?

2021-08-13 Thread D. Ben Knoble
> A shortcut to answering my question would be to tell me that `with-quasisyntax` in the following paste already exists: http://pasterack.org/pastes/48885 Without taking a detailed look, is there anything about with-quasisyntax that with-syntax