guile-devel
[Top][All Lists]
Advanced

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

New syntax (@ MODULE-NAME VARIABLE-NAME) committed


From: Marius Vollmer
Subject: New syntax (@ MODULE-NAME VARIABLE-NAME) committed
Date: Mon, 17 Nov 2003 15:44:06 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

I have committed the following changes.  (The unclean bit about
changing the interpretation of ':' is gone.)

    ** The '-e' option now 'read's its argument.

    This is to allow the new '(@ MODULE-NAME VARIABLE-NAME)' construct to
    be used with '-e'.  For example, you can now write a script like

      #! /bin/sh
      exec guile -e '(@ (demo) main)' -s "$0" "$@"
      !#

      (define-module (demo)
        :export (main))

      (define (main args)
        (format #t "Demo: ~a~%" args))


    * Changes to Scheme functions and syntax

    ** New syntax '@' and '@@':

    You can now directly refer to variables exported from a module by
    writing

        (@ MODULE-NAME VARIABLE-NAME)

    For example (@ (ice-9 pretty-print) pretty-print) will directly access
    the pretty-print variable exported from the (ice-9 pretty-print)
    module.  You don't need to 'use' that module first.  You can also use
    '@' with 'set!'.

    The related syntax (@@ MODULE-NAME VARIABLE-NAME) works just like '@',
    but it can also access variables that have not been exported.  It is
    intended only for kluges and temporary fixes and for debugging, not
    for ordinary code.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

[Prev in Thread] Current Thread [Next in Thread]