Compounds of the formula I:
wherein m, n, p, X, Ar, R
1
, R
2
, R
3
, R
4
and R
5
are as defined herein. Methods of making the compounds and using the compounds for treatment of 5-HT6 receptor-mediated diseases are disclosed.
Provided herein are compounds of the formula (I):
as well as pharmaceutically acceptable salts thereof, wherein the substituents are as those disclosed in the specification. These compounds, and the pharmaceutical compositions containing them, are useful for the treatment of metabolic diseases and disorders such as, for example, type II diabetes mellitus.