unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#47538: ice-9 regex procedures not found when trying to use from r7rs-style defined library
@ 2021-04-01  7:06 Arvydas Silanskas
  2021-05-02 13:50 ` Andy Wingo
  0 siblings, 1 reply; 3+ messages in thread
From: Arvydas Silanskas @ 2021-04-01  7:06 UTC (permalink / raw)
  To: 47538

[-- Attachment #1: Type: text/plain, Size: 880 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1209 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-02 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01  7:06 bug#47538: ice-9 regex procedures not found when trying to use from r7rs-style defined library Arvydas Silanskas
2021-05-02 13:50 ` Andy Wingo
2021-05-02 15:32   ` lloda

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).