expand_symbolic_set(dataType(T),R) :- !, R=tset(TR),
(dataTypeDef(T,Def)
-> %print(dt(T,Def,SET)),nl,
expand_datatypedefbody(Def,SET),list_to_set(SET,TR)
; add_error(csp_sets,'Could not expand dataType. No datatype definition for: ',T),fail
).
expand_symbolic_set(closure(X),Res) :- !, closure_expand(X,R),list_to_set(R,TR),
Res= tset(TR).
expand_symbolic_set(tset(X),R) :- !, R=tset(X).
expand_symbolic_set(setFromTo(int(Low),int(Up)),R) :- !,
when((ground(Low),ground(Up)),
(expand_from_to(Low,Up,RS),list_to_set(RS,TRS),R=tset(TRS))).
expand_symbolic_set(setComp(GeneratorList,tuple(ExprList)),R) :- !,
expand_set_comprehension(ExprList,GeneratorList,R).
expand_symbolic_set(Set,R) :- add_error(haskell_csp,'Could not expand set: ',Set),R=Set.