[racket] splicing into local

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Sep 3 15:53:19 EDT 2011

At Sat, 3 Sep 2011 15:38:19 -0400, Shriram Krishnamurthi wrote:
> I have a define form that expands into two two definitions.  Usually I can 
> write
> (my-define ...) ==> (begin (define ...) (define ...))
> However, this doesn't interact well with local.

Which `begin' and which `local'?

The `begin' of `racket/base' should work for grouping definitions in a
`local' from either `racket/local' or `lang/htdp-intermediate'. I see
that there's a problem with `local' from `lang/htdp-intermediate',
though: it splices `begin' ok, but the `define's within the `begin' are
not expanded to `define-values'.

If you can expand to `(begin (define-values ....) (define-values
....))' for now, that will work around the problem. Meanwhile, I'll fix
`local' from `lang/htdp-intermediate'.

Posted on the users mailing list.