[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/04: base64: Do not use (rnrs).

From: guix-commits
Subject: 02/04: base64: Do not use (rnrs).
Date: Sat, 14 Dec 2019 18:34:53 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 5f9cd63eb0d803966ce645c9d1db3438370e5505
Author: Ludovic Courtès <address@hidden>
Date:   Sun Dec 15 00:11:30 2019 +0100

    base64: Do not use (rnrs).
    * guix/base64.scm: Remove #:use-module clauses for (rnrs) and (srfi
    srfi-13).  Add other #:use-module clauses.
    (fxbit-field): Define as an alias for 'bit-field.
    (fx=?, fx+, mod): New aliases.
    (assert): New macro.
 guix/base64.scm | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/guix/base64.scm b/guix/base64.scm
index 0fa501e..c4fdd9c 100644
--- a/guix/base64.scm
+++ b/guix/base64.scm
@@ -52,11 +52,10 @@
-  #:use-module (rnrs)
-  #:use-module ((srfi srfi-13)
-                #:select (string-index
-                          string-prefix? string-suffix?
-                          string-concatenate string-trim-both)))
+  #:use-module (srfi srfi-11)
+  #:use-module (srfi srfi-60)
+  #:use-module (rnrs bytevectors)
+  #:use-module (rnrs io ports))
 (define-syntax define-alias
@@ -67,12 +66,19 @@
 ;; Force the use of Guile's own primitives to avoid the overhead of its 'fx'
 ;; procedures.
-(define-alias fxbit-field bitwise-bit-field)
+(define-alias fxbit-field bit-field)
 (define-alias fxarithmetic-shift ash)
 (define-alias fxarithmetic-shift-left ash)
 (define-alias fxand logand)
 (define-alias fxior logior)
 (define-alias fxxor logxor)
+(define-alias fx=? =)
+(define-alias fx+ +)
+(define-alias mod modulo)
+(define-syntax-rule (assert exp)
+  (unless exp
+    (throw 'assertion-failure 'exp)))
 (define base64-alphabet

reply via email to

[Prev in Thread] Current Thread [Next in Thread]