Open soegaard opened 9 years ago
Also: It would be nice if unquote were printed as , in the error message.
Unfortunately, I don't think we have control over that:
-> (format "~s" '(a ,b ,c)) "(a (unquote b) (unquote c))"
unless there is a parameter to change how format works. Otherwise, we'd need to write our own format/pretty printer for s-expressions (which is doable but kind of a pain).
-andy:)
On July 19, 2015 at 9:44:15 AM, Jens Axel Søgaard (notifications@github.com) wrote:
Also: It would be nice if unquote were printed as , in the error message.
— Reply to this email directly or view it on GitHub.
The ~v
uses the current printer, which default to right thing:
> (format "~v" '(a ,b ,c))
"'(a ,b ,c)"
(error 'foo "the value is: ~v" '(if '1 '2 ,3))
foo: the value is: '(if '1 '2 ,3)
Cool... I was unaware of ~v I'll go through and use that places where we print s-expressions.
-andy:)
On July 19, 2015 at 10:48:57 AM, Jens Axel Søgaard (notifications@github.com) wrote: The ~v uses the current printer, which default to right thing:
(format "~v" '(a ,b ,c)) "'(a ,b ,c)"
(error 'foo "the value is: ~v" '(if '1 '2 ,3)) foo: the value is: '(if '1 '2 ,3)
— Reply to this email directly or view it on GitHub.
When
nanopass-case
is called with a value V that no clauses match and there is no default else-clause the error message doesn't show the value V. The entire form is printed. Note that the DrRacket seems to color more than thenanopass-case
expression red - which suggest that the source location is not correct.Example of error message: