[plt-scheme] Re: Is there a way to do this?

From: narutocanada at gmail.com (narutocanada at gmail.com)
Date: Sun Sep 14 11:30:32 EDT 2008

Eli Barzilay wrote:
> On Sep 14, narutocanada at gmail.com wrote:
> > On Sep 14, 2:07 pm, Matthew Flatt <mfl... at cs.utah.edu> wrote:
> > >
> > > If you really need to pipe expressions into the REPL, then you could
> > > set `uncaught-exception-handler' to call `exit' with a non-0 value.
> >
> > Can you provide an example, I'm reading the manual at
> > "http://download.plt-scheme.org/doc/html/reference/
> > exns.html#(def._((quote._~23~25kernel)._uncaught-exception-handler))"
> > , but it does not suggest an usage example. I can't figure out what to
> > feed "with-handlers" or simply set! uncaught-exception-handler to
> > exit? I simply need mzscheme to exit on any error and return none 0
> > (like other unix programs). It seems mzscheme has some complicated
> > exception system.
> Something like
>   (uncaught-exception-handler (lambda (exn) (exit 1)))
> should do what you want.  But Matthew's suggestion of writing a proper
> script file and run it as `mzscheme script' is much better.  One thing
> is that you won't get it to print the prompts and the welcome banner
> line.

I need to pipe files for unbiased results for transformations.
I like to clearly separate my own code, and the code I'm processing
that's why I ask for it. I don't need to worry about prompts or
banners, because any meaning preserving transformation should not
alter the results for the same interpreter (mzscheme).


> --
>           ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>                   http://www.barzilay.org/                 Maze is Life!
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.