  The aim of this paper is to introduce the categorical setup which helps us to
relate the theory of Macdonald polynomials and the theory of Weyl modules for
current Lie algebras discovered by V.\,Chari and collaborators.
  We identify Macdonald pairing with the homological pairing on the ring of
characters of the Lie algebra of currents $\mathbf{g}\otimes\mathbb{C}[x,\xi]$.
We use this description in order to define complexes of modules whose Euler
characteristic of characters coincide with Macdonald polynomials. We generalize
this result to the case of graded Lie algebras with anti-involution. We show
that whenever the BGG reciprocity holds for the corresponding category of
modules then these complexes collapse to the modules concentrated in
homological degree $0$. The latter modules generalizes the notion of Weyl
modules for current Lie algebras and the notion of Verma modules in the BGG
category $\mathcal{O}$. We give different criterions of BGG reciprocity and
apply them to the Lie algebra of currents $\mathbf{g}\otimes\mathbb{C}[x]$ with
$\mathbf{g}$ semisimple.
