:- module(is_daplex_variable,[is_daplex_variable/1]).
:- [prolog_detect].
:- prolog_detect:prolog(Prolog),
	(	(	Prolog=eclipse,		%if it is ECLiPSe
			!,
			[is_list]		%consult the is_list module
		);
		(	Prolog=sicstus,
			!,
			use_module(library(lists))
		);
		(	Prolog=pfdm,
			!,
			use_module(library(lists))
		);
		true				%other Prolog doesn't need it
	).

is_daplex_variable(var(X)) :-
	is_list(X),
	!,
	fail.

is_daplex_variable(var(X)) :-
	atom(X).

is_daplex_variable(var(X)) :-
	integer(X).

