A compound, or a pharmaceutically acceptable salt thereof, having the formula: wherein; A and B together have the formula: G is phenyl, or a 5-6 membered heteroaromatic group, which is optionally substituted by 1, 2, 3 or 4 substituents selected from the group consisting of: halogen, cyano, hydroxyl, amino, C 1-4 alkylamino, C 1-4 alkyl, haloC 1-4 alkyl, C 1-4 alkoxy, C 1-4 alkanoyl, haloC 1-4 alkoxy, SF 5, -C(=O)NH 2, -C(=O)OR 3; W is S, O or CHR 2; n is 0 or 1; m is 1 or 2; p is 1; z is 0 or 1; R is hydrogen; R 1 is hydrogen; R 2 is hydrogen; R 3 is hydrogen, or C 1-4 alkyl; R 4 is hydrogen; C 1-4 alkyl; -C(=O)C 1-4 alkyl; -C(=O)C 1-4 alkoxyC 1-4 alkyl; or -C(=O)cyclopropyl; R 5 is hydrogen, or C 1-4 alkyl; R 6 is hydrogen, or C 1-4 alkyl; G 1 is phenyl or a 5-6-membered heteroaromatic group or a 8-11 membered heteroaromatic group; any of which groups is optionally substituted by 1, 2, 3 or 4 substituents selected from the group consisting of: halogen, cyano, hydroxyl, amino, C 1-4 alkylamino, C 1-4 alkyl, haloC 1-4 alkyl, C 1-4 alkoxy, haloC 1-4 alkoxy, SF 5, -C(=O)NH 2, -C(=O) z R 3; Y is phenyl or a moiety selected from the group consisting of: 5-6 membered heteroaromatic group, a 8-11 membered heteroaromatic group; a saturated mono 3-7 membered carbocyclic group or a 8-11 membered bicyclic carbocyclic group in which one or more atom carbons may be replaced by N(R 4) z, O, S; any of such groups may be optionally substituted by 1, 2 or 3 substituents selected from: halogen, cyano, hydroxyl, C 1-4 alkylamino, C 1-4 alkyl, haloC 1-4 alkyl, C 1-4 alkoxy, haloC 1-4 alkoxy, C 1-4 alkanoyl, -C(=O),-NHR 4, -NR 5 R 6, SF 5, -C(=O) z R 3 and =O; or Y is a 5-6 membered heteroaromatic group optionally substituted by one or two substituents selected from: hydroxyl, C 1-4 alkyl and -(CH 2) z C(=O)N(R 4 R 5); when G 1 is a phenyl group, then G 1 and Y may be fused together to form a benzofused aromatic or heteroaromatic system which might be optionally substituted by one or two substituents selected from: halogen, cyano, hydroxy, amino C 1-4 alkyl, haloC 1-4 alkyl, C 1-4 alkoxy, haloC 1-4 alkoxy, C 1-4 alkanoyl, -C(=O)NH 2, -C(=O)OR 3, or SF 5. G is phenyl, or a 5-6 membered heteroaromatic group, which is optionally substituted by 1, 2, 3 or 4 substituents selected from the group consisting of: halogen, cyano, hydroxyl, amino, C 1-4 alkylamino, C 1-4 alkyl, haloC 1-4 alkyl, C 1-4 alkoxy, C 1-4 alkanoyl, haloC 1-4 alkoxy, SF 5, -C(=O)NH 2, -C(=O)OR 3; W is S, O or CHR 2; n is 0 or 1; m is 1 or 2; p is 1; z is 0 or 1; R is hydrogen; R 1 is hydrogen; R 2 is hydrogen; R 3 is hydrogen, or C 1-4 alkyl; R 4 is hydrogen; C 1-4 alkyl; -C(=O)C 1-4 alkyl; -C(=O)C 1-4 alkoxyC 1-4 alkyl; or -C(=O)cyclopropyl; R 5 is hydrogen, or C 1-4 alkyl; R 6 is hydrogen, or C 1-4 alkyl; G 1 is phenyl or a 5-6-membered heteroaromatic group or a 8-11 membered heteroaromatic group; any of which groups is optionally substituted by 1, 2, 3 or 4 substituents selected from the group consisting of: halogen, cyano, hydroxyl, amino, C 1-4 alkylamino, C 1-4 alkyl, haloC 1-4 alkyl, C 1-4 alkoxy, haloC 1-4 alkoxy, SF 5, -C(=O)NH 2, -C(=O) z R 3; Y is phenyl or a moiety selected from the group consisting of: 5-6 membered heteroaromatic group, a 8-11 membered heteroaromatic group; a saturated mono 3-7 membered carbocyclic group or a 8-11 membered bicyclic carbocyclic group in which one or more atom carbons may be replaced by N(R 4) z, O, S; any of such groups may be optionally substituted by 1, 2 or 3 substituents selected from: halogen, cyano, hydroxyl, C 1-4 alkylamino, C 1-4 alkyl, haloC 1-4 alkyl, C 1-4 alkoxy, haloC 1-4 alkoxy, C 1-4 alkanoyl, -C(=O),-NHR 4, -NR 5 R 6, SF 5, -C(=O) z R 3 and =O; or Y is a 5-6 membered heteroaromatic group optionally substituted by one or two substituents selected from: hydroxyl, C 1-4 alkyl and -(CH 2) z C(=O)N(R 4 R 5); when G 1 is a phenyl group, then G 1 and Y may be fused together to form a benzofused aromatic or heteroaromatic system which might be optionally substituted by one or two substituents selected from: halogen, cyano, hydroxy, amino C 1-4 alkyl, haloC 1-4 alkyl, C 1-4 alkoxy, haloC 1-4 alkoxy, C 1-4 alkanoyl, -C(=O)NH 2, -C(=O)OR 3, or SF 5.