[plt-dev] Q. about contract of drscheme:eval:expand-program

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed May 20 17:57:36 EDT 2009

Oh yes, you're right. That is old.


On Wed, May 20, 2009 at 4:45 PM, John Clements
<clements at brinckerhoff.org> wrote:
> The contract for drscheme:eval:expand-program specifies that it accepts an
> 'iter' argument fulfilling this contract:
> (-> (or/c eof-object? syntax? (cons/c string? any/c))
>    (-> any)
>    any)
> I'm wondering why the (cons/c string? any/c) is in there.  The documentation
> states:
> The first argument to iter is the expanded program (represented as syntax)
> or eof. The iter argument is called for each expression in the expanded
> program and once more with eof, unless an error is raised during expansion.
> It is called from the user’s thread. If an exception is raised during
> expansion of the user’s program, iter is not called. Consider setting the
> exception-handler during init to handle this situation.
> ... so, under what circumstances does expand-program call iter with (cons/c
> string? any/c) ?
> John
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-dev

Posted on the dev mailing list.