[racket] Evaluating code written in non-SEXP language

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Sep 13 10:06:01 EDT 2013

At Fri, 13 Sep 2013 17:54:47 +0400, Dmitry Pavlov wrote:
> Matthew,
> 
> > Assuming that this module is `slon/lang/reader`, does it help to add
> >
> >      ++lib slon/lang/reader
> >
> > to the `raco exe` command, along with the `++lib` argument that you
> > have already?
> 
> Unfortunately, no. Nothing has changed:
> 
> $ raco exe ++lib slon/slon-language ++lib slon/lang/reader slon-main.rkt
> $ ./slon-main
> standard-module-name-resolver: collection not found
>    collection: "slon"
>    in collection directories:
>    context...:
>     standard-module-name-resolver
>     /home/dpavlov/era/slon/slon-main.rkt:19:0: slon-main
>     #%mzc:slon-main: [running body]
>     loop

I think the problem may be that "#lang" is triggering a search for
`slon/main` before falling back to `slon/lang/reader`, and since no
`slon/main` is embedded, the attempt looks for a "slon" collection. The
"#lang" search continues as it should when an "slon" collection is
found and no "main.rkt" exists, but it doesn't fail correctly when an
"slon" collection is missing.

So, one more experiment: If you make a dummy "slon/main.rkt" and also
add it with `++lib`, does it change anything?



Posted on the users mailing list.