I am trying to use list constructor in SWI-Prolog, but am getting \'dict\' expected error.
For example,
.(a, []) == [a]. ERROR: Type error: `dict\
SWI-Prolog 7.x uses a different list constructor, '[|]'/2, instead of the traditional ./2 Prolog constructor:
'[|]'/2
./2
?- '[|]'(1,[]) == [1]. true.
The change was motivated to free ./2 for other uses, notably in dict terms, as hinted in the error message you got for your query.