These use the argument conventions of vector-copy!, string-copy!,
etc. and not that of bytevector-copy! (which is from r6rs).
* module/srfi/srfi-4/gnu.scm: As stated.
* test-suite/tests/srfi-4.test: Tests.
* doc/ref/srfi-modules.texi: Documentation.
* libguile/bytevectors.c (bytevector-copy!): Add overlap note to
docstring.
* libguile/vectors.c (vector-copy!): Reuse text for the overlap note.
* Deprecate scm_is_simple_vector.
* libguile/vectors.c (scm_vector_elements,
scm_vector_writable_elements): These functions take an array; reword
to make this clear.
* libguile/print.h: Remove reference to 'simple vector'.
* doc/ref/api-data.texi: Remove documentation for scm_is_simple_vector.
Remove references to 'simple vector'.
Fix documentation for scm_vector_elements,
scm_vector_writable_elements.
* test-suite/tests/arrays.test:
* test-suite/tests/vectors.test: Remove references to 'simple vector'.
This adds SRFI-171 (transducers) to guile.
The two guile-specific additions are powerful transducers which can be
used to generalize transducers like tsegment. They are hard to get
right, but powerful and useful enough to warrant inclusion.
* doc/ref/srfi-modules.texi: added srfi-171 section
* module/Makefile.am (SOURCES):
* module/srfi/srfi-171.scm:
* module/srfi/srfi-171/meta.scm: Add SRFI-171
* module/srfi/srfi-171/gnu.scm: Add 2 guile-specific extensions.
* test-suite/Makefile.am (SCM_TESTS):
* test-suite/tests/srfi-171.test: Add tests.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* doc/ref/api-control.texi (Prompt Primitives): Reference the newer
exception facilities.
(Exceptions): Rewrite to use the new exception primitives.
(Exception Terminology): Remove superfluous section.
(Exception Objects): New section.
(Raising and Handling Exceptions): New section.
(Throw and Catch): New section, coalescing the previous catch,
with-throw-handler, and throw sections.
(Exceptions and C): New section, for miscellaneous procedures.
(Handling Errors): Mention the transitional period regarding exception
handling.
* doc/ref/api-debug.texi (Catching Exceptions): Rewrite to use newer
exception facilities.
(Capturing Stacks): Remove, as it's not really recommendable any
more.
(Pre-Unwind Debugging): Rewrite to use the new primitives.
(Standard Error Handling): Add note about transitional status.
(Stack Overflow): Reference new exception section.
* doc/ref/api-scheduling.texi (Mutexes and Condition Variables):
Reference new exception section.
* doc/ref/r6rs.texi (rnrs exceptions, rnrs conditions): Update to
mention compatibility with SRFI-34/35 and to relate to core
exceptions.
* doc/ref/srfi-modules.texi (SRFI-34): Document.
Fixes <https://bugs.gnu.org/21911>.
Fixes <https://bugs.gnu.org/22034>.
Fixes <https://bugs.gnu.org/21902>.
Partially fixes <https://bugs.gnu.org/21904>.
Reported by Zefram <zefram@fysh.org>.
* doc/ref/srfi-modules.texi (SRFI-19 Introduction): Fix the definitions
of Julian Day and Modified Julian Day. Give the correct full names of
UTC and TAI.
* module/srfi/srfi-19.scm: Import (srfi srfi-1). Use modern Guile
keyword syntax in the 'define-module' form.
(leap-second-neg-delta): New procedure, derived from a similar procedure
in the latest upstream SRFI-19 reference implementation.
(priv:time-tai->time-utc!, time-tai->julian-day)
(time-monotonic->julian-day): Use 'leap-second-neg-delta'.
(local-tz-offset): Fix comment.
(leap-second?): Remove.
(tai-before-leap-second?): New procedure, derived from upstream SRFI-19.
(time-utc->date): Use 'define*' to handle the optional argument. Remove
the leap second handling, following upstream SRFI-19.
(time-tai->date): Rewrite in terms of 'time-utc->date'. Add special
leap second handling, following upstream SRFI-19.
(time-monotonic->date): Rewrite in terms of 'time-tai->date'.
(date->time-tai, date->time-monotonic): Add special leap second
handling, following upstream SRFI-19.
(directives): In the entry for the "~Y" escape in 'date->string', pad
the year field to 4 characters, following upstream SRFI-19.
* test-suite/tests/srfi-19.test: Add tests.
* doc/ref/srfi-modules.texi (SRFI-19): SRFI-19 specifies proleptic use
of the Gregorian calendar, so it was incorrect of the documentation to
describe the code as erroneous in doing so. Rewrite the caution more
neutrally, and move it to the section about the "date" structure, where
it seems most relevant.
* doc/ref/api-compound.texi: Remove.
* doc/ref/api-data.texi: Fold "Compound Data Types" and "Simple Data
Types" into just "Data Types". The distinction didn't work.
* doc/ref/guile.texi:
* doc/ref/Makefile.am:
* doc/ref/srfi-modules.texi: Adapt.
* doc/ref/api-io.texi: Update to document ports more thoroughly. Still
some work needed.
* doc/ref/r6rs.texi: Move ports documentation back to r6rs.texi, now
that Guile has a more thorough binary/textual I/O story, heavily based
on R6RS.
* doc/ref/api-control.texi:
* doc/ref/api-data.texi:
* doc/ref/api-options.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/srfi-modules.texi: Update references.
This commit also renames uniform-vector-element-type-code to
array-type-code.
Conflicts:
libguile/uniform.c
libguile/uniform.h
test-suite/tests/arrays.test
* libguile/uniform.h:
* libguile/uniform.c (scm_is_uniform_vector, scm_uniform_vector_p)
(scm_c_uniform_vector_length, scm_uniform_vector_length)
(scm_uniform_vector_element_type, scm_uniform_vector_element_size)
(scm_c_uniform_vector_ref, scm_uniform_vector_ref):
(scm_c_uniform_vector_set_x, scm_uniform_vector_set_x):
(scm_uniform_vector_to_list)
(scm_uniform_vector_elements, scm_uniform_vector_writable_elements):
Deprecate. This interface lacked both generality and specificity.
The general replacement is array-length, array-ref, and friends on the
scheme side, or the array handle interface on the C side. On the
specific side of things, there are the specific bytevector, srfi-4,
and bitvector interfaces.
* test-suite/tests/arrays.test:
* test-suite/tests/bitvectors.test:
* test-suite/tests/ports.test:
* test-suite/tests/srfi-4.test: Update to use array interfaces.
* doc/ref/api-foreign.texi (Void Pointers and Byte Access):
* doc/ref/srfi-modules.texi (SRFI-4): Update.
* module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-46.
* doc/ref/srfi-modules.texi (SRFI-0): Add srfi-46 to the list of core
features.
(SRFI-46): New node.
* doc/ref/api-macros.texi (Syntax Rules): Mention that the custom
ellipsis identifier support is specified by SRFI-46.
* test-suite/tests/syntax.test ("syntax-rules"): Add ellipsis hygiene
test from SRFI-46.
* module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-87.
* doc/ref/srfi-modules.texi (SRFI-0): Add srfi-87 to the list of core
features.
(SRFI-87): New node.
* 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.
* 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'.
* 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.
Suggested by Ludovic Courtès <ludo@gnu.org>.
* doc/ref/srfi-modules.texi (SRFI-41 Stream Primitives):
Label 'stream-null' as a Scheme Variable, not a Constant.