-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot reexport module from package? #97
Comments
Hi @aherranz. Some declarations, like reexport, do not make sense from the toplevel/REPL/shell. To avoid that it is possible to deactivate that code using conditional compilation as follows: :- if(defined('SHELL')).
% put here what is required in a toplevel (it can be empty)
:- else.
% and here what cannot run in a toplevel
:- endif. for example: :- if(defined('SHELL')).
:- else.
:- reexport(library(rfuzzy/rfuzzy_rt)).
:- endif. Another issue is whether reexport for a package is really required (usually we never need it but I'm not familiar with rfuzzy). Let us know if you need to modify the goal expansion when run in a toplevel context. This is also possible but not really well documented. |
But reexport is not being used from the REPL, in the interpreter I am just doing I am not familiar with the implementation of rfuzzy, I am just trying to use it. Thanks for your orientation. |
Actually doing a Edit: More details on this. Packages in Ciao are not really modules, but source files that are directly included in the context the use them. Most of the time, the source is a collection of directives like
|
I am loading the rfuzzy package and I get an error message "reexport/1 directive not allowed in shell"
The main module of the library is this one:
I don't know the implication of the error, I am not sure if predicates are reexported or not. Can I avoid such a message? (I can update the rfuzzy library).
Regards.
The text was updated successfully, but these errors were encountered: