unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Zelphir Kaltstahl <zelphirkaltstahl@posteo.de>
To: Guile User <guile-user@gnu.org>
Subject: Re: eof-object? documentation
Date: Sun, 15 Nov 2020 13:16:27 +0100	[thread overview]
Message-ID: <c57ba2df-0def-a12a-a5ff-3593647fc4c4@posteo.de> (raw)
In-Reply-To: <7055fbb7-35ee-1748-4846-2db529341aea@posteo.de>

Nevermind … One line below the definition in the docs it says:

"Note that unlike other procedures in this module, eof-object? is
defined in the default environment. "

But why would it be listed there then?

On 11/15/20 1:15 PM, Zelphir Kaltstahl wrote:
> 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




  reply	other threads:[~2020-11-15 12:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 12:15 eof-object? documentation Zelphir Kaltstahl
2020-11-15 12:16 ` Zelphir Kaltstahl [this message]
2020-11-21  8:52   ` randomlooser
2020-11-22 18:57     ` Zelphir Kaltstahl
2020-11-22 22:36       ` Adriano Peluso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c57ba2df-0def-a12a-a5ff-3593647fc4c4@posteo.de \
    --to=zelphirkaltstahl@posteo.de \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).