# Is it possible to import a non exported function in Guile scheme?

**URL:** <https://forum.systemcrafters.net/t/is-it-possible-to-import-a-non-exported-function-in-guile-scheme/1302>\
**Category:** Programming\
**Tags:** guile\
**Created:** [January 16, 2025, 10:31pm UTC](https://forum.systemcrafters.net/t/is-it-possible-to-import-a-non-exported-function-in-guile-scheme/1302 "2025-01-16T22:31:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mirkoh](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mirkoh](https://forum.systemcrafters.net/u/mirkoh)\
**Post date:** [January 16, 2025, 10:31pm UTC](https://forum.systemcrafters.net/t/is-it-possible-to-import-a-non-exported-function-in-guile-scheme/1302/1 "2025-01-16T22:31:10Z")

</div>

If a module exports only one function, how can I use the rest of the functions defined in that module?.

---

<div class="post-metadata">

**Author:** ![Glenneth](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/glenneth/32/11_2.png) [@Glenneth](https://forum.systemcrafters.net/u/Glenneth)\
**Post date:** [January 17, 2025, 3:31am UTC](https://forum.systemcrafters.net/t/is-it-possible-to-import-a-non-exported-function-in-guile-scheme/1302/2 "2025-01-17T03:31:05Z")

</div>

Yes, it’s possible to use functions from a Guile module even if they aren’t exported, though it’s not the most “official” way of doing things. Modules in Guile have a private namespace for stuff they don’t export, but you can still get at those functions using `module-ref`

> **[Module System Reflection (Guile Reference Manual)](https://www.gnu.org/software/guile/manual/html_node/Module-System-Reflection.html)**
>
> Module System Reflection (Guile Reference Manual)

---

<div class="post-metadata">

**Author:** ![mirkoh](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mirkoh](https://forum.systemcrafters.net/u/mirkoh)\
**Post date:** [January 17, 2025, 5:02am UTC](https://forum.systemcrafters.net/t/is-it-possible-to-import-a-non-exported-function-in-guile-scheme/1302/3 "2025-01-17T05:02:09Z")

</div>

Thanks!, module-ref using resolve-module to find the module worked perfectly. May I ask what is the most official way?, initially I tried using the following syntax:

`(@@ (some module) 'some-function)`

Which I found in the “Using Guile Modules” documentation but it did not work.

---

<div class="post-metadata">

**Author:** ![Glenneth](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/glenneth/32/11_2.png) [@Glenneth](https://forum.systemcrafters.net/u/Glenneth)\
**Post date:** [January 17, 2025, 5:16am UTC](https://forum.systemcrafters.net/t/is-it-possible-to-import-a-non-exported-function-in-guile-scheme/1302/4 "2025-01-17T05:16:48Z")

</div>

The official way would be to export any and all required modules. If this is not your own program, it could be worth asking the author to export the required module, or fork the repository and make the changes yourself.
