Re: [racket] define-match-expander and embedded racket

2013-01-25 Thread Tim Brown
On 25 Jan 2013 18:27, "Matthew Flatt" wrote: > So, I think the bug was the same one that shows up with `raco exe' and > `match' in v5.3.1, and that bug has been fixed for the upcoming > release. Hurrah for just too late big reporting! As an aside, would you expect 'raco --cgc' to work whether ra

Re: [racket] define-match-expander and embedded racket

2013-01-25 Thread Matthew Flatt
At Fri, 25 Jan 2013 19:56:55 +, Tim Brown wrote: > As an aside, would you expect 'raco --cgc' to work whether raco is CGC or > 3M? Yes, `--cgc' and `--3m' both with `raco ctool' independent of which variant of Racket is running `raco' (but the default matches the variant of Racket running `rac

Re: [racket] define-match-expander and embedded racket

2013-01-25 Thread Matthew Flatt
I tried again with v5.3.1, instead of the current development version, and this time I get the error that you see. So, I think the bug was the same one that shows up with `raco exe' and `match' in v5.3.1, and that bug has been fixed for the upcoming release. Racket Users li

Re: [racket] define-match-expander and embedded racket

2013-01-25 Thread Tim Brown
I looked a bit further down the page to "3m embedding". That requires the code you're suggesting. So there's no confusion, I'm trying to embed the CGC version of racket into my C program. I also found a "racocgc" in my installation (previously I was using the 3m version with a --cgc switch). I tr

Re: [racket] define-match-expander and embedded racket

2013-01-25 Thread Matthew Flatt
At Fri, 25 Jan 2013 17:13:59 +, Tim Brown wrote: > On 25/01/13 17:04, Matthew Flatt wrote: > > I wasn't able to replicate the error that you get, but I notice that > > your C code doesn't cooperate with the GC. > > I'm following the recipe in "1.5.1 CGC Embedding" in > http://docs.racket-lang.

Re: [racket] define-match-expander and embedded racket

2013-01-25 Thread Tim Brown
On 25/01/13 17:04, Matthew Flatt wrote: I wasn't able to replicate the error that you get, but I notice that your C code doesn't cooperate with the GC. I'm following the recipe in "1.5.1 CGC Embedding" in http://docs.racket-lang.org/inside/overview.html?q=embedding#%28part._embedding%29 I use

Re: [racket] define-match-expander and embedded racket

2013-01-25 Thread Matthew Flatt
I wasn't able to replicate the error that you get, but I notice that your C code doesn't cooperate with the GC. Does it change anything if, in trampoline_main(), you add MZ_GC_DECL_REG(1); MZ_GC_VAR_IN_REG(0, e); MZ_GC_REG(); at the start and MZ_GC_UNREG(); before returning? At

Re: [racket] define-match-expander and embedded racket

2013-01-23 Thread Sam Tobin-Hochstadt
On Wed, Jan 23, 2013 at 7:10 AM, Tim Brown wrote: > > I am trying to embed racket into a C program, and have a module which uses > "define-match-expander" (in conjunction with match). > > The attached scripts seem to show an inconsistency between a module > that has been declared with declare_modu

[racket] define-match-expander and embedded racket

2013-01-23 Thread Tim Brown
Folks, I am trying to embed racket into a C program, and have a module which uses "define-match-expander" (in conjunction with match). The attached scripts seem to show an inconsistency between a module that has been declared with declare_modules(...) and one that has been imported with scheme_n