If you want to use ECLiPSe to do further development of your application, it is probably advantageous to modify it such that it runs under plain ECLiPSe . In the following we summarise the main aspects that have to be considered when doing so.
..., compound(T), arg(N, T, X), ...
Another alternative is to redefine the arg/3 builtin, using call_explicit/2 to access the original version:
:- local arg/3. arg(N, T, X) :- compound(X), call_explicit(arg(N, T, X), sepia_kernel).
A third alternative, which is used in the compatibility packages, is to define an error handler which will fail the predicate whenever the event is raised. In this case:
my_type_error(_, arg(_, _, _)) :- !, fail. my_type_error(E, Goal) :- error(default(E), Goal). :- set_error_handler(5, my_type_error/2).