GNU bug report logs - #47538
ice-9 regex procedures not found when trying to use from r7rs-style defined library

Previous Next

Package: guile;

Reported by: Arvydas Silanskas <nma.arvydas.silanskas <at> gmail.com>

Date: Thu, 1 Apr 2021 07:42:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> igalia.com>

Bug is archived. No further changes may be made.

Full log


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

From: Arvydas Silanskas <nma.arvydas.silanskas <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: ice-9 regex procedures not found when trying to use from r7rs-style
 defined library
Date: Thu, 1 Apr 2021 10:06:39 +0300
[Message part 1 (text/plain, inline)]
Consider files

foo-runner.scm:
(import (foo)
        (scheme write))
(display (bar))

foo.scm:
(define-library (foo)
    (import
      (scheme base)
      (ice-9 regex))
    (export bar)

    (begin
      (define (bar)
        (make-regexp "a"))))

Running this with guile -L . foo-runner.scm, yields error
foo.scm:1:0: In procedure bar:
Unbound variable: make-regexp

It seems using other libraries is fine; eg it works if I change foo.scm to
(define-library (foo)
    (import
      (scheme base)
      (ice-9 match))
    (export bar)

    (begin
      (define (bar)
        (match "a" (_ "bar")))))

It also works if I try using regexp from application instead of module; eg
if I change foo-runner.scm to
(import (foo)
        (scheme write)
        (ice-9 regex))
(display (make-regexp "a"))

I'm running version 3.0.5, installed through debian testing branch package
manager
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 21 days ago.

Previous Next


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