Dibenzothiazepine derivatives useful as antispasmodic agents

Abstract: The invention provides compounds of the formula:- wherein k is 1, 2 or 3; m is 1, 2 or 3; n is 1, 2 or 3; p is 0, 1 or 2; X is O, S or a direct link, with the proviso that when X is O or S, n is 2 or 3; R¹ is H or C₁-C₄ alkyl; and R² is an optionally substituted phenyl or heteroaryl group; and pharmaceutically acceptable salts thereof. These compounds are useful for the treatment of motility disorders, particularly those of the gut such as irritable bowel syndrome.

Description: This invention relates to 5,11-dihydrodibenzo[b,e][1,4]thiazepines, specifically to certain 5,11-dihydro-5-(1-substituted-2-pyrrolidinyl-, piperidinyl- or perhydroazepinylalkyl)dibenzo[b,e][1,4]thiazepines which are gastro-intestinal(GI) selective calcium antagonists. These dihydrodibenzothiazepines are particularly useful in the treatment of motility disorders, particulary those of the gut such as irritable bowel syndrome(IBS). The compounds of the present invention are potent inhibitors of intestinal motility in both the small and large bowel, being calcium antagonists with well defined selectivity for the gastro-intestinal tract. Irritable bowel syndrome is a motility disorder characterised by altered bowel habit (i.e. constipation and/or diarrhoea), distension and abdominal pain. The calcium antagonists of the present invention reduce the motility of the gut thus having an antispasmodic effect on the bowel without affecting blood pressure or other cardiac parameters. The compounds of the invention are also useful in the treatment of other conditions where spasm or hypermotility of smooth muscle tissue is involved. Such conditions involve the smooth muscle of the gastro-intestinal tract, uterus, ureter and biliary tract and include diseases such as oesophageal dysmotility, gastro-oesophageal reflux disease, achalasia, functional bowel disease, pseudo-obstructive disease, non-cardiac chest pain, diverticular disease, inflammatory bowel disease, dysmenorrhea, pre-term labour, incontinence, uteric colic and biliary spasm. They are also of use in the radiological examination of the gut. According to the present invention, there are provided compounds of the formula:- wherein k is 1, 2 or 3; m is 1, 2 or 3; n is 1, 2 or 3; p is 0, 1 or 2; X is O, S or a direct link, with the proviso that when X is O or S, n is 2 or 3; R¹ is H or C₁-C₄ alkyl; and R² is (a) wherein R³ and R⁴ are each independently selected from H, C₁-C₄ alkyl, C₁-C₄ alkoxy, -OH, -N(C₁-C₄ alkyl)₂, halo and -CF₃; (b) wherein q is 1, 2 or 3; and X¹ and X² are each independently selected from 0 and -CH₂-; or (c) a pyridinyl, pyridazinyl, pyrimidinyl, pyrazinyl or thienyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy, and pharmaceutically acceptable salts thereof. "Halo" means F, Cl, Br and I. "Halo" is preferably chloro. C₃ and C₄ alkyl and alkoxy groups may be straight or branched chain. The preferred alkyl and alkoxy groups are methyl and methoxy. In the above definition of compounds of the formula (I):- Preferably, k is 1 or 2. Most preferably, k is 1. Preferably, m is 1 or 2. Most preferably, m is 1. Preferably, n is 2. Preferably, p is 0. Preferably, X is a direct link. Preferably, R¹ is H or methyl. Most preferably, R¹ is H. Preferably, R² is (a) wherein R³ and R⁴ are each independently selected from H, C₁-C₄ alkyl, C₁-C₄ alkoxy, -OH and halo; (b) wherein X¹ and X² are as previously defined for a compound of the formula (I); or (c) a pyridinyl, pyrimidinyl or thienyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy. More preferably, R² is (a) wherein R³ and R⁴ are each independently selected from H, -CH₃, -OCH₃, -OH and Cl; (b) or (c) a pyridinyl, pyrimidinyl or thienyl group. Yet more preferably, R² is phenyl, 3-methylphenyl, 4-methylphenyl, 4-hydroxyphenyl, 4-methoxyphenyl, 3 ,4-dimethoxyphenyl, 4-chlorophenyl, 5-indanyl, 3,4-methylenedioxyphenyl, 2-pyridinyl, 4-pyrimidinyl or 3-thienyl. Most preferably, R² is 4-methoxyphenyl. The numbering of the 5,11-dihydrodibenzo[b,e][1,4]thiazepine ring system and the position of the asymmetric centres (*) within the compounds of the formula (I) are as indicated below:- wherein (*) indicates an asymmetric centre when p = 1 only. The compounds of the formula (I) wherein p has the value 0 or 2 contain at least one asymmetric centre and will therefore exist as a pair of enantiomers or as diastereomeric pairs of enantiomers. The compounds of the formula (I) wherein p has the value 1 contain at least two asymmetric centres and will therefore exist as at least two diastereomeric pairs of enantiomers. Such enantiomers or diastereomeric pairs of enantiomers may be separated by physical methods, e.g. by fractional crystallisation, chromatography or H.P.L.C. of the stereoisomeric mixture of the parent compound or of a suitable salt or derivative thereof. Most preferably, the individual enantiomers of the compounds of the formula (I) containing one asymmetric centre, wherein p has the value 0 or 2, are prepared from optically pure intermediates. The invention includes both the individual stereoisomers of the compounds of the formula (I) together with mixtures thereof. The preferred compounds of the formula (I) provided by the invention have the (25)-configuration, i.e. A particularly preferred individual compound is (S)-5,11-dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine or a pharmaceutically acceptable salt thereof. The pharmaceutically acceptable salts of the compounds of the formula (I) include acid addition salts formed from acids which form non-toxic salts such as the hydrochloride, hydrobromide, hydroiodide, sulphate, bisulphate, phosphate, hydrogen phosphate, acetate, maleate, fumarate, lactate, tartrate, citrate, gluconate, mandelate, benzoate, salicylate, methanesulphonate, benzenesulphonate and para -toluenesulphonate salts. Preferably, the acid addition salt is a hydrochloride, maleate, mandelate, salicylate or methanesulphonate. More preferably, the acid addition salt is a maleate or salicylate. Most preferably, the acid addition salt is a maleate. The compounds of the formula (I) provided by the invention may be prepared by the following methods:- 1) The compounds of the formula (I) wherein k is 1 and m, n, p, X, R¹ and R² are as previously defined for a compound of the formula (I) may be prepared according to Scheme 1:- wherein m, n, p, X, R¹ and R² are as previously defined for a compound of the formula (I) and W is a suitable leaving group, e.g. halo (preferably chloro). In a typical procedure, a compound of the formula (II) is deprotonated by the addition of approximately one equivalent of a suitable strong base, e.g. sodium or potassium hydride, and the anion generated is reacted in situ with a compound of the formula (III) in a suitable organic solvent, e.g. 1,2-dimethoxyethane, at from room temperature to, and preferably at, the reflux temperature thereof. The reaction proceeds by nucleophilic attack of the anion formed from (II) with an aziridinium ion (IV) generated from (III) in situ (see review article - M. Miocque and J. P. Duclos, Chimie Therapeutique, 1969 (5), 363-380). The purified product of the formula (I) is isolated from the mixture of by-products also obtained by conventional extraction and chromatographic techniques. 2) All compounds of the formula (I) wherein k, m, n, p, X, R¹ and R² are as previously defined for a compound of the formula (I) may be prepared according to Scheme 2:- wherein k, m, n, p, X, R¹ and R² are as previously defined for a compound of the formula (I) and Y is a suitable leaving group, e.g. halo (preferably chloro or bromo), methanesulphonyloxy, trifluoromethanesulphonyloxy or p-toluenesulphonyloxy. Preferably, k is 2 or 3 in this method. When k is 1 the reaction will proceed via the intermediacy of an aziridinium ion (IV) as in method (1). In a typical procedure, a compound of the formula (II) is deprotonated by the addition of approximately one equivalent of a suitable strong base, e.g. sodium or potassium hydride, and reacted in situ with a compound of the formula (V) in a suitable organic solvent, e.g. 1,2-dimethoxyethane, at from room temperature to, and preferably at, the reflux temperature thereof. The product of the formula (I) is isolated and purified by conventional techniques. 3) All compounds of the formula (I) wherein k, m, n, p, X, R¹ and R² are as previously defined for a compound of the formula (I) may be prepared according to Scheme 3:- wherein k, m, n, p, X, R¹ and R² are as previously defined for a compound of the formula (I) and Y¹ is a suitable leaving group, e.g. halo (preferably chloro, bromo or iodo), methanesulphonyloxy, trifluoromethanesulphonyloxy or p-toluenesulphonyloxy. In a typical procedure, a compound of the formula (VI) is reacted with a compound of the formula (VII) in the presence of a suitable acid acceptor, e.g. sodium or potassium carbonate, and, where Y¹ is chloro or bromo, optionally in the presence of sodium or potassium iodide to accelerate the rate of reaction. The reaction is typically carried out in a suitable organic solvent, e.g. acetonitrile, at from room temperature to, and preferably at, the reflux temperature thereof. The product of the formula (I) is isolated and purified by conventional techniques. 4) The compounds of the formula:- wherein k, m, p and R¹ are as previously defined for a compound of the formula (I) and R² is a 2- or 4-pyridinyl, pyridazinyl, 2- or 4-pyrimidinyl or pyrazinyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy, may be conveniently prepared by a "Michael-type" addition reaction according to Scheme 4:- wherein k, m, p, R¹ and R² are as defined for this method. In a preferred procedure, a compound of the formula (VI) is heated with an excess of a vinylheterocycle (VIII) at from 40° to 140°C, preferably at about 120°C, in the absence of an additional organic co-solvent. The reaction may also be carried out using at least one equivalent of (VIII) in a suitable organic solvent, e.g. 1,4-dioxane, at from 40°C to the reflux temperature thereof. optionally, the reaction rate may be accelerated by the addition of a suitable acidic, e.g. acetic acid, or basic catalyst, e.g. benzyltrimethylammonium hydroxide. The product of the formula (I) is isolated and purified by conventional techniques. 5) The compounds of the formula (I) wherein p is 1 or 2 and k, m, n, X, R¹ and R² are as previously defined for a compound of the formula (I) may be prepared by oxidation of a suitable acid addition salt (e.g. a hydrochloride salt) of a compound of the formula (I) wherein p is 0 or 1, as appropriate, and k, m, n, X, R¹ and R² are as previously defined for a compound of the formula (I). The reaction is typically carried out using one or two equivalents, as appropriate, of a suitable oxidising agent, e.g. meta -chloroperbenzoic acid, in a suitable organic solvent, e.g. dichloromethane or chloroform, at from 0°C to the reflux temperature thereof, and preferably at room temperature. Alternatively a compound of the formula (I) wherein p is 2 may be prepared by oxidising a suitable acid addition salt (e.g. a hydrochloride salt) of a compound of the formula (I) wherein p is 0 or 1 with an excess of hydrogen peroxide in a C₁-C₄ alkanoic acid, e.g. formic or acetic acid, at from room temperature to the reflux temperature thereof, and preferably at from 80° to 100°C. The product of the formula (I) is isolated and purified by conventional techniques. 6) The compounds of the formula (I) wherein p is 0 and k, m, n, X, R¹ and R² are as previously defined for a compound of the formula (I) may be prepared by reduction of a compound of the formula (I) wherein p is 1 or 2 and k, m, n, X, R¹ and R² are as previously defined for a compound of the formula (I). In a typical procedure a compound of the formula (I) wherein p is 1 or 2 is reacted with a suitable reducing agent, e.g. lithium aluminium hydride, in a suitable organic solvent, e.g. tetrahydrofuran, at from 0°C to the reflux temperature of the solvent. Usually the reducing agent is added at from 0°C to room temperature followed by a short period of stirring at from room temperature to the reflux temperature to accelerate the rate of reaction. The product is isolated and purified by conventional techniques. 7) All compounds of the formula (I) wherein k, m, n, p, X, R¹ and R² are as previously defined for a compound of the formula (I) may be prepared by reduction of a compound of the formula:- wherein p is 0, 1 or 2 and R⁵ is or wherein k, m, n, X, R¹ and R² are as previously defined for a compound of the formula (I). Preferably p is 0 in this method. In a typical procedure a compound of the formula (IX) is reacted with a suitable reducing agent, e.g. borane, in a suitable organic solvent, e.g. tetrahydrofuran or diethyl ether, at from 0°C to the reflux temperature of the solvent. The reducing agent is usually added at from 0°C to room temperature and then the rate of reaction accelerated by heating at the reflux temperature for several hours. The product of the formula (I) is isolated and purified by conventional techniques. In a preferred procedure borane is used as the reducing agent and it is generated in situ using sodium borohydride and boron trifluoride etherate. 8) All compounds of the formula (I) wherein k, m, n, p, X, R¹ and R² are as previously defined for a compound of the formula (I) may be prepared by a Jourdan-Ullmann-Goldberg synthesis using as the starting material a compound of the formula:- wherein "Hal" is halo, preferably chloro, bromo or iodo and most preferably bromo, and k, m, n, p, X, R¹ and R² are as previously defined for a compound of the formula (I). In a typical procedure a compound of the formula (X) is reacted with a suitable transition metal, e.g. copper, or an oxide thereof, in a suitable organic solvent, e.g. pyridine, and optionally in the presence of a suitable inorganic acid acceptor, e.g. potassium carbonate. The reaction may be carried out at from room temperature to the reflux temperature of the solvent, preferably at from 40°C to the reflux temperature, and most preferably at the reflux temperature. The transition metal used in this process is preferably employed as the powdered metal. The product of the new formula (I) is isolated and purified by conventional techniques. 9) Some of the compounds of the formula (I) wherein R² is a substituted phenyl group may be prepared from other compounds of the formula (I) by "functional group interconversion", as follows:- a) A hydroxy substituent may be converted to C₁-C₄ alkoxy by alkylation in the presence of a suitable base. In a typical procedure the phenol is first reacted with a suitable strong base, e.g. sodium hydride, and then treated with a suitable alkylating agent, e.g. a C₁-C₄ alkyl halide, preferably a bromide or iodide. The reaction usually proceeds at about room temperature in a suitable organic solvent, e.g. tetrahydrofuran or N,N-dimethylformamide, although elevated temperatures may be used. b) A C₁-C₄ alkoxy substituent, preferably methoxy, may be converted to hydroxy by treatment with either hydrogen bromide or a C₁-C₄ alkanethiolate. The reaction with hydrogen bromide may be carried out in acetic acid, or by using aqueous hydrobromic acid. The reaction may be carried out at from room temperature to the reflux temperature of the mixture in both cases. The reaction with a C₁-C₄ alkanethiolate, such as sodium ethanethiolate or butanethiolate, is typically carried out in a suitable organic solvent, e.g. N,N-dimethylformamide, at from room temperature to the reflux temperature of the solvent. The C₁-C₄ alkanethiolate reagent may also be generated in situ from the corresponding thiol and a suitable strong base, e.g. sodium hydride. c) A halo substituent may be converted to -N(C₁-C₄ alkyl)₂ by treatment with the appropriate dialkylamine of the formula (C₁-C₄ alkyl)₂NH, optionally in the presence of a suitable inorganic acid acceptor, e.g. sodium carbonate. The reaction is typically carried out in a suitable solvent, e.g. ethanol, at from room temperature to, and preferably at, the reflux temperature. The reaction is most preferably carried out in a "bomb" or sealed tube. The starting materials of the formula (II) wherein p is 0 or 1 are known compounds and may be prepared in accordance with literature procedures, e.g. for p = 0, see US-3,188,322 (Chem. Abs., 63 , 8384h (1965)) and I. Ueda and S. Umio, Bull. Chem. Soc. Japan, 48 (8), 2323 (1975); and for p = 1, see J. Med. Chem., 13 , 713 (1970). The starting materials of the formula (II) wherein p is 2 may be prepared by a similar procedure to that used for the 7-chloro analogue (Table III, Example 38) in J. Med. Chem., 13 , 713 (1970). The intermediates of the formulae (III) and (V) may be prepared as shown in Scheme 5:- wherein k, m, n, X, R¹ and R² are as previously defined for a compound of the formula (I), W is a suitable leaving group, e.g. halo (preferably chloro), and Y is a suitable leaving group, e.g. halo (preferably chloro or bromo), methanesulphonyloxy, trifluoromethanesulphonyloxy or p-toluenesulphonyloxy. Accordingly, a compound of the formula (XI) or (XII) may be alkylated with a compound (VII) of the formula R²-X-(CH₂) n -Y¹ wherein R², X and n are as previously defined for a compound of the formula (I) and Y¹ is a suitable leaving group, e.g. halo (preferably chloro, bromo or iodo), methanesulphonyloxy, trifluoromethanesulphonyloxy or p-toluenesulphonyloxy, to provide a compound of the formula (XIII) or (XIV), respectively. The reaction is typically carried out in the presence of a suitable acid acceptor, e.g. sodium carbonate, in a suitable organic solvent, e.g. acetonitrile or ethanol, at from room temperature to, and preferably at, the reflux temperature thereof. Where Y is chloro or bromo, sodium or potassium iodide may also be added to accelerate the rate of reaction. Alternatively, a compound of the formula (XIII) or (XIV) wherein k, m and R¹ are as previously defined for a compound of the formula (I), n is 2, X is a direct link and R² is a 2- or 4-pyridinyl, pyridazinyl, 2- or 4-pyrimidinyl or pyrazinyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy, may be conveniently prepared by heating a compound of the formula (XI) or (XII), respectively, with an appropriate vinylheterocycle (VIII) of the formula R²CH=CH₂ (wherein R² is as previously defined in this method), optionally in a suitable organic solvent, e.g. 1,4-dioxane, at from 40° to 140°C or at the reflux temperature of said organic solvent. Optionally, the reaction rate may be accelerated by the addition of a suitable acidic e.g. acetic acid, or basic catalyst, e.g. benzyltrimethylammonium hydroxide. The reduction of a compound of the formula (XII) or (XIV) to a compound of the formula (XI) or (XIII), respectively, may be carried out using a suitable reducing agent, e.g. lithium aluminium hydride. In a typical procedure, the reduction is carried out in a suitable organic solvent, e.g. tetrahydrofuran, at from 0°C to the reflux temperature thereof. Optionally, compound (XII) may be used in the form of a suitable acid addition salt, e.g. a hydrochloride or hydrobromide, in this process. The compounds of the formula (III) wherein W is halo (preferably chloro) may be prepared from a compound of the formula (XIII) (wherein k = 1) by treatment with either (i) a suitable halogenating agent, e.g. thionyl chloride or bromide, preferably in the presence of a suitable organic solvent, e.g. dichloromethane or chloroform, at from room temperature to, and preferably at, the reflux temperature thereof; or (ii) a C₁-C₄ alkanesulphonyl chloride or bromide, e.g. methanesulphonyl chloride or bromide, in the presence of a suitable acid acceptor, e.g. triethylamine, in a suitable organic solvent, e.g. dichloromethane, at from room temperature to the reflux temperature thereof, and preferably at room temperature. The compound of the formula (V) may be prepared from the compound (XIII) by treatment with either (i) a suitable halogenating agent, e.g. thionyl chloride or bromide, preferably in the presence of a suitable organic solvent, e.g. dichloromethane or chloroform, at from room temperature to, and preferably at, the reflux temperature thereof; or (ii) a C₁-C₄ alkanesulphonyl chloride or bromide (e.g. methanesulphonyl chloride), a C₁-C₄ alkanesulphonic anhydride (e.g. methanesulphonic anhydride), trifluoromethanesulphonic anhydride or p-toluenesulphonyl chloride, in the presence of a suitable acid acceptor, e.g. triethylamine, and in a suitable organic solvent, e.g. dichloromethane, at from 0°C to the reflux temperature thereof. The skilled man will appreciate that the attempted conversion of (XIII) to (V) when k is 1 under certain conditions may lead to the isolation of (III) as the reaction product as a result of rearrangement of (V) in situ via an aziridinium ion (IV) (as indicated above). Consequently the reaction path followed may be difficult to predict and may vary according to the individual compound (XIII) used and the conditions employed. However, either product (III) or (V) obtained may be used as the starting material for the preparation of the appropriate compound of the formula (I) (see Methods (1) and (2)). The optically pure or racemic starting materials of the formula (XI) or (XII), the alkylating agents (VII) of the formula R²-X-(CH₂) n -Y¹ and the vinylheterocycles (VIII) of the formula R²CH=CH₂ are either known compounds which may also be commercially available, or are preparable by conventional procedures in accordance with literature precedents such as those illustrated in the following Preparations section. The intermediates of the formula (VI) may be prepared as shown in Scheme 6:- wherein k, m, p and R¹ are as previously defined for a compound of the formula (I), Z is a suitable leaving group, e.g. p-toluenesulphonyloxy, and Z¹ is a suitable protecting group, e.g. p-toluenesulphonyl. In a typical procedure, a compound of the formula (II) is deprotonated by the addition of approximately one equivalent of a suitable strong base in a suitable organic solvent. Preferred base/solvent combinations are lithium diisopropylamide/1,2-dimethoxyethane or sodium hydride/N,N-dimethylformamide. The anion generated is then reacted in situ with a compound of the formula (XVI) to provide compound (XV). N-Deprotection of a compound of the formula (XV) wherein p = 0 and Z¹ is p-toluenesulphonyl is achieved using, e.g. sodium bis(2-methoxyethoxy)aluminium hydride ("Red-A1" - Registered Trade Mark) in toluene or sodium/naphthalene/1,2-dimethoxyethane to provide a compound of the formula (VI). Preferably, a compound of the formula (VI) wherein p = 1 or 2 is prepared by oxidation of an acid addition salt of a compound of the formula (VI) wherein p is 0 as described below. A compound of the formula (VI) wherein p is 0 or 1 can be optionally oxidised in the form of a suitable acid addition salt (e.g. a hydrochloride) to provide the compound of the formula (VI) wherein p is 1 or 2, as appropriate. The reaction is typically carried out using one or two equivalents, as appropriate, of a suitable oxidising agent, e.g. meta -chloroperbenzoic acid, in a suitable organic solvent, e.g. chloroform, and at from 0°C to the reflux temperature thereof, and preferably at room temperature. Alternatively a compound of the formula (VI) wherein p is 2 may be prepared by oxidising a suitable acid addition salt (e.g. a hydrochloride salt) of a compound of the formula (VI) wherein p is 0 or 1 with an excess of hydrogen peroxide in a C₁-C₄ alkanoic acid, e.g. formic or acetic acid, at from room temperature to the reflux temperature thereof. The choice of a suitable leaving group (2) and protecting group (Z¹) combination in the compounds of the formula (XVI), as well as suitable conditions for the N-deprotection of a compound of the formula (XV) will be well known to a man skilled in the art. Intermediates of the formula (XVI) are either known compounds (e.g. see P. Karrer and K. Ehrhardt, Helv. Chim. Acta, 34 , 2202 (1951)) or are prepared by conventional procedures in accordance with literature precedents, e.g using compounds of the formula (XI) as starting materials. The intermediates of the formula (IX) may be prepared by conventional condensation or acylation methods, for example, (i) by condensation of a compound of the formula (II), wherein p is 0, 1 or 2, with a compound of the formula (XIV) or as appropriate, wherein k, m, n, X, R¹ and R² are as previously defined for a compound of the formula (I); (ii) by condensation of a compound of the formula (VI), wherein k, m, p and R¹ are as previously defined for a compound of the formula (I), with a compound (XVIII) of the formula R²-X-(CH₂) n-1 CO₂H wherein n, X and R² are as previously defined for a compound of the formula (I); or (iii) by acylation of a compound of the formula (II) or (VI), as appropriate, with a suitable acyl halide (preferably chloride) derivative of (XIV), (XVII) or (XVIII), as appropriate, wherein k, m, n, p, X, R¹ and R² are as previously defined for a compound of the formula (I), typically in the presence of a suitable acid acceptor such as pyridine, triethylamine or sodium or potassium carbonate or bicarbonate, and in a suitable organic solvent, e.g. dichloromethane. In the condensation methods (i) and (ii) above, conventional peptide coupling techniques may be employed, e.g. using 1,3-dicyclohexylcarbodiimide or 1,1′-carbonyldiimidazole as activating agents for the carboxyl group. The compounds of the formula (XVII) may be prepared either by condensation of a compound of the formula (XII), wherein m, k and R¹ are as previously defined for a compound of the formula (I), with a compound of the formula (XVIII), wherein n, X and R² are as previously defined for a compound of the formula (I), or by acylation of a compound of the formula (XII), or of a base salt (e.g. sodium salt) thereof, with a suitable acyl halide derivative of a compound of the formula (XVIII), using similar procedures to those previously described for the preparation of compounds of the formula (IX), and as illustrated in the following Preparations section. The starting materials of the formula (XVIII), and the corresponding acyl halide derivatives thereof, are either known compounds which may also be commercially available, or are prepared by conventional methods in accordance with literature precedents. The intermediates of the formula (X) are most conveniently prepared firstly by condensation or acylation of a compound of the formula:- wherein p and "Hal" are as previously defined for a compound of the formula (X), with a compound of the formula (XIV) or (XVII), or a suitable acyl halide derivative thereof, as appropriate, wherein k, m, n, X, R¹ and R² are as previously defined for a compound of the formula (I), by conventional condensation or acylation techniques such as those previously described for the preparation of compounds of the formula (IX), to provide an intermediate amide of the formula:- wherein "Hal" is halo, preferably chloro, bromo or iodo and most preferably bromo, p is 0, 1 or 2 and R⁶ is respectively, wherein k, m, n, X, R¹ and R² are as previously defined for a compound of the formula (I), followed by reduction of the compound of the formula (XX) with a suitable reducing agent, e.g. borane, using a similar method to that previously described in method (7) for the preparation of compounds of the formula (I). Preferably p is 0 in this method. The starting materials of the formula (XIX) may be known compounds (e.g. see Bull. Chem. Soc. Japan, 48 , 2323 (1975)) or are prepared by conventional techniques in accordance with literature precedents. All of the above reactions are conventional and appropriate reagents and reaction conditions for their performance and procedures for isolating the desired products will be well known to those skilled in the art in accordance with literature precedents and by reference to the Examples and Preparations hereto. Pharmaceutically acceptable acid addition salts are readily prepared by mixing equimolar amounts of the free base and the desired acid together in a suitable solvent. The acid addition salt generally precipitates from solution and is collected by filtration, or is recovered by evaporation of the solvent. The salt obtained may be recrystallised if further purification is desired. Assessment of in vitro spasmolytic activity The activity of the compounds of the invention may be shown according to the following methods. Intestinal spasmolytic activity is assessed using isolated pieces of guinea pig ileum in vitro . Tissues are equilibrated in normal Krebs solution at 37°C and gassed with 95% oxygen and 5% carbon dioxide. One end of the tissue is fixed and the opposite end attached to a Washington isotonic transducer. Contractions are induced by electrical field stimulation (0.1 Hz, 0.5 msec at supramaximal voltage) and the magnitude of the response assessed. Tissues are treated at 15 minute intervals with increasing concentrations of test compound with a washout between each concentration. The concentration of compound required to reduce the response by 50% (ED₅₀) is determined. Alternatively tissues are contracted with a submaximal concentration of either acetylcholine, histamine or bradykinin using a 3 minute contact period and the magnitude of the response noted. The bath is drained and replaced with fresh Krebs solution and, after 20 minutes, the test is repeated with the particular test compound present in the Krebs solution. The concentration of compound required to reduce the response by 50% (ED₅₀) is determined. Finally, tissues may be incubated in modified Krebs solution containing 45 mM K⁺ and zero Ca²⁺ concentration. Tissues are contracted by the addition of 2mM Ca²⁺ and the magnitude of the resulting contraction recorded. The bath is drained and replaced with fresh modified Krebs solution and, after 20 minutes, the test is repeated with the particular test compound present in the Krebs solution. The concentration of compound required to inhibit the response by 50% (ED₅₀) is determined. Spasmolytic activity on vascular tissue is shown by the ability of compounds to inhibit contractile responses of vascular tissues in vitro which is the consequence of calcium influx caused by high extracellular concentrations of potassium ions. The test is performed by mounting spirally cut strips of rat aorta with one end fixed and the other attached to a force transducer. The tissue is immersed in Krebs solution containing 2.5 mM Ca²⁺. Potassium chloride is added to the bath to give a final K⁺ concentration of 45 mM. The change in tension caused by the resulting contraction of the tissue is noted. The bath is drained and replaced with fresh Krebs solution and, after 45 minutes, the test is repeated with the particular compound under test in the Krebs solution. The concentration of compound required to reduce the response by 50% (ED₅₀) is recorded. A compound which is gut selective inhibits the spasmogenic response of the guinea pig ileum at a lower ED₅₀ concentration than that measured for the rat aorta. Assessment of in vivo spasmolytic activity The spasmolytic activity in vivo of the compounds of the invention is assessed by determining the ability of the test compound to inhibit cholecystokinin stimulated intestinal motility in anaesthetised dogs in comparison with changes in heart rate, blood pressure, cardiac output and total peripheral resistance. Oral activity is assessed in normal conscious dogs instrumented to record small and large bowel motility. For therapeutic use the compounds of the formula (I) will generally be administered in admixture with a pharmaceutical carrier selected with regard to the intended route of administration and standard pharmaceutical practice. For example, they may be administered orally in the form of tablets containing such excipients as starch or lactose, or in capsules or ovules either alone or in admixture with excipients, or in the form of elixirs or suspensions containing flavouring or colouring agents. They may be injected parenterally, for example, intravenously, intramuscularly or subcutaneously. For parenteral administration, they are best used in the form of a sterile aqueous solution which may contain other substances, for example, enough salts or glucose to make the solution isotonic with blood. For administration to man in the curative or prophylactic treatment of motility disorders of the gut, oral dosages of the compounds will generally be in the range of from 1 to 1000 mg. Thus, the invention further provides a pharmaceutical composition comprising a compound of the formula (I), or a pharmaceutically acceptable salt thereof, together with a pharmaceutically acceptable diluent or carrier. The invention yet further provides a compound of the formula (I), or a pharmaceutically acceptable salt thereof, for use as a medicament. The invention also provides the use of a compound of the formula (I), or of a pharmaceutically acceptable salt thereof, for the manufacture of a medicament for the treatment of motility disorders, particularly those of the gut such as irritable bowel syndrome. The invention further provides a method of treating an animal (including a human being) to cure or prevent a motility disorder, particularly of the gut such as irritable bowel syndrome, which comprises treating said animal with an effective amount of a compound of the formula (I), or with, as appropriate, a pharmaceutically acceptable salt or composition thereof. The invention also includes any novel intermediates disclosed herein, such as those of the formulae (VI), (IX) and (X). The following Examples illustrate the preparation of the compounds of the invention:- EXAMPLE 1 (S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine Potassium hydride (35% dispersion in oil, 229 mg) was added to a solution of 5,11-dihydrodibenzo[b,e][1,4]thiazepine (see US-3,188,322 [Chem. Abs., 63 , 8384h (1965)] and I. Ueda and S. Umio, Bull. Chem. Soc. Japan, 48(8), 2323 (1975)) (425 mg) in DME (1,2-dimethoxyethane) (20 ml) and the mixture stirred at room temperature for 30 minutes, treated with a solution of (R)-3-chloro-1-(4-methoxyphenethyl)piperidine (see Preparation 1) (507 mg) in DME (5 ml) and heated under reflux for 18 hours. The mixture was cooled to room temperature, quenched with water and extracted with ethyl acetate. The organic layer was washed with water, dried over sodium sulphate and evaporated under reduced pressure. The residue was purified by chromatography on silica gel, performing a gradient elution using initially dichloromethane as eluant and changing to dichloromethane/saturated methanolic ammonia (98:2). The appropriate fractions were combined and evaporated under reduced pressure to give the title compound as a colourless oil, (100 mg, 12%), [α] 25 / 589 -60.9° (c = 0.57 in ethanol). ¹H-NMR (300 MHz, CDCl₃) δ = 6.8-7.4 (m, 12H), 4.65 (broad, 1H), 4.15 (dd, 2H, J = 8Hz and 2Hz), 3.82 (s, 3H), 3.12 (m, 2H), 3.0 (m, 1H), 2.78 (m, 2H), 2.55 (m, 2H), 2.25 (q, 1H, J = 8Hz), 1.7-2.0 (m, 4H) ppm. EXAMPLES 2 TO 4 The following tabulated Examples of the general formula:- were obtained as colourless oils by similar methods to that described for Example 1 using 5,11-dihydrodibenzo[b,e][1,4]thiazepine and the appropriate chloro compound as starting materials. EXAMPLE 5 (S)-5,11-Dihydro-5-[2-(1-[4-methoxyphenethyl]-2-pyrrolidinyl)ethyl]dibenzo[b,e][1,4]thiazepine Potassium hydride (35% dispersion in oil, 110 mg) was added to a solution of 5,11-dihydrodibenzo[b,e][1,4]thiazepine (see Example 1) (570 mg) in DME (8 ml) and the mixture stirred at room temperature for 30 minutes, treated with a solution of (S)-2-(2-chloroethyl)-1-(4-methoxyphenethyl) pyrrolidine (480 mg) (prepared from the corresponding hydrochloride salt prepared in Preparation 4 by stirring a solution of the salt in dichloromethane with a slight excess of 10% aqueous sodium carbonate solution, separating the layers, drying the organic layer over sodium sulphate, and evaporating under reduced pressure to provide the desired free base) in DME (4 ml) and heated under reflux for two hours. The mixture was cooled to room temperature, quenched with water and extracted with ethyl acetate. The organic layer was washed with water, dried over sodium sulphate and evaporated under reduced pressure. The residue was purified by chromatography on silica gel, performing a gradient elution using initially dichloromethane/hexane (3:1) as eluant, changing to dichloromethane/methanol (97:3). The appropriate fractions were combined and evaporated under reduced pressure to give the title compound as a colourless oil, (460 mg, 58%). EXAMPLE 6 (S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine A mixture of (S)-5,11-dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine (see Preparations 13 and 14) (2.8 g), 4-methoxyphenethyl bromide (2.6 g), sodium carbonate (1.30 g) and sodium iodide (50 mg) in acetonitrile (75 ml) was heated under reflux for 16 hours, evaporated under reduced pressure and the residue partitioned between ethyl acetate and water. The organic layer was washed with water, dried over sodium sulphate and evaporated under reduced pressure. The residue was purified by chromatography on silica gel, performing a gradient elution using initially dichloromethane as eluant and changing to dichloromethane/saturated methanolic ammonia (98:2). The appropriate fractions were combined and evaporated under reduced pressure to give the title compound as a colourless oil, (2.5 g, 62%). ¹H-NMR (300 MHz, CDCl₃) δ = 6.8-7.4 (m, 12H), 4.65 (broad, 1H), 4.15 (dd, 2H, J = 8Hz and 2Hz), 3.82 (s, 3H), 3.12 (m, 2H), 3.0 (m, 1H), 2.78 (m, 2H), 2.55 (m, 2H), 2.25 (q, 1H, J = 8Hz), 1.7-2.0 (m, 4H) ppm. EXAMPLES 7 to 19 The following tabulated Examples of the general formula:- were prepared as oils by similar methods to that described for Example 6 by reacting (S)-5,11-dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine (see Preparations 13 and 14) with a slight excess of the appropriate alkylating agent R²-X-(CH₂) n -Y¹ in the presence of sodium carbonate and sodium iodide using acetonitrile as the solvent. EXAMPLE 20 (S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine maleate (1:1) A mixture of (2S)-(N-[2-(2-bromophenylmethylthio)phenyl])aminomethyl-1-(4-methoxyphenethyl)pyrrolidine (see Preparation 22) (1580g), potassium carbonate (854g) and copper powder (97.6g) in pyridine (7.9L) was heated under reflux for 5 days, cooled, filtered and poured into a mixture of concentrated hydrochloric acid (10L), ice (15kg) and dichloromethane (2.5L). The layers were separated and the acidic aqueous layer was extracted three times with dichloromethane. The combined organic extracts were washed with 2M aqueous sodium hydroxide solution followed by water, dried over magnesium sulphate and evaporated under reduced pressure. The residue (1255g) was dissolved in ethyl acetate (2.5L) and the solution was treated with a solution of maleic acid (339g) in ethyl acetate (8.5L). The resulting precipitate was collected by filtration, washed with ethyl acetate and dried to give the title compound (921g, 54%) as a colourless solid, m.p. 152.5°C, [α] 25 / 589 - 47.6 (c = 1.0 in dichloromethane). EXAMPLE 21 5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine maleate (1:1) Boron trifluoride etherate (23.4g) was added over 5 minutes to a stirred solution of 5,11-dihydro-5-[1-(4-methoxyphenylacetyl)-2-pyrrolidinylcarbonyl]dibenzo[b,e][1,4]thiazepine (see Preparation 25) (22.9g) and sodium borohydride (4.22g) in tetrahydrofuran (120ml). The mixture was stirred at room temperature for one hour, heated under reflux for two hours, cooled, quenched cautiously with water and evaporated under reduced pressure to reduced volume to remove the tetrahydrofuran. The residue was treated with 4M aqueous sodium hydroxide solution (50ml) and the mixture was heated under reflux for two hours, allowed to cool to room temperature and extracted with dichloromethane. The organic extracts were dried over magnesium sulphate and evaporated under reduced pressure. The residue (17.6g) was dissolved in ethyl acetate (40ml) and the solution was heated to 50°C, treated with a solution of maleic acid (4.74g) in ethyl acetate (100ml) and stirred at room temperature for ten minutes. The resulting precipitate was collected by filtration, washed with ethyl acetate and dried to give the desired compound as a colourless solid (19.4g, 71%), m.p. 174°C. EXAMPLE 22 (S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine salicylate (1:1) A solution of salicylic acid (800 mg) in ether (5 ml) was added to a solution of (S)-5,11-dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine (see Examples 1 and 6) (2.50 g) in ether (10 ml) and the mixture was stirred at room temperature for 16 hours. The resulting precipitate was collected, dried and recrystallised from isopropyl acetate to give the title compound as colourless crystals, (2.35 g, 71%), m.p. 150-151°C, [α]₅₈₉ -40.6° (c = 0.695 in ethanol). EXAMPLE 23 (S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine maleate (1:1) A solution of maleic acid (4.7g) in ethyl acetate (200 ml) was added to a solution of (S)-5,11-dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine (see Examples 1 and 6) (17.3 g) in ethyl acetate (100 ml) and the mixture was stirred at room temperature for 16 hours. The resulting precipitate was collected, dried and recrystallised from ethyl acetate/methanol to give the title compound as colourless crystals, (14.0 g, 64%), m.p. 153-154°C, [α] 25 / 589 -39.7° (c = 0.755 in ethanol). EXAMPLE 24 (S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine methanesulphonate (1:1) Methanesulphonic acid (39 mg) was added to a solution of (S)-5,11-dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine (see Examples 1 and 6) (175 mg) in dichloromethane (5 ml) and the mixture was stirred at room temperature for 16 hours and evaporated under reduced pressure. The residue was crystallised from ethyl acetate/diisopropyl ether to give the title compound as colourless crystals, (150 mg, 31%), m.p. 118-122°C, [α] 25 / 589 -36.9° (c = 0.59 in ethanol). EXAMPLE 25 (S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine (R)-mandelate (1:1) A solution of (R)-mandelic acid (88 mg) and (S)-5,11-dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine (see Examples 1 and 6) (250 mg) in dichloromethane (10 ml) was stirred at room temperature for 16 hours and evaporated under reduced pressure. The residue was triturated with ether and the resulting solid collected, dried and recrystallised from ethyl acetate/hexane to give the title compound as colourless crystals, (250 mg, 83%), m.p. 151-153°C, [α] 25 / 589 -70.4° (c = 0.575 in ethanol). EXAMPLE 26 (S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine hydrochloride (1:1) Excess saturated ethereal hydrogen chloride solution was added to a solution of (S)-5,11-dihydro-5-11-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine (see Examples 1 and 6) (1.30 g) in ether (20 ml) and the mixture was stirred at room temperature for 16 hours. The resulting precipitate was collected, washed several times with ether, dried and recrystallised from ethyl acetate to give the title compound as colourless crystals, (602 mg, 43%), m.p. 189-190°C, [α] 25 / 589 -30.7° (c = 0.57 in ethanol). EXAMPLE 27 (S)-5,11-Dihydro-5-[1-(2-[2-pyridyl]ethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine A mixture of 2-vinylpyridine (250 mg) and (S)-5,11-dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine (see Preparations 13 and 14) (166 mg) was heated at 120°C for 2 hours, cooled to room temperature and purified by chromatography on silica gel using ethyl acetate/methanol (10:1) as eluant. Appropriate fractions were combined and evaporated under reduced pressure to give the title compound as a pale brown gum, (131 mg, 58%). ¹H-NMR (300 MHz, CDCl₃)δ= 8.57 (d, 1H, J = 8Hz), 7.61 (dt, 1H, J = 8 and 2Hz), 6.90-7.40 (m, 10H), 6.80 (dt, 1H, J = 8 and 2Hz), 4.50-4.70 (broad s, 1H), 4.04 (dd, 2H, J = 9 and 3Hz) and 1.6-3.3 (m, 12H) ppm. EXAMPLE 28 (2S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine-10-oxide A mixture of (2S)-5,11-dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine-10-oxide (see Preparation 19) (180 mg), 4-methoxyphenethyl bromide (140 mg) and sodium carbonate (70 mg) in acetonitrile (20 ml) was heated under reflux for 18 hours and evaporated under reduced pressure. The residue was partitioned between ethyl acetate and water and the organic layer washed with water, dried over sodium sulphate and evaporated under reduced pressure. The residue was purified by chromatography on silica gel (5 g), performing a gradient elution initially using dichloromethane as eluant and changing to dichloromethane/methanol (98:2). Appropriate fractions were combined and evaporated under reduced pressure to give the title compound as a colourless oil, (50 mg, 19%). EXAMPLE 29 (2S)-5,11-Dihydro-5-[1-(4-hydroxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine-10-oxide This was obtained by a similar method to that described in Example 28 using 4-hydroxyphenethyl bromide instead of 4-methoxyphenethyl bromide as the starting material. The title compound was obtained as a colourless oil, (50 mg, 26%). EXAMPLE 30 (S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine-10,10-dioxide This was obtained by a similar method to that described in Example 28 using (S)-5,11-dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine-10,10-dioxide (see Preparation 20) instead of (2S)-5,11-dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine-10-oxide as the starting material. The title compound was obtained as a colourless oil, (80 mg, 28%). EXAMPLE 31 (S)-5,11-Dihydro-5-[1-(4-hydroxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine-10,10-dioxide This was obtained by reacting (S)-5,11-dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine-10,10-dioxide (see Preparation 20) and 4-hydroxyphenethyl bromide by a similar method to that described in Example 28. The title compound was obtained as a colourless oil, (60 mg, 29%). The following Preparations illustrate the preparation of starting materials used in the preceding Examples:- PREPARATION 1 (R)-3-Chloro-1-(4-methoxyphenethyl)piperidine A mixture of methanesulphonyl chloride (1.3 ml), triethylamine (1.7 g) and (S)-2-hydroxymethyl-1-(4-methoxyphenethyl)pyrrolidine (see Preparation 6) (4.0 g) in dichloromethane (30 ml) was stirred at room temperature for 2.5 hours, diluted with dichloromethane, washed with 10% aqueous sodium carbonate solution, dried over sodium sulphate and evaporated under reduced pressure to give the title compound as a pale brown oil, (4.0 g), which was characterised by NMR and used directly in Example 1 without further purification. ¹H-NMR (300 MHz, CDCl₃) δ = 7.17 (d, 2H, J = 8Hz), 6.84 (d, 2H, J = 8Hz), 4.01-4.13 (m, 1H), 3.82 (s, 3H), 3.19 (d, 1H, J = 14 Hz), 2.58-2.84 (m, 5H), 2.32 (t, 1H, J = 14 Hz) and 1.6-2.3 (m, 4H) ppm. PREPARATION 2 (S)-3-Chloro-1-(4-methoxyphenethyl)piperidine This was obtained by a similar method to that described in Preparation 1 using (R)-2-hydroxymethyl-1-(4-methoxyphenethyl)pyrrolidine (see Preparation 7) instead of (S)-2-hydroxymethyl-1-(4-methoxyphenethyl)pyrrolidine as the starting material. The title compound was obtained as a pale brown oil, (660 mg), which was characterised by NMR and used directly in Example 2 without further purification. ¹H-NMR (300 MHz, CDCl₃) δ = 7.17 (d, 2H, J = 8Hz), 6.84 (d, 2H, J = 8Hz), 4.01-4.13 (m, 1H), 3.82 (s, 3H), 3.19 (d, 1H, J = 14 Hz), 2.58-2.84 (m, 5H), 2.32 (t, 1H, J = 14 Hz) and 1.6-2.3 (m, 4H) ppm. PREPARATION 3 (R)-3-Chloro-1-(4-methoxyphenethyl)perhydroazepine This was obtained by a similar method to that described in Preparation 1 using (S)-2-hydroxymethyl-1-(4-methoxyphenethyl)piperidine (see Preparation 8) instead of (S)-2-hydroxymethyl-1-(4-methoxyphenethyl)pyrrolidine as the starting material. The title compound was obtained as a pale brown oil, (2.6 g), which was characterised by NMR and used directly in Example 3 without further purification. ¹H-NMR (300 MHz, CDCl₃) δ = 7.14 (d, 2H, J = 8Hz), 6.83 (d, 2H, J = 8Hz), 3.82 (s, 3H), 2.4-3.7 (m, 9H) and 1.6-1.8 (m, 6H) ppm. PREPARATION 4 (S)-2-(2-Chloroethyl)-1-(4-methoxyphenethyl)pyrrolidine hydrochloride Thionyl chloride (2 ml) was added slowly to a solution of (S)-2-(2-hydroxyethyl)-1-(4-methoxyphenethyl)pyrrolidine (see Preparation 9) (3.0 g) in dichloromethane (30 ml). The mixture was heated under reflux for 2 hours and evaporated under reduced pressure to give the title compound as a brown oil, (4.15 g), which was characterised by NMR and used directly in Example 5 without further purification. ¹H-NMR (300 MHz, CDCl₃) δ = 7.19 (d, 2H, J = 8Hz), 6.90 (d, 2H, J = 8Hz), 3.80-4.02 (m, 2H), 3.80 (s, 3H), 3.34-3.62 (m, 4H), 2.83-3.16 (m, 3H), 2.44-2.76 (m, 2H), 2.23-2.40 (m, 2H) and 1.98-2.16 (m, 2H) ppm. PREPARATION 5 (R)-3-Chloro-1-(4-methoxyphenethyl)-3-methylpiperidine Thionyl chloride (238 mg) was added slowly to a solution of (S)-2-hydroxymethyl-1-(4-methoxyphenethyl)-2-methylpyrrolidine (see Preparation 10) (349 mg) in dichloromethane (15 ml) and the mixture was heated under reflux for 2 hours. The reaction was cooled, diluted with dichloromethane, washed with 10% aqueous sodium carbonate solution, dried over sodium sulphate and evaporated under reduced pressure to give the title compound as a brown gum, (130 mg), which was characterised by NMR and used directly in Example 4 without further purification. ¹H-NMR (300 MHz, CDCl₃) δ = 7.19 (d, 2H, J = 8Hz), 6.82 (d, 2H, J = 8Hz), 3.80 (s, 3H), 2.2-3.1 (m, 8H), 1.62 (s, 3H) and 1.4-2.1 (m, 4H) ppm. PREPARATION 6 (S)-2-Hydroxymethyl-1-(4-methoxyphenethyl)pyrrolidine A mixture of (S)-2-pyrrolidinemethanol (3.0 g), 4-methoxyphenethyl bromide (7.0 g), sodium carbonate (3.5 g) and sodium iodide (100 mg) in acetonitrile (40 ml) was heated under reflux for 16 hours and evaporated under reduced pressure. The residue was partitioned between ethyl acetate and water and the organic layer washed with water and extracted with 2M hydrochloric acid. The acidic extract was washed with ethyl acetate, basified with solid sodium carbonate and extracted with ethyl acetate. The organic extract was dried over sodium sulphate and evaporated under reduced pressure to give the title compound as a colourless oil, (4.0 g, 57%). ¹H-NMR (300 MHz, CDCl₃) δ = 7.16 (d, 2H, J = 8Hz), 6.83 (d, 2H, 8Hz), 3.81 (s, 3H), 3.59 (dd, 1H, J = 8 and 2Hz), 3.26-3.40 (m, 2H), 2.3-3.1 (m, 7H) and 1.6-2.0 (m, 4H) ppm. PREPARATION 7 (R)-2-Hydroxymethyl-1-(4-methoxyphenethyl)pyrrolidine This was obtained by a similar method to that described in Preparation 6 using (R)-2-pyrrolidinemethanol instead of (S)-2-pyrrolidinemethanol as the starting material. The title compound was obtained as a pale brown oil, (1.8 g, 77%), [α] 25 / 589 + 68.9° (c = 1.5 in ethanol). PREPARATION 8 (S)-2-Hydroxymethyl-1-(4-methoxyphenethyl)piperidine This was obtained by a similar method to that described in Preparation 6 using (S)-2-piperidinemethanol (prepared by resolution of racemic 2-piperidinemethanol as described in Japan Kokai 73 19,597 - see Chem. Abs., 78 , 148000f (1973)) instead of (S)-2-pyrrolidinemethanol as the starting material. The title compound was obtained as a colourless oil, (4.8 g, 64%), [α] 25 / 589 -39.3° (c = 1.025 in ethanol). ¹H-NMR (300 MHz, CDCl₃) δ = 7.16 (d, 2H, J = 8Hz), 6.83 (d, 2H, J = 8Hz), 3.80 (s, 3H), 3.76 (dd, 1H, J = 9 and 3Hz), 3.63 (dd, 1H, J = 9 and 2Hz), 2.3-3.1 (m, 9H) and 1.3-1.8 (m, 4H) ppm. PREPARATION 9 (S)-2-(2-Hydroxyethyl)-1-(4-methoxyphenethyl)pyrrolidine This was obtained by a similar method to that described in Preparation 6 using (S)-2-(2-hydroxyethyl)pyrrolidine (see Preparation 11) instead of (S)-2-pyrrolidinemethanol as the starting material. The title compound was obtained as a colourless oil, (4.7 g, 68%), [α] 25 / 589 -80.4° (c = 1.0 in methanol). PREPARATION 10 (S)-2-Hydroxymethyl-1-(4-methoxyphenethyl)-2-methylpyrrolidine (S)-1-(4-Methoxyphenethyl)-2-methylproline (see Preparation 12) (895 mg) was added portionwise to a stirred suspension of lithium aluminium hydride (380 mg) in tetrahydrofuran (60 ml) and the mixture stirred at room temperature for 22 hours. The reaction was quenched by the cautious, dropwise, sequential addition of water (0.4 ml), 5M aqueous sodium hydroxide solution (0.4 ml) and water (1.2 ml), and then the resulting mixture filtered. The filtrate was dried over sodium sulphate and evaporated under reduced pressure to give the title compound as a colourless oil, (390 mg, 46%). ¹H-NMR (300 MHz, CDCl₃)δ = 7.16 (d, 2H, J = 8 Hz), 6.84 (d, 2H, J = 8Hz), 3.81 (s, 3H), 3.37 (dt, 1H, J = 2 and 8 Hz), 3.21 (q, 2H, J = 7 Hz), 2.4-3.1 (m, 5H), 1.98-2.11 (m, 1H), 1.66-1.86 (m, 2H), 1.42-1.58 (m, 1H) and 0.84 (s, 3H) ppm. PREPARATION 11 (S)-2-(2-Hydroxyethyl)pyrrolidine Lithium aluminium hydride (3.27 g) was added, portionwise over 30 minutes, to a stirred suspension of (S)-2-pyrrolidineacetic acid hydrobromide (7.23 g) (prepared by the method of R. Busson and H. Vanderhaeghe, J. Org. Chem., 43 , 4438 (1978)) in tetrahydrofuran (240 ml) and the mixture heated under reflux for 3.5 hours. The reaction was allowed to cool to room temperature, quenched by the cautious, dropwise, sequential addition of water (3 ml), 2M aqueous sodium hydroxide solution (3 ml) and water (2 ml), treated with sodium sulphate (10 g) and filtered. The filtrate was evaporated under reduced pressure to give the title compound as a colourless oil, (3.2 g, 81%) [α] 25 / 589 -25.1° (c = 1.0 in methanol). ¹H-NMR (300 MHz, CDCl₃) δ = 3.78 (dt, 2H, J = 7 and 3 Hz), 3.68 (broad s, 2H), 3.37-3.47 (m, 1H), 2.89 (t, 2H, J = 7Hz) and 1.4-2.2 (m, 6H) ppm. PREPARATION 12 (S)-1-(4-Methoxyphenethyl)-2-methylproline A mixture of (S)-2-methylproline (1.47 g) (prepared by the method of D. Seebach et al., JACS, 105 , 5390 (1983)), 4-methoxyphenethyl bromide (1.72 g) and sodium carbonate (2.12 g) in ethanol (30 ml) was heated under reflux for 48 hours, adjusted to pH8 with 2M hydrochloric acid, treated with glacial acetic acid to pH7, filtered and evaporated under reduced pressure. The residue was triturated with ethanol, filtered and evaporated under reduced pressure to give the title compound as a brown gum, (1.55 g), which was used directly in Preparation 10 without further purification. PREPARATION 13 (S)-5,11-Dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine Sodium bis(2-methoxyethoxy)aluminium hydride ("Red-A1" - registered Trade Mark) (20.8 ml of a 3.4M solution in toluene) was added to a solution of (S)-5,11-dihydro-5-(1-[4-methylphenylsulphonyl]-2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine (see Preparations 15 and 16) (8.0 g) in toluene (50 ml) and the mixture heated under reflux for 27 hours, allowed to cool to room temperature, quenched by the addition of 2.5 M aqueous sodium hydroxide solution, diluted with water and extracted with ethyl acetate. The combined organic extracts were washed with saturated aqueous sodium chloride solution, dried over sodium sulphate and evaporated under reduced pressure. The residue was purified by chromatography on silica gel, performing a gradient elution initially using dichloromethane as eluant and changing to dichloromethane/saturated methanolic ammonia (90:10). Appropriate fractions were combined and evaporated under reduced pressure to give the title compound as a colouriess oil, (2.9 g, 55%), [α]₅₈₉ -4.9° (c = 1.065 in ethanol). ¹H-NMR (300 MHz, CDCl₃)δ= 7.0-7.4 (m, 7H), 6.84 (t, 1H, J = 8 Hz), 4.1-4.7 (broad s, 2H), 3.96 (dd, 1H, J = 10 and 4 Hz), 3.66 (dd, 1H, J = 10 and 5 Hz), 3.0-3.5 (m, 3H) and 1.6-2.1 (m, 4H) ppm. PREPARATION 14 (S)-5,11-Dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine Sodium (55 mg) was added to a solution of naphthalene (340 mg) in DME (6 ml) and the mixture stirred at room temperature for one hour, treated with a solution of (S)-5,11-dihydro-5-(1-[4-methylphenylsulphonyl]-2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine (see Preparations 15 and 16) (200 mg) in DME (4 ml), stirred with ice-cooling for one hour, quenched with water and extracted with ethyl acetate. The organic extract was worked-up and purified as described in Preparation 13 to give the title compound as a colourless oil, (16 mg, 12%). ¹H-NMR (300 MHz, CDCl₃) δ = 7.0-7.4 (m, 7H), 6.84 (t, 1H, J = 8 Hz), 4.1-4.7 (broad s, 2H), 3.96 (dd, 1H, J = 10 and 4 Hz), 3.66 (dd, 1H, J = 10 and 5 Hz), 3.0-3.5 (m, 3H) and 1.6-2.1 (m, 4H) ppm. PREPARATION 15 (S)-5,11-Dihydro-5-(1-[4-methylphenylsulphonyl]-2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine Lithium diisopropylamide (4.3 ml of a 1.5M solution in hexane) was added to a solution of 5,11-dihydrodibenzo[b,e][1,4]thiazepine (see Example 1 for source) (1.0 g) in DME (25 ml) and the mixture stirred at room temperature for 15 minutes, treated with (S)-1-(4-methylphenylsulphonyl)-2-(4-methylphenylsulphonyloxymethyl)pyrrolidine (3.9 g) (prepared by the method of P. Karrer and K. Ehrhardt, Helv. Chim. Acta, 34 , 2202 (1951)), heated under reflux for 2.5 hours, allowed to cool to room temperature, quenched with 2M hydrochloric acid and extracted with ethyl acetate. The organic extract was washed with water, dried over sodium sulphate and evaporated under reduced pressure. The residue was purified by chromatography on silica gel, performing a gradient elution initially using hexane as eluant and changing to hexane/ethyl acetate (90:10). Appropriate fractions were combined and evaporated under reduced pressure to give the title compound as a colourless solid, (0.93 g, 44%), m.p. 88-90°C, [α] 25 / 589 -115° (c = 0.62 in ethanol). ¹H-NMR (300 MHz, CDCl₃) δ = 6.9-7.6 (m, 12H), 4.6 (dd, 2H, J = 8Hz and 2Hz), 4.2-4.4 (broad, 1H), 3.5 (m, 2H), 3.0-3.2 (m, 2H), 2.42 (s, 3H), 2.0 (m, 1H), 1.8 (m, 1H), 1.6 (m, 2H) ppm. PREPARATION 16 (S)-5,11-Dihydro-5-(1-[4-methylphenylsulphonyl]-2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine Sodium hydride (80% dispersion in oil, 40 mg) was added to a solution of 5,11-dihydrodibenzo[b,e][1,4]thiazepine (see Example 1 for source) (213 mg) in dimethylformamide (10 ml) and the mixture heated at 60°C for 45 minutes, treated with a solution of (S)-1-(4-methylphenylsulphonyl)-2-(4-methylphenylsulphonyloxy methyl)pyrrolidine (see Preparation 15 for source) (440 mg) in dimethylformamide (5 ml), heated at 60°C for 7 hours and evaporated under reduced pressure. The residue was partitioned between ethyl acetate and water and the organic layer washed with water, dried over sodium sulphate and evaporated under reduced pressure. The residue was purified by chromatography on silica gel, performing a gradient elution initially using hexane as eluant and changing to hexane/ethyl acetate (60:40). Appropriate fractions were combined and evaporated under reduced pressure to give the title compound as a colourless oil, (50 mg, 24%). ¹H-NMR (300 MHz, CDCl₃)δ= 6.9-7.6 (m, 12H), 4.6 (dd, 2H, J = 8Hz and 2Hz), 4.2-4.4 (broad, 1H), 3.5 (m, 2H), 3.0-3.2 (m, 2H), 2.42 (s, 3H), 2.0 (m, 1H), 1.8 (m, 1H), 1.6 (m, 2H) ppm. PREPARATION 17 5-(2-Bromoethyl) indane Phosphorous tribromide (3.5 ml) was added dropwise to an ice-cooled solution of 5-(2-hydroxyethyl)indane (14.0 g) (prepared as described in FR-2,139,628 (14.0 g) in carbon tetrachloride (100 ml) and the mixture was heated under reflux for 2 hours, quenched with ice-water and partitioned between dichloromethane and 10% aqueous sodium carbonate solution. The organic layer was washed with water, dried over magnesium sulphate and evaporated under reduced pressure. The residue was purified by chromatography on silica gel using dichloromethane as eluant. Appropriate fractions were combined and evaporated under reduced pressure to give the title compound as a pale yellow oil, (10.5 g, 54%). ¹H-NMR (300 MHz, CDCl₃)δ= 7.20 (dd, 1H, J = 8 and 1.5 Hz), 7.10 (d, 1H, J = 1.5 Hz), 6.99 (d, 1H, J = 8Hz), 3.58 (t, 2H, J = 7 Hz), 3.17 (t, 2H, J = 7 Hz), 2.80-3.02 (m, 4H) and 2.02-2.18 (m, 2H) ppm. PREPARATION 18 4-(2-[methanesulphonyloxy]ethyl)pyrimidine A solution of methanesulphonyl chloride (137 mg) in dichloromethane (2 ml) was added to a solution of 4-(2-hydroxyethyl)pyrimidine (124 mg) (prepared by the method of C. G. Overberger and I. C. Kogon, JACS, 76 , 1879 (1954)) and triethylamine (121 mg) in dichloromethane (10 ml), the mixture stirred at room temperature for 3 hours and evaporated under reduced pressure to give the crude title compound as a pale yellow oil which was used directly in Example 10 without further purification. PREPARATION 19 (2S)-5,11-Dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine-10-oxide A solution of meta -chloroperbenzoic acid (105 mg) in chloroform (5 ml) was added to a solution of (S)-5,11-dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine hydrochloride (see Preparation 21) (200 mg) in chloroform (10 ml) and the mixture stirred at room temperature for 4 hours, washed with 10% aqueous sodium carbonate solution, dried over sodium sulphate and evaporated under reduced pressure to give the title compound as a colourless gum, (180 mg, 96%). ¹H-NMR (300 MHz, CDCl₃)δ= 7.78 (dd, 1H, J = 8 and 2 Hz); 7.0-7.6 (m, 7H); 4.30-4.62 (m, 2H), 3.63-3.80 (m, 2H), 3.24 (sextet, 1H, J = 7 Hz), 2.81-3.02 (m, 2H) and 1.4-2.0 (m, 5H) ppm. PREPARATION 20 (S)-5,11-Dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine-10,10-dioxide Hydrogen peroxide (30 wt. % solution in water, 0.8 ml) was added to a hot (85°C) solution of (S)-5,11-dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine hydrochloride (see Preparation 21) (660 mg) in formic acid (5 ml) and the mixture heated at 90-95°C for 2 hours, poured into water, basified with solid sodium hydroxide to pH 10 and extracted with ethyl acetate. The combined organic extracts were dried over sodium sulphate and evaporated under reduced pressure to give the title compound as a pale brown solid, (540 mg, 91%), which was used directly in Examples 30 and 31. PREPARATION 21 (S)-5,11-Dihydro-5-(2-pyrrolidinylmethyl)dibenzo[b,e][1,4]thiazepine hydrochloride (1:1) A mixture of (S)-5,11-dihydro-5-[1-(4-methylphenylsulphonyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine (see Preparations 15 and 16) (77.6 g) and sodium bis(2-methoxyethoxy)aluminium hydride ("Red-Al" - registered Trade Mark) (202 ml of a 3.4 M solution in toluene) in toluene (202 ml) was heated under reflux for 17 hours, allowed to cool to room temperature, poured cautiously into a mixture of 2.5 M aqueous sodium hydroxide solution (400 ml) and ether (200 ml) and the layers separated. The aqueous layer was extracted twice with ether and the combined organic layers extracted twice with 3M hydrochloric acid. The combined acidic extracts were stirred at room temperature for 18 hours and the resulting precipitate collected, stirred with water (200 ml), filtered and dried to give the title compound as a colourless solid, (22.4 g, 39%), m.p. 155-160°C (decomp.). PREPARATION 22 (2S)-(N-[2-(2-Bromophenylmethylthio)phenyl])aminomethyl-1-(4-methoxyphenethyl)pyrrolidine Boron trifluoride etherate (1531 g, 1327 ml) was added over ten minutes to a stirred, ice-cooled solution of (2S)-(N-[2-(2-bromophenylmethylthio)phenyl])carbamoyl-1-(4-methoxyphenylacetyl)pyrrolidine (see Preparation 23) (1750 g) and sodium borohydride (306.2 g) in tetrahydrofuran (8.73 L). The mixture was stirred at room temperature for one hour, heated under reflux for two hours, cooled, evaporated under reduced pressure to reduced volume to remove the tetrahydrofuran, quenched by the cautious addition of water and further evaporated under reduced pressure. The residue was treated with 40% aqueous sodium hydroxide solution (5 L) and the mixture was heated under reflux for two hours, cooled to room temperature by the addition of ice, acidified to pH 6-7 with concentrated hydrochloric acid and extracted with dichloromethane. The combined organic extracts were washed with 1M aqueous sodium hydroxide solution followed by water, dried over magnesium sulphate and evaporated under reduced pressure to give the desired compound (1589 g, 96%) as a brown oil which was characterised by ¹H-NMR spectroscopy. ¹H-NMR (CDCl₃)δ= 7.56 (d, 1H, J=8Hz), 7.00 - 7.15 (m, 6H), 6.93 (d, 1H, J=8Hz), 6.81 (d, 2H, J=8Hz), 6.50 - 6.61 (m, 2H), 5.54 (broad s, 1H), 3.99 (s, 2H), 3.75 (s, 3H), 2.70 - 3.40 (m, 7H), 2.44 - 2.57 (m, 1H), 2.30 - 2.40 (m, 1H), 1.65 - 2.03 (m, 4H) ppm. PREPARATION 23 (2S)-(N-[2-(2-Bromophenylmethylthio)phenyl])carbamoyl-1-(4-methoxyphenylacetyl)pyrrolidine A solution of 1,3-dicyclohexylcarbodiimide (DCC) (705 g) in dichloromethane (1400 ml) was added over 30 minutes to a stirred solution of 2-(2-bromophenylmethylthio)aniline (see Bull. Chem. Soc. Japan, 48 , 2323 (1975)) (957 g) and (S)-1-(4-methoxyphenylacetyl)proline (see Preparation 24) (900 g) in dichloromethane (5.5 L). The mixture was stirred at 25-35°C for one hour and filtered. The filtrate was evaporated under reduced pressure to give the desired product as a brown gum which was used directly in Preparation 22. PREPARATION 24 (S)-1-(4-Methoxyphenylacetyl)proline 5M Aqueous sodium hydroxide solution (26 ml) was added to a solution of (S)-proline (582 g) in water (3.5 L) and acetone (3.5 L). The mixture was treated with ice (3.5 kg), cooled in an ice/acetone bath, treated over a one hour period with a solution of 4-methoxyphenylacetyl chloride (944 g) in acetone (1.75 L) with vigorous stirring and the simultaneous addition of sufficient 5M aqueous sodium hydroxide solution in order to keep the pH within the range 9.5 - 9.7. The reaction was stirred for 30 minutes, treated with concentrated hydrochloric acid (6 ml) and partially evaporated under reduced pressure to remove the majority of the acetone. The residue was treated with ice (2 kg), concentrated hydrochloric acid (750 ml) and the mixture stirred at room temperature for one hour. The resulting precipitate was collected, washed with water and recrystallised from toluene/ethanol to give the desired product as a colourless solid (905 g, 75%), m.p. 138 - 139°C. PREPARATION 25 5,11-Dihydro-5-[1-(4-methoxyphenylacetyl)-2-pyrrolidinylcarbonyl]dibenzo[b,e][1,4]thiazepine A solution of phosphorus pentachloride (20.8 g) in dichloromethane (100 ml) was added over 5 minutes to a stirred solution of (S)-1-(4-methoxyphenylacetyl)proline (see Preparation 24) (26.33 g) in dichloromethane (150 ml). The mixture was stirred at room temperature for one hour, treated with a solution of 5,11-dihydrodibenzo[b,e][1,4]thiazepine (see Example 1 for source) (21.3 g) in dichloromethane (100 ml) and heated under reflux for 2 hours. The mixture was treated with toluene (300 ml) and the mixture was heated under reflux whilst distilling off a portion of the dichloromethane until the reflux temperature of the mixture was about 60°C. The mixture was heated under reflux for a further 4 hours, cooled, washed with saturated aqueous sodium bicarbonate solution, dried over magnesium sulphate and evaporated under reduced pressure. The residue was purified by column chromatography on silica using dichloromethane as the eluant. The appropriate fractions were combined and evaporated under reduced pressure to give the crude product (32.5 g, 71%), which was used directly in Example 21.

Claims: Claims for the following Contracting States : AT, BE, CH, LI, DE, DK, FR, GB, IT, LU, NL, SE A compound of the formula:- wherein k is 1, 2 or 3; m is 1, 2 or 3; n is 1, 2 or 3; p is 0, 1 or 2; X is O, S or a direct link, with the proviso that when X is O or S, n is 2 or 3; R¹ is H or C₁-C₄ alkyl; and R² is (a) wherein R³ and R⁴ are each independently selected from H, C₁-C₄ alkyl, C₁-C₄ alkoxy, -OH, -N(C₁-C₄ alkyl)₂, halo and -CF₃; (b) wherein q is 1, 2 or 3, and X¹ and X² are each independently selected from O and -CH₂-; or (c) a pyridinyl, pyridazinyl, pyrimidinyl, pyrazinyl or thienyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy, or a pharmaceutically acceptable salt thereof. A compound of the formula (I) as claimed in claim 1 wherein k is 1 or 2. A compound of the formula (I) as claimed in claim 2 wherein k is 1. A compound of the formula (I) as claimed in any preceding claim wherein m is 1 or 2. A compound of the formula (I) as claimed in claim 4 wherein m is 1. A compound of the formula (I) as claimed in any preceding claim wherein n is 2. A compound of the formula (I) as claimed in any preceding claim wherein p is 0. A compound of the formula (I) as claimed in any preceding claim wherein X is a direct link. A compound of the formula (I) as claimed in any preceding claim wherein R¹ is H or methyl. A compound of the formula (I) as claimed in claim 9 wherein R¹ is H. A compound of the formula (I) as claimed in any preceding claim wherein R² is (a) wherein R³ and R⁴ are each independently selected from H, C₁-C₄ alkyl, C₁-C₄ alkoxy, -OH and halo; (b) wherein X¹ and X² are as defined in claim 1; or (c) a pyridinyl, pyrimidinyl or thienyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy. A compound of the formula (I) as claimed in claim 11 wherein R² is phenyl, 3-methylphenyl, 4-methylphenyl, 4-hydroxyphenyl, 4-methoxyphenyl, 3,4-dimethoxyphenyl, 4-chlorophenyl, 5-indanyl, 3,4-methylenedioxyphenyl, 2-pyridinyl, 4-pyrimidinyl or 3-thienyl. A compound of the formula (I) as claimed in claim 12 wherein R² is 4-methoxyphenyl. A (2S)- stereoisomer of a compound of the formula (I) as claimed in any preceding claim, that is (S)-5,11-Dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine or a pharmaceutically acceptable salt thereof. A maleate salt of a compound of the formula (I) as claimed in any preceding claim. A pharmaceutical composition comprising a compound of the formula (I), or a pharmaceutically acceptable salt thereof, as claimed in any preceding claim, together with a pharmaceutically acceptable diluent or carrier. A compound of the formula (I), or a pharmaceutically acceptable salt or composition thereof, as claimed in any one of claims 1 to 16 and 17 respectively, for use as a medicament. The use of a compound of the formula (I), or of a pharmaceutically acceptable salt or composition thereof, as claimed in any one of claims 1 to 16 and 17 respectively, for the manufacture of a medicament for the curative or prophylactic treatment of motility disorders, particularly those of the gut such as irritable bowel syndrome. A compound of the formula:- or wherein R⁵ is or wherein "Hal" is halo and k, m, n, p, X, R¹ and R² are as defined in claim 1. Claims for the following Contracting State : ES A process for the preparation of a compound of the formula:- wherein k is 1, 2 or 3; m is 1, 2 or 3; n is 1, 2 or 3; p is 0, 1 or 2; X is O, S or a direct link, with the proviso that when X is O or S, n is 2 or 3; R¹ is H or C₁-C₄ alkyl; and R² is (a) wherein R³ and R⁴ are each independently selected from H, C₁-C₄ alkyl, C₁-C₄ alkoxy, -OH, -N(C₁-C₄ alkyl)₂, halo and -CF₃; (b) wherein q is 1, 2 or 3, and X¹ and X² are each independently selected from O and -CH₂-; or (c) a pyridinyl, pyridazinyl, pyrimidinyl, pyrazinyl or thienyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy, or a pharmaceutically acceptable salt thereof, which comprises (a) for compounds of the formula (I) wherein k is 1 and m, n, p, X, R¹ and R² are as defined for a compound of the formula (I), reacting the deprotonated form of a compound of the formula:- with a compound of the formula:- wherein m, n, p, X, R¹ and R² are as defined for a compound of the formula (I) and W is a leaving group; (b) reacting the deprotonated form of a compound of the formula (II) with a compound of the formula:- wherein k, m, n, p, X, R¹ and R² are as defined for a compound of the formula (I) and Y is a leaving group; (c) reacting a compound of the formula:- with a compound (VII) of the formula R²-X-(CH₂) n -Y¹, wherein k, m, n, p, X, R¹ and R² are as defined for a compound of the formula (I) and Y¹ is a leaving group, optionally in the presence of an acid acceptor; (d) for compounds of the formula (I) wherein n is 2, X is a direct link, R² is a 2- or 4-pyridinyl, pyridazinyl, 2- or 4-pyrimidinyl or pyrazinyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy and k, m, p and R¹ are as defined for a compound of the formula (I), reacting a compound of the formula (VI), wherein k, m, p and R¹ are as defined for a compound of the formula (I), with a compound (VIII) of the formula R²CH=CH₂, wherein R² is as defined for this method; (e) for compounds of the formula (I) wherein p is 1 or 2 and k, m, n, X, R¹ and R² are as defined for a compound of the formula (I), oxidising an acid addition salt of a compound of the formula (I), wherein p is 0 or 1, as appropriate, and k, m, n, X, R¹ and R² are as defined for a compound of the formula (I); (f) for compounds of the formula (I) wherein p is 0 and k, m, n, X, R¹ and R² are as defined for a compound of the formula (I), reducing a compound of the formula (I) wherein p is 1 or 2 and k, m, n, X, R¹ and R² are as defined for a compound of the formula (I); (g) reducing a compound of the formula:- wherein p is 0, 1 or 2 and R⁵ is or wherein k, m, n, X, R¹ and R² are as defined for a compound of the formula (I); or (h) reacting a compound of the formula:- wherein "Hal" is halo and k, m, n, p, X, R¹ and R² are as defined for the formula (I), with a transition metal, or an oxide thereof: any one of said process alternatives (a) to (c) and (e) to (h) being optionally followed by one or more of the additional process steps comprising (i) when R² is a hydroxy-substituted phenyl group, conversion of the hydroxy substituent to C₁-C₄ alkoxy by reaction firstly with a base and then with a C₁-C₄ alkylating agent; (ii) when R² is a C₁-C₄ alkoxy-substituted phenyl group, conversion of the C₁-C₄ alkoxy substituent to hydroxy by treatment with either hydrogen bromide or an alkali metal C₁-C₄ alkanethiolate; (iii) when R² is a halo-substituted phenyl group, conversion of the halo substituent to -N(C₁-C₄ alkyl)₂ by reaction with an appropriate dialkylamine of the formula (C₁-C₄ alkyl)₂NH; (iv) separation of the stereoisomers; or (v) conversion of the compound of the formula (I) into a pharmaceutically acceptable salt. A process for the preparation of a compound of the formula (I) as defined in claim 1, or a pharmaceutically acceptable salt thereof, wherein k, m, n, p, X, R¹ and R² are as defined for a compound of the formula (I) in claim 1, which comprises any one of said process alternatives (a) to (e) as defined in claim 1: said process being optionally followed by conversion of the compound of the formula (I) into a pharmaceutically acceptable salt. A process as claimed in claim 1(a) wherein W is halo. A process as claimed in claim 1(b) or 1(c) wherein Y or Y¹, respectively, is halo, methanesulphonyloxy, trifluoromethanesulphonyloxy or p-toluenesulphonyloxy. A process as claimed in claim 1(a), 1(b), 3 or 4, as dependent on claim 1(b) only, wherein the sodium or potassium salt of a compound of the formula (II) is used. A process as claimed in claim 1(c) or 4, as dependent on claim 1(c) only, wherein Y¹ is chloro or bromo and sodium or potassium carbonate is used as the acid acceptor, and optionally sodium or potassium iodide is present. A process as claimed in claim 1(g) in which the reducing agent is borane. A process as claimed in claim 1(h) in which "Hal" is bromo. A process as claimed in claim 1(h) or 8 in which copper is used. A process as claimed in claim 1(h), 8 or 9 in which pyridine is used as a solvent and potassium carbonate is present. A process as claimed in claim 10 which is carried out at from 40°C to the reflux temperature of the solvent. A process as claimed in any preceding claim wherein k is 1, m is 1, n is 2, p is 0, X is a direct link and R¹ is H. A process as claimed in any preceding claim wherein R² is (a) wherein R³ and R⁴ are each independently selected from H, C₁-C₄ alkyl, C₁-C₄ alkoxy, -OH and halo; (b) wherein X¹ and X² are as defined for a compound of the formula (I) in claim 1; or (c) a pyridinyl, pyrimidinyl or thienyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy. A process as claimed in claim 13 wherein R² is phenyl, 3-methylphenyl, 4-methylphenyl, 4-hydroxyphenyl, 4-methoxyphenyl, 3,4-dimethoxyphenyl, 4-chlorophenyl, 5-indanyl, 3,4-methylenedioxyphenyl, 2-pyridinyl, 4-pyrimidinyl or 3-thienyl. A process as claimed in claim 14 wherein R² is 4-methoxyphenyl. A process as claimed in any preceding claim which is used to prepare a (2S)- stereoisomer of a compound of the formula (I), that is A process as claimed in claim 16 which is used to prepare (S)-5,11-dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4]thiazepine. A process as claimed in any preceding claim which is used to prepare a maleate salt of a compound of the formula (I). Claims for the following Contracting State : GR A process for the preparation of a compound of the formula:- wherein k is 1, 2 or 3; m is 1, 2 or 3; n is 1, 2 or 3; p is 0, 1 or 2; X is O, S or a direct link, with the proviso that when X is O or S, n is 2 or 3; R¹ is H or C₁-C₄ alkyl; and R² is (a) wherein R³ and R⁴ are each independently selected from H, C₁-C₄ alkyl, C₁-C₄ alkoxy, -OH, -N(C₁-C₄ alkyl)₂, halo and -CF₃; (b) wherein q is 1, 2 or 3, and X¹ and X² are each independently selected from O and -CH₂-; or (c) a pyridinyl, pyridazinyl, pyrimidinyl, pyrazinyl or thienyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy, or a pharmaceutically acceptable salt thereof, which comprises (a) for compounds of the formula (I) wherein k is 1 and m, n, p, X, R¹ and R² are as defined for a compound of the formula (I), reacting the deprotonated form of a compound of the formula:- with a compound of the formula:- wherein m, n, p, X, R¹ and R² are as defined for a compound of the formula (I) and W is a leaving group; (b) reacting the deprotonated form of a compound of the formula (II) with a compound of the formula:- wherein k, m, n, p, X, R¹ and R² are as defined for a compound of the formula (I) and Y is a leaving group; (c) reacting a compound of the formula:- with a compound (VII) of the formula R²-X-(CH₂) n -Y¹, wherein k, m, n, p, X, R¹ and R² are as defined for a compound of the formula (I) and Y ¹ is a leaving group, optionally in the presence of an acid acceptor; (d) for compounds of the formula (I) wherein n is 2, X is a direct link, R² is a 2- or 4-pyridinyl, pyridazinyl, 2- or 4-pyrimidinyl or pyrazinyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy and k, m, p and R¹ are as defined for a compound of the formula (I), reacting a compound of the formula (VI), wherein k, m, p and R¹ are as defined for a compound of the formula (I), with a compound (VIII) of the formula R²CH=CH₂, wherein R² is as defined for this method; (e) for compounds of the formula (I) wherein p is 1 or 2 and k, m, n, X, R¹ and R² are as defined for a compound of the formula (I), oxidising an acid addition salt of a compound of the formula (I), wherein p is 0 or 1, as appropriate, and k, m, n, X, R¹ and R² are as defined for a compound of the formula (I); (f) for compounds of the formula (I) wherein p is 0 and k, m, n, X, R¹ and R² are as defined for a compound of the formula (I), reducing a compound of the formula (I) wherein p is 1 or 2 and k, m, n, X, R¹ and R² are as defined for a compound of the formula (I); (g) reducing a compound of the formula:- wherein p is 0, 1 or 2 and R⁵ is or wherein k, m, n, X, R¹ and R² are as defined for a compound of the formula (I); or (h) reacting a compound of the formula:- wherein "Hal" is halo and k, m, n, p, X, R¹ and R² are as defined for the formula (I), with a transition metal, or an oxide thereof: any one of said process alternatives (a) to (c) and (e) to (h) being optionally followed by one or more of the additional process steps comprising (i) when R² is a hydroxy-substituted phenyl group, conversion of the hydroxy substituent to C₁-C₄ alkoxy by reaction firstly with a base and then with a C₁-C₄ alkylating agent; (ii) when R² is a C₁-C₄ alkoxy-substituted phenyl group, conversion of the C₁-C₄ alkoxy substituent to hydroxy by treatment with either hydrogen bromide or an alkali metal C₁-C₄ alkanethiolate; (iii) when R² is a halo-substituted phenyl group, conversion of the halo substituent to -N(C₁-C₄ alkyl)₂ by reaction with an appropriate dialkylamine of the formula (C₁-C₄ alkyl)₂NH; (iv) separation of the stereoisomers; or (v) conversion of the compound of the formula (I) into a pharmaceutically acceptable salt. A process for the preparation of a compound of the formula (I) as defined in claim 1, or a pharmaceutically acceptable salt thereof, wherein k, m, n, p, X, R¹ and R² are as defined for a compound of the formula (I) in claim 1, which comprises any one of said process alternatives (a) to (e) as defined in claim 1: said process being optionally followed by conversion of the compound of the formula (I) into a pharmaceutically acceptable salt. A process as claimed in claim 1(a) wherein W is halo. A process as claimed in claim 1(b) or 1(c) wherein Y or Y¹, respectively, is halo, methanesulphonyloxy, trifluoromethanesulphonyloxy or p-toluenesulphonyloxy. A process as claimed in claim 1(a), 1(b), 3 or 4, as dependent on claim 1(b) only, wherein the sodium or potassium salt of a compound of the formula (II) is used. A process as claimed in claim 1(c) or 4, as dependent on claim 1(c) only, wherein Y¹ is chloro or bromo and sodium or potassium carbonate is used as the acid acceptor, and optionally sodium or potassium iodide is present. A process as claimed in claim 1(g) in which the reducing agent is borane. A process as claimed in claim 1(h) in which "Hal" is bromo. A process as claimed in claim 1(h) or 8 in which copper is used. A process as claimed in claim 1(h), 8 or 9 in which pyridine is used as a solvent and potassium carbonate is present. A process as claimed in claim 10 which is carried out at from 40°C to the reflux temperature of the solvent. A process as claimed in any preceding claim wherein k is 1, m is 1, n is 2, p is 0, X is a direct link and R¹ is H. A process as claimed in any preceding claim wherein R² is (a) wherein R³ and R⁴ are each independently selected from H, C₁-C₄ alkyl, C₁-C₄ alkoxy, -OH and halo; (b) wherein X¹ and X² are as defined for a compound of the formula (I) in claim 1; or (c) a pyridinyl, pyrimidinyl or thienyl group, said group being optionally substituted by up to 2 substituents each independently selected from C₁-C₄ alkyl and C₁-C₄ alkoxy. A process as claimed in claim 13 wherein R² is phenyl, 3-methylphenyl, 4-methylphenyl 4-hydroxyphenyl, 4-methoxyphenyl, 3,4-dimethoxyphenyl, 4-chlorophenyl, 5-indanyl, 3,4-methylenedioxyphenyl, 2-pyridinyl, 4-pyrimidinyl or 3-thienyl. A process as claimed in claim 14 wherein R² is 4-methoxyphenyl. A process as claimed in any preceding claim which is used to prepare a (2S)- stereoisomer of a compound of the formula (I), that is A process as claimed in claim 16 which is used to prepare (S)-5,11-dihydro-5-[1-(4-methoxyphenethyl)-2-pyrrolidinylmethyl]dibenzo[b,e][1,4] thiazepine. A process as claimed in any preceding claim which is used to prepare a maleate salt of a compound of the formula (I). A compound of the formula:- or wherein R⁵ is or wherein "Hal" is halo and k, m, n, p, X, R¹ and R² are as defined in claim 1.

Inventors: ALKER DAVID DR, BASS ROBERT J DR, CROSS PETER EDWARD DR, ALKER, DAVID, DR., BASS, ROBERT J., DR., CROSS, PETER EDWARD, DR.
Applicants: PFIZER, PFIZER LTD, PFIZER INC., PFIZER LIMITED
Application year: 1990
Main classification: C07D417
IPC codes: C07D417, A61K31, C07D207