> On Dec 3, 2015, at 1:44 AM, Klaus Ostermann <klaus...@gmail.com> wrote: > > What would be the simplest way to use DrRacket as an editor for a file > containing an s-expression? > > Is there some pre-existing #lang that one could add to the file such that > DrRacket doesn't complain? > > For instance, it would be nice if > > #lang ??? > (foo (bar 5)) > > would be desugared to > > #lang racket/base > (define data '(foo (bar 5)))
You could definitely create that language. I believe it would be as easy as creating a new collection with the standard reader and providing a definition for the #%plain-module-begin macro that wraps the body in a definition. (You’d probably also want a “provide” to go along with that.) Should be less than 15 lines of code total? John Clements > > -- > 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.