The disclosure provides compounds of formula (I) or pharmaceutically acceptable salts thereof: The disclosure also provides processes for their preparation, intermediates used in these processes, pharmaceutical compositions containing them, and their use as modulators of dopamine D