marker(closure(P,T,B),set(any),closure(P,T,B)).
marker(global_set(GS),set(Type),Local) :-
marker_explicit_set(global_set(GS),set(Type),Local).
marker(avl_set(S),set(Type),SLocal) :- % marker_explicit_set(avl_set(S),set(Type),Val,Local).
(avl_marker(S, Type,Local) -> true ; print(failed_avl_marker(S)),nl,fail),
sort_markers(Local,SLocal).
marker(closure_x(P,T,B,E),set(Type),Local) :-
marker_explicit_set(closure_x(P,T,B,E),set(Type),Local).
marker(int(N), integer, N). % int(N)
marker(string(S), string, S). % string(S)).
marker(term(F), real, R) :- is_real(term(F),R).
marker(fd(Nr,T), global(T), Term) :-
(deferred_set_el_marker(T,Nr,Term)
-> true
; (b_global_deferred_set_with_card_gt1(T)
-> print(not_counted(Nr,T)),nl ; true),
Term=fd(Nr,T) /*should not happen for deferred sets */
).
marker(pred_false /* bool_false */, boolean, pred_false).
marker(pred_true /* bool_true */, boolean, pred_true).
marker(freeval(ID,Case,V),_Type,freeval_marker(Case,VM)) :-
freetype_case_db(Case,ID,CaseType),
marker(V,CaseType,VM).
marker((X,Y), couple(T1,T2), Mark) :-
(X==Y -> Mark = id_couple(L1), marker(X,T1,L1) % added 7/9/2011 by leuschel
; Mark = couple(L1,L2), marker(X,T1,L1),marker(Y,T2,L2)).
marker([], set(_), []).
marker([H|T], set(Type), Local) :-
l_marker([H|T],Type,LL),
sort_markers(LL,Local).
marker(rec(Fields), record(FTypes), Local) :-
fields_marker(Fields,FTypes,Local).