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

From: John Clements (clements at brinckerhoff.org)
Date: Wed May 20 17:45:34 EDT 2009

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20090520/2fad1bdd/attachment.p7s>

Posted on the dev mailing list.