phoe / binding-arrows

An implementation of threading macros based on binding anonymous variables.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Source Form Context

charJe opened this issue · comments

Would it be possible to add with-trivial-source-form https://github.com/scymtym/trivial-with-current-source-form to improve error reporting?

Yes - please make a PR and run the tests, I'll merge it.

I tried to do this, but it seems to me that with-trivial-source-form is not the right tool for this job. errors and warnings emited from the compiler (like "wrong number of arguments") are signaled on the fully expanded form. I don't see a way to intercept those, and I certainly don't see a way to have them be signaled inside the body of with-trivial-source-form.

For more context here is an example:
Screenshot from 2021-10-01 00-39-39
I expect the orange squigles to be under (map...)