A compound of formula: wherein ------ represents a single or double bond, such that at least one bond within the 5 membered ring system is a double bond; Ring A may be optionally substituted by 1, 2 or 3 R a groups; B represents a -heterocyclyl group wherein said heterocyclyl group may be optionally substituted by 1, 2 or 3 R a groups; R a represents halogen, C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-8 cycloalkyl, C 3-8 cycloalkenyl, -OR x, -O-(CH 2) n -OR x, haloC 1-6 alkyl, haloC 1-6 alkoxy, C 1-6 alkanol, =O, =S, nitro, Si(R x) 4, -(CH 2) s -CN, -S-R x, -SO-R x, -SO 2 -R x, -COR x, -(CR x R y) s -COOR z,-(CH 2) s -CONR x R y, -(CH 2) s -NR x R y, -(CH 2) s -NR x COR y, -(CH 2) s -NR x SO 2 -R y, -(CH 2) s -NH-SO 2 -NR x R y, -OCONR x R y, -(CH 2) s -NR x CO 2 R y, -O-(CH 2) s CR x R y -(CH 2) t -OR z or -(CH 2) s -SO 2 NR x R y groups; R x, R y and R z independently represent hydrogen, C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 1-6 alkanol, hydroxy, C 1-6 alkoxy, haloC 1-6 alkyl, -CO-(CH 2) n -C 1-6 alkoxy, C 3-8 cycloalkyl or C 3-8 cycloalkenyl; R 7 and R 8 independently represent hydrogen, C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-8 cycloalkyl, C 3-8 cycloalkenyl, aryl, heterocyclyl or R 7 and R 8 together with the nitrogen atom to which they are attached may form a nitrogen containing heterocyclyl ring, wherein said C 1-6 alkyl, aryl and heterocyclyl may be optionally substituted by 1, 2 or 3 R b groups; R 1 and R b independently represent an R a group or a -Y-carbocyclic or -Z-heterocyclyl group wherein said carbocyclic and heterocyclyl groups may be optionally substituted by 1, 2 or 3 R a groups; Y and Z independently represent a bond, -CO-(CH 2) s -, -COO-, -(CH 2) n -, -NR x -(CH 2) s, -(CH 2) s NR x -, -CONR x -, -NR x CO-, -SO 2 NR x -, -NR x SO 2 -, -NR x CONR y -, -NR x CSNR y -, - O-(CH 2) s -, -(CH 2) s -O-, S-, -SO- or -(CH 2) s -SO 2 -; n represents an integer from 1-4; s and t independently represent an integer from 0-4; q represents an integer from 0-2; or a pharmaceutically acceptable salt or solvate thereof. ------ represents a single or double bond, such that at least one bond within the 5 membered ring system is a double bond; Ring A may be optionally substituted by 1, 2 or 3 R a groups; B represents a -heterocyclyl group wherein said heterocyclyl group may be optionally substituted by 1, 2 or 3 R a groups; R a represents halogen, C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-8 cycloalkyl, C 3-8 cycloalkenyl, -OR x, -O-(CH 2) n -OR x, haloC 1-6 alkyl, haloC 1-6 alkoxy, C 1-6 alkanol, =O, =S, nitro, Si(R x) 4, -(CH 2) s -CN, -S-R x, -SO-R x, -SO 2 -R x, -COR x, -(CR x R y) s -COOR z,-(CH 2) s -CONR x R y, -(CH 2) s -NR x R y, -(CH 2) s -NR x COR y, -(CH 2) s -NR x SO 2 -R y, -(CH 2) s -NH-SO 2 -NR x R y, -OCONR x R y, -(CH 2) s -NR x CO 2 R y, -O-(CH 2) s CR x R y -(CH 2) t -OR z or -(CH 2) s -SO 2 NR x R y groups; R x, R y and R z independently represent hydrogen, C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 1-6 alkanol, hydroxy, C 1-6 alkoxy, haloC 1-6 alkyl, -CO-(CH 2) n -C 1-6 alkoxy, C 3-8 cycloalkyl or C 3-8 cycloalkenyl; R 7 and R 8 independently represent hydrogen, C 1-6 alkyl, C 2-6 alkenyl, C 2-6 alkynyl, C 3-8 cycloalkyl, C 3-8 cycloalkenyl, aryl, heterocyclyl or R 7 and R 8 together with the nitrogen atom to which they are attached may form a nitrogen containing heterocyclyl ring, wherein said C 1-6 alkyl, aryl and heterocyclyl may be optionally substituted by 1, 2 or 3 R b groups; R 1 and R b independently represent an R a group or a -Y-carbocyclic or -Z-heterocyclyl group wherein said carbocyclic and heterocyclyl groups may be optionally substituted by 1, 2 or 3 R a groups; Y and Z independently represent a bond, -CO-(CH 2) s -, -COO-, -(CH 2) n -, -NR x -(CH 2) s, -(CH 2) s NR x -, -CONR x -, -NR x CO-, -SO 2 NR x -, -NR x SO 2 -, -NR x CONR y -, -NR x CSNR y -, - O-(CH 2) s -, -(CH 2) s -O-, S-, -SO- or -(CH 2) s -SO 2 -; n represents an integer from 1-4; s and t independently represent an integer from 0-4; q represents an integer from 0-2; or a pharmaceutically acceptable salt or solvate thereof.