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

1483 commits

Author SHA1 Message Date
Andy Wingo
12087939ed Merge remote-tracking branch 'origin/stable-2.0' 2012-02-12 13:32:56 +01:00
Andy Wingo
164a78b355 web server: do not provide a response body where it is not permitted
* module/web/response.scm (response-must-not-include-body?): New
  function.

* doc/ref/web.texi: Doc the function.

* module/web/server.scm (sanitize-response): Error if we have a body,
  but the response type does not permit a body.  If we are responding to
  a HEAD request, silently drop the body.
2012-02-12 13:29:19 +01:00
Andy Wingo
a41bed83ab Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	libguile/read.c
	test-suite/tests/tree-il.test
2012-02-11 18:14:48 +01:00
Mark H Weaver
e7cf0457d7 Support => within case, and improve error messages for cond and case
* module/ice-9/boot-9.scm (cond, case): Reimplement using syntax-case,
  with improved error messages and support for '=>' within 'case' as
  mandated by the R7RS.  Add warnings for duplicate case datums and
  case datums that cannot be meaningfully compared using 'eqv?'.

* module/system/base/message.scm (%warning-types): Add 'bad-case-datum'
  and 'duplicate-case-datum' warning types.

* test-suite/tests/syntax.test (cond, case): Update tests to reflect
  improved error reporting.  Add tests for '=>' within 'case'.

* test-suite/tests/tree-il.test (partial evaluation): Update tests to
  reflect changes in how 'case' is expanded.

* doc/ref/api-control.texi (Conditionals): Document '=>' within 'case'.
2012-02-08 16:27:48 -05:00
Mark H Weaver
b131b233ff Add source properties to many more types of data
* libguile/read.c (scm_read_array): New internal helper that
  calls scm_i_read_array and sets its source property if the
  'positions' reader option is set.

  (scm_read_string): Set source properties on strings if the 'positions'
  reader option is set.

  (scm_read_vector, scm_read_srfi4_vector, scm_read_bytevector,
  scm_read_guile_bitvector, scm_read_sharp): Add new arguments for the
  'line' and 'column' of the first character of the datum being read.
  Set source properties if the 'positions' reader option is set.

  (scm_read_expression): Pass 'line' and 'column' to scm_read_sharp.

* doc/ref/api-debug.texi (Source Properties): Update manual.
2012-02-08 16:27:41 -05:00
Andy Wingo
0858753e82 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	GUILE-VERSION
	libguile/gc-malloc.c
	libguile/ports.c
2012-02-08 11:48:08 +01:00
Bake Timmons
5f6ffd6652 Improve consistency of definitions of C functions in manual.
* doc/ref/api-compound.texi
* doc/ref/api-evaluation.texi
* doc/ref/api-foreign.texi
* doc/ref/api-io.texi
* doc/ref/posix.texi
* doc/ref/srfi-modules.texi: Add missing parentheses and commas to definitions
  of C functions.

* doc/ref/api-data.texi: Change from @deffn to @deftypefn for C function
  with arguments not of SCM type.
2012-02-04 00:10:14 +01:00
Bake Timmons
df0a100250 Make notation for Scheme repeated arguments more consistent in manual.
* doc/ref/api-compound.texi
* doc/ref/api-control.texi
* doc/ref/api-data.texi
* doc/ref/api-debug.texi
* doc/ref/api-evaluation.texi
* doc/ref/api-macros.texi
* doc/ref/api-memory.texi
* doc/ref/api-modules.texi
* doc/ref/api-procedures.texi
* doc/ref/api-regex.texi
* doc/ref/api-scheduling.texi
* doc/ref/api-utility.texi
* doc/ref/goops.texi
* doc/ref/match.texi
* doc/ref/misc-modules.texi
* doc/ref/posix.texi
* doc/ref/r6rs.texi
* doc/ref/scheme-using.texi
* doc/ref/srfi-modules.texi
* doc/ref/sxml-match.texi: Make notation for Scheme repeated arguments more
  consistent in manual.
2012-02-04 00:10:13 +01:00
Ludovic Courtès
afd08fdf87 format: Add specifier ~h for localized number output.
* doc/ref/misc-modules.texi (Formatted Output): Document ~h.  Recommend
  use of ~h instead of ~:d.

* module/ice-9/format.scm (format): Add support for ~h.

* test-suite/tests/format.test ("~h localized number"): New test prefix.

* test-suite/tests/i18n.test (%american-english-locale-name,
  %american-english-locale): New variables.
  (under-american-english-locale-or-unresolved): New procedure.
  ("format ~h"): New test prefix.
2012-02-03 16:35:06 +01:00
Ludovic Courtès
1ba05158eb tests: Have `getaddrinfo' test work for Darwin 8.
* doc/ref/posix.texi (Network Databases): Update description of
  `EAI_NODATA' to mention that Darwin provides it.

* libguile/net_db.c (scm_getaddrinfo): Likewise.

* test-suite/tests/net-db.test ("getaddrinfo")["wrong service name"]:
  Accept `EAI_NODATA' too.  Reported by David Fang <fang@csl.cornell.edu>,
  see <http://bugs.gnu.org/10684>.
2012-02-03 10:30:52 +01:00
Bake Timmons
64de6db5c6 Make consistent the usage of variable names in the function definitions found in the Texinfo docs.
* doc/r5rs/r5rs.texi:
* doc/ref/api-compound.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-io.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/compiler.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/scheme-using.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* doc/ref/web.texi:
* doc/sources/env.texi: Make usage of variable names of function definitions
  more consistent.
2012-02-02 12:04:16 +01:00
Bake Timmons
9cbcc73fce Fix unbalanced parentheses in docs.
* doc/ref/sxml-match.texi (sxml-match-let, sxml-match-let*): Remove
  extraneous parenthesis at end of Texinfo function definition header.
2012-02-02 12:04:16 +01:00
Mike Gran
bf8d845468 Update srfi-14 character sets to Unicode 6.1
* libguile/srfi-14.i.c (cs_lower_case_ranges, cs_lower_case)
  (cs_upper_case_ranges, cs_upper_case, cs_letter_ranges, cs_letter)
  (cs_digit_ranges, cs_digit, cs_letter_plus_digit_ranges, cs_letter_plus_digit)
  (cs_graphic_ranges, cs_graphic, cs_printing_ranges, cs_printing)
  (cs_punctuation_ranges, cs_punctuation, cs_symbol_ranges, cs_symbol)
  (cs_designated_ranges, cs_designated): modified
* doc/ref/api-data.texi: modified
2012-02-01 19:51:35 -08:00
Ludovic Courtès
ffd901eb5e doc: Add "warnings" to the concept index.
* doc/ref/api-evaluation.texi (Compilation): Add "warnings" to the
  concept index.
2012-01-30 20:57:16 +01:00
Andy Wingo
dfadcf85cb Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	libguile/debug.h
	module/ice-9/psyntax-pp.scm
	module/ice-9/psyntax.scm
	module/language/tree-il/peval.scm
	module/language/tree-il/primitives.scm
2012-01-30 20:27:35 +01:00
Andy Wingo
252acfe8e7 Merge commit '3d51e57cfb'
Conflicts:
	libguile/foreign.c
	libguile/hashtab.c
	module/ice-9/psyntax-pp.scm
	module/language/tree-il/compile-glil.scm
2012-01-30 18:52:46 +01:00
Andy Wingo
855db1905d Merge commit '9b0975f1dc'
Conflicts:
	libguile/foreign.c
	module/ice-9/psyntax-pp.scm
	module/ice-9/psyntax.scm
2012-01-30 18:25:07 +01:00
Mark H Weaver
07c2ca0f0d Rename scm_call_varargs -> scm_call
* libguile/eval.c, libguile/eval.h, doc/ref/api-evaluation.texi,
  test-suite/standalone/test-loose-ends.c, NEWS: Rename
  scm_call_varargs -> scm_call

Suggested by Ludovic Courtès <ludo@gnu.org>
2012-01-30 11:02:29 -05:00
Mark H Weaver
741b8a2300 Implement scm_call_varargs and scm_call_{7,8,9}
* libguile/eval.c (scm_call_7, scm_call_8, scm_call_9,
  scm_call_varargs): New functions.

* libguile/eval.h: Add prototypes.

* doc/ref/api-evaluation.texi: Add documentation.

* test-suite/standalone/test-loose-ends.c: Add tests.

* NEWS: Add news entry.
2012-01-30 10:27:44 -05:00
Mark H Weaver
505afe2832 Update user-visible copyright dates in manual and REPL to 2012
* doc/ref/guile.texi, module/system/repl/common.scm: Update
  user-visible copyright dates to 2012.
2012-01-30 00:33:31 -05:00
Andy Wingo
eb7da3d81f document include', include-from-path'
* doc/ref/api-evaluation.texi (Local Inclusion): New section.
2012-01-27 16:33:11 +01:00
Andy Wingo
0740cb49d1 more documentation on the process of loading source and compiled files
* doc/ref/api-evaluation.texi (Load Paths): Move documentation of
  %load-path and related procedures here, from Build Config.  Add docs
  for %load-compiled-path.

* doc/ref/api-foreign.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-options.texi:
* doc/ref/scheme-using.texi: Update xrefs.
2012-01-27 16:33:11 +01:00
Andy Wingo
68c31a42ab update local-eval docs
* doc/ref/api-evaluation.texi (Local Evaluation): Update docs, add some
  examples.
2012-01-26 16:22:35 +01:00
Andy Wingo
d062a8c1ee Implement local-eval', local-compile', and `the-environment'
* module/ice-9/local-eval.scm: New module (ice-9 local-eval) which
  exports `the-environment', `local-eval', and `local-compile'.

* libguile/debug.c (scm_local_eval): New C function that calls the
  Scheme implementation of `local-eval' in (ice-9 local-eval).

* libguile/debug.h (scm_local_eval): Add prototype.

* doc/ref/api-evaluation.texi (Local Evaluation): Add documentation.

* test-suite/tests/eval.test (local evaluation): Add tests.

* test-suite/standalone/test-loose-ends.c (test_scm_local_eval):
  Add test.

* module/Makefile.am: Add ice-9/local-eval.scm.

Based on a patch by Mark H Weaver <mhw@netris.org>.
2012-01-26 12:08:58 +01:00
Andy Wingo
68fcf71189 new syntax procedures to (system syntax)
* module/ice-9/boot-9.scm:
* module/ice-9/psyntax.scm (syntax-module, syntax-local-binding)
  (syntax-locally-bound-identifiers): After boot, move these definitions
  to a new (system syntax) module.

* module/ice-9/psyntax-pp.scm: Regenerate.

* doc/ref/api-macros.texi: Add some words about syntax-module and
  friends being in (system syntax).
2012-01-25 21:31:20 +01:00
Andy Wingo
1ace4fbf3d add syntax-module
* module/ice-9/psyntax.scm (syntax-module): New accessor for syntax
  objects.
* module/ice-9/psyntax-pp.scm: Regenerate.

* module/ice-9/boot-9.scm: Declare syntax-module.

* doc/ref/api-macros.texi: Document it.
2012-01-25 20:34:17 +01:00
Andy Wingo
3d51e57cfb add syntax-locally-bound-identifiers
* module/ice-9/boot-9.scm (syntax-locally-bound-identifiers): Declare
  variable.
* module/ice-9/psyntax.scm: Add locally-bound-identifiers helper, and
  define syntax-locally-bound-identifiers.
* module/ice-9/psyntax-pp.scm: Regenerated.
* doc/ref/api-macros.texi: Document the new procedure.
2012-01-25 20:34:16 +01:00
Andy Wingo
21ad60a1d2 current-filename canonicalizes path, remove add-to-path
* module/ice-9/boot-9.scm (current-filename): Canonicalize the path, so
  that the result is independent of the current directory, and so
  that `dirname' can traverse up the file system, as in the
  add-to-load-path example.
  (add-to-path): Remove.  The eval-when semantics make this macro too
  tricky to explain -- people will start using it on other path-like
  things, in lexical contours, whereas it only really makes sense with
  load-like paths at the toplevel.

* doc/ref/api-evaluation.texi (Loading): Fix link to load-with-path
  docs, and remove add-to-path docs.
2012-01-23 11:13:12 +01:00
Mark H Weaver
d47db067b6 Add random-state-from-platform' and scm_i_random_bytes_from_platform'
* libguile/random.c (scm_random_state_from_platform): New procedure.
  (scm_i_random_bytes_from_platform): New internal function.

* libguile/random.h (scm_random_state_from_platform,
  scm_i_random_bytes_from_platform): Add prototypes.

* doc/ref/api-data.texi (Random): Add documentation.
2012-01-21 03:22:57 -05:00
Andy Wingo
925172cf52 add current-filename, add-to-path, add-to-load-path
* module/ice-9/boot-9.scm (current-filename, add-to-path)
  (add-to-load-path): New syntaxen.

* doc/ref/api-evaluation.texi (Loading): Move load-path related
  procedures to a new section:
  (Load Paths): Hither.  Document add-to-path and add-to-load-path.

* doc/ref/api-debug.texi (Source Properties): Document
  current-source-location and current-filename.

* doc/ref/api-modules.texi:
* doc/ref/guile-invoke.texi:
* doc/ref/scheme-using.texi: Update @ref for Load Paths change.
2012-01-21 00:08:17 +01:00
Andy Wingo
9accf3d98f add when, unless
* module/ice-9/boot-9.scm (when, unless): New forms.

* doc/ref/api-control.texi (Conditionals): Add docs.  Rename this
  node from "if cond case".

* doc/ref/r6rs.texi:
* doc/ref/scheme-ideas.texi:
* doc/ref/srfi-modules.texi: Update referrers.
2012-01-20 19:51:45 +01:00
Andy Wingo
9b0975f1dc add syntax-local-binding
* module/ice-9/boot-9.scm (syntax-local-binding): New binding.

* module/ice-9/psyntax.scm: Locally define a fluid that holds the
  "transformer environment".  with-transformer-environment calls a
  procedure with the transformer environment, or raises an error if
  called outside the extent of a transformer.  Bind
  transformer-environment in expand-macro.
  (resolve-identifier): Backport this helper from master.
  (syntax-local-binding): New procedure to return binding information of
  a bound identifier (a lexical, macro, a pattern variable, a displaced
  lexical, a global, or some other form).

* module/ice-9/psyntax-pp.scm: Regenerate.

* doc/ref/api-macros.texi (Syntax Transformer Helpers): Add docs for
  syntax-local-binding, and syntax-source, and move some other
  descriptions to this new section.
2012-01-19 12:38:27 +01:00
Mark H Weaver
1ceeca0a76 Add `scm_c_value_ref' to allow access to multiple returned values from C
Based on a patch by Julian Graham <julian@member.fsf.org>

* libguile/values.c, libguile/values.h (scm_c_value_ref): New function.
* doc/ref/api-control.texi (Multiple Values): Add documentation.
* test-suite/standalone/test-scm-values.c: New test program.
* test-suite/standalone/Makefile.am: Add test-scm-values test.
2012-01-18 18:01:48 -05:00
Andy Wingo
e2e8ca4240 print-options doc update
* doc/ref/api-evaluation.texi (Scheme Write): Update print-options.
2012-01-12 00:32:00 +01:00
Andy Wingo
99db1bc2e2 Move parameters documentation to core
* doc/ref/api-scheduling.texi (Fluids and Dynamic States): Update for
  default values.
  (Parameters): Move here from srfi-39, and adapt.
2012-01-12 00:10:25 +01:00
Andy Wingo
cd3370bac1 add docs for scm_gc_register_allocation
* doc/ref/api-memory.texi: Update for scm_gc_register_allocation.
  Remove docs for scm_gc_{un,}register_collectable_memory.
2012-01-12 00:09:39 +01:00
Mark H Weaver
bbe3408ae4 Remove docs `procedure-environment', which no longer exists
* doc/ref/api-procedures.texi (Procedure Properties): Remove the entry
  for `procedure-environment', which no longer exists.
2012-01-10 15:59:49 -05:00
Mike Gran
3248c954db Typo in documentation of local-boxed-set
* doc/ref/vm.texi: modified
2012-01-09 21:35:41 -08:00
Andy Wingo
91ee7515da Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	libguile/__scm.h
	libguile/array-map.c
	libguile/procprop.c
	libguile/tags.h
	module/ice-9/deprecated.scm
	module/ice-9/psyntax-pp.scm
	module/ice-9/psyntax.scm
	test-suite/standalone/test-num2integral.c
	test-suite/tests/regexp.test
2012-01-10 00:41:42 +01:00
Andy Wingo
0bdd43515e Merge commit 'f78a1ccede' 2012-01-10 00:23:49 +01:00
Andy Wingo
bbc2364a3e Merge commit 'cc8afa2b36'
Conflicts:
	module/ice-9/psyntax-pp.scm
	module/language/tree-il/peval.scm
2012-01-10 00:21:48 +01:00
Andy Wingo
c60e6ed4b8 no need to warn people off of s_FOO generated by SCM_DEFINE
* doc/ref/libguile-snarf.texi (Function Snarfing): The s_FOO binding
  isn't deprecated; no need to warn people to stop using it.  Thanks to
  Peter Brett for the hint.
2012-01-08 17:55:01 +01:00
Ludovic Courtès
be96155b50 ftw: Add an error' parameter to file-system-fold'.
* module/ice-9/ftw.scm (errno-if-exception): New macro.
  (file-system-fold): Add an `error' parameter.  Wrap `opendir' and STAT
  calls in `errno-if-exception' and call ERROR when appropriate.
  (file-system-tree): Provide an `error' procedure.  Return #f when
  FILE-NAME is unreadable.
  (scandir): Provide an `error' procedure.

* test-suite/tests/ftw.test (%top-builddir): New variable.
  (make-file-tree, delete-file-tree): New procedures.
  (with-file-tree): New macro.
  ("file-system-fold"): Update tests to add an `error' procedure.
  ["ENOENT", "EACCES", "dangling symlink and lstat", "dangling symlink
  and stat"]: New tests.
  ("file-system-tree")["ENOENT"]: New test.
  ("scandir")["EACCES"]: New test.

* doc/ref/misc-modules.texi (File Tree Walk): Update `file-system-fold'
  documentation.
2012-01-08 16:16:21 +01:00
Andy Wingo
866ecf54c0 syntax parameters doc formatting
* doc/ref/api-macros.texi (Syntax Parameters): Some copy-editing on
  Ian's lovely syntax-parameters documentation.
2012-01-08 14:36:17 +01:00
Andy Wingo
4f5fb35194 deprecate SCM_ASRTGO
* libguile/deprecated.h: Mark scm_immutable_cell and
  scm_immutable_double_cell as being SCM_DEPRECATED, not SCM_API.
  Deprecate SCM_ASRTGO.

* libguile/deprecated.c (scm_i_deprecated_asrtgo): New support
  procedure.

* doc/ref/api-control.texi (Handling Errors): Remove ASRTGO docs.
2012-01-08 14:27:03 +01:00
Ian Price
729b62bd95 document syntax parameters
* doc/ref/api-macros.texi (Macros): Add subsection for "Syntax Parameters"
2012-01-08 13:28:35 +01:00
Andy Wingo
992a387958 update api-modules.texi
* doc/ref/api-modules.texi (Modules): Add subsection for "Modules and
  the File System".  Move "Included Guile Modules" to the end.  Move
  "Module System Reflection" after "Variables", as we need to know about
  variables.  Flesh out "Module System Reflection" a bit, with docs on
  module-ref, module-variable, and other bindings.  General editing.
2012-01-07 00:45:44 +01:00
Ludovic Courtès
b3da54d181 Placate a number of `syntax-check' verifications.
- "filesystem" -> "file system"
  - remove doubled words
  - use EXIT_* macros instead of literal numbers
  - update `syntax-check' exclusion files
2012-01-05 23:38:10 +01:00
Mark H Weaver
4dbd29a9b8 Fix docs of string mutators to do so on a mutable string
* doc/ref/api-data.texi (String Modification): Change
  (define y "abcdefg") => (define y (string-copy "abcdefg"))
  before mutating the string bound to y in the example code.
2012-01-04 13:43:47 -05:00
Ludovic Courtès
aed9483ba1 doc: Fix typo in `define-wrapped-pointer-type' example.
* doc/ref/api-foreign.texi (Void Pointers and Byte Access): Fix typo in
  `define-wrapped-pointer-type' example.
2012-01-03 23:31:30 +01:00