From: Andreas Rottmann <a.rottmann@gmx.at>
To: Guile Development <guile-devel@gnu.org>
Subject: [PATCH 1/4] Turn `(rnrs io ports)' into an R6RS library
Date: Sun, 21 Nov 2010 23:17:51 +0100 [thread overview]
Message-ID: <1290377874-13808-1-git-send-email-a.rottmann@gmx.at> (raw)
In-Reply-To: <87d3pyz5yo.fsf@delenn.lan>
* module/rnrs/io/ports.scm: Change into an R6RS library from a "regular"
Guile module, so the bookkeeping for #:re-export and #:replace is done
automatically and we gain control over the imports from `(guile)'.
---
module/rnrs/io/ports.scm | 58 +++++++++++++++++++++++----------------------
1 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/module/rnrs/io/ports.scm b/module/rnrs/io/ports.scm
index 04dabe6..2246049 100644
--- a/module/rnrs/io/ports.scm
+++ b/module/rnrs/io/ports.scm
@@ -26,34 +26,34 @@
;;;
;;; Code:
-(define-module (rnrs io ports)
- #:version (6)
- #:re-export (eof-object? port? input-port? output-port?)
- #:export (eof-object
-
- ;; input & output ports
- port-transcoder binary-port? transcoded-port
- port-position set-port-position!
- port-has-port-position? port-has-set-port-position!?
- call-with-port
-
- ;; input ports
- open-bytevector-input-port
- open-string-input-port
- make-custom-binary-input-port
-
- ;; binary input
- get-u8 lookahead-u8
- get-bytevector-n get-bytevector-n!
- get-bytevector-some get-bytevector-all
-
- ;; output ports
- open-bytevector-output-port
- open-string-output-port
- make-custom-binary-output-port
-
- ;; binary output
- put-u8 put-bytevector))
+(library (rnrs io ports (6))
+ (export eof-object eof-object?
+
+ ;; input & output ports
+ port? input-port? output-port?
+ port-transcoder binary-port? transcoded-port
+ port-position set-port-position!
+ port-has-port-position? port-has-set-port-position!?
+ call-with-port
+
+ ;; input ports
+ open-bytevector-input-port
+ open-string-input-port
+ make-custom-binary-input-port
+
+ ;; binary input
+ get-u8 lookahead-u8
+ get-bytevector-n get-bytevector-n!
+ get-bytevector-some get-bytevector-all
+
+ ;; output ports
+ open-bytevector-output-port
+ open-string-output-port
+ make-custom-binary-output-port
+
+ ;; binary output
+ put-u8 put-bytevector)
+ (import (guile))
(load-extension (string-append "libguile-" (effective-version))
"scm_init_r6rs_ports")
@@ -121,4 +121,6 @@ as a string, and a thunk to retrieve the characters associated with that port."
(values port
(lambda () (get-output-string port)))))
+)
+
;;; ports.scm ends here
--
1.7.2.3
next prev parent reply other threads:[~2010-11-21 22:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-15 21:45 Some work on the R6RS I/O libraries Andreas Rottmann
2010-11-19 23:59 ` Ludovic Courtès
2010-11-20 17:40 ` [PATCH 1/4] Fix missing port-table locking and bytevector output port segfault Andreas Rottmann
2010-11-20 22:43 ` Ludovic Courtès
2010-11-20 17:40 ` [PATCH 2/4] Add implementation of "transcoded ports" Andreas Rottmann
2010-11-20 22:52 ` Ludovic Courtès
2010-11-21 22:07 ` Andreas Rottmann
2010-11-21 22:17 ` Andreas Rottmann [this message]
2010-11-21 22:17 ` [PATCH 2/4] Reorganize the R6RS I/O condition types Andreas Rottmann
2010-11-21 22:17 ` [PATCH 3/4] Work towards a more complete implementation of `(rnrs io ports)' Andreas Rottmann
2010-11-23 21:13 ` Ludovic Courtès
2010-11-23 23:44 ` Andreas Rottmann
2010-11-24 20:24 ` Ludovic Courtès
2010-11-21 22:17 ` [PATCH 4/4] Add implementation of "transcoded ports" Andreas Rottmann
2010-11-24 22:29 ` Ludovic Courtès
2010-11-25 0:08 ` Andreas Rottmann
2010-11-25 21:15 ` Ludovic Courtès
2010-11-20 17:40 ` [PATCH 3/4] Reorganize the R6RS I/O condition types Andreas Rottmann
2010-11-20 17:40 ` [PATCH 4/4] Work towards a more complete implementation of `(rnrs io ports)' Andreas Rottmann
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=1290377874-13808-1-git-send-email-a.rottmann@gmx.at \
--to=a.rottmann@gmx.at \
--cc=guile-devel@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).