takikawa / sweet-racket

A port of sweet expressions to Racket
http://pkg-build.racket-lang.org/doc/sweet/index.html
Other
47 stars 10 forks source link

function application doesn't work within begin-for-syntax #1

Closed AlexKnauth closed 9 years ago

AlexKnauth commented 9 years ago
#lang sweet-exp racket
begin-for-syntax
  define x 3
  displayln x

gives this error:

displayln: function application is not allowed;
 no #%app syntax transformer is bound in the transformer environment in: (displayln x)

This program gives the same error:

#lang sweet-exp racket
begin-for-syntax
  define x 3
  displayln(x)

And this one:

#lang sweet-exp racket
begin-for-syntax
  define x 3
  (displayln x)

But this one is fine:

#lang sweet-exp racket
begin-for-syntax(
  (define x 3)
  displayln(x)
)