A compound of formula, or a pharmaceutically acceptable salt thereof: wherein: L is selected from -NHC - and -C NH-; =M- is selected from =CR a - and =N-; each occurrence of - - - M- is independently selected from =CR a -, -CR a R a -, =N- and -NR a -; wherein each occurrence of R a is independently selected from: (a) H, (b) -OH, (c) halogen, (d) -CN, (e) C 1-6 alkyl, (f) -O-C 1-6 alkyl, (g) -C -R 5, wherein R 5 is selected from (a) -OH, (b) -O-C 1-6 alkyl and (c) a 5- or 6-membered heterocyclyl, optionally substituted with -OH, and (h) 5- or 6-membered heteroaryl; wherein each of the C 1-6 alkyl of (e) and (f) is optionally substituted with 1 to 3 substituents independently selected from (a) -OH, (b) -C OH and (c) halogen; each dotted bond " - - - " is independently selected from a double bond and a single bond; one Z is =CH- and the other Z is =N-; R 1 is selected from: C 1-6 alkyl, C 3-6 cycloalkyl, aryl and 5- or 6-membered heteroaryl; wherein each of the aryl of and the heteroaryl of is optionally substituted with 1 to 3 substituents independently selected from (a) halogen, (b) -CN, (c) -NH 2, (d) C 1-6 alkyl, optionally substituted with 1 to 3 halogens, (e) -O-C 1-6 alkyl and (f) C 3-6 cycloalkyl; each occurrence of R 2 is independently selected from: H, -OH, halogen, -CN, C 1-6 alkyl, -O-C 1-6 alkyl, -C -R 5, wherein R 5 is selected from (a) -OH, (b) -O-C 1-6 alkyl and (c) a 5- or 6-membered heterocyclyl, optionally substituted with -OH, and 5- or 6-membered heteroaryl; wherein each of the C 1-6 alkyl of and is optionally substituted with 1 to 3 substituents independently selected from (a) -OH, (b) -C OH and (c) halogen; or alternatively, two adjacent R 2 groups together with the carbons to which they are attached form a 5- or 6-membered heterocyclic ring comprising 1 to 2 hetero atoms independently selected from O, S and NH, wherein the 5- or 6-membered heterocyclic ring is optionally substituted with an oxo; R 3 is selected from H and C 1-6 alkyl optionally substituted with a halogen or -OH; and one R 4 is H and the other R 4 is selected from -OH, C 1-6 alkyl -O-C 1-6 alkyl and halogen; or alternatively, two R 4 groups together with the carbon to which they are attached form a 4- or 5-membered cycloalkyl ring or a heterocyclic ring containing one oxygen atom; each ring is optionally substituted with -OH, halogen or C 1-6 alkyl. L is selected from -NHC - and -C NH-; =M- is selected from =CR a - and =N-; each occurrence of - - - M- is independently selected from =CR a -, -CR a R a -, =N- and -NR a -; wherein each occurrence of R a is independently selected from: (a) H, (b) -OH, (c) halogen, (d) -CN, (e) C 1-6 alkyl, (f) -O-C 1-6 alkyl, (g) -C -R 5, wherein R 5 is selected from (a) -OH, (b) -O-C 1-6 alkyl and (c) a 5- or 6-membered heterocyclyl, optionally substituted with -OH, and (h) 5- or 6-membered heteroaryl; (a) H, (b) -OH, (c) halogen, (d) -CN, (e) C 1-6 alkyl, (f) -O-C 1-6 alkyl, (g) -C -R 5, wherein R 5 is selected from (a) -OH, (b) -O-C 1-6 alkyl and (c) a 5- or 6-membered heterocyclyl, optionally substituted with -OH, and (h) 5- or 6-membered heteroaryl; wherein each of the C 1-6 alkyl of (e) and (f) is optionally substituted with 1 to 3 substituents independently selected from (a) -OH, (b) -C OH and (c) halogen; each dotted bond " - - - " is independently selected from a double bond and a single bond; one Z is =CH- and the other Z is =N-; R 1 is selected from: C 1-6 alkyl, C 3-6 cycloalkyl, aryl and 5- or 6-membered heteroaryl; C 1-6 alkyl, C 3-6 cycloalkyl, aryl and 5- or 6-membered heteroaryl; wherein each of the aryl of and the heteroaryl of is optionally substituted with 1 to 3 substituents independently selected from (a) halogen, (b) -CN, (c) -NH 2, (d) C 1-6 alkyl, optionally substituted with 1 to 3 halogens, (e) -O-C 1-6 alkyl and (f) C 3-6 cycloalkyl; each occurrence of R 2 is independently selected from: H, -OH, halogen, -CN, C 1-6 alkyl, -O-C 1-6 alkyl, -C -R 5, wherein R 5 is selected from (a) -OH, (b) -O-C 1-6 alkyl and (c) a 5- or 6-membered heterocyclyl, optionally substituted with -OH, and 5- or 6-membered heteroaryl; H, -OH, halogen, -CN, C 1-6 alkyl, -O-C 1-6 alkyl, -C -R 5, wherein R 5 is selected from (a) -OH, (b) -O-C 1-6 alkyl and (c) a 5- or 6-membered heterocyclyl, optionally substituted with -OH, and 5- or 6-membered heteroaryl; wherein each of the C 1-6 alkyl of and is optionally substituted with 1 to 3 substituents independently selected from (a) -OH, (b) -C OH and (c) halogen; or alternatively, two adjacent R 2 groups together with the carbons to which they are attached form a 5- or 6-membered heterocyclic ring comprising 1 to 2 hetero atoms independently selected from O, S and NH, wherein the 5- or 6-membered heterocyclic ring is optionally substituted with an oxo; R 3 is selected from H and C 1-6 alkyl optionally substituted with a halogen or -OH; and one R 4 is H and the other R 4 is selected from -OH, C 1-6 alkyl -O-C 1-6 alkyl and halogen; or alternatively, two R 4 groups together with the carbon to which they are attached form a 4- or 5-membered cycloalkyl ring or a heterocyclic ring containing one oxygen atom; each ring is optionally substituted with -OH, halogen or C 1-6 alkyl.