Subject: Re: bug#15540: Circular module imports vs. #:select (2.0.9)

From: Andy Wingo <[email-masked]>
Date: Tue, 28 Feb 2017 11:50:00 +0100

On Sun 06 Oct 2013 21:36, [email-masked] (Ludovic Courtès) writes:

> Consider these two modules:
>
> (define-module (a) #:use-module (b) #:export (from-a))
> (define from-a 1)
>
>
> and:
>
> (define-module (b) #:use-module ((a) #:select (from-a)) #:export (from-b))
> (define from-b 2)
>
>
> This fails:
>
> scheme@(guile-user)> ,use(a)
> While executing meta-command:
> ERROR: no binding `from-a' in module (a)
>
>
> whereas this succeeds (starting from a fresh Guile):
>
> scheme@(guile-user)> ,use(b)
> scheme@(guile-user)> from-b
> $1 = 2
>
> Problem is that ‘define-module*’ processes exports after imports.

Applied a version of your patch to master.  Making the test was quite
tricky!

Andy