Alexander Carlyle, 1722-1805