A compound having the formula: or a pharmaceutically acceptable salt thereof, wherein: A is -CH(R 2)-; X is 5 or 6-membered monocyclic heteroaryl or -N(R 5)C -; Y is selected from -O-, -N(R 5)- or -CH(R 3)-, or -A-Y- is -C(R 2)=CH-; Z is -C -, -CH(R 4)- or a bond, such that: (i) when Y is -O- or -N(R 5)-, then Z is -C -, (b) when Y is -CH(R 3)-, then Z is a bond or -CH(R 4), and (iii) when -A-Y- is - C(R 2)=CH-, then Z is a bond; R 1 is a phenyl group which is optionally substituted with from 1 to 3 groups, each independently selected from C 1 -C 6 alkyl, halo, -O-(C 1 -C 6 alkyl), C 1 -C 6 haloalkyl, -O-(Ci-Ce haloalkyl), -CN, -NO 2, -N(R 4) 2, -C OR 6, -C N(R 4) 2 and -NHC R 6; R 2 is selected from H, C 1 -C 6 alkyl, -O-(Ci-Ce alkyl) and -N(R 4) 2; R 3 is selected from H, C 1 -C 6 alkyl and -O-(C 1 -C 6 alkyl); each occurrence of R 4 is independently selected from H, C 1 -C 6 alkyl and -O-(C 1 -C 6 alkyl); each occurrence of R 5 is independently H or C 1 -C 6 alkyl; each occurrence of R 6 is independently selected from H, C 1 -C 6 alkyl and C 3 -C 7 cycloalkyl; R 7A is H; R 7B is H or R 7A and R 7B, together with the common carbon atom to which they are each attached, join to form a spirocyclic C 3 -C 7 cycloalkyl group or a spirocyclic 4- to 7-membered monocyclic heterocycloalkyl group; and R 8 is selected from C 1 -C 6 alkyl, -(C 1 -C 6 alkylene)-O-(C 1 -C 6 alkyl), C 3 -C 7 cycloalkyl and -(C 1 -C 6 alkylene)-C 3 -C 7 cycloalkyl. or a pharmaceutically acceptable salt thereof, wherein: A is -CH(R 2)-; X is 5 or 6-membered monocyclic heteroaryl or -N(R 5)C -; Y is selected from -O-, -N(R 5)- or -CH(R 3)-, or -A-Y- is -C(R 2)=CH-; Z is -C -, -CH(R 4)- or a bond, such that: (i) when Y is -O- or -N(R 5)-, then Z is -C -, (b) when Y is -CH(R 3)-, then Z is a bond or -CH(R 4), and (iii) when -A-Y- is - C(R 2)=CH-, then Z is a bond; R 1 is a phenyl group which is optionally substituted with from 1 to 3 groups, each independently selected from C 1 -C 6 alkyl, halo, -O-(C 1 -C 6 alkyl), C 1 -C 6 haloalkyl, -O-(Ci-Ce haloalkyl), -CN, -NO 2, -N(R 4) 2, -C OR 6, -C N(R 4) 2 and -NHC R 6; R 2 is selected from H, C 1 -C 6 alkyl, -O-(Ci-Ce alkyl) and -N(R 4) 2; R 3 is selected from H, C 1 -C 6 alkyl and -O-(C 1 -C 6 alkyl); each occurrence of R 4 is independently selected from H, C 1 -C 6 alkyl and -O-(C 1 -C 6 alkyl); each occurrence of R 5 is independently H or C 1 -C 6 alkyl; each occurrence of R 6 is independently selected from H, C 1 -C 6 alkyl and C 3 -C 7 cycloalkyl; R 7A is H; R 7B is H or R 7A and R 7B, together with the common carbon atom to which they are each attached, join to form a spirocyclic C 3 -C 7 cycloalkyl group or a spirocyclic 4- to 7-membered monocyclic heterocycloalkyl group; and R 8 is selected from C 1 -C 6 alkyl, -(C 1 -C 6 alkylene)-O-(C 1 -C 6 alkyl), C 3 -C 7 cycloalkyl and -(C 1 -C 6 alkylene)-C 3 -C 7 cycloalkyl. A is -CH(R 2)-; X is 5 or 6-membered monocyclic heteroaryl or -N(R 5)C -; Y is selected from -O-, -N(R 5)- or -CH(R 3)-, or -A-Y- is -C(R 2)=CH-; Z is -C -, -CH(R 4)- or a bond, such that: (i) when Y is -O- or -N(R 5)-, then Z is -C -, (b) when Y is -CH(R 3)-, then Z is a bond or -CH(R 4), and (iii) when -A-Y- is - C(R 2)=CH-, then Z is a bond; R 1 is a phenyl group which is optionally substituted with from 1 to 3 groups, each independently selected from C 1 -C 6 alkyl, halo, -O-(C 1 -C 6 alkyl), C 1 -C 6 haloalkyl, -O-(Ci-Ce haloalkyl), -CN, -NO 2, -N(R 4) 2, -C OR 6, -C N(R 4) 2 and -NHC R 6; R 2 is selected from H, C 1 -C 6 alkyl, -O-(Ci-Ce alkyl) and -N(R 4) 2; R 3 is selected from H, C 1 -C 6 alkyl and -O-(C 1 -C 6 alkyl); each occurrence of R 4 is independently selected from H, C 1 -C 6 alkyl and -O-(C 1 -C 6 alkyl); each occurrence of R 5 is independently H or C 1 -C 6 alkyl; each occurrence of R 6 is independently selected from H, C 1 -C 6 alkyl and C 3 -C 7 cycloalkyl; R 7A is H; R 7B is H or R 7A and R 7B, together with the common carbon atom to which they are each attached, join to form a spirocyclic C 3 -C 7 cycloalkyl group or a spirocyclic 4- to 7-membered monocyclic heterocycloalkyl group; and R 8 is selected from C 1 -C 6 alkyl, -(C 1 -C 6 alkylene)-O-(C 1 -C 6 alkyl), C 3 -C 7 cycloalkyl and -(C 1 -C 6 alkylene)-C 3 -C 7 cycloalkyl.