Is there a way to use module/2 in ECLiPSe Prolog? -
in swi-prolog, using code such @ beginning of module text file:
:- module(foo, [bar/2]). :- use_module(library(jack)). i don't want change code. how can neverthelss use eclipse prolog (*). there library defines module/2 directive in eclipse prolog?
best regards
the following code defines macro maps module/2 module/3 directives:
:- export macro((:-)/1, translate_directive/2, [top_only]). translate_directive( (:- module(module, exports)), (:- module(module, exports, [swi])) ). compile (or import) before compiling module written swi. note 3rd argument of module/3 must contain language module, corresponding dialect module written in. have used swi here, other choices quintus, iso or eclipse's native eclipse_language.
Comments
Post a Comment