The cabal version in Ubuntu Xenial is 184.108.40.206 and it has been failing on CI since HTTP-4000 changed to allow "network < 2.8" - the resulting output is:
Downloading the latest package list from hackage.haskell.org
Skipping download: Local and remote files match.
cabal: Could not resolve dependencies:
trying: thrift-1.0.0 (user goal)
trying: network-220.127.116.11 (dependency of thrift-1.0.0)
trying: HTTP-4000.3.12 (dependency of thrift-1.0.0)
rejecting: HTTP-4000.3.12:+network-uri (conflict: network==18.104.22.168,
HTTP-4000.3.12:network-uri => network>=2.6 && <2.8)
rejecting: HTTP-4000.3.12:-network-uri (conflict: network==22.214.171.124,
HTTP-4000.3.12:network-uri => network>=126.96.36.199 && <2.6)
Backjump limit reached (change with --max-backjumps).
Makefile:639: recipe for target 'all-local' failed
make: *** [all-local] Error 1
thrift has no direct dependency on network 188.8.131.52 - why it is being selected first is beyond me. It should back off to 184.108.40.206 once it sees the network-uri set of dependencies. It looks like the cabal in Ubuntu Bionic doesn't have this problem.