summaryrefslogtreecommitdiff
path: root/module/rnrs
AgeCommit message (Collapse)AuthorFilesLines
2010-06-18Fix `define-condition-type' to use condition-accessors, not recordJulian Graham1-2/+7
accessors. * module/rnrs/conditions.scm (define-condition-type): The generated accessors should be condition accessors, which know how to unpack a compound condition; these can then delegate to the appropriate record accessors. * test-suite/tests/r6rs-conditions.test: New test case to verify above.
2010-06-16remove encoding of versions into the file system (for now?)Andy Wingo23-0/+0
* module/ice-9/boot-9.scm (find-versioned-module): Remove. Still had some bugs (e.g. for "." in the path and in finding compiled files), did too much computation and statting, and we don't really want to promote versioning. Nor do we want to hard-code a particular encoding of versions in the file-system. Perhaps the real way to do this is to be extensible somehow. (try-module-autoload): Just dispatch to primitive-load-path in all cases. * module/rnrs * module/rnrs.scm: * module/rnrs/arithmetic/bitwise.scm: * module/rnrs/arithmetic/fixnums.scm: * module/rnrs/arithmetic/flonums.scm: * module/rnrs/base.scm: * module/rnrs/conditions.scm: * module/rnrs/control.scm: * module/rnrs/enums.scm: * module/rnrs/eval.scm: * module/rnrs/exceptions.scm: * module/rnrs/files.scm: * module/rnrs/hashtables.scm: * module/rnrs/io/simple.scm: * module/rnrs/lists.scm: * module/rnrs/mutable-pairs.scm: * module/rnrs/mutable-strings.scm: * module/rnrs/programs.scm: * module/rnrs/r5rs.scm: * module/rnrs/records/inspection.scm: * module/rnrs/records/procedural.scm: * module/rnrs/records/syntactic.scm: * module/rnrs/sorting.scm: * module/rnrs/syntax-case.scm: * module/rnrs/unicode.scm: Move these files, eliding the "6/" infix, so that they are in the normal (unversioned) module path.
2010-06-02add #:version (6) to rnrs bytevectors and portsAndy Wingo2-2/+4
* 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-01rename (rnrs bytevector) to (rnrs bytevectors)Andy Wingo1-4/+4
* 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-05-20Explicitly import `*unspecified*' to support R6RS library purificationJulian Graham1-1/+6
enhancements. * module/rnrs/6/hashtables.scm: Add explicit import for `*unspecified*'.
2010-05-20Explicitly import `@@' to support R6RS library purification enhancementsJulian Graham6-6/+7
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-20Fix broken imports in `(rnrs r5rs)'.Julian Graham1-3/+3
* module/rnrs/6/r5rs.scm (imports): Import `null-environment' from `(ice-9 safe-r5rs)'; import `scheme-report-environment' from `(ice-9 r5rs)'.
2010-05-20Fix incorrect export names in `(rnrs io simple)'.Julian Graham1-2/+2
* module/rnrs/io/6/simple.scm: with-input-file => with-input-from-file, with-output-file => with-output-to-file.
2010-05-20Test suite and fixes for R6RS (rnrs arithmetic fixnums).Julian Graham1-44/+57
* 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-20Implementation and test cases for the R6RS (rnrs arithmetic flonums)Julian Graham3-2/+490
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-20Implementation and test case for R6RS (rnrs eval) library.Julian Graham1-0/+39
* 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-20Fix syntax and consolidate imports for (rnrs lists).Julian Graham1-9/+18
* 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-20Implementation and test cases for the R6RS (rnrs enums) library.Julian Graham2-1/+154
* 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-20Add R6RS `syntax-violation' to (rnrs syntax-case).Julian Graham2-19/+26
* 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-20Test suite and fixes for R6RS (rnrs conditions) andJulian Graham2-59/+56
(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-20Implementation for the (rnrs mutable-pairs) and (rnrs mutable-strings)Julian Graham2-0/+44
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-20Implementation for the R6RS (rnrs r5rs) library.Julian Graham1-0/+34
* module/Makefile.am: Add rnrs/6/r5rs.scm to RNRS_SOURCES. * module/rnrs/6/r5rs.scm: New file.
2010-05-20Add `guard' form and test cases to R6RS (rnrs exceptions) library.Julian Graham2-2/+23
* 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-20Implementation and test cases for R6RS (rnrs files) library.Julian Graham3-6/+254
* 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-20Implementation for the R6RS (rnrs sorting) library.Julian Graham1-0/+27
* module/Makefile.am: Add rnrs/6/sorting.scm to RNRS_SOURCES. * module/rnrs/6/sorting.scm: New file.
2010-05-20Implementation for the R6RS (rnrs programs) library.Julian Graham1-0/+22
* module/Makefile.am: Add rnrs/6/programs.scm to RNRS_SOURCES. * module/rnrs/6/programs.scm: New file.
2010-05-20Implementation and test cases for the R6RS (rnrs unicode) library.Julian Graham1-0/+104
* module/Makefile.am: Add rnrs/6/unicode.scm to RNRS_SOURCES. * module/rnrs/6/unicode.scm: New file. * test-suite/Makefile.am: Add tests/r6rs-unicode.test to SCM_TESTS. * test-suite/tests/r6rs-unicode.test
2010-05-20Fixes and test cases for R6RS (rnrs hashtables) library.Julian Graham1-19/+34
* module/rnrs/6/hashtables.scm: Assorted bugfixes, esp. for wrapping single-argument hash functions. * test-suite/Makefile.am: Add tests/r6rs-hashtables.test to SCM_TESTS. * test-suite/tests/r6rs-hashtables.test: New file.
2010-05-20Implementation for the R6RS (rnrs hashtables) library;Julian Graham3-92/+304
Implementation and test cases for the R6RS (rnrs record syntactic) library. * module/Makefile.am: Add rnrs/6/hashtables.scm to RNRS_SOURCES. * module/rnrs/6/hashtables.scm: New file. * module/rnrs/records/6/inspection.scm: (record-type-generative?) Record types are generative iff they have no uid, not vice-versa. * module/rnrs/records/6/syntactic.scm: Finish `define-record-type' implementation; add `record-type-descriptor' and `record-constructor-descriptor' forms. * test-suite/Makefile.am: Add tests/r6rs-records-syntactic.test to SCM_TESTS. * test-suite/tests/r6rs-records-inspection.test: Update tests for `record-type-generative?' to reflect corrected behavior. * test-suite/tests/r6rs-records-syntactic.test: New file.
2010-05-20(rnrs conditions) should not depend on (rnrs records syntactic).Julian Graham1-11/+26
* module/rnrs/6/conditions.scm: (define-condition-type) Re-implement `define-condition-type' in terms of (rnrs records procedural).
2010-05-20Fix missing export of string->symbol in (rnrs base).Julian Graham1-3/+3
* module/rnrs/6/base.scm: Add string->symbol to library exports.
2010-05-20Implementation for the R6RS (rnrs lists) library.Julian Graham1-0/+40
* module/Makefile.am: Add module/rnrs/6/lists.scm to RNRS_SOURCES. * module/rnrs/6/lists.scm: New file.
2010-05-20Implementation and test cases for the R6RS (rnrs records inspection)Julian Graham2-52/+157
library. * module/Makefile.am: Add module/rnrs/records/6/inspection.scm to RNRS_SOURCES. * module/rnrs/records/6/inspection.scm: New file. * module/rnrs/records/6/procedural.scm: Assorted refactoring: Create index constants for record, rtd, and rcd field indexes; record-type-vtable, record-constructor-vtable: More informative display names; (make-record-type-descriptor): fold left, not right when creating vtable; store field names as vector, not list; detect opaque parents * test-suite/Makefile.am: Add test-suite/tests/r6rs-records-inspection.test to SCM_TESTS. * test-suite/tests/r6rs-records-inspection.test: New file.
2010-05-20Remove needless import of (rnrs io simple).Julian Graham1-1/+0
* module/rnrs/6/conditions.scm: Remove (rnrs io simple (6)) from imports.
2010-05-20Implementation and test cases for the R6RS (rnrs records procedural) library,Julian Graham6-0/+840
along with its dependencies. * module/Makefile.am: Add new R6RS libraries below to RNRS_SOURCES. * module/rnrs/6/conditions.scm, exceptions.scm, syntax-case.scm: New files. * module/rnrs/io/6/simple.scm: New file. * module/rnrs/records/6/procedural.scm, syntactic.scm: New files. * test-suite/Makefile.am: Add tests/r6rs-records-procedural.test to SCM_TESTS. * test-suite/tests/r6rs-records-procedural.test: New file.
2010-05-20Fix missing imports for `(rnrs arithmetic bitwise)'.Julian Graham1-1/+3
* module/Makefile.am: Add module/rnrs/arithmetic/6/bitwise.scm to RNRS_SOURCES. * module/rnrs/arithmetic/6/bitwise.scm: Import `(rnrs control)' and `modulo' from `(guile)'. * test-suite/Makefile.am: Add r6rs-arithmetic-bitwise.test to SCM_TESTS.
2010-05-20Implementation and test cases for the R6RS (rnrs control) library.Julian Graham2-0/+110
* module/Makefile.am: Add rnrs/6/base.scm and rnrs/6/control.scm to RNRS_SOURCES. * module/rnrs/6/base.scm, control.scm: New files. * test-suite/Makefile.am: Add tests/r6rs-control.test to SCM_TESTS. * test-suite/tests/r6rs-control.test: New file.
2010-05-20Implementation and test cases for the R6RS (rnrs arithmetic bitwise)Julian Graham1-0/+123
library. * module/rnrs/arithmetic/6/bitwise.scm: New file. * test-suite/tests/r6rs-arithmetic-bitwise.test: New file.
2010-03-16rename libguile to libguile-@EFFECTIVE_VERSION@, currently libguile-2.0Andy Wingo2-2/+4
* libguile/Makefile.am (lib_LTLIBRARIES): Instead of just "libguile.la", make "libguile-@EFFECTIVE_VERSION@.la". This allows multiple versions of Guile to be installed at once. See http://www106.pair.com/rhp/parallel.html for a rationale. (libguile_@GUILE_EFFECTIVE_VERSION@_la_CFLAGS): (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): (libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES): (libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD): (libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS): Fixup automake vars to include the effective version. (guile_LDADD): Fix up the spelling of libguile. * libguile/bytevectors.c (scm_bootstrap_bytevectors): * libguile/foreign.c (scm_register_foreign): * libguile/i18n.c (scm_bootstrap_i18n): * libguile/instructions.c (scm_bootstrap_instructions): * libguile/objcodes.c (scm_bootstrap_objcodes): * libguile/programs.c (scm_bootstrap_programs): * libguile/vm.c (scm_bootstrap_vm): Register extensions using e.g. "libguile-2.0" as the libname -- i.e., including the effective version in the libname. * module/ice-9/i18n.scm: * module/rnrs/bytevector.scm: * module/rnrs/io/ports.scm: * module/system/foreign.scm: * module/system/vm/instruction.scm: * module/system/vm/objcode.scm: * module/system/vm/program.scm: * module/system/vm/vm.scm: When doing a load-extension for something in Guile, use the effective version also. * meta/guile-2.0-uninstalled.pc.in (Libs): * meta/guile-2.0.pc.in (Libs): Use -lguile-@EFFECTIVE_VERSION@. This change should mean that code built against Guile should not be affected by the libguile rename. * guile-readline/Makefile.am (libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LIBADD): * srfi/Makefile.am (libguile_srfi_srfi_1_v_@LIBGUILE_SRFI_SRFI_1_MAJOR@_la_LIBADD): (libguile_srfi_srfi_4_v_@LIBGUILE_SRFI_SRFI_4_MAJOR@_la_LIBADD): (libguile_srfi_srfi_13_14_v_@LIBGUILE_SRFI_SRFI_13_14_MAJOR@_la_LIBADD): (libguile_srfi_srfi_60_v_@LIBGUILE_SRFI_SRFI_60_MAJOR@_la_LIBADD): * test-suite/standalone/Makefile.am (test_num2integral_LDADD): (test_round_LDADD): (libtest_asmobs_la_LIBADD): (libtest_ffi_la_LIBADD): (test_list_LDADD): (test_unwind_LDADD): (test_conversion_LDADD): (test_loose_ends_LDADD): (test_scm_c_read_LDADD): (test_scm_take_locale_symbol_LDADD): (test_scm_take_u8vector_LDADD): (libtest_extensions_la_LIBADD): (test_with_guile_module_LDADD): (test_scm_with_guile_LDADD): Fix up the spelling of libguile.la.
2010-01-11Provide Guile-friendly `coding:' meta-data.Ludovic Courtès2-14/+6
* module/ice-9/i18n.scm, module/rnrs/bytevector.scm, module/rnrs/io/ports.scm, module/scripts/compile.scm, module/srfi/srfi-35.scm, module/srfi/srfi-88.scm: Write `coding:' comment at the top.
2009-06-17Complete changing license to LGPLv3+Neil Jerram2-2/+2
(Still guile-readline to do, but that will all be GPLv3+.)
2009-06-05add ability to compile uniform arraysAndy Wingo1-2/+3
* module/rnrs/bytevector.scm (rnrs): * libguile/bytevectors.h: * libguile/bytevectors.c (scm_uniform_array_to_bytevector): New function. * libguile/unif.h: * libguile/unif.c (scm_from_contiguous_typed_array): New function. * libguile/vm-i-loader.c (load-array): New instruction, for loading byte data into uniform vectors. Currently it copies out the data, though in the future we could avoid that. * module/language/assembly.scm (align-code): New exported function, aligns code on some boundary. (align-program): Use align-code. * module/language/assembly/compile-bytecode.scm (write-bytecode): Support the load-array instruction. * module/language/glil/compile-assembly.scm (dump-object): Dump uniform arrays. Neat :)
2009-05-28Import R6RS bytevectors and I/O ports from Guile-R6RS-Libs 0.2.Ludovic Courtès2-0/+195
* README: Document dependency on GNU libunistring. * benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add `benchmark/bytevectors.bm'. * configure.in: Make sure we have libunistring; update $LIBS. * libguile.h: Include "bytevectors.h" and "r6rs-ports.h". * libguile/Makefile.am (libguile_la_SOURCES): Add `bytevectors.c' and `r6rs-ports.c' (DOT_X_FILES): Add `bytevectors.x' and `r6rs-ports.x'. (DOT_DOC_FILES): Add `bytevectors.doc' and `r6rs-ports.doc'. (noinst_HEADERS): Add `ieee-754.h'. (modinclude_HEADERS): Add `bytevectors.h' and `r6rs-ports.h' * libguile/validate.h (SCM_VALIDATE_BYTEVECTOR): New macro. * module/Makefile.am (SOURCES): Add $(RNRS_SOURCES). (RNRS_SOURCES): New variable. * test-suite/Makefile.am (SCM_TESTS): Add `bytevectors.test' and `r6rs-ports.test'.