>
> What syntax/loc would do is put the source location of the caller in the back
> trace. It only goes one level deep though, so you're not getting the actual
> benefit of using syntax/loc over syntax, unless the error happens in the
> outer let expression instead of one the inner expressions
thank you !!
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/opt
`syntax-case` (and `with-syntax` and others) bind template identifiers,
that you can use inside #', #`, `syntax/loc`, etc.
`let`, and other regular Racket binding forms bind ordinary identifiers.
To use those within a template, you need to unquote, as you suggest.
`syntax/loc` is like `syntax` (#
> On Nov 23, 2015, at 10:30 AM, thomas.lynch
> wrote:
>
> Without syntax/loc, no location of error in macro:
>
> (define-syntax (messup5 stx)
>(datum->syntax stx
> (let (
> [a 7]
> [b 9]
> )
>(^ a b)
> )))
> (messup5)
The differen
p.s. for reference here,
Without syntax loc, no location of error in macro:
#|
(define-syntax (messup5 stx)
(datum->syntax stx
(let (
[a 7]
[b 9]
)
(^ a b)
)))
(messup5)
rac...@test-macro-dev-error.rkt> (enter! "t
what is the difference between syntax-case matched identifiers, and those
provided by let. This example crashes and burns on load:
(define-syntax (fine1 stx)
(let (
[a 7]
[b 9]
)
(syntax/loc stx
(+ a b)
)))
Which begs the question, ho
Alex, yes thank you, the quote-srcloc works at run time, so for example:
(define-syntax (here3 stx)
(let(
[program `(quote-srcloc ,stx)]
)
(datum->syntax stx program)
))
Will print the call point. What the heck is this macro, as it is being pass
7 matches
Mail list logo