A method for treating memory impairment is disclosed. The method comprises administering a therapeutically effective amount of a compound having the formula: <IMAGE> or a pharmaceutically acceptable acid addition salt or prodrug therefor to a patient.