I couldn't figure out if there is already something like this in place, but I think it may be useful to have this kind of information available to programs called by the Cabal library. Or rather, I see no downside to provide this information, even if programs don't need it yet. OTOH, changes like https://phabricator.haskell.org/D1780 do occur from time to time. And Cabal has no way to know about future GHC versions, however, GHC can know about past (incompatible) Cabal versions.
With such an environment variable ghc-pkg or ghc could optionally inspect the CABAL_VERSION environment variable, and warn (or adapt their behaviour) if the Cabal library version is known to be unaware of recent changes in GHC's behaviour.
/cc @ezyang
UPDATE: #415 is somewhat related