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

1871 commits

Author SHA1 Message Date
Mark H Weaver
b306fae0ab Document that we support srfi-62 and add it to %cond-expand-features.
* module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-62.

* doc/ref/srfi-modules.texi (SRFI-0): Add srfi-62 to the list of core
  features.
  (SRFI-62): New node.
2014-01-14 13:26:30 -05:00
Mark H Weaver
cb8aaef4d0 Merge branch 'stable-2.0'
Conflicts:
	libguile/chars.c
	libguile/read.c
	test-suite/tests/reader.test
2014-01-14 03:18:34 -05:00
Mark H Weaver
394449d5d3 Recognize 'escape' character name, per R7RS.
* libguile/chars.c (scm_r7rs_charnames, scm_r7rs_charnums):
  New static constants.
  (SCM_N_R7RS_CHARNAMES): New macro.
  (scm_i_charname, scm_i_charname_to_char): Adapt to new R7RS
  char names.

* doc/ref/api-data.texi (Characters): Document #\escape.

* test-suite/tests/reader.test ("reading"): Add test.
2014-01-14 02:24:44 -05:00
Mark H Weaver
6579c3308d read: Accept "\|" in string literals.
* libguile/read.c (scm_read_string): Accept "\|" in string literals.

* doc/ref/api-data.texi (String Syntax): Add "\|" to the list of
  supported backslash escapes.

* test-suite/tests/reader.test ("reading"): Add test.
2014-01-14 02:24:37 -05:00
Mark H Weaver
7a329029cf read: Support R7RS '#true' and '#false' syntax for booleans.
* libguile/read.c (try_read_ci_chars): New static function.
  (scm_read_boolean, scm_read_array): Use 'try_read_ci_chars'.

* doc/ref/api-data.texi (Booleans): Update docs.

* test-suite/tests/reader.test ("reading"): Add tests.
2014-01-14 02:24:24 -05:00
Mark H Weaver
61d509194c Add srfi-16 and srfi-30 to %cond-expand-features.
* module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-16 and
  srfi-30.

* doc/ref/srfi-modules.texi (SRFI-0): Add srfi-16 and srfi-30 to the
  list of core features.

* module/srfi/srfi-16.scm: Remove call to 'cond-expand-provide'.
2014-01-14 02:19:52 -05:00
Mark H Weaver
b958141cdb Merge branch 'stable-2.0'
Conflicts:
	libguile/hash.c
	module/ice-9/psyntax-pp.scm
	module/ice-9/psyntax.scm
	test-suite/tests/r6rs-ports.test
2014-01-14 01:30:56 -05:00
Andy Wingo
bdad134016 Finish CPS documentation
* doc/ref/compiler.texi (Continuation-Passing Style): Flesh out the
  documentation.
2014-01-12 15:37:30 +01:00
Mark H Weaver
f974224d97 Bump user-visible copyright years to 2014.
* doc/ref/guile.texi: Add 2014 to list of copyright years in @copying
  section.

* module/ice-9/command-line.scm (version-etc): Bump 'copyright-year' to
  2014.

* module/system/repl/common.scm (*version*): Add 2014 to the range of
  copyright years.
2014-01-12 04:16:39 -05:00
Mark H Weaver
0e18163366 Implement R7RS 'syntax-error'.
* module/ice-9/psyntax.scm (syntax-error): New macro.
  (syntax-rules): Handle 'syntax-error' templates specially
  for improved error reporting.

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

* doc/ref/api-macros.texi (Syntax Rules): Add new subsection "Reporting
  Syntax Errors in Macros".

* test-suite/tests/syntax.test: Add tests.
2014-01-09 17:43:53 -05:00
Mark H Weaver
1624e149f7 psyntax: custom ellipses using 'with-ellipsis' or R7RS syntax-rules.
* module/ice-9/psyntax.scm (binding-type): Update the header comment
  to mention the new 'ellipsis' binding type.
  (macros-only-env): Preserve ellipsis bindings.
  (ellipsis?): Add 'r' and 'mod' as arguments.  Search the lexical
  environment for an ellipsis binding, and use it.
  (gen-syntax): Adapt to the additional arguments of 'ellipsis?'.
  (with-ellipsis): New core syntax.
  (convert-pattern): Add unary 'ellipsis?' procedure as an argument.
  (gen-clause): Adapt to the additional arguments of 'ellipsis?'.
  Pass unary 'ellipsis?' procedure to 'convert-pattern'.
  (syntax-case): Adapt to the additional arguments of 'ellipsis?'.
  (syntax-local-binding): Support new 'ellipsis' binding type.
  (syntax-rules): Add support for a custom ellipsis identifier as
  the first operand, as per R7RS.  Collect common code within new
  local procedure 'expand-syntax-rules'.

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

* module/ice-9/local-eval.scm (analyze-identifiers): Add support for
  'ellipsis' binding type.

* doc/ref/api-macros.texi (Syntax Rules): Add docs for R7RS custom
  ellipsis syntax.  Use @dots{}.
  (Syntax Case): Add docs for 'with-ellipsis'.  Use @dots{}.
  (Syntax Transformer Helpers): Update to include new 'ellipsis'
  binding type.

* test-suite/tests/syntax.test: Add tests.
2014-01-09 17:41:19 -05:00
Mark H Weaver
1df515a077 Merge branch 'stable-2.0'
Conflicts:
	module/system/vm/traps.scm
	test-suite/tests/peval.test
2014-01-09 02:52:34 -05:00
Mark H Weaver
900a897cd3 Implement 'exact-integer?' and 'scm_is_exact_integer'.
* libguile/numbers.c (scm_exact_integer_p, scm_is_exact_integer):
  New procedures.
  (scm_integer_p): Improve docstring.

* libguile/numbers.h (scm_exact_integer_p, scm_is_exact_integer):
  New prototypes.

* doc/ref/api-data.texi (Integers): Add docs.

* test-suite/tests/numbers.test ("exact-integer?"): Add tests.
2014-01-08 21:42:16 -05:00
Mark H Weaver
f659df4495 Fix doc that incorrectly claimed (integer? +inf.0) => #t.
Fixes <http://bugs.gnu.org/16356>.
Reported by Zefram <zefram@fysh.org>.

* doc/ref/api-data.texi (Integers): Add docs.  Fix outdated example
  that incorrectly showed (integer? +inf.0) => #t.
2014-01-08 21:41:37 -05:00
Mark H Weaver
61989c7053 Merge branch 'stable-2.0'
Conflicts:
	libguile/pairs.c
	libguile/vm.c
	test-suite/tests/control.test
2013-12-12 23:44:46 -05:00
Andy Wingo
18e1113513 Quick documentation fixes.
* doc/ref/compiler.texi: Make it build.
2013-12-10 19:53:55 +01:00
Andy Wingo
58b2315657 Beginnings of CPS section in manual
* doc/ref/compiler.texi (Continuation-Passing Style): Beginnings of this
  section.  Will be finished when we fix implicit truncation.
2013-12-10 19:49:56 +01:00
Andy Wingo
660f2775e9 Fix cross-references in api-macros.texi
* doc/ref/api-macros.texi (Macro Expansion): Fix cross-references.
2013-12-10 19:49:56 +01:00
Andy Wingo
d297e544d9 compiler.texi tweaks
* doc/ref/compiler.texi (Compiler Tower): Reword a couple things.
  (Tree-IL): Add more vertical space, for readability in info.
2013-12-05 11:55:10 +01:00
Andy Wingo
67915ab079 Doc updates to macroexpansion, compiled procs, and compiler.texi
* doc/ref/api-macros.texi (Macro Expansion): New section.
* doc/ref/api-procedures.texi (Compiled Procedures): Beginnings of a
  revision.  Not finished.
* doc/ref/compiler.texi (Compiling to the Virtual Machine): Beginnings
  of a revision.  CPS and bytecode are not done yet.
2013-12-04 20:46:02 +01:00
Mark H Weaver
7cfcb60bc1 GOOPS doc fix: #:dsupers is the init keyword for the dsupers slot.
* doc/ref/goops.texi (Metaclasses): #:dsupers is the initialization
  keyword for the dsupers slot, not #:supers.
2013-12-01 18:41:31 -05:00
Andy Wingo
1f6f591d66 Add section to vm.texi about Guile's use of ELF
* doc/ref/vm.texi (Object File Format): New section.
2013-12-01 12:35:12 +01:00
Andy Wingo
9e9745b355 vm.texi tweak
* doc/ref/vm.texi (Why a VM?): Small tense tweak.
2013-11-30 20:59:14 +01:00
Andy Wingo
69aecc6abb Update vm.texi's "Instruction Set" section.
* doc/ref/vm.texi (Instruction Set): Update.
2013-11-30 18:46:14 +01:00
Andy Wingo
23e2e78067 Beginning vm.texi updates
* doc/ref/vm.texi: Updates.
2013-11-30 18:46:14 +01:00
Andy Wingo
f5729276a9 Update history.texi
* doc/ref/history.texi (A Timeline of Selected Guile Releases, Status):
  Update.
2013-11-30 18:46:10 +01:00
Andy Wingo
0d1788039a Remove outdated section of api-memory.texi
* doc/ref/api-memory.texi (Memory Blocks): Remove section documenting
  scm_must_malloc and friends.
2013-11-29 12:28:53 +01:00
Andy Wingo
f76cf73a49 Merge commit '8571dbde63'
Conflicts:
	libguile/procprop.c
2013-11-28 15:00:17 +01:00
Andy Wingo
6dd9810902 Merge commit '750ac8c592'
Conflicts:
	.gitignore
	libguile/deprecated.c
2013-11-28 14:53:03 +01:00
Andy Wingo
3cff108dde Fix "include" doc typo
* doc/ref/api-evaluation.texi (Local Inclusion): Fix typo.
2013-11-28 10:59:42 +01:00
Andy Wingo
f88e9510f0 Use version 2.2 in manual examples
* doc/ref/api-evaluation.texi (Load Paths):
* doc/ref/api-options.texi (Build Config):
* doc/ref/guile-invoke.texi (Environment Variables):
* doc/ref/libguile-parallel.texi (Parallel Installations): Use 2.2 in
  examples, rather than 2.0.
2013-11-28 10:57:42 +01:00
Andy Wingo
c0d928dc2b Fix some references to objcode in the manual
* doc/ref/api-evaluation.texi (Compilation): Update references from
  "objcode" to "rtl".
2013-11-28 10:56:55 +01:00
Andy Wingo
a222cbc9d1 No more VM objects visible to Scheme
* libguile/vm.h:
* libguile/vm.c (scm_the_vm): Don't expose to Scheme.
  (scm_vm_p): Remove, as it is not needed.

* module/system/vm/vm.scm: Remove the-vm and vm? exports.

* doc/ref/api-coverage.texi (Code Coverage):
* test-suite/tests/coverage.test:
* module/system/vm/coverage.scm (with-code-coverage): Don't take a VM
  argument.  Adapt documentation and tests.

* module/ice-9/command-line.scm: Remove the-vm autoload.

* module/system/vm/trace.scm (trace-calls-to-procedure):
  (trace-calls-in-procedure):
  (trace-instructions-in-procedure):
  (call-with-trace): Remove #:vm kwarg, and adapt to trap changes.

* module/system/vm/trap-state.scm (the-trap-state): Rework to use a
  parameter underneath instead of a weak key on (the-vm).

* module/system/vm/traps.scm (new-disabled-trap):
  (new-enabled-trap): Remove vm argument.
  (trap-at-procedure-call):
  (trap-in-procedure):
  (trap-instructions-in-procedure):
  (trap-at-procedure-ip-in-range):
  (trap-at-source-location):
  (trap-frame-finish):
  (trap-in-dynamic-extent):
  (trap-calls-in-dynamic-extent):
  (trap-instructions-in-dynamic-extent):
  (trap-calls-to-procedure):
  (trap-matching-instructions): Remove vm keyword arguments.

* test-suite/tests/control.test ("unwind"): Adapt test.

* test-suite/tests/eval.test (test-suite): Remove the-vm import.
2013-11-21 16:45:03 +01:00
Andy Wingo
972275eee5 VM accessors take VM as implicit argument, not explicit argument
* libguile/vm.h:
* libguile/vm.c:
  (scm_vm_apply_hook, scm_vm_push_continuation_hook,
  scm_vm_pop_continuation_hook, scm_vm_abort_continuation_hook,
  scm_vm_restore_continuation_hook, scm_vm_next_hook,
  scm_vm_trace_level, scm_set_vm_trace_level_x, scm_vm_engine,
  scm_set_vm_engine_x, scm_c_set_vm_engine_x): The VM argument is now
  implicit: the VM for the current thread.

* doc/ref/api-debug.texi (VM Hooks): Try to adapt.

* module/ice-9/command-line.scm:
* module/statprof.scm:
* module/system/vm/coverage.scm:
* module/system/vm/trace.scm:
* module/system/vm/trap-state.scm:
* module/system/vm/traps.scm:
* test-suite/tests/control.test:
* test-suite/tests/eval.test: Adapt users that set hooks or ensure that
  we have a debug engine.
2013-11-21 16:10:41 +01:00
David Thompson
5063f0a93b Add procedures to convert alists into hash tables.
* module/ice-9/hash-table.scm: New module.

* test-suite/tests/hash.test ("alist conversion"): Add tests.

* doc/ref/api-compound.texi (Hash Table Reference): Add docs.
2013-11-18 23:03:38 -05:00
Ian Price
9cdf0ac603 Doc: 'unfold-right' takes a tail not a tail generator.
Reported by David Kastrup <dak@gnu.org>.

* doc/ref/srfi-modules.texi (SRFI-1 Fold and Map): Change argument
  name, and default value.
2013-10-19 23:17:29 +01:00
Ian Price
c9e3266c4b Doc: mention vectors are self-quoting
Reported by Dmitry Bogatov <KAction@gnu.org>.

* doc/ref/api-compound.texi (Vector Syntax, Vector Creation): Mention
  that vectors are self-quoting. Remove examples with quote signs.
2013-10-18 13:02:41 +01:00
Ludovic Courtès
aaa9ef33d8 doc: Update the section on SMOBs and memory management.
* doc/ref/libguile-smobs.texi (Describing a New Type): Only list 'print'
  and 'equalp' as compulsory.  Explain why 'mark' and 'free' are
  optional.
  (Creating Smob Instances): Remove paragraphs about allocations that
  might fail etc.  Use 'scm_gc_malloc_pointerless' for the pixel
  buffer.
  (Garbage Collecting Smobs): Explain when the 'mark' and 'free'
  functions are needed.
  (Garbage Collecting Simple Smobs): Remove.
2013-10-14 22:59:28 +02:00
Andy Wingo
d7928d7c61 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	libguile/deprecated.h
	libguile/programs.c
	libguile/programs.h
2013-10-03 21:35:21 +02:00
Mark H Weaver
84af582d1e Fix minor mistakes in documentation.
Fixes <http://bugs.gnu.org/15487>.
Reported by Josep Portella Florit <jpf@primfilat.com>.

* doc/ref/api-i18n.texi (i18n Introduction, Text Collation,
  Internationalization, Internationalization):
  LC_MESSAGE --> LC_MESSAGES.

* doc/ref/api-procedures.texi (Compiled Procedures):
  program-lambda-alist --> program-lambda-list.

* THANKS: Fix alignment of Josep Portella Florit.
2013-09-30 12:46:01 -04:00
Mark H Weaver
c04bf4337b Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	module/srfi/srfi-9.scm
	module/web/server.scm
2013-09-13 00:24:04 -04:00
Mark H Weaver
803c087e6b Fix truncated documentation for 'put-char'.
Fixes <http://bugs.gnu.org/15152>.
Reported by Josep Portella Florit <jpf@primfilat.com>.

* doc/ref/api-io.texi (R6RS Textual Output): Fix truncated docs
  for 'put-char'.

* THANKS: Add Josep Portella Florit to fixes section.
2013-09-13 00:00:43 -04:00
Mark H Weaver
453acfacf4 Merge remote-tracking branch 'origin/stable-2.0' 2013-08-23 22:36:02 -04:00
Ian Price
1fcf690929 doc: `get-string-all' takes only one argument.
* doc/ref/api-io.texi (R6RS Textual Input): Remove `count' argument.
2013-08-19 22:25:41 +01:00
Mark H Weaver
521c542199 Merge remote-tracking branch 'origin/stable-2.0' 2013-08-15 04:09:04 -04:00
Mark H Weaver
b57162c3d2 Manual: clarify that 'append!' and 'reverse!' might not mutate.
* doc/ref/api-compound.texi (Append/Reverse): Clarify that 'append!' and
  'reverse!' are not required to modify anything.
2013-08-13 20:33:18 -04:00
Mark H Weaver
62744c1a6a Manual: don't promise that 'append!' will modify the existing lists.
* doc/ref/api-compound.texi (Append/Reverse): Say that 'append!' *may*
  modify the given lists, but don't promise that it will.
2013-08-13 19:52:48 -04:00
Mark H Weaver
6dce942c46 String ports use UTF-8; ignore %default-port-encoding.
* libguile/strports.c (scm_mkstrport): Use UTF-8; ignore
  %default-port-encoding.  Rename 'str_len' and 'c_pos' to
  'num_bytes' and 'c_byte_pos'.  Interpret 'pos' argument
  as a character index instead of a byte index.

* module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-6 to the
  list of core features.

* module/srfi/srfi-6.scm (open-input-string, open-output-string): Simply
  re-export these, since the core versions are now compliant.

* doc/ref/api-io.texi (String Ports): Remove text that describes
  non-compliant behavior of string ports with regard to encoding.

* doc/ref/srfi-modules.texi (SRFI-0): Add srfi-6 to the list of
  core features.
  (SRFI-6): Remove text that mentions non-compliant behavior of
  core string ports.

* module/ice-9/format.scm (format):
* module/ice-9/pretty-print.scm (truncated-print):
* module/rnrs/io/ports.scm (open-string-input-port,
  open-string-output-port):
* test-suite/test-suite/lib.scm (format-test-name):
* test-suite/tests/chars.test ("combining accent is pretty-printed",
  "combining X is pretty-printed"):
* test-suite/tests/ecmascript.test (eread, eread/1):
* test-suite/tests/rdelim.test:
* test-suite/tests/reader.test (read-string):
* test-suite/tests/regexp.test:
* test-suite/tests/srfi-105.test (read-string): Don't set
  %default-port-encoding before creating string ports.

* benchmark-suite/benchmarks/ports.bm (%latin1-port): Use
  'set-port-encoding!' to set the string port encoding.
  (%utf8/ascii-port, %utf8/wide-port, "rdelim"): Don't set
  %default-port-encoding before creating string ports.

* test-suite/tests/r6rs-ports.test ("lookahead-u8 non-ASCII"): Don't set
  %default-port-encoding before creating string ports.
  ("put-bytevector with UTF-16 string port", "put-bytevector with
  wrong-encoding string port"): Use 'set-port-encoding!' to set the
  string port encoding.

* test-suite/tests/print.test (tprint): Use 'set-port-encoding!' to set
  the string port encoding.
  ("truncated-print"): Use 'pass-if-equal'.

* test-suite/tests/ports.test ("encoding failure leads to exception",
  "%default-port-encoding is honored", "peek-char [latin-1]", "peek-char
  [utf-8]", "peek-char [utf-16]"): Remove tests.
  ("%default-port-encoding is ignored", "peek-char"): Add tests.
  ("suitable encoding [latin-1]", "suitable encoding [latin-3]",
  "wrong encoding, error", "wrong encoding, substitute",
  "wrong encoding, escape"): Use 'set-port-encoding!' to set the
  string port encoding.
  ("%default-port-encoding, wrong encoding"): Rewrite to use
  a file port instead of a string port.
2013-08-07 01:22:22 -04:00
Mark H Weaver
f82f62944a Merge remote-tracking branch 'origin/stable-2.0' 2013-07-18 15:31:34 -04:00
Mark H Weaver
23cf330c86 Add support for HTTP proxies.
* module/web/http.scm (http-proxy-port?, set-http-proxy-port?!): New
  exported procedures.
  (write-request-line): If we're using an http proxy, write an
  absolute-URI in the request line.

* module/web/client.scm: Import (web http).
  (current-http-proxy): New exported parameter.
  (open-socket-for-uri): If 'current-http-proxy' is not false,
  connect to the proxy instead of the URI host, and use
  'set-http-proxy-port?!' to make note of that fact.

* doc/ref/web.texi (Web Client): Document 'current-http-proxy'.
2013-07-16 19:33:32 -04:00