Re: [racket-users] Let over lambda and location information

2021-11-29 Thread Sorawee Porncharoenwase
If you simply want the source location to be the macro call site, one approach is finding where the source location currently is (in this case, it’s the lambda inside make-keyword-procedure). Then, you simply need to thread syntax/loc through macros to put the source location there. Here’s an

[racket-users] Let over lambda and location information

2021-11-29 Thread Christine Lemmer-Webber
Take the following code: #+BEGIN_SRC racket (require racket/match) (define-syntax-rule (methods* [(method-name method-args ...) body ...] ... fallback) (let ((method-name (lambda (method-args ...) body ...)) ...) (define all-methods (list