Catch up with GHC 8.10's API changes.
Catch up with GHC 8.10's API changes.

This is based on [code written by Ben Gamari and Ryan
Scott](https://gitlab.haskell.org/ghc/head.hackage/blob/9a09dfe4d90066ff27b82cf4824d64778ed91f81/patches/doctest-0.16.2.patch).

sol/doctest,sol/doctest