* Changes to Scheme functions and syntax
+** 'call-with-current-continuation' is now also available under the name
+ 'call/cc'.
+
** Checking for duplicate bindings in module system
-The module system now checks for duplicate imported bindings.
+The module system now can check for name conflicts among imported
+bindings.
The behavior can be controlled by specifying one or more duplicates
-handlers. For example, to get back the old behavior (which was to use
-the last imported binding of a certain name), write:
+handlers. For example, to make Guile return an error for every name
+collision, write:
(define-module (foo)
:use-module (bar)
:use-module (baz)
- :duplicates last)
+ :duplicates check)
+
+The new default behavior of the module system when a name collision
+has been detected is to
+
+ 1. Give priority to bindings marked as a replacement.
+ 2. Issue a warning (different warning if overriding core binding).
+ 3. Give priority to the last encountered binding (this corresponds to
+ the old behavior).
-If you want the old behavior without changing your module headers, put
-the line:
+If you want the old behavior back without replacements or warnings you
+can add the line:
- (default-module-duplicates-handler 'last)
+ (default-duplicate-binding-handler 'last)
-in your .guile init file.
+to your .guile init file.
The syntax for the :duplicates option is:
warn issue a warning for bindings with a common name
replace replace bindings which have an imported replacement
warn-override-core issue a warning for imports which override core bindings
+ and accept the override
first select the first encountered binding (override)
last select the last encountered binding (override)
+
+These two are provided by the (oop goops) module:
+
merge-generics merge generic functions with a common name
into an <extended-generic>
merge-accessors merge accessors with a common name
The default duplicates handler is:
- (replace warn-override-core check)
+ (replace warn-override-core warn last)
+
+A recommended handler (which is likely to correspond to future Guile
+behavior) can be installed with:
+
+ (default-duplicate-binding-handler '(replace warn-override-core check))
** New define-module option: :replace