The present invention provides compounds of formula (I): compositions comprising such compounds; the use of such compounds in therapy (for example in the treatment or prevention of a disease, disorder or condition ameliorated by inhibition of a dopamine transporter); and methods of treating patients with such compounds; wherein R1, R2, R3, R4, R5, R6, R9, R10, Q, X, Y, Z, A, L, B, m, n and p are as defined herein.