[plt-scheme] unit/sig question

From: Ryan Culpepper (ryan_sml at yahoo.com)
Date: Sun Apr 10 15:37:12 EDT 2005

--- Matt Jadud <mcj4 at kent.ac.uk> wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> ...
> What I don't understand is how I can turn this compound unit into 
> something I can use. For example, I thought that something like
> (define pass0 (invoke-unit/sig verify-lang0@))
> would bind pass0 to the export of verify-lang0@ (and therefore an 
> expression that parses the top-level form in the language), but
> that's not the case. Or, if it is, I've got the export of 
> top-lang0@ wrong as well, and somehow I just end up with #void.

invoke-unit/sig returns the result of evaluating the unit body. Try
looking for define-values/invoke-unit/sig in the help desk. Or it you
really want to call the variable pass0, you might try:

  (define pass0
    (let ()
      (define-values/invoke-unit/sig (<top>) top-lang0@)


Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!

Posted on the users mailing list.