GNU bug report logs - #53878
[PATCH 00/11] Update Racket to 8.4. Adjust Chez Scheme

Previous Next

Package: guix-patches;

Reported by: Philip McGrath <philip <at> philipmcgrath.com>

Date: Tue, 8 Feb 2022 15:14:01 UTC

Severity: normal

Tags: patch

Merged with 53997

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philip McGrath <philip <at> philipmcgrath.com>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
Cc: Ludovic Courtès <ludo <at> gnu.org>, Attila Lendvai <attila <at> lendvai.name>, Philip McGrath <philip <at> philipmcgrath.com>, Malte Gerdes <malte.f.gerdes <at> gmail.com>, zimoun <zimon.toutoune <at> gmail.com>
Subject: [bug#53878] [PATCH v3 13/15] gnu: chez-mit: Support chez-scheme-for-racket.
Date: Sat, 19 Feb 2022 01:42:26 -0500
Racket's variant of Chez Scheme defines 'string->uninterned-symbol',
which conflicts with the definition from '(chez mit)'. See discussion at
<https://github.com/racket/racket/issues/4151>.

* gnu/packages/chez.scm (chez-mit)[origin]<snippet>: Add workaround for
chez-scheme-for-racket.
---
 gnu/packages/chez.scm | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index 54bbee7923..be251798c3 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -355,7 +355,29 @@ (define-public chez-mit
              (commit (string-append "v" version))))
        (sha256
         (base32 "0c7i3b6i90xk96nmxn1pc9272a4yal4v40dm1a4ybdi87x53zkk0"))
-       (file-name (git-file-name name version))))
+       (file-name (git-file-name name version))
+       (snippet
+        ;; Workaround for chez-scheme-for-racket.
+        ;; See: https://github.com/racket/racket/issues/4151
+        #~(begin
+            (use-modules (guix build utils))
+            (substitute* "mit/core.sls"
+              (("[(]import ")
+               "(import (only (chezscheme) import)\n")
+              (("[(]define string->uninterned-symbol gensym[)]")
+               (format #f "~s"
+                       '(begin
+                          (import (only (chezscheme)
+                                        meta-cond
+                                        library-exports))
+                          (meta-cond
+                           ((memq 'string->uninterned-symbol
+                                  (library-exports '(chezscheme)))
+                            (import (only (chezscheme)
+                                          string->uninterned-symbol)))
+                           (else
+                            (define string->uninterned-symbol
+                              gensym)))))))))))
     (build-system gnu-build-system)
     (inputs
      (list chez-srfi))       ; for tests
-- 
2.32.0





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

Previous Next


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