1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 20:30:28 +02:00
Commit graph

4577 commits

Author SHA1 Message Date
Andy Wingo
3098986b1a recursive repl support
* module/system/repl/common.scm (*repl-level*): New public fluid.
  (repl-prompt): If *repl-level* is a positive integer, add it to the
  prompt.

* module/system/repl/repl.scm (start-repl): The `lang' argument is now
  optional, and defaults to (current-language). New kwargs level and
  welcome; level defaults to 0, or 1+ the existing level, and the
  welcome is a boolean, true if level is 0. Parameterize *repl-level*
  during the dynamic extent of this repl. Also, parameterize
  the-last-stack to #f for the duration of this repl.

* module/system/vm/debug.scm (frame->module, debugger-repl): Stubs of a
  recursive repl implementation. The idea is to be a repl in the lexical
  context of the error; but it would be nice to be able to operate in
  the module of the proc too, for example to export bindings. Hmm.
2010-06-02 22:19:40 +02:00
Andy Wingo
4288533bb3 current-language fluid refactoring
* module/system/base/compile.scm:
* module/system/base/language.scm (*current-language*, current-language):
  Move this fluid and thunk down to (system base language).
2010-06-02 22:19:40 +02:00
Andy Wingo
3ece779a67 boot-9 top-repl tweak
* module/ice-9/boot-9.scm (top-repl): More concisely drill down to
  start-repl.
2010-06-02 22:19:40 +02:00
Andy Wingo
c08adae460 add #:version (6) to rnrs bytevectors and ports
* module/rnrs/bytevectors.scm:
* module/rnrs/io/ports.scm: Add #:version (6) to these modules.

* module/6/rnrs.scm: Add versions to the import specs for bytevectors
  and ports.
2010-06-02 22:19:40 +02:00
Andy Wingo
22cf27c815 fix procedure naming
* module/ice-9/psyntax.scm (define-expansion-accessors): New helper, to
  define accesors for a particular expansion data structure. Use it
  later to define lambda?, lambda-meta, and set-lambda-meta!.
  (maybe-name-value): Update to work with the newly defined accessors.
  (build-global-reference, build-let, build-named-let, build-letrec):
  Re-enable naming of procedures.

* module/ice-9/psyntax-pp.scm: Regenerated.
2010-06-02 16:07:11 +02:00
Andy Wingo
4c06cb2c2d (rnrs bytevectors) fallout
* module/Makefile.am (RNRS_SOURCES): Fix for (rnrs bytevectors) rename.
2010-06-01 14:04:01 +02:00
Andy Wingo
07d22c0259 rename (rnrs bytevector) to (rnrs bytevectors)
* module/rnrs/bytevectors.scm: Rename to (rnrs bytevectors), from (rnrs
  bytevector), to match the name from the R6RS.

* benchmark-suite/benchmarks/bytevectors.bm:
* doc/ref/api-data.texi:
* doc/ref/api-foreign.texi:
* libguile/bytevectors.c:
* module/6/rnrs.scm:
* module/language/assembly.scm:
* module/language/assembly/compile-bytecode.scm:
* module/language/assembly/decompile-bytecode.scm:
* module/language/glil/compile-assembly.scm:
* module/language/tree-il/primitives.scm:
* module/srfi/srfi-4.scm:
* module/srfi/srfi-4/gnu.scm:
* module/system/foreign.scm:
* test-suite/standalone/test-ffi:
* test-suite/tests/asm-to-bytecode.test:
* test-suite/tests/bytevectors.test:
* test-suite/tests/foreign.test:
* test-suite/tests/r6rs-ports.test: Update all referrers.
2010-06-01 13:26:11 +02:00
Julian Graham
04186f2006 Ignore explicit phase specification for imports in `library' form.
* module/ice-9/r6rs-libraries.scm (library): Unwrap the `for' sub-form
  during export resolution the same way that `import' does.
* test-suite/tests/rnrs-libraries.test ("implicit phasing"): New test
  prefix and tests.
2010-05-27 21:32:39 -04:00
No Itisnt
3d82d9a62d Add sources to module/Makefile.am
* module/Makefile.am: add srfi/srfi-9/gnu.scm to SRFI_SOURCES
2010-05-27 14:09:56 -05:00
No Itisnt
167510bc10 Record printer fixes
* doc/ref/srfi-modules.texi: Fix style

* module/srfi/srfi-9/gnu.scm (set-record-type-printer!): renamed from set-record-printer!
2010-05-27 14:09:56 -05:00
Ludovic Courtès
01fded8c77 sxml-match: Handle multiple-value returns.
* module/sxml/sxml-match.ss (sxml-match1): Invoke ESCAPE via
  `call-with-values'.

* test-suite/tests/sxml-match-tests.ss ("test multiple value returns"):
  New test.

* module/sxml/match.scm: Mention the modification.
2010-05-26 23:41:23 +02:00
No Itisnt
40b19fda5c Merge branch 'master' of git.sv.gnu.org:/srv/git/guile 2010-05-26 15:28:11 -05:00
Ludovic Courtès
400a5dcb8b Add (sxml match).
* module/Makefile.am (LIB_SOURCES): Add `sxml/match.scm'.
  (NOCOMP_SOURCES): Add `sxml/sxml-match.ss'.

* module/sxml/match.scm, module/sxml/sxml-match.ss: New files.

* test-suite/Makefile.am (SCM_TESTS): Add `tests/sxml.match.test'.
  (EXTRA_DIST): Add `tests/sxml-match-tests.ss'.

* test-suite/tests/sxml-match-tests.ss,
  test-suite/tests/sxml.match.test: New files.

* doc/ref/guile.texi (Guile Modules): Include `sxml-match.texi'.

* doc/ref/sxml-match.texi: New file.

* doc/ref/Makefile.am (guile_TEXINFOS): Add `sxml-match.texi'.
2010-05-25 23:31:36 +02:00
Ludovic Courtès
adb8f30600 Add copyight/license header in `compile-psyntax.scm'. 2010-05-25 23:31:36 +02:00
No Itisnt
6942d86409 * doc/ref/srfi-modules.texi:
* module/srfi/srfi-9/gnu.scm: rename `define-record-printer' to
  `set-record-printer!' to reflect the fact that the printer is set at runtime
2010-05-25 15:54:05 -05:00
No Itisnt
e525e4e499 add custom record printers
* doc/ref/srfi-modules.texi: update documentation
* module/srfi/srfi-9/gnu.scm: add `define-record-printer'
2010-05-25 15:47:35 -05:00
Ludovic Courtès
96640816c8 Fix disassembly of free variable lists.
* module/language/assembly/disassemble.scm (disassemble-free-vars):
  Handle FREE-VARS as a list, not a vector.
2010-05-22 23:54:16 +02:00
Andy Wingo
25f4cd87c2 boot-9 comment cleanup
* module/ice-9/boot-9.scm: Remove needless comment.
2010-05-21 23:44:15 +02:00
Andy Wingo
7df2621d72 lambda* in make-mutable-parameter
* module/ice-9/boot-9.scm (make-mutable-parameter): Use lambda*.
2010-05-21 23:43:58 +02:00
Andy Wingo
17ee350cb2 define* in repl-reader
* module/ice-9/boot-9.scm (repl-reader): Use define*.
2010-05-21 23:43:35 +02:00
Andy Wingo
d9113d47c6 define* in try-module-autoload
* module/ice-9/boot-9.scm (try-module-autoload): Use define*.
2010-05-21 23:43:16 +02:00
Andy Wingo
36d58fc31e define* in resolve-interface
* module/ice-9/boot-9.scm (resolve-interface): Use define* with proper
  keyword arguments, for great justice.
2010-05-21 23:42:54 +02:00
Andy Wingo
6b7d701e73 lambda* in resolve-module
* module/ice-9/boot-9.scm (resolve-module): Use lambda*.
2010-05-21 23:42:17 +02:00
Andy Wingo
5a6621244f define* in load-module
* module/ice-9/boot-9.scm (load-module): Use define*.
2010-05-21 23:41:49 +02:00
Andy Wingo
723ae5b370 define* in module-observe-weak
* module/ice-9/boot-9.scm (module-observe-weak): Use define*.
2010-05-21 23:37:54 +02:00
Andy Wingo
d6e70467ba define* in load
* module/ice-9/boot-9.scm (load): Use define*.
2010-05-21 23:37:35 +02:00
Andy Wingo
02851b26c7 case-lambda in dup->{in,out,}port, dup
* module/ice-9/boot-9.scm (dup->port, dup->inport, dup->outport, dup):
  Use case-lambda. Not particularly elegant.
2010-05-21 23:36:47 +02:00
Andy Wingo
52c9a3381d define* in file-set-position
* module/ice-9/boot-9.scm (file-set-position): Use define*.
2010-05-21 23:36:00 +02:00
Andy Wingo
d44a0d12b4 define* in record-constructor
* module/ice-9/boot-9.scm (record-constructor): Use define*.
2010-05-21 23:35:24 +02:00
Andy Wingo
b2669c41a7 define* in make-record-type
* module/ice-9/boot-9.scm (make-record-type): Use define*.
2010-05-21 23:34:54 +02:00
Andy Wingo
a4c8a02e09 lambda* in string-any, string-every
* module/ice-9/boot-9.scm (string-any, string-every): Use lambda*.
2010-05-21 23:34:06 +02:00
Andy Wingo
f31b7b6a1c lambda* in catch
* module/ice-9/boot-9.scm (catch): Use lambda*.
2010-05-21 23:33:28 +02:00
Andy Wingo
d648f56989 lambda* in make-prompt-tag
* module/ice-9/boot-9.scm (make-prompt-tag): Use lambda*.
2010-05-21 23:32:43 +02:00
Julian Graham
b766109224 Explicitly import `*unspecified*' to support R6RS library purification
enhancements.

* module/rnrs/6/hashtables.scm: Add explicit import for `*unspecified*'.
2010-05-20 21:46:12 -04:00
Julian Graham
2470bda772 Explicitly import `@@' to support R6RS library purification enhancements
on `master'.

* module/rnrs/6/conditions.scm:
* module/rnrs/6/exceptions.scm:
* module/rnrs/6/files.scm:
* module/rnrs/6/hashtables.scm:
* module/rnrs/io/6/simple.scm:
* module/rnrs/records/6/inspection.scm: Add explicit import for `@@'.
2010-05-20 21:18:04 -04:00
Julian Graham
5f29551e4d Fix broken imports in `(rnrs r5rs)'.
* module/rnrs/6/r5rs.scm (imports): Import `null-environment' from
  `(ice-9 safe-r5rs)'; import `scheme-report-environment' from
  `(ice-9 r5rs)'.
2010-05-20 21:18:04 -04:00
Julian Graham
d9c40da983 Fix incorrect export names in `(rnrs io simple)'.
* module/rnrs/io/6/simple.scm: with-input-file => with-input-from-file,
  with-output-file => with-output-to-file.
2010-05-20 21:18:04 -04:00
Julian Graham
2d56d2dfdd Implementation for R6RS (rnrs) composite library. (Can't be loaded yet
because of conflict between `syntax-case' transformer binding and
`(rnrs syntax-case)' hierarchical namespace module binding.)

* module/6/rnrs.scm: New file.
* module/Makefile.am: Add 6/rnrs.scm to RNRS_SOURCES.
2010-05-20 21:18:04 -04:00
Julian Graham
8794d769bd Test suite and fixes for R6RS (rnrs arithmetic fixnums).
* module/rnrs/arithmetic/6/fixnums.scm: Fix missing imports;
  (fixnum-width, greatest-fixnum, least-fixnum): Redefine these as
  zero-argument procedures; Fix argument mismatches in several functions.
* test-suite/Makefile.am: Add tests/r6rs-arithmetic-fixnums.test to
  SCM_TESTS.
* test-suite/tests/r6rs-arithmetic-fixnums.test: New file.
2010-05-20 21:18:04 -04:00
Julian Graham
b01818d752 Implementation and test cases for the R6RS (rnrs arithmetic flonums)
library.

* module/Makefile.am: Add rnrs/arithmetic/6/fixnums.scm and
  rnrs/arithmetic/6/flonums.scm to RNRS_SOURCES.
* module/rnrs/6/base.scm: (div-and-mod, div0, mod0, div0-and-mod0): New
  functions; this `div' implementation is not quite right, but we'll come
  back to it later.
* module/rnrs/arithmetic/6/fixnums.scm: New file.
* module/rnrs/arithmetic/6/flonums.scm: New file.
* test-suite/Makefile.am: Add tests/r6rs-arithmetic-flonums.test to
  SCM_TESTS.
* test-suite/tests/r6rs-arithmetic-flonums.test: New file.
2010-05-20 21:18:03 -04:00
Julian Graham
15ce5cafbc Implementation and test case for R6RS (rnrs eval) library.
* module/Makefile.am: Add rnrs/6/eval.scm to RNRS_SOURCES.
* module/rnrs/6/eval.scm: New file
* test-suite/Makefile.am: Add tests/r6rs-eval.test to SCM_TESTS.
* test-suite/tests/r6rs-eval.test: New file.
2010-05-20 21:18:03 -04:00
Julian Graham
bc4db0905f Fix syntax and consolidate imports for (rnrs lists).
* module/rnrs/6/lists.scm: Import syntax is
  `(only (import-set) id-1 ...)', not `(only (import-set) (id-1 ...))';
  use `rename' form as wrapper instead of creating separate custom
  interface on SRFI-1.
2010-05-20 21:18:03 -04:00
Julian Graham
ace75ab775 Implementation and test cases for the R6RS (rnrs enums) library.
* module/Makefile.am: Add rnrs/6/enums.scm to RNRS_SOURCES.
* module/rnrs/6/conditions.scm: Fix define-condition-type binding for
  syntax-violation? predicate.
* module/rnrs/6/enums.scm: New file.
* test-suite/Makefile.am: Add tests/r6rs-enums.test to SCM_TESTS.
* test-suite/tests/r6rs-enums.test: New file.
2010-05-20 21:18:03 -04:00
Julian Graham
0c7398a7dc Add R6RS `syntax-violation' to (rnrs syntax-case).
* module/rnrs/6/exceptions.scm: Remove dependency on (rnrs syntax-case);
  rewrite guard and guard0 in using syntax-rules in terms of syntax-case.
* module/rnrs/6/syntax-case.scm: Add syntax-violation implementation.
2010-05-20 21:18:03 -04:00
Julian Graham
2359a9a49e Test suite and fixes for R6RS (rnrs conditions) and
(rnrs records procedural).

* module/rnrs/6/conditions.scm: Fix export of
  make-implementation-restriction-violation; remove dependency on
  (rnrs syntax-case); remove redundant function
  compound-condition-components; rewrite define-condition-type using
  syntax-rules instead of syntax-case.
* module/rnrs/records/6/procedural.scm: Remove serious-condition?,
  violation? and assertion-violation? predicates, since they're not true
  condition predicates.
* test-suite/Makefile.am: Add tests/r6rs-conditions.test to SCM_TESTS.
* test-suite/tests/r6rs-conditions.test: New file.
2010-05-20 21:18:03 -04:00
Julian Graham
a725e27bda Implementation for the (rnrs mutable-pairs) and (rnrs mutable-strings)
libraries.

* module/Makefile.am: Add rnrs/6/mutable-pairs.scm and
  rnrs/6/mutable-strings.scm to RNRS_SOURCES.
* module/rnrs/6/mutable-pairs.scm: New file.
* module/rnrs/6/mutable-strings.scm: New file.
2010-05-20 21:18:03 -04:00
Julian Graham
3d5bc1ad6f Implementation for the R6RS (rnrs r5rs) library.
* module/Makefile.am: Add rnrs/6/r5rs.scm to RNRS_SOURCES.
* module/rnrs/6/r5rs.scm: New file.
2010-05-20 21:18:03 -04:00
Julian Graham
d1c83d388a Add `guard' form and test cases to R6RS (rnrs exceptions) library.
* module/rnrs/6/exceptions.scm: (guard0, guard): New syntax.
* module/rnrs/records/6/procedural.scm: (r6rs-raise-continuable): Can't
  use `raise' here because it's exported by (rnrs exceptions); use plain
  old `throw' instead.
* test-suite/Makefile.am: Add tests/r6rs-exceptions.test to SCM_TESTS.
* test-suite/tests/r6rs-exceptions.test: New file.
2010-05-20 21:18:03 -04:00
Julian Graham
0113507eee Implementation and test cases for R6RS (rnrs files) library.
* module/Makefile.am: Add rnrs/6/files.scm to RNRS_SOURCES.
* module/rnrs/6/conditions.scm (define-condition-type): Use specified
  accessor name to create accessor binding.  Add internally-visible
  &i/o-* condition types.
* module/rnrs/6/files.scm: New file.
* module/rnrs/io/6/simple.scm: Export &i/o-* condition types clandestinely
  imported from (rnrs conditions).
* test-suite/Makefile.am: Add tests/r6rs-files.test to SCM_TESTS.
* test-suite/test/r6rs-files.test: New file.
2010-05-20 21:18:03 -04:00
Julian Graham
805b4179bf Implementation for the R6RS (rnrs sorting) library.
* module/Makefile.am: Add rnrs/6/sorting.scm to RNRS_SOURCES.
* module/rnrs/6/sorting.scm: New file.
2010-05-20 21:18:03 -04:00