A compound of the formula (I): wherein R1, R2, R3, R4, Ar, A, n and m are defined herein, is disclosed as a GlyT1 inhibitor pharmaceutical compositions containing the compound of the formula (I) are also disclosed as are their use in medicine, for example in the treatment of schizophrenia.