Is there a way to use module/2 in ECLiPSe Prolog?
问题 In SWI-Prolog, I am using code such as at the beginning of a module text file: :- module(foo, [bar/2]). :- use_module(library(jack)). I don't want to change my code . How can I neverthelss use ECLiPSe Prolog (*). Is there some library that defines a module/2 directive in ECLiPSe Prolog? Best Regards (*) http://eclipseclp.org/ 回答1: The following code defines a macro that maps module/2 into module/3 directives: :- export macro((:-)/1, translate_directive/2, [top_only]). translate_directive( (:-