On Apr 24, 2015, at 8:44 AM, Jens Axel Søgaard <[email protected]> wrote:
> As it turns out, it is at-exp that are at fault.
>
> The screen shot below show that arrows and renaming works when using the
> infix packages with the syntax:
> ($ "b^2-4*a*x")
>
> Note that it works even for identifiers inside the string.
Oh! Well that’s a pleasant surprise! I didn’t know that check-syntax arrows
could point to “identifiers” within strings!
> The arrows disappear when I use the at-exp syntax: @${b^2-4*a*x}.
> I am not sure why. Anyone?
I tried this and this worked with at-exp:
#lang at-exp racket
(require (for-syntax syntax/parse))
(define-syntax m
(syntax-parser
[(m str)
(datum->syntax #'str (string->symbol (syntax-e #'str)) #'str #'str)]))
(let ([x 5])
@m{x})
But that made me think of doing this:
In main.ss, line 68, you use datum->syntax with three arguments, but it works
if you add the fourth argument:
(datum->syntax
#'str
(apply string-append
(map syntax->datum
(syntax->list #'(str str* ...))))
(list (syntax-source #'str)
line col pos
(syntax-span #'str))
#'str)
> The planet package took a *very* long time to install, so I intend to upload
> a version to pkg.racket-lang.org.
>
> /Jens Axel
> <infix.png>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.