[racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread thomas.lynch
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

Re: [racket-users] Re: racket users fight for their right to colon keywords

2015-11-23 Thread Neil Van Dyke
The Clan of Colon Keywords was willing to honor a truce. I think for people coming from other languages with :keywords, Racket's #:keywords help to signal that they are not anything like how :keywords are usually used. I'm sure there are relatively better justifications for pound-colon

[racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread thomas.lynch
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,

[racket-users] Racket v6.3

2015-11-23 Thread Ryan Culpepper
Racket version 6.3 is now available from http://racket-lang.org/ - Racket's macro expander uses a new representation of binding called "set of scopes". The new binding model provides a simpler explanation of how macros preserve binding, especially across module boundaries and in

[racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread thomas.lynch
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!

Re: [racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread Vincent St-Amour
`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`

Re: [racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread thomas.lynch
> > 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

Re: [racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread Alex Knauth
> 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)

Re: [racket-users] Re: quote-srcloc an questions of getting location

2015-11-23 Thread thomas.lynch
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