Re: [racket] how can we modify the example from the reference

2011-09-11 Thread Matthias Felleisen
The paragraph in 1.2.3.9 starts with "For a top-level definition (outside of a module), the order of evaluation affects the binding of a generated definition for a generated identifier use." So when you run this example in a top-level environment, e.g., the interactions window (aka repl) it wo

[racket] how can we modify the example from the reference

2011-09-11 Thread André Mayers
In the section 1.2.3.9 : Macro-Introduced Bindings the example below give the following error "define-syntaxes: context (defining "odd.1", ...) expected 2 values, received 0 values"  (define-syntax defs-and-uses (syntax-rules ()   [(def-and-use)    (begin ; Declare before def

Re: [racket] Define-type language form, and macros

2011-09-11 Thread Jay McCarthy
The main other interesting things going on are validating that all the variants are from the same type, every variant is covered, all the fields are there, etc. Jay On Sun, Sep 11, 2011 at 1:30 PM, Jeremy Kun wrote: > So it looks like there are a lot more complicated things going on in > define-

Re: [racket] Define-type language form, and macros

2011-09-11 Thread Jeremy Kun
So it looks like there are a lot more complicated things going on in define-type and type-case than I naively tried to implement myself. It's probably safer to just do the nice (require (only-in)) thing and not reinvent a worse version of the wheel. Although I did get my particular define-syntax to

Re: [racket] Need Help With Keybindings

2011-09-11 Thread David G. Kay
Thank you; that's great. I'm most of the way there now. Still, I'm finding the text% documentation tough sledding; the tools seem lower-level than I need. Is there a keybinding file somewhere for emacs commands? I think changing the actual keystrokes in that file would be the easiest way for m

Re: [racket] Define-type language form, and macros

2011-09-11 Thread Danny Yoo
On Sun, Sep 11, 2011 at 1:44 PM, Jeremy Kun wrote: > Is there an existing Racket analogue for the "define-type" language form > from the PLAI text? You can pull out specific things from a language or module by using: (require (only-in some-module language-feature-1 l

Re: [racket] Define-type language form, and macros

2011-09-11 Thread Sam Tobin-Hochstadt
On Sun, Sep 11, 2011 at 1:44 PM, Jeremy Kun wrote: > Is there an existing Racket analogue for the "define-type" language form > from the PLAI text? Is there a quick way for me to just (require-syntax > define-type) so I can use it in my otherwise purely-Racket programs? Or > perhaps, is there a wa

[racket] Define-type language form, and macros

2011-09-11 Thread Jeremy Kun
Is there an existing Racket analogue for the "define-type" language form from the PLAI text? Is there a quick way for me to just (require-syntax define-type) so I can use it in my otherwise purely-Racket programs? Or perhaps, is there a way for me to look at the original syntax definitions so I can

[racket] cell model representation for cons or list operations

2011-09-11 Thread xinwei1988
Hi. I’m trying to figure out if that’s anyway I could have racket to draw out the cell model representation for cons or list operations. Or there are plugins available for me because I don’t seem to find it. I would like to visualize the model given a list or cons operations but it seems to be