GNU bug report logs - #49363
eof-object? is not exported from (ice-9 binary-ports)

Previous Next

Package: guile;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Sat, 3 Jul 2021 20:31:01 UTC

Severity: normal

To reply to this bug, email your comments to 49363 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#49363; Package guile. (Sat, 03 Jul 2021 20:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxime Devos <maximedevos <at> telenet.be>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sat, 03 Jul 2021 20:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: bug-guile <at> gnu.org
Subject: eof-object? is not exported from (ice-9 binary-ports)
Date: Sat, 03 Jul 2021 22:24:10 +0200
[Message part 1 (text/plain, inline)]
According to the manual:

6.12.2 Binary I/O
-----------------

[...]
   To use these routines, first include the binary I/O module:

     (use-modules (ice-9 binary-ports))

[...]
   The end-of-file object is unlike any other kind of object: it’s not a
pair, a symbol, or anything else.  To check if a value is the
end-of-file object, use the ‘eof-object?’ predicate.

 -- Scheme Procedure: eof-object? x
 -- C Function: scm_eof_object_p (x)
     Return ‘#t’ if X is an end-of-file object, or ‘#f’ otherwise.

However, eof-object? is not exported by (ice-9 binary-ports):

scheme@(guile-user)> (@ (ice-9 binary-ports) eof-object?)
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Unbound variable: eof-object?

But it is imported from (ice-9 ports):

scheme@(guile-user) [1]> (@ (ice-9 ports) eof-object?)
$1 = #<procedure eof-object? (_)>

Could an appropriate export be added to (ice-9 binary-ports)?
Or the manual adjusted to note you need to import (ice-9 ports)
to get eof-object?

Greetings,
Maxime
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guile <at> gnu.org:
bug#49363; Package guile. (Sun, 04 Jul 2021 05:55:01 GMT) Full text and rfc822 format available.

Message #8 received at 49363 <at> debbugs.gnu.org (full text, mbox):

From: Linus Björnstam <linus.bjornstam <at> veryfast.biz>
To: "Maxime Devos" <maximedevos <at> telenet.be>, 49363 <at> debbugs.gnu.org
Subject: Re: bug#49363: eof-object? is not exported from (ice-9 binary-ports)
Date: Sun, 04 Jul 2021 07:54:25 +0200
Isn't eof-object? available in the default environment?

-- 
  Linus Björnstam

On Sat, 3 Jul 2021, at 22:24, Maxime Devos wrote:
> According to the manual:
> 
> 6.12.2 Binary I/O
> -----------------
> 
> [...]
>    To use these routines, first include the binary I/O module:
> 
>      (use-modules (ice-9 binary-ports))
> 
> [...]
>    The end-of-file object is unlike any other kind of object: it’s not a
> pair, a symbol, or anything else.  To check if a value is the
> end-of-file object, use the ‘eof-object?’ predicate.
> 
>  -- Scheme Procedure: eof-object? x
>  -- C Function: scm_eof_object_p (x)
>      Return ‘#t’ if X is an end-of-file object, or ‘#f’ otherwise.
> 
> However, eof-object? is not exported by (ice-9 binary-ports):
> 
> scheme@(guile-user)> (@ (ice-9 binary-ports) eof-object?)
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Unbound variable: eof-object?
> 
> But it is imported from (ice-9 ports):
> 
> scheme@(guile-user) [1]> (@ (ice-9 ports) eof-object?)
> $1 = #<procedure eof-object? (_)>
> 
> Could an appropriate export be added to (ice-9 binary-ports)?
> Or the manual adjusted to note you need to import (ice-9 ports)
> to get eof-object?
> 
> Greetings,
> Maxime
> 
> Attachments:
> * signature.asc




Information forwarded to bug-guile <at> gnu.org:
bug#49363; Package guile. (Sun, 04 Jul 2021 11:49:01 GMT) Full text and rfc822 format available.

Message #11 received at 49363 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Linus Björnstam <linus.bjornstam <at> veryfast.biz>, 
 49363 <at> debbugs.gnu.org
Subject: Re: bug#49363: eof-object? is not exported from (ice-9 binary-ports)
Date: Sun, 04 Jul 2021 13:48:42 +0200
[Message part 1 (text/plain, inline)]
Linus Björnstam schreef op zo 04-07-2021 om 07:54 [+0200]:
> Isn't eof-object? available in the default environment?

Yes, but I use (define-library ...) and (library ...) forms
instead of (define-module (...) ...) forms.  When using
define-library or library, the ‘default’ environment is ignored.

I suppose I should import 'eof-object?' from (rnrs io ports)
as I am using RnRS library forms.  Still, this seems a bug in
(ice-9 binary-ports) or the documentation and easy to fix. 

Greetings,
Maxime. 
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.