> On Oct 3, 2015, at 3:59 PM, Antonio Menezes Leitao 
> <[email protected]> wrote:
> 
> Hi,
> 
> It seems that define-syntax is provided by typed/racket but not by 
> typed/racket/base. Is that on purpose?
> 
> The following program compiles in DrRacket, version 
> 6.2.900.17--2015-09-20(6dfc20d/a) [3m]:
> 
> #lang typed/racket
> 
> (define-syntax (foo stx)
>   (syntax-case stx ()
>     ((_ expr)
>      (syntax/loc stx expr))))
> 
> However, if I change the #lang line to
> 
> #lang typed/racket/base
> 
> I get an error:
> 
> syntax-case: unbound identifier in the transformer environment;
>  also, no #%app syntax transformer is bound in: syntax-case

For that you should 
(require (for-syntax racket/base))

typed/racket provides all of racket/base for-syntax, just like racket does, but
typed/racket/base doesn't, just like racket/base does.

typed/racket/base provides define-syntax in the runtime phase,
but it doesn't provide syntax-case for-syntax.

> BTW, there is no problem with define-syntax-rule.
> 
> Best,
> Antonio.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/ADEFDB39-EBD8-4D8A-9A5D-285E97E9CDFD%40knauth.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to