Discussion:
Trouble trying to use some modules from the docs
Zelphir Kaltstahl
2018-06-16 18:41:44 UTC
Permalink
Message: 3
Date: Sat, 16 Jun 2018 06:36:46 -0700
Subject: Re: Trouble trying to use some modules from the docs (Matt
Wette)
Content-Type: text/plain; charset=utf-8; format=flowed
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
Loading...