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

16114 commits

Author SHA1 Message Date
Daniel Hartwig
afdf5467e5 repl: add repl-option for customized print
Closes <http://bugs.gnu.org/13077>.

* module/system/repl/common.scm (repl-default-options)
  (repl-print): Add option to use customized print procedure.
* doc/ref/scheme-using.texi (REPL Commands): Update.
2012-12-10 23:41:06 +01:00
Ludovic Courtès
9977b31643 test-suite: Skip EACCES' test of file-system-fold' when run as root.
* test-suite/tests/ftw.test ("file-system-fold")["EACCES"]: Use
  `pass-if-equal'.  Throw `unresolved' when run as root.
  Reported by Andreas Enge <andreas@enge.fr> at
  <http://lists.gnu.org/archive/html/bug-guix/2012-12/msg00073.html>.
2012-12-10 23:41:06 +01:00
Ludovic Courtès
cc94810708 Verify the value of `SHUT_RD' and related constants.
* libguile/socket.c: Add `verify' clauses for the values of `SHUT_RD',
  `SHUT_WR', and `SHUT_RDWR'.
2012-12-10 23:41:06 +01:00
Ludovic Courtès
4578dc9479 doc: Update `release.org'.
* doc/release.org (Use porter boxes): Mention Snakebite.
2012-12-10 23:41:06 +01:00
Mark H Weaver
8f63b9b670 Thanks Jozef Chraplewski.
* THANKS: Jozef Chraplewski.
2012-12-07 12:03:49 -05:00
Mark H Weaver
2355f01709 Avoid signed integer overflow in scm_product
* libguile/numbers.c (scm_product): Avoid signed integer overflow, which
  modern C compilers are allowed to assume will never happen, thus
  allowing them to optimize out our overflow checks.

* test-suite/tests/numbers.test (*): Add tests.
2012-12-07 12:02:07 -05:00
Daniel Hartwig
e6a730b22a doc: remove more references to hash-tables-as-vectors
* doc/ref/api-compound.texi (Hash Tables): Update.
2012-11-30 21:23:05 +01:00
Ludovic Courtès
3eaa587645 doc: Update `release.org'.
* doc/release.org: Fix typos, and update.
2012-11-30 21:22:45 +01:00
Ludovic Courtès
3b5390989d NEWS: Add "R6RS SRFI support" text.
* NEWS: Add proper text for "R6RS SRFI support", by Ian Price and
  Mark Weaver.
2012-11-30 00:48:53 +01:00
Ludovic Courtès
9a535f09e0 Bump version number for 2.0.7.
* 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-30 00:06:26 +01:00
Mark H Weaver
3919585f79 NEWS: Add entry for new GUILE_LOAD_PATH (et al) ellipsis handling.
* NEWS: Add entry for new GUILE_LOAD_PATH (et al) ellipsis handling.
2012-11-29 17:57:49 -05:00
Mark H Weaver
2813d72571 NEWS: Mention par-for-each, alongside par-map, being fixed to use all cores
* NEWS: Mention par-for-each, alongside par-map, being fixed to use all
  cores.
2012-11-29 17:50:56 -05:00
Mark H Weaver
a94e7d85dd Minor fixes in NEWS
* NEWS: Minor fixes to the descriptions.
2012-11-29 17:25:21 -05:00
Ludovic Courtès
13fac28218 Update `NEWS'.
* NEWS: Add news for 2.0.7.
2012-11-29 22:44:12 +01:00
Ludovic Courtès
4d599c2441 futures: Remove circular dependency with (ice-9 threads).
* module/ice-9/futures.scm: Remove now-useless import of (ice-9 threads)
  introduced in commit be05b336.
2012-11-29 22:44:12 +01:00
Ludovic Courtès
a638be152c doc: Document nested futures.
* doc/ref/api-scheduling.texi (Futures): Mention nested futures.
  Explain what happens upon `touch'.
2012-11-29 22:44:12 +01:00
Ludovic Courtès
8eccf6cdbd doc: Remove example use of vectors as hash tables.
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-29 22:44:12 +01:00
Mark H Weaver
bd31bce6ac Add parse-path-with-ellipsis, and use it for GUILE_LOAD_PATH et al.
* 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-28 21:58:05 -05:00
Ludovic Courtès
99b94347f9 Remove definition of the `SHARED_LIBRARY_PATH_VARIABLE' C macro.
This is a follow-up to fc32c44.

* configure.ac: Remove definition of `SHARED_LIBRARY_PATH_VARIABLE',
  which was added in e66ff09a.
2012-11-28 22:55:08 +01:00
Ludovic Courtès
91e693a8e8 web: Add `http-get*'.
* module/web/client.scm (http-get*): New procedure.
* doc/ref/web.texi (Web Client): Document it.
2012-11-28 22:50:26 +01:00
Ludovic Courtès
75d6c59fc2 web: Add `response-body-port'.
* 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-28 22:41:25 +01:00
Ludovic Courtès
ee2d874119 web: Export `text-content-type?'.
* 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-28 22:12:59 +01:00
Ludovic Courtès
cb17c4422b tests: Use pass-if-equal' in web-response.test'.
* test-suite/tests/web-response.test: Cleanup whitespace.  Use
  `pass-if-equal' when appropriate.
2012-11-28 21:25:07 +01:00
Ludovic Courtès
c438cd7175 eval: Store docstrings for lambdas.
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-28 16:43:59 +01:00
Mark H Weaver
fc32c44995 Fix library search order and don't change LD_LIBRARY_PATH
* 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-27 18:20:45 -05:00
Ludovic Courtès
c04c118461 vlist: Remove Texinfo markup from docstrings.
* 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-27 23:02:15 +01:00
Daniel Hartwig
4e81e9d9a3 web client: correctly handle uri-query, etc. in relative URI headers
* 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-27 22:41:33 +01:00
Ludovic Courtès
261af76005 web client: Support relative URIs in some headers.
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-27 00:10:24 +01:00
Ludovic Courtès
ca8be3f5b3 Have load-in-vicinity' look for .go' files in %LOAD-COMPILED-PATH.
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-27 00:10:24 +01:00
Ludovic Courtès
9fbca4b32e Split `load-in-vicinity' into small procedures.
* 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-27 00:10:24 +01:00
Ian Price
6356e0dc2f Update thanks
* THANKS: Add Sjoerd Van Leent
2012-11-26 21:04:03 +00:00
Ian Price
085552d83d Fix docs for `hashtable-copy'
* doc/ref/r6rs.texi (rnrs hashtables): a true mutable argument means a
  mutable copy.
2012-11-26 01:24:51 +00:00
Ian Price
5d7c55bdcf R6RS srfi library names should ignore first identifier after the :n
* 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-25 12:28:41 +00:00
Daniel Hartwig
890647559d (web uri): document that uri-port is an integer
* doc/ref/web.texi (URIs):
* module/web/uri.scm (build-uri): Document that uri-port is an integer.
2012-11-24 15:54:07 +01:00
Daniel Hartwig
06883ae000 syncronize web module docstrings with manual
* 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-24 15:40:14 +01:00
Ludovic Courtès
e8772a9ede Augment `.dir-locals.el'.
* .dir-locals.el: Add more `scheme-indent-function' rules.
2012-11-24 00:22:20 +01:00
Ludovic Courtès
9ee0455738 Turn on the `case' warnings in auto-compilation.
* module/ice-9/boot-9.scm (%auto-compilation-options): Add
  `duplicate-case-datum' and `bad-case-datum'.
2012-11-24 00:16:14 +01:00
Ludovic Courtès
5cd1030786 Add tests for -Wduplicate-case-datum' and -Wbad-case-datum'.
* 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-23 23:57:45 +01:00
Ludovic Courtès
679a35567d doc: Mention the duplicate-case-datum' and bad-case-datum' warnings.
* doc/ref/api-evaluation.texi (Compilation): List the
  `duplicate-case-datum' and `bad-case-datum' warnings.
2012-11-23 23:41:32 +01:00
Ludovic Courtès
712ca51ffe Remove reference to scm_init_popen' when fork' is unavailable.
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-23 23:37:29 +01:00
Ian Price
06906f370f R6RS `string-for-each' should accept multiple string arguments
* module/rnrs/base.scm (string-for-each): Rewrite.
* test-suite/tests/r6rs-base.test ("string-for-each"): Add tests.
2012-11-22 22:26:16 +01:00
Ludovic Courtès
2c7b7e0f21 cse: Fix out-of-bounds access to the database.
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-21 23:51:16 +01:00
Ludovic Courtès
2d37a93494 Update `par-map' to use nested futures.
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-21 23:33:30 +01:00
Ludovic Courtès
3e529bf02a futures: Allow nested futures; put the main thread to work.
* 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-21 23:33:30 +01:00
Ludovic Courtès
ab975cf592 futures: Add a record printer.
* module/ice-9/futures.scm: Add a record printer for <future>.
2012-11-21 23:33:30 +01:00
Ludovic Courtès
f2fb5e5328 futures: Keep futures unlocked while they are processing.
* 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-21 23:33:30 +01:00
Ludovic Courtès
7ae4e75af5 Update Gnulib to v0.0-7695-g26c0590.
* gnulib-local/m4/canonicalize.m4.diff: Remove.
* Makefile.am (EXTRA_DIST): Adjust accordingly.
2012-11-17 16:20:52 +01:00
Ludovic Courtès
44cd55752a doc: Strengthen the case for pattern matching.
* 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-17 16:14:02 +01:00
Ludovic Courtès
67768115d7 doc: Fix typo in `set-record-type-printer!' doc.
* 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-17 15:34:49 +01:00
Mark H Weaver
110ef00ba1 Merge remote-tracking branch 'origin/stable-2.0' 2012-11-15 05:31:18 -05:00