GNU bug report logs - #28837
Guile 2.2.2: Loading srfi-1 with merge-generics breaks "map"

Previous Next

Package: guile;

Reported by: Andrew Erlanger <andrew.erlanger <at> gmail.com>

Date: Sat, 14 Oct 2017 17:39:02 UTC

Severity: normal

To reply to this bug, email your comments to 28837 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#28837; Package guile. (Sat, 14 Oct 2017 17:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Erlanger <andrew.erlanger <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sat, 14 Oct 2017 17:39:02 GMT) Full text and rfc822 format available.

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

From: Andrew Erlanger <andrew.erlanger <at> gmail.com>
To: bug-guile <at> gnu.org 
Subject: Guile 2.2.2: Loading srfi-1 with merge-generics breaks "map" 
Date: Sat, 14 Oct 2017 13:30:01 -0400
Re-creation:

1. Make a directory (I call it 'mytest')

2. In the directory, make a file f.scm containing:

(define-module (mytest f)
  #:use-module (oop goops)
  #:use-module (srfi srfi-1)
  #:duplicates (merge-generics))

3. In the directory, make a file test.scm containing:

(add-to-load-path (dirname (getcwd)))

(use-modules (mytest f))

4. Navigate to the directory in a terminal, and start the Guile REPL.

5. In the REPL, enter the two following commands:

(load "test.scm")

,in (mytest f) map

The last command returns:

While executing meta-command:
ERROR: Unbound variable: map

That is, the 'map' primitive becomes unbound in the context of (mytest
f). Any procedures which both
    (a) relying on map, and
    (b) are defined and exported in (mytest f),
throw the above error as well.

Please let me know if I can clarify.

- Andrew




Information forwarded to bug-guile <at> gnu.org:
bug#28837; Package guile. (Tue, 17 Oct 2017 01:13:02 GMT) Full text and rfc822 format available.

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

From: David Pirotte <david <at> altosw.be>
To: Andrew Erlanger <andrew.erlanger <at> gmail.com>
Cc: 28837 <at> debbugs.gnu.org
Subject: Re: bug#28837: Guile 2.2.2: Loading srfi-1 with merge-generics
 breaks "map"
Date: Mon, 16 Oct 2017 23:11:47 -0200
[Message part 1 (text/plain, inline)]
Hi Andrew,

> (define-module (mytest f)
>   #:use-module (oop goops)
>   #:use-module (srfi srfi-1)
>   #:duplicates (merge-generics))

You need at least 

  #:duplicates (merge-generics
                replace)

but as I recommended in an earlier message, you should extend the default set

  #:duplicates (merge-generics
		replace
		warn-override-core
		warn
		last)

> ,in (mytest f) map

> While executing meta-command:
> ERROR: Unbound variable: map

The above will fix your problem.

David
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 7 years and 306 days ago.

Previous Next


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