guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble trying to use some modules from the docs


From: Zelphir Kaltstahl
Subject: Re: Trouble trying to use some modules from the docs
Date: Sat, 16 Jun 2018 20:41:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 16.06.2018 18:00, address@hidden wrote:
> Message: 3
> Date: Sat, 16 Jun 2018 06:36:46 -0700
> From: Matt Wette <address@hidden>
> To: address@hidden
> Subject: Re: Trouble trying to use some modules from the docs (Matt
>       Wette)
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
>
> On 06/16/2018 02:35 AM, Zelphir Kaltstahl wrote:
>> Hello,
>>
>> I have managed to get another case of a binding not being available
>> according to the Guile REPL, this time I have the code and way to
>> reproduce the issue.
>> ;; ===== HELPERS MODULE (networking-lib/helpers.scm) =====
>> (use-modules (rnrs bytevectors))
>>
>> (define-module (networking-lib helpers)
>>  ? #:export (display-byte-vector))
>>
> With above code, bytevector import is NOT in the context of your 
> module.? Try
>
> (define-module (networking-lib helpers)
>  ? #:export (display-byte-vector))
>
> (use-modules (rnrs bytevectors))
>
>
> OR
>
>
> (define-module (networking-lib helpers)
>  ? #:export (display-byte-vector)
>  ? #:use-module (rnrs bytevectors))
Thank you Matt, that worked.
Somehow I assumed, that it would "magically" make the used modules also
available in the code, which uses the helpers module.
Now I can have less/no code duplication : )

I have now changed the code and I have it here:
https://gitlab.com/zelphir-kaltstahl-projects/guile-scheme-tutorials-and-examples/tree/dev/network-programming



reply via email to

[Prev in Thread] Current Thread [Next in Thread]