summaryrefslogtreecommitdiff
path: root/doc/ref/api-data.texi
AgeCommit message (Collapse)AuthorFilesLines
2019-11-14Update NEWS for records and exceptions workwip-exceptionsAndy Wingo1-2/+2
* NEWS: Update. * doc/ref/api-data.texi (Records): Fix a typo.
2019-10-28Add support for immutable fields in core recordsAndy Wingo1-2/+9
* module/ice-9/boot-9.scm (make-record-type): Allow (mutable NAME) or (immutable NAME) as a field name, and record field mutability in a bitfield. (record-modifier): Throw an error if the field isn't mutable. * test-suite/tests/records.test ("records"): Add tests. * doc/ref/api-data.texi (Records): Update.
2019-10-27Rename final? record type flag; add support for opaque?Andy Wingo1-5/+14
* module/ice-9/boot-9.scm (record-type-extensible?): Rename from record-type-final?, with the opposite sense. (record-type-opaque?): New accessor. (make-record-type): Change #:final? to #:extensible?, with the opposite meaning. Add #:opaque? arg. * test-suite/tests/records.test ("records"): Add opaque tests; update extensible tests. * doc/ref/api-data.texi (Records): Update. * module/srfi/srfi-35.scm (&condition, make-condition-type): Update for make-record-type API change.
2019-10-27Guile `make-record-type' supports non-generative definitionAndy Wingo1-1/+13
* module/ice-9/boot-9.scm (prefab-record-types): New definition. (make-record-type): Add #:uid keyword. * test-suite/tests/records.test ("records"): Add tests. * doc/ref/api-data.texi (Records): Document #:uid
2019-10-22Record accessors respect subtypingAndy Wingo1-11/+17
* module/ice-9/boot-9.scm (make-record-type): Don't allow subtyping of final types. (%record-type-error): Remove helper. (record-accessor, record-modifier): Use computed record type predicate, to allow for subtyping. (define-record-type): Adapt to %record-type-error going away; these types are final so no accessor adaptation is needed. * test-suite/tests/records.test: Add tests. * doc/ref/api-data.texi (Records): Update.
2018-08-07doc: Fix typo about SRFI-4 syntax.Ludovic Courtès1-1/+1
Reported by Matt Wette <matt.wette@gmail.com>. Fixes <https://bugs.gnu.org/29910>. * doc/ref/api-data.texi (Array Syntax): Fix typo.
2017-11-29Merge until e0bcda4ad940c4e15679cc2b229838b33acdd36c from stable-2.2Andy Wingo1-39/+18
2017-10-31Fix sort, sort! for arrays with nonzero lower boundDaniel Llorens1-10/+22
* module/ice-9/arrays.scm (array-copy): New function, export. * module/Makefile.am: Install (ice-9 arrays). * doc/ref/api-data.texi: Add documentation for (ice-9 arrays). * libguile/quicksort.i.c: Use signed bounds throughout. * libguile/sort.c (scm_restricted_vector_sort_x): Fix error calls. Fix calls to quicksort. * test-suite/tests/sort.test: Actually test that the sorted results match the original data. Test cases for non-zero base index arrays for sort, sort!, and stable-sort!.
2017-10-31Remove documentation on uniform-vector-read!, uniform-vector-writeDaniel Llorens1-33/+0
* NEWS: Add specific removal notice. * doc/ref/api-data.texi: Remove documentation on uniform-vector-read!, uniform-vector-write.
2017-09-25Merge 'stable-2.2'Andy Wingo1-6/+19
Resolve conflicts by removing capability of struct-ref / struct-set! to access unboxed slots.
2017-09-25Add struct-ref/unboxed, struct-set!/unboxedAndy Wingo1-6/+19
* NEWS: Add news entry. * doc/ref/api-data.texi (Vtables, Structure Basics): Update documentation. * libguile/struct.c (scm_i_struct_equalp): Avoid using struct-ref on unboxed fields. (scm_struct_ref, scm_struct_set_x_unboxed): Issue deprecation warning when accessing unboxed fields. (scm_struct_ref_unboxed, scm_struct_set_x_unboxed): New functions. * libguile/struct.h (scm_struct_ref_unboxed, scm_struct_set_x_unboxed): New functions. * module/oop/goops.scm (class-add-flags!, class-clear-flags!): (class-has-flags?, <class>, %allocate-instance, <slot>): (compute-get-n-set, unboxed-get, unboxed-set, unboxed-slot?): (allocate-slots, %prep-layout!, make-standard-class, initialize): Adapt to access unboxed nfields and flags fields via the new accessors.
2017-09-23Replace "pr" struct fields with "pw" fieldsAndy Wingo1-19/+21
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT): Layout is a "pr" field. * module/ice-9/boot-9.scm (record-type-vtable): Record vtable fields are writable. (<parameter>): "pw" fields. * module/oop/goops.scm (<class>, %compute-layout): <read-only> fields are "pw" underneath. * module/rnrs/records/procedural.scm (record-type-vtable) (record-constructor-vtable, make-record-type-descriptor): Use "pw" fields in vtables. * module/srfi/srfi-35.scm (%condition-type-vtable) (struct-layout-for-condition): "pw" fields in vtables. * test-suite/tests/goops.test: * test-suite/tests/structs.test: Use "pw" fields only. * benchmark-suite/benchmarks/structs.bm: Update for make-struct/no-tail, to use pw fields, and also to remove useless tests that the compiler would optimize away. * doc/ref/api-data.texi (Vtables): Add a note about the now-vestigial permissions character and update documentation. (Structure Basics, Meta-Vtables): Update examples. * libguile/hash.c (scm_i_struct_hash): Remove code that would handle opaque/self fields. * libguile/print.h (SCM_PRINT_STATE_LAYOUT): Use "pw" fields. * libguile/struct.c (scm_struct_init): Simplify check for hidden fields. * libguile/values.c (scm_init_values): Field is "pw".
2017-09-23Deprecate opaque struct fieldsAndy Wingo1-11/+2
* NEWS: Add entry. * doc/ref/api-data.texi (Vtables, Structure Basics): Remove mention of opaque field protection. * libguile/struct.c (scm_make_struct_layout, scm_make_struct_no_tail): Remove discussion of opaque fields. (set_vtable_layout_flags): Issue a deprecation warning when opaque fields are used.
2017-09-22Deprecate struct "self" slotsAndy Wingo1-12/+4
* libguile/print.h (SCM_PRINT_STATE_LAYOUT): Use a normal slot instead of a self slot. * libguile/print.c (make_print_state): Initialize "handle" slot manually. * libguile/struct.c (issue_deprecation_warning_for_self_slots): New helper, called when making vtables to issue deprecation warnings for "self" slots. Avoids warning for the "self" slot that's part of the fixed vtable slots. (scm_i_struct_inherit_vtable_magic): Call issue_deprecation_warning_for_self_slots. * doc/ref/api-data.texi (Vtables, Structure Basics): Remove references to self slots. * NEWS: Add entry.
2017-09-20Remove references to tail arrays in the documentationAndy Wingo1-69/+18
* doc/ref/api-data.texi (Vtables, Structure Basics): Update to remove references to tail arrays, in preparation for deprecation.
2017-04-19Documentation typo tweakSergei Trofimovich1-1/+1
* doc/ref/api-data.texi: Tweak 'u+0007' to 'U+0007' (as in the rest of the table). Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2017-03-01doc: Fix typo in keywords documentation.Georgi Kirilov1-1/+1
* doc/ref/api-data.texi (Keyword Read Syntax): Fix typo Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-03-01Document 'scm_to_uintptr_t' and 'scm_from_uintptr_t'.Ludovic Courtès1-1/+3
* doc/ref/api-data.texi (Integers): Document them.
2017-02-27Explain why no native accessors for `s8' and `u8' existDiogo F. S. Ramos1-2/+3
* doc/ref/api-data.texi: Instead of saying it is obvious, explain why no native endianness accessors exist for the `s8' and `u8' variants.
2017-01-09Final names for new array functionsDaniel Llorens1-64/+92
Globally rename (array-from* -> array-slice), (array-from -> array-cell-ref), (array-amend! -> array-cell-set!), (array-for-each-cell -> array-slice-for-each).
2016-11-23Document new array functions, with provisional namesDaniel Llorens1-0/+165
* doc/ref/api-data.texi: New section 'Arrays as arrays of arrays'. Document array-from, array-from*, array-amend!, array-for-each-cell, array-for-each-cell-in-order.
2016-11-22Merge api-{data,compound}.texiAndy Wingo1-513/+4481
* 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.
2016-08-07Documentation fixesEthan Stefan Day1-9/+9
* doc/ref/api-compound.texi: * doc/ref/api-control.texi: * doc/ref/api-data.texi: Fix typos and clarify.
2016-06-24Fix typo about `keywords' read optionAndy Wingo1-1/+1
* doc/ref/api-data.texi (Keyword Read Syntax): Fix typo. Thanks to Glenn Michaels for the report and fix.
2016-06-08Big ports documentation updateAndy Wingo1-2/+2
* 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.
2016-05-22Implement 'string-utf8-length' and 'scm_c_string_utf8_length'.Mark H Weaver1-1/+7
* libguile/strings.c (utf8_length, scm_c_string_utf8_length) (scm_string_utf8_length): New functions. * libguile/strings.h (scm_c_string_utf8_length, scm_string_utf8_length): New prototypes. * doc/ref/api-data.texi (Bytevectors as Strings): Add docs. * doc/ref/guile.texi: Update manual copyright date to 2015. * test-suite/tests/strings.test (string-utf8-length): Add tests.
2015-01-22Merge commit '5af307de43e4b65eec7f235b48a8908f2a00f134'Andy Wingo1-2/+6
Conflicts: test-suite/tests/reader.test
2014-10-01read: Accept "\(" in string literals.Mark H Weaver1-2/+6
Suggested by David Kastrup <dak@gnu.org> in <http://bugs.gnu.org/13644>. * libguile/read.c (scm_read_string_like_syntax): Accept "\(" as equivalent to "(". * doc/ref/api-data.texi (String Syntax): Document it. * test-suite/tests/reader.test ("reading"): Add test.
2014-09-29Add (ice-9 unicode) moduleAndy Wingo1-0/+18
* libguile/unicode.c: * libguile/unicode.h: * test-suite/tests/unicode.test: * module/ice-9/unicode.scm: New files. * module/Makefile.am: * libguile/Makefile.am: * test-suite/Makefile.am: * libguile/init.c: Wire new files into the build. * doc/ref/api-data.texi: Add docs.
2014-09-12Add (ice-9 unicode) moduleAndy Wingo1-0/+18
* libguile/unicode.c: * libguile/unicode.h: * test-suite/tests/unicode.test: * module/ice-9/unicode.scm: New files. * module/Makefile.am: * libguile/Makefile.am: * test-suite/Makefile.am: * libguile/init.c: Wire new files into the build. * doc/ref/api-data.texi: Add docs.
2014-04-25Merge branch 'stable-2.0'v2.1.0Mark H Weaver1-0/+12
Conflicts: GUILE-VERSION NEWS guile-readline/ice-9/readline.scm libguile/async.c libguile/backtrace.c libguile/deprecated.h libguile/gc-malloc.c libguile/gdbint.c libguile/init.c libguile/ioext.c libguile/mallocs.c libguile/print.c libguile/rw.c libguile/scmsigs.c libguile/script.c libguile/simpos.c libguile/snarf.h libguile/strports.c libguile/threads.c libguile/vm-i-scheme.c libguile/vm-i-system.c module/srfi/srfi-18.scm test-suite/Makefile.am test-suite/standalone/test-num2integral.c
2014-03-17Documentation tweaks for the 'r7rs-symbols' read/print options.Mark H Weaver1-0/+12
* doc/ref/api-data.texi (Symbol Read Syntax): Mention the 'r7rs-symbols' print option, and provide example code to enable both the read and print options. Add 'r7rs-symbols' to the concept index.
2014-03-16Doc and NEWS updatesAndy Wingo1-0/+4
* NEWS: Update section on dynamic stacks. Add link for intptr interfaces. * doc/ref/api-data.texi (Integers): Add intptr interfaces.
2014-01-14Merge branch 'stable-2.0'Mark H Weaver1-0/+10
Conflicts: libguile/print.c libguile/read.c test-suite/tests/print.test
2014-01-14read: Support R7RS |...| symbol notation.Mark H Weaver1-0/+10
* libguile/private-options.h (SCM_R7RS_SYMBOLS_P): New macro. (SCM_N_READ_OPTIONS): Increment. * libguile/read.c (scm_read_opts): Add entry for 'r7rs-symbols'. (t_read_opts): Add field for 'r7rs_symbols_p'. (scm_read_string_like_syntax): New function based on earlier 'scm_read_string' that handles either string literals or R7RS quoted symbols (delimited by vertical bars), depending on the value of 'chr'. (scm_read_string): Reimplement based on 'scm_read_string_like_syntax'. (scm_read_r7rs_symbol): New static function. * doc/ref/api-data.texi (Symbol Read Syntax): Briefly describe the R7RS symbol syntax, mention the 'r7rs-symbols' read option, and give some examples. * doc/ref/api-evaluation.texi (Scheme Read): Mention the 'r7rs-symbols' read option. * test-suite/tests/reader.test ("reading"): Add test.
2014-01-14Merge branch 'stable-2.0'Mark H Weaver1-3/+11
Conflicts: libguile/chars.c libguile/read.c test-suite/tests/reader.test
2014-01-14Recognize 'escape' character name, per R7RS.Mark H Weaver1-0/+3
* 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-14read: Accept "\|" in string literals.Mark H Weaver1-3/+7
* 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-14read: Support R7RS '#true' and '#false' syntax for booleans.Mark H Weaver1-0/+1
* 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-09Merge branch 'stable-2.0'Mark H Weaver1-4/+23
Conflicts: module/system/vm/traps.scm test-suite/tests/peval.test
2014-01-08Implement 'exact-integer?' and 'scm_is_exact_integer'.Mark H Weaver1-2/+21
* 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-08Fix doc that incorrectly claimed (integer? +inf.0) => #t.Mark H Weaver1-2/+2
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.
2013-04-14Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver1-14/+82
Conflicts: GUILE-VERSION libguile/array-map.c libguile/fports.h libguile/gc.h libguile/inline.h libguile/ports.c libguile/ports.h libguile/print.c libguile/r6rs-ports.c libguile/read.c test-suite/tests/00-socket.test
2013-04-06Fix the recommendations for conversion of C string constants.Mark H Weaver1-11/+13
* doc/ref/api-data.texi (Conversion to/from C, Symbol Primitives, Keyword Procedures): Fix the recommendations for conversion of C string constants. The encoding of the source code is irrelevant in modern compilers. What is relevant is the execution character set. Both GCC and clang use UTF-8 by default, so recommend the 'scm_from_utf8_*' functions when the argument is a C string constant. Also fix the broken texinfo markup for 'scm_from_*_symbol' that prevented them from being listed in the index.
2013-04-06Implement 'scm_c_bind_keyword_arguments'.Mark H Weaver1-0/+66
* libguile/keywords.c (scm_keyword_argument_error): New variable. (scm_c_bind_keyword_arguments): New API function. * libguile/keywords.h (enum scm_keyword_arguments_flags): New enum. (scm_t_keyword_arguments_flags): New typedef. (scm_c_bind_keyword_arguments): New prototype. * doc/ref/api-data.texi (Coding With Keywords, Keyword Procedures): Add documentation. * test-suite/standalone/test-scm-c-bind-keyword-arguments.c: New file. * test-suite/standalone/Makefile.am: Add test-scm-c-bind-keyword-arguments test.
2013-04-01Fix broken texinfo markup in (ice-9 iconv) docs.Mark H Weaver1-3/+3
* doc/ref/api-data.texi (Representing Strings as Bytes): Fix broken @deffn syntax.
2013-04-01Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver1-1/+1
Conflicts: libguile/r6rs-ports.c
2013-04-01Fix typos in 'string-join' docs: 'string-infix' -> 'strict-infix'.Mark H Weaver1-1/+1
* doc/ref/api-data.texi (String Constructors): In definition of 'string-join', change 'string-infix' -> 'strict-infix'. * libguile/srfi-13.c (scm_string_join): In docstring, change 'string-infix' -> 'strict-infix'.
2013-03-28Merge remote-tracking branch 'origin/stable-2.0'Mark H Weaver1-31/+49
Conflicts: configure.ac libguile/deprecated.c libguile/deprecated.h libguile/filesys.h libguile/fluids.c libguile/fports.c libguile/gc.c libguile/guile.c libguile/numbers.c libguile/objcodes.c libguile/r6rs-ports.c libguile/smob.c libguile/socket.c libguile/threads.h module/language/scheme/decompile-tree-il.scm module/language/tree-il/peval.scm test-suite/tests/syncase.test
2013-03-15fix doc buildAndy Wingo1-2/+2
* doc/ref/api-data.texi (Bitwise Operations): Don't use @-commands in @math. Fixes doc build. * doc/ref/api-macros.texi (Syntax Rules): Fix example result.