* A R7RS library name part bug?
@ 2023-11-13 14:21 無無
2023-11-13 23:17 ` Taylan Kammer
0 siblings, 1 reply; 2+ messages in thread
From: 無無 @ 2023-11-13 14:21 UTC (permalink / raw)
To: guile-devel
I have read that in R7RS a library name is defined as:
<library name> -> ( <library name part>+ )
<library name part> -> <identifier> | <uinteger 10>
<uinteger R> -> <digit R>
<digit 10> -> <digit>
<digit> -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
That means that a valid library name would be something like (a b 1),
where "1" is a valid library name part, but the following code
disagrees. running `guile --r7rs -L . a/good-main.scm` works while
`guile --r7rs -L . a/bad-main.scm` fails.
The files are as follows:
;;; ./a/b/1.scm
(define-library (a b 1)
(import (scheme base))
(export one)
(begin
(define one 'one)))
;;; ./a/b/d-1.scm
(define-library (a b d-1)
(import
(scheme base)
(scheme write)
)
(export
dd-1)
(begin
(define dd-1 'dd-1)))
;;; ./a/b/d.scm
(define-library (a b d)
(import
(scheme base)
(scheme write)
)
(export
dd)
(begin
(define dd 'dd)))
;;; ./a/good-main.scm
(define-library (a c)
(import
(scheme base)
(scheme write)
(a b d)
(a b d-1))
(begin
(display '(a c)) (newline)
(display dd) (newline)
(display dd-1) (newline)))
;;; ./a/bad-main.scm
(define-library (a c)
(import
(scheme base)
(scheme write)
(a b 1))
(begin
(display one) (newline)))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: A R7RS library name part bug?
2023-11-13 14:21 A R7RS library name part bug? 無無
@ 2023-11-13 23:17 ` Taylan Kammer
0 siblings, 0 replies; 2+ messages in thread
From: Taylan Kammer @ 2023-11-13 23:17 UTC (permalink / raw)
To: 無無, guile-devel
On 13.11.2023 15:21, 無無 wrote:
> I have read that in R7RS a library name is defined as:
>
> <library name> -> ( <library name part>+ )
> <library name part> -> <identifier> | <uinteger 10>
> <uinteger R> -> <digit R>
> <digit 10> -> <digit>
> <digit> -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
>
> That means that a valid library name would be something like (a b 1),
> where "1" is a valid library name part, but the following code
> disagrees. running `guile --r7rs -L . a/good-main.scm` works while
> `guile --r7rs -L . a/bad-main.scm` fails.
>
> [...]
>
This is unfortunately a known limitation in Guile's R7RS support.
IIRC, integers in library names only works for (srfi N) which is
internally transformed to (srfi srfi-N).
--
Taylan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-13 23:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-13 14:21 A R7RS library name part bug? 無無
2023-11-13 23:17 ` Taylan Kammer
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).