summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-11-30NEWS: Add "R6RS SRFI support" text.v2.0.7Ludovic Courtès1-3/+5
* NEWS: Add proper text for "R6RS SRFI support", by Ian Price and Mark Weaver.
2012-11-30Bump version number for 2.0.7.Ludovic Courtès1-3/+3
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment. (LIBGUILE_INTERFACE_CURRENT): Increment, to account for new C function `scm_make_vtable_vtable'. (LIBGUILE_INTERFACE_AGE): Increment.
2012-11-29NEWS: Add entry for new GUILE_LOAD_PATH (et al) ellipsis handling.Mark H Weaver1-0/+9
* NEWS: Add entry for new GUILE_LOAD_PATH (et al) ellipsis handling.
2012-11-29NEWS: Mention par-for-each, alongside par-map, being fixed to use all coresMark H Weaver1-1/+2
* NEWS: Mention par-for-each, alongside par-map, being fixed to use all cores.
2012-11-29Minor fixes in NEWSMark H Weaver1-7/+7
* NEWS: Minor fixes to the descriptions.
2012-11-29Update `NEWS'.Ludovic Courtès1-0/+176
* NEWS: Add news for 2.0.7.
2012-11-29futures: Remove circular dependency with (ice-9 threads).Ludovic Courtès1-1/+0
* module/ice-9/futures.scm: Remove now-useless import of (ice-9 threads) introduced in commit be05b336.
2012-11-29doc: Document nested futures.Ludovic Courtès1-1/+29
* doc/ref/api-scheduling.texi (Futures): Mention nested futures. Explain what happens upon `touch'.
2012-11-29doc: Remove example use of vectors as hash tables.Ludovic Courtès1-18/+0
Fixes <http://bugs.gnu.org/13022>. Reported by Daniel Hartwig <mandyke@gmail.com>. * doc/ref/api-compound.texi (Hash Table Examples): Remove example use of vectors as hash tables.
2012-11-28Add parse-path-with-ellipsis, and use it for GUILE_LOAD_PATH et al.Mark H Weaver4-18/+70
* libguile/load.c (scm_ellipsis): New Variable. (scm_parse_path_with_ellipsis): New procedure. (scm_init_load): Initialize 'scm_ellipsis'. (scm_init_load_path): Use 'scm_parse_path_with_ellipsis' to handle GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH. * libguile/load.h (scm_parse_path_with_ellipsis): Add prototype. * doc/ref/guile-invoke.texi (Environment Variables): doc/ref/api-evaluation.texi (Load Paths): Add documentation. Correct description of default load path to reflect reality. Remove 'GUILE_LOAD_PATH' from the concept index; it is already in the variable index. Add cross references between these two sections of the manual.
2012-11-28Remove definition of the `SHARED_LIBRARY_PATH_VARIABLE' C macro.Ludovic Courtès1-4/+0
This is a follow-up to fc32c44. * configure.ac: Remove definition of `SHARED_LIBRARY_PATH_VARIABLE', which was added in e66ff09a.
2012-11-28web: Add `http-get*'.Ludovic Courtès2-1/+31
* module/web/client.scm (http-get*): New procedure. * doc/ref/web.texi (Web Client): Document it.
2012-11-28web: Add `response-body-port'.Ludovic Courtès3-13/+85
* module/web/response.scm (make-delimited-input-port, response-body-port): New procedures. (read-response-body): Use `response-body-port'. * test-suite/tests/web-response.test ("example-1")["response-body-port"]: New test. ("example-2")["response-body-port"]: New test.
2012-11-28web: Export `text-content-type?'.Ludovic Courtès3-7/+16
* module/web/client.scm (text-type?): Remove. (decode-response-body): Use `text-content-type?'. * module/web/response.scm (text-content-type?): New procedure. * doc/ref/web.texi (Responses): Document it.
2012-11-28tests: Use `pass-if-equal' in `web-response.test'.Ludovic Courtès1-39/+37
* test-suite/tests/web-response.test: Cleanup whitespace. Use `pass-if-equal' when appropriate.
2012-11-28eval: Store docstrings for lambdas.Ludovic Courtès6-68/+130
Fixes <http://bugs.gnu.org/12173>. Reported by Ian Price <ianprice90@googlemail.com>. * libguile/memoize.c (MAKMEMO_LAMBDA): New `docstring' parameter. Add it as the second argument of `SCM_M_LAMBDA'. Update caller. (memoize)[SCM_M_LAMBDA]: Extract docstring from EXP; when `memoize' returns, add the docstring to the lambda's arguments. (unmemoize)[SCM_M_LAMBDA]: Adjust to new argument layout of `SCM_M_LAMBDA'. * libguile/eval.c (BOOT_CLOSURE_NUM_REQUIRED_ARGS, BOOT_CLOSURE_HAS_REST_ARGS, BOOT_CLOSURE_IS_REST, BOOT_CLOSURE_PARSE_FULL): Adjust to new argument layout of `SCM_M_LAMBDA'. * module/ice-9/eval.scm (primitive-eval)[make-general-closure]: Likewise. [eval]: When EXP is a lambda, match its docstring; when the docstring is not #f, add it to the closures procedure properties. * test-suite/tests/eval.test ("docstrings"): New test prefix. * libguile/procs.c (sym_documentation): Rename to... (scm_sym_documentation): ... this. Make it global. * libguile/procs.h (scm_sym_documentation): New declaration.
2012-11-27Fix library search order and don't change LD_LIBRARY_PATHMark H Weaver1-45/+89
* libguile/dynl.c (system_extensions_path): New static variable. (sysdep_dynl_link): If 'lt_dlopenext' fails, manually search in 'system_extensions_path'. (augment_env): Remove. (sysdep_dynl_init): Don't change LD_LIBRARY_PATH, and don't use lt_dladdsearchdir if GUILE_SYSTEM_EXTENSIONS_PATH is set. Instead, initialize 'system_extensions_path' from GUILE_SYSTEM_EXTENSIONS_PATH (or if it's unset: <SCM_LIB_DIR>:<SCM_EXTENSIONS_DIR>), and rely on sysdep_dynl_link to search those directories manually.
2012-11-27vlist: Remove Texinfo markup from docstrings.Ludovic Courtès1-47/+47
* module/ice-9/vlist.scm: Remove Texinfo markup from docstrings with sed -e"s/@var{\([a-z0-9?!-]\+\)}/\U\1/g ; s/@code{\([^}]\+\)}/‘\1’/g".
2012-11-27web client: correctly handle uri-query, etc. in relative URI headersDaniel Hartwig2-19/+23
* module/web/uri.scm (uri-pat): Make scheme part optional. (string->uri*): New private procedure to also parse relative URIs. * module/web/http.scm (declare-relative-uri-header!): Use that.
2012-11-27web client: Support relative URIs in some headers.Ludovic Courtès1-2/+17
Fixes <http://bugs.gnu.org/12827>. * module/web/http.scm (declare-relative-uri-header!): New procedure. ("Content-Location", "Referer"): Use it. Based on discussions with Daniel Hartwig <mandyke@gmail.com>.
2012-11-27Have `load-in-vicinity' look for `.go' files in %LOAD-COMPILED-PATH.Ludovic Courtès1-13/+39
Fixes <http://bugs.gnu.org/12519>. * module/ice-9/boot-9.scm (load-in-vicinity)[fresh-compiled-file-name]: New `scmstat' parameter; use it. [sans-extension]: New procedure. [load-absolute]: Call (stat ABS-PATH) from here. Search a `.go' file from %LOAD-COMPILED-PATH before searching %COMPILE-FALLBACK-PATH.
2012-11-27Split `load-in-vicinity' into small procedures.Ludovic Courtès1-35/+54
* module/ice-9/boot-9.scm (load-in-vicinity)[compiled-extension]: New variable. [compiled-file-name]: Rename to... [fallback-file-name]: ... this; update caller. Use COMPILED-EXTENSION. [more-recent?, compile, warn-about-exception]: New procedures. [fresh-compiled-file-name]: Use them.
2012-11-26Update thanksIan Price1-0/+1
* THANKS: Add Sjoerd Van Leent
2012-11-26Fix docs for `hashtable-copy'Ian Price1-2/+2
* doc/ref/r6rs.texi (rnrs hashtables): a true mutable argument means a mutable copy.
2012-11-25R6RS srfi library names should ignore first identifier after the :nIan Price2-2/+10
* module/ice-9/r6rs-libraries.scm (resolve-r6rs-interface): (srfi :n name ids ...) -> (srfi srfi-n ids ...) * test-suite/tests/rnrs-libraries.test ("srfi"): Add test.
2012-11-24(web uri): document that uri-port is an integerDaniel Hartwig2-10/+12
* doc/ref/web.texi (URIs): * module/web/uri.scm (build-uri): Document that uri-port is an integer.
2012-11-24syncronize web module docstrings with manualDaniel Hartwig7-145/+171
* doc/ref/web.texi: Fix spacing. Update with a few missing function descriptions. * module/web/client.scm: * module/web/http.scm: * module/web/request.scm: * module/web/server.scm: * module/web/uri.scm: Update docstrings from manual (reworked by Ludovic Courtès).
2012-11-24Augment `.dir-locals.el'.Ludovic Courtès1-1/+4
* .dir-locals.el: Add more `scheme-indent-function' rules.
2012-11-24Turn on the `case' warnings in auto-compilation.Ludovic Courtès1-1/+2
* module/ice-9/boot-9.scm (%auto-compilation-options): Add `duplicate-case-datum' and `bad-case-datum'.
2012-11-23Add tests for `-Wduplicate-case-datum' and `-Wbad-case-datum'.Ludovic Courtès1-1/+71
* test-suite/tests/tree-il.test (%opts-w-duplicate-case-datum, %opts-w-bad-case-datum): New variables. ("warnings")["duplicate-case-datum", "bad-case-datum"]: New tests.
2012-11-23doc: Mention the `duplicate-case-datum' and `bad-case-datum' warnings.Ludovic Courtès1-1/+2
* doc/ref/api-evaluation.texi (Compilation): List the `duplicate-case-datum' and `bad-case-datum' warnings.
2012-11-23Remove reference to `scm_init_popen' when `fork' is unavailable.Ludovic Courtès3-3/+15
Fixes <http://bugs.gnu.org/12477>. Reported by lin ray <lin.wei.ray@gmail.com>. * configure.ac: Define the `HAVE_FORK' Automake conditional. * module/Makefile.am (ICE_9_SOURCES): Add `ice-9/popen.scm' only when HAVE_FORK. * libguile/posix.c (scm_init_posix): Register `scm_init_popen' only when HAVE_FORK.
2012-11-22R6RS `string-for-each' should accept multiple string argumentsIan Price2-1/+78
* module/rnrs/base.scm (string-for-each): Rewrite. * test-suite/tests/r6rs-base.test ("string-for-each"): Add tests.
2012-11-21cse: Fix out-of-bounds access to the database.Ludovic Courtès2-5/+23
Fixes <http://bugs.gnu.org/12883>. * module/language/tree-il/cse.scm (cse)[find-dominating-lexical]: Fix computation of the last argument passed to `unroll'. Patch by Stefan Israelsson Tampe <stefan.itampe@gmail.com>. * test-suite/tests/cse.test ("cse")["http://bugs.gnu.org/12883"]: New test.
2012-11-21Update `par-map' to use nested futures.Ludovic Courtès1-11/+16
This allows it to actually use all CPU cores, instead of having the main thread stuck on a `wait-condition-variable'. * module/ice-9/threads.scm (par-mapper): Add a `cons' argument; update callers accordingly. Rewrite using nested futures.
2012-11-21futures: Allow nested futures; put the main thread to work.Ludovic Courtès2-80/+177
* module/ice-9/futures.scm (%futures-waiting, %within-future?, %future-prompt): New variables. (let/ec): New macro. (process-future!): Run FUTURE's thunk in a prompt; capture FUTURE's continuation when it aborts, and add it to %FUTURES-WAITING. Set %WITHIN-FUTURE? in the dynamic extent of the call FUTURE's thunk. (process-futures): Move loop body to... (process-one-future): ... here. New procedure. (notify-completion): New procedure. (touch)[work, loop]: New procedures. When %WITHIN-FUTURE? and FUTURE is started, abort; if not %WITHIN-FUTURE, call `work' while waiting. When FUTURE is queued, call `work' too. * test-suite/tests/future.test ("nested futures"): New tests.
2012-11-21futures: Add a record printer.Ludovic Courtès1-0/+9
* module/ice-9/futures.scm: Add a record printer for <future>.
2012-11-21futures: Keep futures unlocked while they are processing.Ludovic Courtès1-40/+81
* module/ice-9/futures.scm (<future>)[completion]: New field. [done?]: Rename to... [state]: ... this. Change `set-future-done?!' to `set-future-state!', and `future-done?' to `future-state'. (make-future): Initialize the `completion' field to 'queued. (with-mutex): New macro. (process-future!): Remove `set-future-done?!' call. (process-futures): Check `future-state'. Unlock FUTURE's mutex before processing it. Broadcast FUTURE's `completion' cond. var. when done. (touch): Likewise.
2012-11-17Update Gnulib to v0.0-7695-g26c0590.Ludovic Courtès34-797/+1117
* gnulib-local/m4/canonicalize.m4.diff: Remove. * Makefile.am (EXTRA_DIST): Adjust accordingly.
2012-11-17doc: Strengthen the case for pattern matching.Ludovic Courtès2-6/+35
* doc/ref/api-compound.texi (Pairs): Warn against `cadr' & co., and add a link to "Pattern Matching". * doc/ref/match.texi (Pattern Matching): Add example with nested lists. Add paragraph comparing `match' expressions and hand-written code.
2012-11-17doc: Fix typo in `set-record-type-printer!' doc.Ludovic Courtès2-5/+5
* module/srfi/srfi-9/gnu.scm (set-record-type-printer!): Change the parameter name to `proc'. * doc/ref/api-compound.texi (SRFI-9 Records): Update accordingly.
2012-11-12Add missing R6RS `open-file-input/output-port' procedureAndreas Rottmann3-70/+100
* module/rnrs/io/port.scm (r6rs-open): New internal helper procedure for opening files. (open-file-input-port, open-file-output-port): Make use of `r6rs-open'. (open-file-input/output-port): Implement in terms of `r6rs-open', add to exported identifiers list. * module/rnrs.scm (open-file-input/output-port): Add to exported identifiers. * test-suite/tests/r6rs-ports.test (test-input-file-opener): New procedure, collects several tests for opening file input ports. ("7.2.7 Input Ports"): Use `test-input-file-opener' for checking `open-file-input-port'. (test-output-file-opener): New procedure, collects several tests for opening file output ports. ("8.2.10 Output ports"): Use `test-output-file-opener' for checking `open-file-output-port'. ("8.2.13 Input/output ports"): New test prefix, making use of both `test-input-file-opener' and `test-output-file-opener' to check `open-file-input/output-port'.
2012-11-11doc: Update argument order of SRFI-9 `set-field'.Ludovic Courtès1-1/+1
* doc/ref/api-compound.texi (SRFI-9 Records): Change argument order for `set-field'.
2012-11-10srfi-9.test: avoid symbols of the form ':bar' for more robust checking.Mark H Weaver1-2/+2
* test-suite/tests/srfi-9.test ("incompatible field paths"): Rename ':bar' to 'bar' to avoid the possibility of the symbol name being printed with #{...}# notation.
2012-11-10doc: Document SRFI-9 functional setters.Ludovic Courtès1-0/+101
* doc/ref/api-compound.texi (Functional ``Setters''): New section.
2012-11-10doc: Move SRFI-9 records under "Compound Data Types".Ludovic Courtès2-103/+153
Suggested by Mark Weaver. * doc/ref/srfi-modules.texi (SRFI-9): Keep the node, but move contents to... * doc/ref/api-compound.texi (SRFI-9 Records): ...here. (Record Overview): New section.
2012-11-10Change the argument order of 'set-fields' to match that of 'set-fields'.Mark H Weaver2-19/+19
* module/srfi/srfi-9/gnu.scm (set-fields): Swap order of first two arguments. * test-suite/tests/srfi-9.test: Update tests.
2012-11-10Add system/base/ck.scm to SYSTEM_BASE_SOURCES in module/Makefile.am.Mark H Weaver1-1/+2
* module/Makefile.am (SYSTEM_BASE_SOURCES): Add system/base/ck.scm.
2012-11-10Futures: Avoid creating the worker pool more than once.Mark H Weaver1-9/+15
* module/ice-9/futures.scm (%create-workers!): Use 'with-mutex' in case an exception is thrown. Within the critical section, check to make sure the worker pool hasn't already been created by another thread.
2012-11-10Improve error for set-fields paths leading to different types.Mark H Weaver4-26/+164
* module/system/base/ck.scm: New module. * module/srfi/srfi-9.scm: Import (system base ck). (getter-type, getter-index, getter-copier): Convert incoming argument convention to CK form. (define-tagged-inlinable): Convert return value convention for key lookup to CK form. * module/srfi/srfi-9/gnu.scm: Import (system base ck). Rename '%set-fields-unknown-getter' to 'unknown-getter'. (c-list, c-same-type-check): New macros. (%set-fields): Using the CK abstract machine, arrange to check (at macro expansion time) that all of the getters in head position correspond to the same record type. * test-suite/tests/srfi-9.test: Add test.