[Larceny-users] larceny command line

will at ccs.neu.edu will at ccs.neu.edu
Mon Feb 28 23:52:57 EST 2011


Jon Wells wrote:
> It seems that the argument to the -e option is always evaluated in r5
> mode. Is there a reason for that?  It'd be nice to be able to...
> 
>     larceny -err5rs -- -e '(import (guff))'
> 
> and land up in a repl with guff imported.
> 
> I don't mind hacking my own version to do this, provided I'm not going
> to shoot myself in the foot in some very complicated way by doing so.

It looks as though you're asking for the -e option to work in
ERR5RS and R6RS modes as well as R5RS mode.

In R6RS mode, the -e option is incompatible with the semantics
of the -- option, which sends everything that follows to the
R6RS top-level program.  Faced with the choice of making the
ERR5RS mode compatible with R5RS or R6RS mode in this respect,
we made it compatible with R6RS mode.  If we hadn't, it would
have been hard to debug R6RS programs in ERR5RS mode.

We could support an equivalent of the -e option that precedes
the -- option instead of following it, but that would add hair
to the command-line processing that's done in C or C#, and we
have been trying to simplify Larceny's command-line processing.

For a proposed solution to the inconvenience of having to type
an import in ERR5RS mode, see ticket #664:
https://trac.ccs.neu.edu/trac/larceny/ticket/664

Will



More information about the Larceny-users mailing list