How does the Contract Law definition of 'consumer surplus' relate to the Microeconomics definition? O'Sullivan &amp; Hilliard's The Law of Contract (2018 8 ed). 16.23 starts on p. 387, 16.35 on p. 391.

Right: Pindyck, Rubinfeld. Microeconomics, Global Edition (2017 9 ed). p. 152.


  


Richard and Damian Taylor. Contract Law Directions (2019 7 ed).  


  Difference in value or cost of cure? (Section 11.3.1)
  The £2,500 award made in Ruxley for Mr Forsyth’s ‘loss of amenity’ can be interpreted as
  damages for non-pecuniary loss, based on the fact that the contract was a consumer
  contract for enjoyment (see the opinions of Lords Clyde and Hutton in Farley v Skinner
  (2001)). However, the award may also be interpreted as a response to the need for a
  wider principle of recovery based on the loss of ‘consumer surplus’. Consumer surplus is
  the difference in value between what a thing is worth commercially and the higher value
  at which a consumer subjectively values it. So, whilst an extra few inches on the swimming pool added no financial value, the £2,500 represented Mr Forsyth’s consumer surplus:
  to him, and him alone, the pool was a more valuable asset if it was deeper (i.e. if his
  contract was fully performed). He had contracted for this extra depth and it had not been
  provided, so you could argue that the award of £2,500 was compensation for loss of this
  consumer surplus.


I'm not a microeconomist, but these terms appear to be defined wholly differently? Or am I overlooking something similar that underlies  them?
O'Sullivan &amp; Hilliard write: Consumer surplus is a "type of non-financial loss" and


  can be defined as the amount by which the particular plaintiff values performance of a particular obligation over and above its market value.


This is identical to the economist's definition of consumer surplus.

Using Pindyck and Rubinfeld's example: If a student was willing to pay as much as $\$13$ for a rock concert ticket (this is the value she places on the "performance of a particular obligation") but only had to pay $\$12$ (this is the price or the market value of the ticket), then her consumer surplus is $$\$13-\$12=\$1.$$