unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Arvydas Silanskas <nma.arvydas.silanskas@gmail.com>
To: 47538@debbugs.gnu.org
Subject: bug#47538: ice-9 regex procedures not found when trying to use from r7rs-style defined library
Date: Thu, 1 Apr 2021 10:06:39 +0300	[thread overview]
Message-ID: <CAPh7weB3gKPSFRyw31Zawp4mL9Ej+ePTesbR=k4nWc4-TQ0egg@mail.gmail.com> (raw)

[-- 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 --]

             reply	other threads:[~2021-04-01  7:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  7:06 Arvydas Silanskas [this message]
2021-05-02 13:50 ` bug#47538: ice-9 regex procedures not found when trying to use from r7rs-style defined library Andy Wingo
2021-05-02 15:32   ` lloda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPh7weB3gKPSFRyw31Zawp4mL9Ej+ePTesbR=k4nWc4-TQ0egg@mail.gmail.com' \
    --to=nma.arvydas.silanskas@gmail.com \
    --cc=47538@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).