It returns syntax-object wrapped with the marks and substitutions
that have been added to new-id since its introduction as base-id.
The new-id and base-id should be free-identifier=? and new-id
should have the same (or more) marks as base-id.
changed in order to allow large structures (e.g., libraries,
syntax objects, etc.) to print efficiently. This is done by only
traversing the parts of the structure that will actually be
printed, rather than traversing the whole data structure (which is
what write/display used to do). Pretty-print should be fixed in a
similar manner (TODO).
exported by the environment. Try
> (environment-symbols (environment '(rnrs)))
- Added an internal export mechanism so that identifiers can be
exported from within a library. The syntax is the same:
(export export-spec* ...)
when appears in a library's top level, adds the export specs to
the set of exported identifiers. So, one can do:
(library (A)
(export)
(import (ikarus))
(export a)
(define a 17))
When appearing in non-library definition context, the export form
is ignored.
indices (r6rs requirement).
- file-options are now represented as enum-sets (r6rs requirement)
- odd?, even?, lcm, remainder, etc., now accept inexact integers.
- (optimize-level [0,1,2]) and ikarus -O[0,1,2]
where -O0 = no optimizations
-O1 = using old optimizer
-O2 = using the new cp0 optimizer
defaults to -O1 for now.
- (cp0-size-limit n) which is the limit of the residual size for
each inlining attempt
- (cp0-effort-limit n) which is the limit on the effort expended
for each inlining attempt
- Rewrote the syntax-match macro to make use of the same technology
used in syntax-case itself resulting in reduced code size.
- Added (system-value <symbol>) which returns the system value.
E.g., (system-value 'car) => #<procedure car>
This is pretty much the same as
(eval <symbol> (environment '(ikarus)))
except that it does not involve compiling the expression or
consulting the library/expander systems.
- Fixed the fasl loader to make it understand complex numbers.
top-marked wrapped syntax objects were incorrectly combined.
E.g., it used to be that:
(syntax-case (datum->syntax #'foo #'(x y)) ()
[(x y) 'shouldntmatch] [_ 'ok])
yields shouldntmatch; it's now ok.
- We can now redefine imported identifiers.
- We can now use let-syntax, letrec-syntax, and modules at
top-level.
Hand-wavey Repl Semantics:
- Imported identifiers mean what they meant previously. In
particular, you cannot set! imported identifiers.
- An imported identifier may be redefined using define. Once
something is defined at the top-level, a specific location for it
is created, and all definitions, references, and set!s to that
variable go through the top-level location.
- Re-importing an identifier shadows the top-level location.
- Redefining re-exposes the top-level location.
- and do on.
- A reference to an unbound variable also fabricates a top-level
location for that variable.
Let's see how this goes.
(Note from Kent, extracted from chez scheme release notes, follows)
This always worked:
(let ()
(define-syntax from
(syntax-rules ()
[(_ m v) (let () (import m) v)]))
(module a (x) (define x 'x-of-a))
(from a x))
Didn't work before this change:
(let ()
(define-syntax x-from-a
(syntax-rules ()
[(_) (let () (import a) x)]))
(module a (x) (define x 'x-of-a))
(x-from-a))