Frank Henard
Frank Henard

Reputation: 3638

How to use (import (prefix ...))

I'm trying to figure out how to use the

 > (import (prefix some-module :some-module))

docs are here

I found the example of the definition here.

Now, how do I then refer to a definition on it?

Here are some things I tried:

:some-module.baz some-module.baz :some-module:baz some-module:baz

None of them worked

Upvotes: 2

Views: 684

Answers (2)

mario-goulart
mario-goulart

Reputation: 56

Please note that the documentation you link to is for the major version 4 of CHICKEN (.../4/Modules), which is very old and at this point it can be considered obsolete. If you are using CHICKEN 5 (hopefully), the documentation is here (note the 5 in the URL). use is for CHICKEN 4 only. In CHICKEN 5 you should use import.

Upvotes: 1

Frank Henard
Frank Henard

Reputation: 3638

I got an answer in the #chicken irc room.

The example I saw with the colon in front of the prefix is wrong. It should be:

> (import (prefix some-module some-module:))

Then to use:

> (some-module:baz)

Upvotes: 4

Related Questions