On 6/15/23 11:59, Unstable Horse wrote:
Hmm, if I rewrite your rectangular.scm to:
rectangular.scm
(define-module (rectangular)
#:use-module ((guile) #:select ((lambda* . λ)))
#:export (real-part))
(define real-part
(λ (num)
(car num)))
This works both with `import'
On 6/15/23 12:33, Jean Abou Samra wrote:
Le jeudi 15 juin 2023 à 12:29 +0200, Jean Abou Samra a écrit :
As you can see, the library macro has turned the (export real-part) part into
a re-export from (guile).
Sigh. This is the code from |module/ice-9/r6rs-libraries.scm|:
|(define (compute-e
Le jeudi 15 juin 2023 à 12:29 +0200, Jean Abou Samra a écrit :
> As you can see, the library macro has turned the (export real-part) part into
> a re-export from (guile).
Sigh. This is the code from `module/ice-9/r6rs-libraries.scm`:
```
(define (compute-exports ifaces specs)
(define
I agree, it seems like a bug.
Here is a slightly more minimal example:
```
$ cat rectangular.scm
(library (rectangular)
(export real-part)
(import (guile))
(define real-part car))
$ cat solution.scm
(use-modules ((rectangular) #:prefix rect:))
(display (rect:real-part '(1 . 2)))
$ guile
Hmm, if I rewrite your rectangular.scm to:
rectangular.scm
(define-module (rectangular)
#:use-module ((guile) #:select ((lambda* . λ)))
#:export (real-part))
(define real-part
(λ (num)
(car num)))
This works both with `import' and `use-modules', so the problem might
be som
Hello Guile Users!
I have now created a minimal example of the import bug or issue I am observing:
rectangular.scm
(library (rectangular)
(export real-part)
(import (except (rnrs base) error)
(only (guile)
lambda* λ))
(define real-part
(λ (num)