3 ms·
That must be how DrRacket works, right? I've also dreamed of accessing Racket macro syntax errors at runtime and building my own interface for viewing the erro
by srcreigh 5y ago
That must be how DrRacket works, right?
I've also dreamed of accessing Racket macro syntax errors at runtime and building my own interface for viewing the errors. For example, send sandboxed DSL code over an HTTP request, and send any errors in a response to view them on a web application.
I also cannot see very far, but I suspect you could whip something like this up using the error-display-handler [1] parameter and the macro stepper [2].
Of course, there is a paper written about DrRacket (aka DrScheme) which you can study [3] as well as DrRacket source code [4].
[1]: https://docs.racket-lang.org/reference/exns.html#%28def._%28%28quote._~23~25kernel%29._error-display-handler%29%29 https://docs.racket-lang.org/reference/exns.html#%28def._%28...
[2]: https://docs.racket-lang.org/macro-debugger/index.html https://docs.racket-lang.org/macro-debugger/index.html
[3]: https://www2.ccs.neu.edu/racket/pubs/jfp01-fcffksf.pdf https://www2.ccs.neu.edu/racket/pubs/jfp01-fcffksf.pdf
[4]: https://github.com/racket/drracket https://github.com/racket/drracket