Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Grigory Shepelev
@shegeley@fosstodon.org  ·  activity timestamp 4 weeks ago
@wingo @cwebber @fd9a @boo_@hako @simendsjo

Question for #guile #scheme kings and queens.

I have a module A [(define-module A ….) ] and module B that's code-generated (not macros-way the writing strings to file way) that has [#:use-module A] statement in it.

At some procedure part of module A I want to import and use one variable from module B. I want it to happen only EXACTLY when this branch of code is called.

Is that even possible? Circular dependency = ⚰️ ?

  • Copy link
  • Flag this post
  • Block
Christine Lemmer-Webber 🌀
@cwebber@social.coop replied  ·  activity timestamp 4 weeks ago
@shegeley @wingo @fd9a @boo_@hako @simendsjo The evil secret version of things is that you can use @@

(define snarfed-variable
(@@ (my-project module-b) snarf-this-variable))

Though of course violating the abstractions of modules, there be dragons.

You might also consider putting a parameter in one module that's set and pulled from there.

In the future #guile on irc.libera.chat or the guile-user mailing lists are better places to ask these things typically!

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.2.21 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login