J. Lambek/P. Scott: Introduction to higher order categorical logic.
Cambridge UP 1986.

M. Makkai/G. Reyes: First order categorical logic.
Springer LN Math. 611 (1977).