I have this simple module:
REBOL[
Name: 'test1
Type: 'module
Exports: [foo]
]
foo: does [print "foo"]
and this one:
REBOL[
Name: 'test2
Type: 'module
Exports: [bar]
]
import %test1.reb
foo
bar: does [foo]
When I try to do import %test2.reb, I get foo word is not bound to a context error.
After this error, I'm able to call foo from console, so it was imported, but somehow it's invisible to test2 module. So what's the proper way to use module inside module?
I'm not certain if this is a bug in Using the IMPORT, howeverNEEDS header should work:
Rebol [
Name: 'test2
Type: 'module
Exports: [bar]
Needs: [%test1.reb]
]
foo
bar: does [foo]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With