On Wed, Sep 25, 2013 at 7:59 AM, Sam Tobin-Hochstadt
wrote:
> On Wed, Sep 25, 2013 at 2:14 AM, Konrad Hinsen
> wrote:
> >
> > > Maybe making the error message more specific like "Did you forget to
> (require
> > > (for-syntax syntax/parse)) ?" ? Or is it too specific?
> >
> > It would already h
On Sep 25, 2013, at 7:59 AM, Sam Tobin-Hochstadt wrote:
> I think the error message could be better
Yes. Please.
Racket Users list:
http://lists.racket-lang.org/users
Without actually `require`-ing syntax-parse, could syntax-rules and
syntax-case simply report this one special case differently? If the
specific not-expression is the exact syntax `_`, then report
not-an-expression (as usual) but also add the p.s. "Are you trying to
use syntax-parse? "
Maybe
On Wed, Sep 25, 2013 at 2:14 AM, Konrad Hinsen
wrote:
>
> > Maybe making the error message more specific like "Did you forget to
> (require
> > (for-syntax syntax/parse)) ?" ? Or is it too specific?
>
> It would already help a lot if the error message said something about
> syntax-parse being u
Stephen Chang writes:
> You need (require (for-syntax syntax/parse)) because you are using it inside
> a
> define-syntax.
Ahhh... that does it, thanks!
Laurent writes:
> How much work would be required to prevent people from falling into it ever
> again?
> Maybe saying so in the doc
You really do need to know a little bit about phases in order to develop
macros in Racket, so just putting a band-aid on the issue wouldn't be
much help, and the apparent departure from the normal rules would just
make it more difficult to understand phases by looking at the requires
of a worki
If you look in the Typed Racket implementation, you'll see lots phase-1
only uses of syntax-parse.
Sam
On Sep 24, 2013 3:21 PM, "Nick Sivo" wrote:
> Why doesn't syntax/parse just provide everything at phases 0 and 1
> like the module 'sp below:
>
> (module sp racket/base
> (require syntax/pars
Why doesn't syntax/parse just provide everything at phases 0 and 1
like the module 'sp below:
(module sp racket/base
(require syntax/parse
(for-syntax syntax/parse))
(provide (all-from-out syntax/parse)
(for-syntax (all-from-out syntax/parse
(require 'sp)
(define-sy
This is a quite common pitfall into which I have myself fallen a few times,
and I guess it's not the last time.
How much work would be required to prevent people from falling into it ever
again?
Maybe saying so in the docs at the right place wouldn't hurt, but people
may still miss it.
Maybe makin
You need (require (for-syntax syntax/parse)) because you are using it
inside a define-syntax.
On Sep 24, 2013 11:56 AM, "Konrad Hinsen"
wrote:
> Hi everyone,
>
> I am trying to learn about syntax-parse, starting with the introduction
> of the "Syntax" documentation.
>
> Unfortunately, the very fi
10 matches
Mail list logo