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
  0 siblings, 0 replies; only message 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] only message in thread

only message in thread, other threads:[~2021-04-01  7:06 UTC | newest]

Thread overview: (only message) (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

unofficial mirror of bug-guile@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-bugs/0 guile-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-bugs guile-bugs/ https://yhetil.org/guile-bugs \
		bug-guile@gnu.org
	public-inbox-index guile-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.bugs
	nntp://news.gmane.io/gmane.lisp.guile.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git