summaryrefslogtreecommitdiff
path: root/doc/ref
AgeCommit message (Collapse)AuthorFilesLines
2021-09-20doc: Fix wrong @uref argument order.Ludovic Courtès1-2/+2
* doc/ref/sxml.texi (SXML): Fix @uref argument order.
2021-09-14Fix typo in srfi-69 docDaniel Llorens1-1/+1
2021-08-17Extend bytevector-fill! to handle a partial fillDaniel Llorens1-4/+14
* libguile/bytevectors.c (bytevector-fill!): As stated. (scm_bytevector_fill_x): Stub to avoid changing the C API. * doc/ref/api-data.texi: Documentation. * libguile/vectors.c (vector-fill!): Less confusing variable names. * test-suite/tests/bytevectors.test: Test partial fill cases for bytevector-fill!.
2021-08-16Remove the 'simple vector' conceptDaniel Llorens2-47/+40
* 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'.
2021-08-06Add function vector-copy! to coreDaniel Llorens1-5/+31
This is up to 20%-30% faster than the previous versions in (scheme base) or (srfi srfi-43) that used vector-move-left!/vector-move-right!. * libguile/vectors.h: * libguile/vectors.c: As stated. * doc/ref/api-data.texi (vector-copy!): Document the new function. (vector-fill!): Document optional arguments. (vector-copy): Document optional arguments. * module/scheme/base.scm: Reuse core vector-copy!. * module/srfi/srfi-43.scm: Reuse core vector-copy!.
2021-08-06Extend core vector-copy to r7rs vector-copyDaniel Llorens1-0/+1
* libguile/vectors.h: Declare scm_vector_copy_partial. * libguile/vectors.c (scm_vector_copy_partial): As stated. (scm_vector_copy): Reuse scm_vector_copy_partial. * module/scheme/base.scm: Reuse core vector-copy. * module/srfi/srfi-43: Reuse core vector-copy. * test-suite/tests/vectors.test: Test vector-copy.
2021-05-21Fix typo in lambda documentation.Luis Felipe1-2/+2
In the part about lambda formals, change "arguments will converted into" to "arguments will BE converted into". * doc/ref/api-procedures.texi (Lambda: Basic Procedure Creation): Fix typo.
2021-04-26Allow users to force gmp to use libgcAndy Wingo1-0/+13
* doc/ref/guile-invoke.texi (Environment Variables): Document GUILE_INSTALL_GMP_MEMORY_FUNCTIONS. * libguile/numbers.c (scm_init_numbers): Use environment variable.
2020-10-05Document write-line.Jan (janneke) Nieuwenhuizen1-0/+11
* libguile/rdelim.c (SCM_DEFINE): Use "procedure" rather than "function". * doc/ref/api-io.texi (Line/Delimited): Use it to document 'write-line'.
2021-03-13On Cygwin, 'lib' DLLs use 'cyg' prefixMike Gran1-0/+6
When using automake and libtool to build DLLs on Cygwin, libtool will rename libXXX to cygXXX. 'load-foreign-library' should emulate libltdl behavior and search for DLLs using that convention. * module/system/foreign-library.scm (lib->cyg): new helper function (load-foreign-library): add rename-on-cygwin? option to rename libraries using Cygwin semantics * test-suite/tests/foreign.test: new test section 'lib->cyg' * doc/ref/api-foreign.text: document new rename-on-cygwin? option for load-foreign-library
2021-03-12Revert "Handle CRLF and Unicode line endings in read-line"Andy Wingo1-7/+3
This reverts commit 0f983e3db0c43ad7c89f57ea84f792ede373ba0c. After discussing with Mike we are going to punt the read-line changes for now. Open the port in O_TEXT mode if you want to chomp the CR in CFLF sequences.
2021-03-11Handle CRLF and Unicode line endings in read-lineMike Gran1-3/+7
* libguile/rdelim.c (scm_read_line): handle CRLF, LS and PS * module/ice-9/suspendable-ports.scm (read-line): handle CRLF, LS, and PS * module/web/http.scm (read-header-line): take advantage of CRLF in read-line (read-header): don't need to test for \return * test-suite/tests/rdelim.test: new tests for read-line CRLF, LS and PS * doc/ref/api-io.texi: update doc for read-line
2021-03-10Add mkstemp; undocument mkstemp!Andy Wingo1-11/+14
* doc/ref/posix.texi (File System): Update to document mkstemp only. * libguile/filesys.c: Make a mkstemp that doesn't modify the input template. Instead the caller has to get the file name from port-filename. (scm_mkstemp): Use the new mkstemp to implement mkstemp!. Can't deprecate yet though as the replacement hasn't been there for long enough. * libguile/posix.c (scm_tempnam): Update to mention mkstemp instead. * module/system/base/compile.scm (call-with-output-file/atomic): Use mkstemp. * test-suite/tests/posix.test: * test-suite/tests/r6rs-files.test: Use mkstemp. * NEWS: Update.
2021-03-09Document syntax-sourcevAndy Wingo1-0/+7
* NEWS: Add doc link. * doc/ref/api-macros.texi (Syntax Transformer Helpers): Document syntax-sourcev. * module/system/syntax.scm: Re-export syntax-sourcev.
2021-03-09Document quote-syntaxAndy Wingo1-0/+18
* NEWS: Update. * doc/ref/api-macros.texi (Syntax Case): Update.
2021-03-05Fix up source properties section in manualAndy Wingo1-6/+6
* doc/ref/api-debug.texi (Source Properties): Fix wordo, and adapt text.
2021-03-04Update reference for GUILE_EXTENSIONS_PATHAndy Wingo1-1/+9
* NEWS: Update. * doc/ref/guile-invoke.texi (Environment Variables): Add entry.
2021-03-04Update documentation to incorporate read-syntaxAndy Wingo3-35/+84
* NEWS: Update a bit. * doc/ref/api-debug.texi (Source Properties): Mention read-syntax. * doc/ref/api-evaluation.texi (Annotated Scheme Read): New section. * doc/ref/api-macros.texi (Syntax Case): Update for source vectors.
2021-02-21Implement read-syntaxAndy Wingo1-5/+5
* doc/ref/api-macros.texi (Syntax Case): Update documentation for datum->syntax. * module/ice-9/psyntax.scm (datum->syntax): Use #:source keyword for source location info instead of an optional, and allow an alist. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/read.scm (%read, read): Refactor to allow read and read-syntax to share an implementation. (read-syntax): New function.
2021-02-21Document datum->syntax extensionsAndy Wingo1-4/+14
* doc/ref/api-macros.texi (Syntax Case): Document that template-id can be false, and document srcloc. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/psyntax.scm (syntax?): Allow the lexical context to be null. Allow srcloc to be a source properties alist. Inspired by Racket.
2021-02-03Replace libltdl with raw dlopen, dlsymAndy Wingo4-530/+446
* NEWS: Update. * am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Add system/foreign-library.scm. * configure.ac: Replace ltdl check with -ldl check. * libguile/dynl.c: Rewrite to just expose core dlopen / dlsym / etc to a helper Scheme module. (scm_dynamic_link, scm_dynamic_pointer, scm_dynamic_function) (scm_dynamic_object_p, scm_dynamic_call): Rewrite in terms of (system foreign-library). * libguile/extensions.c (load_extension): Avoid scm_dynamic_call. * module/system/foreign-library.scm: New file. * module/oop/goops.scm (<dynamic-object>): Hackily export <foreign-library> instead of a class here. * doc/ref/api-foreign.texi (Foreign Function Interface): Rewrite to only document the new interfaces. Eventually we will deprecate dynamic-link and friends. * doc/ref/guile.texi (API Reference): Move Foreign Objects after Foreign Function Interface. Seems there should be some closer relationship but this will do for now. * doc/ref/tour.texi (Putting Extensions into Modules): * doc/ref/libguile-parallel.texi (Parallel Installations): Update for rename of Modules and Extensions to Foreign Extensions. * libguile/deprecated.h: * libguile/deprecated.c (scm_dynamic_unlink): Deprecate. * libguile/guile.c: Remove ltdl include. * test-suite/tests/foreign.test: Update tests to use new API, and update error expectations.
2021-01-21Replace mutating mkdtemp! with non-mutating mkdtempMichael Gran1-8/+8
* doc/ref/posix.texi: replace mkdtemp! and scm_mkdtemp_x documentation with documentation for mkdtemp and scm_mkdtemp * libguile/filesys.c (scm_mkdtemp_x): procedure mkdtemp! removed (scm_mkdtemp): new procedure mkdtemp * libguile/filesys.h: Remove declaration for scm_mkdtemp_x. New declaration scm_mkdtemp. * test-suite/tests/filesys.test: Remove mkdtemp! tests. Add tests for mkdtemp.
2021-01-19New procedure mkdtemp! to create unique temporary directoryMichael Gran1-1/+20
* configure.ac (AC_CHECK_FUNCS): add mkdtemp! test * doc/ref/posix.texi: document mkdtemp! * libguile/filesys.c (scm_mkdtemp_x): new function * libguile/filesys.h: new declaration for scm_mkdtemp_x * test-suite/tests/filesys.test: add tests for mkdtemp! Adapted from a patch by Rob Browning.
2021-01-17Fix "display" typo in make-thread and begin-thread docsRob Browning1-2/+2
* doc/ref/api-scheduling.texi (make-thread, begin-thread): fix "display" typo.
2021-01-12Document new interfacesAndy Wingo1-0/+13
* NEWS: Update. * doc/ref/api-io.texi (Bytevector Ports): Add docs.
2021-01-12Document call-with-portAndy Wingo2-7/+8
* doc/ref/api-io.texi (Ports): Add docs. * doc/ref/r6rs.texi (rnrs io ports): Remove docs.
2021-01-07New warnings: -Wuse-before-definition, -Wnon-idempotent-definitionAndy Wingo1-8/+4
* module/ice-9/boot-9.scm (%auto-compilation-options): Add use-before-definition and non-idempotent-definition. * module/language/tree-il/analyze.scm (<use-before-def-info>): New analysis info. (make-use-before-definition-analysis): New function. (goops-toplevel-definition): Move down. (unbound-variable-analysis, macro-use-before-definition): Remove, as they are subsumed by use-before-def. There are some deprecated bindings though. (make-analyzer): Rework to allow for use-before-def analysis to handle multiple * module/system/base/message.scm (%warning-types): Add handlers for the new warning types. * test-suite/tests/tree-il.test: Add tests. * doc/ref/api-evaluation.texi (Compilation): Update.
2020-09-10Move copy-tree to (ice-9 copy-tree); deprecate main bindingAndy Wingo2-7/+11
* doc/ref/api-data.texi (List Constructors): * doc/ref/api-utility.texi (Copying): Update docs to mention module. * libguile.h: Remove trees.h inclusion. * libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): (DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Remove trees.c, trees.h, and related files. * libguile/init.c (scm_i_init_guile): Remove trees.h and the scm_init_trees call. * libguile/trees.c: * libguile/trees.h: Remove. * module/Makefile.am (SOURCES): Add ice-9/copy-tree.scm. * module/ice-9/copy-tree.scm: New file. * module/ice-9/deprecated.scm (copy-tree*): Export as copy-tree, proxying to (ice-9 copy-tree). * module/system/repl/common.scm: * module/web/client.scm: * test-suite/tests/elisp.test: * test-suite/tests/srfi-1.test: * module/oop/goops/save.scm: Use (ice-9 copy-tree). * test-suite/Makefile.am (SCM_TESTS): Add copy-tree.test. * test-suite/tests/copy-tree.test: New file; test pulled from eval.test. * libguile/deprecated.h: * libguile/deprecated.c (scm_copy_tree): Deprecate.
2020-09-05Update NEWSAndy Wingo1-1/+0
* NEWS: Update. * doc/ref/api-evaluation.texi (Scheme Read): Remove copy option.
2020-08-12Add $switch CPS term kindAndy Wingo1-2/+16
* module/language/cps.scm ($switch): New term. * doc/ref/compiler.texi (CPS in Guile): Add documentation. * module/language/cps.scm (build-term, parse-cps, unparse-cps) * module/language/cps/closure-conversion.scm (compute-non-operator-uses) (compute-singly-referenced-labels, rewrite-shared-closure-calls) (compute-free-vars, convert-one) * module/language/cps/compile-bytecode.scm (compile-function) * module/language/cps/contification.scm (compute-singly-referenced-labels) (compute-contification-candidates, apply-contification) * module/language/cps/cse.scm (compute-truthy-expressions) (forward-cont, term-successors, eliminate-common-subexpressions-in-fun) * module/language/cps/dce.scm (compute-known-allocations) (compute-live-code, process-eliminations) * module/language/cps/devirtualize-integers.scm (compute-use-counts) (peel-trace) * module/language/cps/effects-analysis.scm (compute-effects) * module/language/cps/licm.scm (hoist-one, hoist-in-loop) * module/language/cps/loop-instrumentation.scm (compute-loop-headers) * module/language/cps/peel-loops.scm (rename-cont) * module/language/cps/renumber.scm (sort-labels-locally, renumber) * module/language/cps/rotate-loops.scm (rotate-loop) (rotate-loops-in-function) * module/language/cps/self-references.scm (resolve-self-references) * module/language/cps/simplify.scm (compute-singly-referenced-vars) (eta-reduce, compute-singly-referenced-labels, beta-reduce) * module/language/cps/slot-allocation.scm (compute-defs-and-uses) (add-prompt-control-flow-edges, compute-var-representations) * module/language/cps/specialize-numbers.scm (compute-significant-bits) * module/language/cps/split-rec.scm (compute-free-vars) * module/language/cps/type-fold.scm (local-type-fold) * module/language/cps/types.scm (successor-count, infer-types) * module/language/cps/utils.scm (compute-function-body) (compute-successors, compute-predecessors) * module/language/cps/verify.scm (compute-available-definitions) (check-valid-var-uses, check-arities): Add support for new term.
2020-08-03Add eq-immediate? instructionAndy Wingo1-0/+6
* libguile/jit.c (compile_eq_immediate, compile_eq_immediate_slow): Add JIT compiler. * libguile/vm-engine.c (eq_immediate): New instruction. * doc/ref/vm.texi (Comparison Instructions): Document. * module/system/vm/assembler.scm (encode-X8_S8_ZI16!/shuffle): New shuffler. * module/system/vm/disassembler.scm (code-annotation): Add eq-immediate? case.
2020-07-30Add sign-extending make-immediate instructionAndy Wingo1-2/+8
* doc/ref/vm.texi (Instruction Set, Constant Instructions): Document new instruction. * libguile/instructions.c (FOR_EACH_INSTRUCTION_WORD_TYPE): New first word kind with zi16 operand. * libguile/jit.c (compile_make_immediate, compile_make_immediate_slow): New compilers. (COMPILE_X8_S8_ZI16): New operand kind. * libguile/vm-engine.c (make-immediate): New instruction. * module/language/bytecode.scm: * module/system/vm/assembler.scm (encode-X8_S8_ZI16<-/shuffle): (signed-bits, load-constant): Support the new instruction kind. * module/system/vm/disassembler.scm (disassemblers) (sign-extended-immediate, code-annotation): Support for zi16 operands.
2020-07-23Add jtable instructionAndy Wingo1-1/+17
* doc/ref/vm.texi (Instruction Set): Document new v32-x8-l24 instruction kind. (Branch Instructions): Document jtable. * libguile/instructions.c (FOR_EACH_INSTRUCTION_WORD_TYPE): Add V32_X8_L24. * libguile/jit.c (compile_jtable, compile_jtable_slow): (COMPILE_X8_S24__V32_X8_L24, analyze): Add stub JIT compiler implementation. * libguile/vm-engine.c (jtable): New instruction. * module/language/bytecode.scm (instruction-arity): Deprecate. * module/system/vm/assembler.scm (encoder, assembler): Add V32_X8_L24 case. * module/system/vm/disassembler.scm (u32-ref, s32-ref): Move definitions to expansion-time only. (define-op-handlers): New definition, replacing visit-opcodes. (disassemblers, jump-parsers, stack-effect-parsers, clobber-parsers): Rework in terms of define-op-handlers. Default case becomes #f, and add support for jtable. (disassemble-one, instruction-relative-jump-targets) (instruction-stack-size-after, instruction-slot-clobbers): Inline default case in the lookup procedure, not copied in the handler vector. (compute-labels): Add jtable case. (instruction-lengths-vector, instruction-length): Rework to allow variable-length instructions, and mark jtable as being variable-length. (instruction-has-fallthrough?): Add jtable to the no-fallthrough set.
2020-06-18doc: Mention (ice-9 time) module path.Arun Isaac1-0/+3
* doc/ref/scheme-using.texi (Profile Commands): Mention (ice-9 time) module path. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-18doc: Document default delimiter of string-join.Arun Isaac1-3/+4
* doc/ref/api-data.texi (String Constructors): Document default delimiter of the string-join function. * libguile/srfi-13.c (scm_string_join): Adjust docstring accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-18doc: Improve content-range HTTP header documentation.Arun Isaac1-5/+5
* doc/ref/web.texi (HTTP Headers): Improve punctuation in content-range HTTP header documentation. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-18doc: Fix minor typo in the HTTP headers documentation.Arun Isaac1-1/+1
* doc/ref/web.texi (HTTP Headers): Fix minor typo. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-18doc: Add missing canonicalize-path documentation.Ricardo G. Herdt1-0/+15
The documentation is copied over from libguile/filesys.c. I just added "(absolute)" to the text to help users finding it, since this term is more common in other languages. * doc/ref/posix.texi (File System): Document it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-06-17srfi-1: Rewrite 'find' in Scheme.Ludovic Courtès1-2/+2
This halves the wall-clock time of: guile -c '(use-modules (srfi srfi-1)) (define lst (make-list 100000000 1)) (find zero? lst)' and yields an 18% speedup on: guile -c '(use-modules (srfi srfi-1)) (define lst (make-list 100000000 1)) (find (lambda (x) (= 2 x)) lst)' * libguile/srfi-1.c (scm_srfi1_find): Remove. * libguile/srfi-1.h (scm_srfi1_find): Likewise. * module/srfi/srfi-1.scm (find): New procedure. * doc/ref/srfi-modules.texi (SRFI-1 Searching): Adjust docstring.
2020-06-15doc: Remove copy/pasted sentence.Ludovic Courtès1-1/+1
* doc/ref/api-io.texi (I/O Extensions): Remove sentence pasted from 'read' when explaining 'write' method.
2020-05-27doc: Fix a few typos in vm section.Eric Bavier1-3/+3
* doc/ref/vm.texi: Fix some grammar and typos. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-05-27doc: Fix typos in the manual.Jan Synacek3-4/+4
* doc/ref/api-control.texi: * doc/ref/r6rs.texi: * doc/ref/sxml.texi: Fix typos. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-05-27doc: Rephrase documentation of 'thunk?'.Ludovic Courtès1-2/+2
Fixes <https://bugs.gnu.org/41353>. Reported by Jan Synacek <jsynacek@redhat.com>. * doc/ref/api-procedures.texi (Procedure Properties): Rephrase documentation of 'thunk?'. * libguile/procs.c (scm_thunk_p): Likewise.
2020-05-27doc: Reword unclear sentence about programs.Ludovic Courtès1-3/+5
Fixes <https://bugs.gnu.org/41352>. Reported by Jan Synacek <jsynacek@redhat.com>. * doc/ref/api-procedures.texi (Compiled Procedures): Clarify wording.
2020-05-27doc: Add reference to Guile Hall in the manual.Alex Sassmannshausen2-0/+27
* doc/ref/scheme-using.texi (Distributing Guile Code): New node. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2020-05-22doc: '@' is not equivalent to autoloading.Ludovic Courtès1-4/+0
* doc/ref/api-modules.texi (Creating Guile Modules): Remove paragraph about '@' as an alternative to #:autoload.
2020-05-22doc: #:autoload does not pull in all the module bindings.Ludovic Courtès1-3/+5
Reported by Jan Nieuwenhuizen <janneke@gnu.org>. This is a followup to cb14fd214365e50b6b1655616ae74d0228933bbd. * doc/ref/api-modules.texi (Creating Guile Modules): Remove bit that says all the bindings of an autoloaded module become available.
2020-05-18doc: Fix documentation for srfi-171.Linus Björnstam1-2/+2
* doc/ref/srfi-modules.texi (SRFI-171): Fix broken documentation. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-05-16doc: Tweak 'pipeline' documentation.Ludovic Courtès1-12/+9
* doc/ref/posix.texi (Pipes): Adjust markup. Simplify example.
2020-05-16popen: Add 'pipeline' procedure.Rutger van Beusekom1-0/+28
* libguile/posix.c (scm_open_process): Remove. (scm_piped_process): Add to replace open_process. * module/ice-9/popen.scm (pipe->fdes): Add to convert pipe pair to fdes pair. (open-process): Add open-process for backwards compatibility. (pipeline): Add to implement a pipeline using piped-process. * doc/ref/posix.texi (Pipes): Document it. * test-suite/tests/popen.test ("open-process") ("piped-process", "piped-process: with output") ("pipeline"): New tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>