`cabal check`: clearly mark Errors (#8908)
* Fix typo
American spelling.
* Switch from `show` to `ppPackageCheck`
Show instance for `PackageCheck` is broken (not bijective with `read`) and
in the future will be deprecated.
* Add `warnError`
`warnError` is like `warn`, but instead of "Warning: …" prepends
"Error: …" to the message. It is useful in those cases where you
want to highlight something is broken but do not want to stop the
program yet.
* cabal check: highlight error messages
Warnings that make `cabal check` fail (i.e. the package will be
refused by Hackage) are prepended by an "Error: " string, like
this:
Error: Instead of 'cc-options: -Llibdir' use 'extra-lib-dirs: libdir'
This commit also gets away from list comprehension.
* Make testsuite pass
`NoDupNames` is now caught with an `error` before check has the opportunity
to run.
* Add changelog for #8908
* Respect concordance
(Artem’s review) summary message will now say “The following errors…”
if the issues are “Error: …”s and “The following warnings…” otherwise.
---------
Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>