unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* ice-9 r4rs
@ 2008-03-19  1:48 Sebastian Tennant
  2008-03-19 12:44 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Tennant @ 2008-03-19  1:48 UTC (permalink / raw)
  To: guile-user

Hi,

(info "(guile-1.8)File Ports")

   -- Scheme Procedure: open-input-file filename
       Open FILENAME for input.  Equivalent to
            (open-file FILENAME "r")

   -- Scheme Procedure: open-output-file filename
       Open FILENAME for output.  Equivalent to
            (open-file FILENAME "w")

These procs are found in ice-9 r4rs.  The docs make no mention of this
fact.

Having found the procs, you'd expect

  (use-modules (ice-9 r4rs))

to work but it's broken.  r4rs.scm doesn't even contain a call to
define-module.

Although:

 load-from-path "ice-9/r4rs"

doesn't throw an error open-input-file and open-output-file are still
not bound.

Sebastian





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

* Re: ice-9 r4rs
  2008-03-19  1:48 ice-9 r4rs Sebastian Tennant
@ 2008-03-19 12:44 ` Ludovic Courtès
  2008-03-19 13:05   ` Sebastian Tennant
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2008-03-19 12:44 UTC (permalink / raw)
  To: guile-user

Hi,

Sebastian Tennant <sebyte@smolny.plus.com> writes:

> (info "(guile-1.8)File Ports")
>
>    -- Scheme Procedure: open-input-file filename
>        Open FILENAME for input.  Equivalent to
>             (open-file FILENAME "r")
>
>    -- Scheme Procedure: open-output-file filename
>        Open FILENAME for output.  Equivalent to
>             (open-file FILENAME "w")
>
> These procs are found in ice-9 r4rs.  The docs make no mention of this
> fact.

With Guile 1.8:

  $ guile
  guile> (help open-input-file)
  `open-input-file' is a procedure in the (guile) module.

  Takes a string naming an existing file and returns an input port
  capable of delivering characters from the file.  If the file
  cannot be opened, an error is signalled.
  guile> (help open-output-file)
  `open-output-file' is a procedure in the (guile) module.

  Takes a string naming an output file to be created and returns an
  output port capable of writing characters to a new file by that
  name.  If the file cannot be opened, an error is signalled.  If a
  file with the given name already exists, the effect is unspecified.
  guile> (procedure? open-input-file)
  #t
  guile> (procedure? open-output-file)
  #t

Both procedures are bound by default.

Which version of Guile are you using?

Thanks,
Ludovic.





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

* Re: ice-9 r4rs
  2008-03-19 12:44 ` Ludovic Courtès
@ 2008-03-19 13:05   ` Sebastian Tennant
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Tennant @ 2008-03-19 13:05 UTC (permalink / raw)
  To: guile-user

Quoth ludo@gnu.org (Ludovic Courtès):
> Both procedures are bound by default.

Hmm... so they are.  Last night must have been their night off... or
mine perhaps :-)

Seb





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

end of thread, other threads:[~2008-03-19 13:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19  1:48 ice-9 r4rs Sebastian Tennant
2008-03-19 12:44 ` Ludovic Courtès
2008-03-19 13:05   ` Sebastian Tennant

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).