Compounds of the formula (I) wherein A, B, D, M, Ar, W, X, Y, Z and R are as defined herein, are useful in the prevention and treatment of hepatitis C infections. The compounds, their preparation, pharmaceutical compositions containing them and their use in medicine are disclosed.