unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* eof-object? documentation
@ 2020-11-15 12:15 Zelphir Kaltstahl
  2020-11-15 12:16 ` Zelphir Kaltstahl
  0 siblings, 1 reply; 5+ messages in thread
From: Zelphir Kaltstahl @ 2020-11-15 12:15 UTC (permalink / raw)
  To: Guile User

Hello Guile users!

I noticed a mistake in the documentation at
https://www.gnu.org/software/guile/manual/html_node/Binary-I_002fO.html.

There it says:

"To use these routines, first include the binary I/O module:
(use-modules (ice-9 binary-ports))"

and then it lists `eof-object?`, which implies, that this procedure is
in the `(ice-9 binary-ports)` module.

However, it is available without importing that module and not
available, when only importing the module as follows:

~~~~
$ guile
GNU Guile 3.0.4
Copyright (C) 1995-2020 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (library (file-utils)
  (export)
  (import
    (except (rnrs base) let-values map error)
    (only (guile)
          lambda*
          λ
          call-with-input-file
          call-with-output-file
          set-port-encoding!
          ;; this is documented to be in (ice-9 binary-ports) but it is not
          #;eof-object?)
    ;; for textual reading and writing procedures
    (ice-9 textual-ports)
    ;; not sure if needed
    (ice-9 binary-ports)
    ;; for `eof-object?`
    (ice-9 rdelim)
    ;; srfi-1 for list procedures
    (srfi srfi-1)))
scheme@(file-utils)> eof-object 
Display all 338 possibilities? (y or n)
scheme@(file-utils)> eof-object?
;;; <unknown-location>: warning: possibly unbound variable `eof-object?'
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Unbound variable: eof-object?

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(file-utils) [1]> 
~~~~

However, the procedure `eof-object` (no trailing question mark) is
available:

~~~~
$ guile
GNU Guile 3.0.4
Copyright (C) 1995-2020 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (library (file-utils)
  (export)
  (import
    (except (rnrs base) let-values map error)
    (only (guile)
          lambda*
          λ
          call-with-input-file
          call-with-output-file
          set-port-encoding!
          ;; this is documented to be in (ice-9 binary-ports) but it is not
          #;eof-object?)
    ;; for textual reading and writing procedures
    (ice-9 textual-ports)
    ;; not sure if needed
    (ice-9 binary-ports)
    ;; for `eof-object?`
    (ice-9 rdelim)
    ;; srfi-1 for list procedures
    (srfi srfi-1)))
scheme@(file-utils)> eof-object 
$1 = #<procedure eof-object ()>
scheme@(file-utils)> 
~~~~

which is not available when not doing the imports like that and simply
calling guile and trying to access it:

~~~~
$ guile
GNU Guile 3.0.4
Copyright (C) 1995-2020 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> eof-object
;;; <unknown-location>: warning: possibly unbound variable `eof-object'
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Unbound variable: eof-object

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>
~~~~

If you could point me to where and how to update the docs, I could
probably take away that `?`. Not sure what is involved in the process of
fixing the docs.

Regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-22 22:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-15 12:15 eof-object? documentation Zelphir Kaltstahl
2020-11-15 12:16 ` Zelphir Kaltstahl
2020-11-21  8:52   ` randomlooser
2020-11-22 18:57     ` Zelphir Kaltstahl
2020-11-22 22:36       ` Adriano Peluso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).