> On Sep 3, 2016, at 4:43 PM, David Storrs <david.sto...@gmail.com> wrote: > > I typically use Emacs, but I thought I would experiment with DrRacket a bit. > I'm on OSX 10.11 using DrRacket v6.6, freshly installed an hour ago. I > started it up, File>New, typed this: > > > #lang racket > (displayln "hello world") > > > and hit the Run button at top right. I get the following message at bottom: > > Welcome to DrRacket, version 6.6 [3m]. > Language: R5RS [custom]; memory limit: 128 MB. > . #%module-begin: illegal use (not a module body) in: (#%module-begin > (displayln "hello world”))
Looks like DrRacket is set to the “R5RS” language. You probably want to set the language level to “Use language declared in source”. I’m guessing you set it to R5RS yourself? Thinking about how to avoid this: Would it make sense to hack something in that catches this and related errors and gives a helpful suggestion if the file begins with #lang? John > > I tried saving the file (File>Save Definitions) as "foo.rkt" and running it > again with (unsurprisingly) no change. > > It runs fine from the command line using "racket foo.rkt" 'which racket' > shows that I am in fact using the v6.6 version. (I have v5.3.1, v6.3 and > v6.6 installed) > > I've googled around and found something similar from 2013 but there was no > closure on that thread. I threw "illegal use (not a module body)" at the > search box in the Racket docs and got nothing back. I've skimmed through the > documentation on modules and I don't see what would be relevant there. > > I'm sure this is something simple but I have no idea where to look. Any > suggestions? > > Dave > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: PGP signature