Basically, it a BIG job. You'd need to consider the change of engine, a change of pylon, probably wiring in the wing and fuselage, and major change to the flight control system. And then you need to recertify the airframe.
Financially, you'll have to dump the old engine and hope you could find a buyer. However, you'd also need significant support (technical and paperwork-wise) from the airframer, who probably charge you and the full market price. (They're not going to sell any more airframes in the deal, so there's no incentive to discount.)
Has it happened before ? I can't think of any real examples. If it was worthwhile, I'd have expected the PW4000/B777's to be prime candidates.
: The BA
/ 767 example. From what I've been told, RR
offered the RB211 on the 747, and BA
liked it. The RB211 wasn't designed for the 767, but BA
demanded it. BA
got what they wanted for fleet commonality, and I'm not aware of any major problems with it. (However I bow to the knowledge of any passing BA