Abdulaziz Ghuloum
d49aed209a
Added (interaction-environment).
2008-05-01 06:02:36 -04:00
Abdulaziz Ghuloum
e7386cd7d7
Major changes to the interactive repl:
...
- 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.
2008-05-01 04:21:07 -04:00
Abdulaziz Ghuloum
89def78c3c
Fixed the definition of identifier? and id? in expander so that only
...
top-make-wrapped (possibly annotated) symbols are identifiers. It
used to be that symbols were considered identifiers by the previous
definition.
2008-04-28 14:01:49 -04:00
Abdulaziz Ghuloum
3ce6d037e4
Fixed a bug in module imports where some marks were missing in action.
...
(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))
2008-04-19 17:55:30 -04:00
Abdulaziz Ghuloum
c01f3049e4
Fixes bug 206842: syntax tracing not working by default when
...
syntax-case fenders fail
2008-03-25 21:23:23 -04:00
Abdulaziz Ghuloum
48f7c88e2d
made time macro not depend on format.
2008-03-24 21:50:37 -04:00
Abdulaziz Ghuloum
81c17da20b
Fixes bug 190373: `time' macro's "running stats for" can be misleading
2008-03-24 21:45:36 -04:00
Abdulaziz Ghuloum
d35566081b
import now recognizes and ignore ``for'' spec.
2008-03-15 21:00:16 -04:00
Abdulaziz Ghuloum
a3f6e3e039
Cut down bootstrap time by 10% by caching the values of scheme-stx.
...
Macroexpansion time is reduced by 25%.
2008-03-12 18:12:57 -04:00
Abdulaziz Ghuloum
c8f9b1dc3d
Added fluid-let-syntax.
...
See http://www.scheme.com/csug7/syntax.html#./syntax:s15
for details.
2008-02-25 02:15:51 -05:00
Abdulaziz Ghuloum
e751c15bc4
library record now contains original file name for libraries loaded
...
from files.
2008-02-18 20:39:42 -05:00
Abdulaziz Ghuloum
c430a91bb8
more preparations for separate compilation
2008-02-18 20:28:54 -05:00
Abdulaziz Ghuloum
fa08c543bb
library records now cache expanded code.
2008-02-18 19:15:47 -05:00
Abdulaziz Ghuloum
314f80eee9
include now attached annotations to read files (using read-annotated
...
instead of read).
2008-02-17 02:29:36 -05:00
Abdulaziz Ghuloum
19e5d2bacd
Fixes bug 192222: Quasiquote broken
2008-02-15 15:25:20 -05:00
Abdulaziz Ghuloum
f4fb08adba
Added an experimental macro expansion stack trace that looks like:
...
Unhandled exception:
Condition components:
1. &who: let
2. &message: "not an identifier"
3. &syntax:
form: (let ((12 a)) (printf "a=~s\n" a))
subform: 12
4. &trace: #<syntax (let ((12 a)) (printf "a=~s\n" a))>
5. &trace: #<syntax (right 12 a (printf "a=~s\n" a))>
6. &trace: #<syntax (wrong a 12 (printf "a=~s\n" a)) [byte 216 of test.ss]>
For a file containing:
(define-syntax right
(syntax-rules ()
[(_ a b c) (let ([a b]) c)]))
(define-syntax wrong
(syntax-rules ()
[(_ a b c) (right b a c)]))
(right x 17 (wrong a 12 (printf "a=~s\n" a)))
2008-02-14 04:01:09 -05:00
Abdulaziz Ghuloum
a43177d399
Fixed some of bug 186155: Incorrect syntax errors for define
2008-01-27 19:12:20 -05:00
Abdulaziz Ghuloum
6018e2200d
Made (define foo) expand to (define foo (void)).
2008-01-18 22:18:26 -05:00
Abdulaziz Ghuloum
4444496609
Fixes bug 181105: syntax pattern variable list length mismatch error
...
is obscure
2008-01-09 08:47:48 -05:00
Abdulaziz Ghuloum
62765c2885
Fixes bug 180895: letrec error message not as helpful as let
2008-01-09 08:37:46 -05:00
Abdulaziz Ghuloum
797897cc01
Fixes bug 180455: raw symbols in output of macro are not detected
2008-01-04 20:53:59 -05:00
Abdulaziz Ghuloum
1786677c73
* made unbound variable violations have &undefined condition type.
2007-12-23 19:52:18 -05:00
Abdulaziz Ghuloum
2e7faf85c7
Fixes bug 178334: annotation structs being revealed
2007-12-23 16:23:20 -05:00
Abdulaziz Ghuloum
097ca03e47
Fixes bug 177638: keyword argument in syntax-rules should not be
...
used in substitutions
2007-12-20 06:36:00 -05:00
Abdulaziz Ghuloum
b915854677
enhanced printing of annotated syntax objects.
2007-12-20 00:31:49 -05:00
Abdulaziz Ghuloum
2c31b5bf51
replaced some calls to assertion-violation with calls to
...
syntax-violation for better syntactic error reporting.
2007-12-19 23:42:27 -05:00
Abdulaziz Ghuloum
917754e28e
syntax-errors now give source information in their error message.
2007-12-19 19:05:23 -05:00
Abdulaziz Ghuloum
bbe388656c
fixes bug 176756: define-condition-type does not work in repl
2007-12-17 11:37:10 -05:00
Abdulaziz Ghuloum
8c0563b2d3
fixes bug 173369: errors are supposed to be &assertion
2007-12-15 08:22:49 -05:00
Abdulaziz Ghuloum
4e66fe76e8
Fixes bug 176207: macros cannot be redefined.
2007-12-14 03:23:47 -05:00
Abdulaziz Ghuloum
fa27b7e9cd
Fixes 1/2 of bug 176207: identifier-syntax second case broken
2007-12-14 01:58:55 -05:00
Abdulaziz Ghuloum
75f2d78678
more cleanup in expander.
2007-12-13 06:41:44 -05:00
Abdulaziz Ghuloum
112e00a6e6
get-import-spec* now uses an eq-hash-table to detect most dups.
2007-12-13 06:15:21 -05:00
Abdulaziz Ghuloum
c181838f48
changed "parse-import-spec*" in psyntax.expander to return two
...
vectors (names and labels) instead of an a-list subst.
2007-12-13 05:57:15 -05:00
Abdulaziz Ghuloum
54f683f0e0
Ported match.ss to ikarus.
2007-12-11 17:41:48 -05:00
Abdulaziz Ghuloum
3562a736c5
Fixes bug 175117: Named let violates scoping rules
2007-12-09 12:20:13 -05:00
Abdulaziz Ghuloum
1d5c069273
Fixes bug 175057: Added time-gmt-offset procedure that takes a time
...
object and returns the offset from gmt in seconds.
2007-12-09 07:20:49 -05:00
Abdulaziz Ghuloum
efd233ad0e
Fixes bugs 175025 and 175026: let-values and let*-values are fixed/added
2007-12-09 02:53:12 -05:00
Abdulaziz Ghuloum
cf82981383
Fixes bug 174497: syntax-error should not be in (rnrs) and
...
syntax-violation not completed
2007-12-07 03:00:25 -05:00
Abdulaziz Ghuloum
e874d2d0a0
Added "include-into" macro.
...
(include-into ctxt "filename") included the contents of the file
as if they were present in the context ctxt (which must be an
identifier).
(include-into here "filename") would do the same thing as
(include "filename")
2007-12-05 03:26:56 -05:00
Abdulaziz Ghuloum
bd06d39220
Fixes bug 173165 and bug 173162: opaque and sealed for record types
...
are not being enforced.
2007-12-01 01:52:34 -05:00
Abdulaziz Ghuloum
9d6f8511c8
Fixes bug 173169: Mutator names on define-record-type are wrong
2007-12-01 01:46:58 -05:00
Abdulaziz Ghuloum
2d55282789
Fixes bug 165133: Bodies of internal definitions should be expanded
...
before right-hand-side expressions
2007-11-30 06:31:07 -05:00
Abdulaziz Ghuloum
28fcdd3df6
Fixed bug 172986: define-record-type allowing invalid syntax
2007-11-30 05:36:25 -05:00
Abdulaziz Ghuloum
6b74c8fb7d
Fixed bug 172279: Incorrect syntax use causing an internal bug
2007-11-27 06:11:30 -05:00
Abdulaziz Ghuloum
358ba407aa
Fixes bug 164730: mutation of export
2007-11-23 16:07:38 -05:00
Abdulaziz Ghuloum
8640cb785d
Fixes half of bug 164725: missing scheme-report-environment.
2007-11-23 14:38:25 -05:00
Abdulaziz Ghuloum
d6a1a177a9
Fixes bug 163982: Extra "" irritant in expander error
2007-11-21 02:23:29 -05:00
Abdulaziz Ghuloum
b71de5dab4
* Fixes bug 163980: Error message contains "fmls"
...
Slightly better error message for malformed formal parameters
(duplicate and non-identifiers are signaled properly).
2007-11-21 02:10:42 -05:00
Abdulaziz Ghuloum
f417c7505b
* Unfixes bug 161749: (define-syntax (foo x) 12) does not work
2007-11-19 04:18:35 -05:00
Abdulaziz Ghuloum
a7680d723d
Extra libraries found in $pkglibdir can now be imported directly.
...
For example, (import (streams)) just works!
2007-11-18 22:46:00 -05:00
Abdulaziz Ghuloum
442eb1ca00
* Kind of fixes bug 163219: Better error message for expand.
2007-11-18 19:10:03 -05:00
Abdulaziz Ghuloum
759474fd85
* libraries are now expanded to a special library-letrec* form.
2007-11-17 09:53:22 -05:00
Abdulaziz Ghuloum
7e1c6001eb
Fixes a bug in top-level set! that caused the following to signal an
...
error:
> (define foo 12)
> (begin ((lambda (x) (set! foo x)) 13) 14)
2007-11-17 01:16:24 -05:00
Abdulaziz Ghuloum
25aa8d7072
Fixes bug 162741: hygiene breaks exported macros that introduce define-record-type
2007-11-14 17:24:29 -05:00
Abdulaziz Ghuloum
6c1dbba3de
* Fixed a problem in the expander that caused libraries that are
...
expanded from the repl to dump all their bindings into the top
level as well.
2007-11-14 13:54:54 -05:00
Abdulaziz Ghuloum
93868c0731
* Fixed spelling of "auxiliary" in an error message.
2007-11-12 11:37:11 -05:00
Abdulaziz Ghuloum
c26ef04965
* multiple imports of the same binding into the same context now work.
2007-11-12 05:01:25 -05:00
Abdulaziz Ghuloum
880a6f8efd
(ikarus)'s "import" keyword now handles libraries, allowing
...
libraries to be imported into any definition context including
the top-level, body of a script, body of a library, or body of a
function.
2007-11-12 04:40:48 -05:00
Abdulaziz Ghuloum
eaeb6a4876
Fixed bug 162153: Bytevectors should be self evaluating.
2007-11-12 03:34:48 -05:00
Abdulaziz Ghuloum
6e7e0410fb
* (ikarus) now exports the "library" keyword, allowing (library ---)
...
forms to appear anywhere definitions can appear including the
top-level, body of a script, body of a library, or body of a
function.
2007-11-12 01:27:47 -05:00
Abdulaziz Ghuloum
5a6e106a44
* upgrades to new(er) versions of automake and autoconf.
...
* updated configure.ac and makefile.ac files for the new version
(applying some of the patch in bug 160100).
2007-11-10 23:50:54 -05:00
Abdulaziz Ghuloum
6938657fad
* Fixed bug 161749: (define-syntax (foo x) 12) does not work
2007-11-10 06:28:29 -05:00
Abdulaziz Ghuloum
9632e19032
Fixes bug 160395: missing import from r6r script reports bogus error.
2007-11-06 01:14:27 -05:00
Abdulaziz Ghuloum
b3143eec0d
* Fixed a bug in expander causing #(x* ...) patterns inside syntax
...
to not expand properly.
2007-11-04 14:01:44 -05:00
Abdulaziz Ghuloum
37da0d75d4
* Fixes bug 159403: scripts choke when a definition follows an expression
2007-11-01 20:00:02 -04:00
Abdulaziz Ghuloum
b8434045f7
* pretty-width is now exported.
...
* generate-temporaries uses the names of identifiers to construct
new names.
2007-10-31 04:34:14 -04:00
Abdulaziz Ghuloum
988c13e123
* Added define-enumeration, which completes the (rnrs enums) library.
2007-10-27 11:40:40 -04:00
Abdulaziz Ghuloum
79a38bc54b
* fixed implementation of guard-macro in psyntax.expander.
2007-10-27 11:15:10 -04:00
Abdulaziz Ghuloum
4522d66cfc
* Version and sub-version specs are now honored in library import forms.
2007-10-26 12:41:55 -04:00
Abdulaziz Ghuloum
75a95bc189
* standard libraries now have version (6).
...
* #<library> now prints versions in proper form.
2007-10-26 01:22:11 -04:00
Abdulaziz Ghuloum
959b682588
* libraries now can have a version as part of their names
...
* import forms still don't understand version names.
2007-10-26 00:55:00 -04:00
Abdulaziz Ghuloum
b640d98cbc
* removed formatted errors from all source codes.
2007-10-25 14:32:26 -04:00
Abdulaziz Ghuloum
239141717f
* Added define-condition-type macro.
2007-10-23 17:53:43 -04:00
Abdulaziz Ghuloum
da29123fc0
* standard condition types are not exported.
2007-10-23 17:24:55 -04:00
Abdulaziz Ghuloum
56d279297b
* fixed bugs in define-record-type (constructor name was ignored)
...
* fixed bugs in record-constructor (incorrect constructor was
returned when when no protocol is supplied)
* added r6rs condition types (constructors and standard conditions).
2007-10-23 16:38:34 -04:00
Abdulaziz Ghuloum
fdb664b61c
renamed:
...
src/scheme => scheme
2007-10-17 20:07:10 -04:00