[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unit question (documentation error hopefully).



	The PLT Scheme web server is double plus super way cool [1].  It 
finally convinced me to attempt to really understand the PLT unit system.

	In the section describing examples to linking units it says

These examples use the definitions from the earlier unit examples in 
section 7.1.1.

The following compound-unit expression creates a useless wrapping around 
the unit bound to f1@:

  (define f3@
    (compound-unit
      (import)
      (link [A (f1@)])
      (export (A (x A:x)))))

The only difference between f1@ and f3@ is that f1@ exports a variable 
named x, while f3@ exports a variable named A:x.

and section 7.1.1 says that f1@ is

  (define f1@
     (unit
       (import) (export)
       (define x (current-seconds))
       (display x) (newline) x))

If I understand correctly, f1@ exports nothing, x itself is invisible
to the outside world, but its value is returned from an invocation.

Another comment: if you are going to refer to sections by number, could you
place the section numbers on the pages themselves.