This adds a -fcompact-holes flag that prints typed hole
error messages in a more compact format.
Also adds a user guide entry for the flag and test cases.
|Lint Warnings||Excuse: yes|
|No Unit Test Coverage|
|Build 63403: Circle CI: validate-x86_64-linux|
|Build 63402: Circle CI: validate-x86_64-linux (hadrian)|
|Build 63401: Circle CI: validate-i386-linux|
|Build 63400: [GHC] Linux/amd64: Continuous Integration|
|Build 63399: [GHC] OSX/amd64: Continuous Integration|
|Build 63398: [GHC] Windows/amd64: Continuous Integration|
|Build 63397: arc lint + arc unit|
Not sure if these two are actually worth fixing, but thought I'd mention them anyway.
Looks like a mild case of Boolean Blindness to me - iow, having data HolePrinting = PrintHolesNormally | PrintCompactHoles or something like that here would probably increase clarity (and have the compiler remind us when we flip the arguments)
This long list of possible hole fits makes me a bit uneasy, because it means that there is a high chance of unrelated changes (adding things to Prelude, or changing the type of something in Prelude) leading to this test failing - even though the regression it is supposed to detect isn't present.
The most pragmatic solution I can think of would be to use an explicit Prelude import here, with just a small list of things that we absolutely need to have in scope, and designed to minimize the chance of future type changes; then the expected output will be both smaller and less likely to deviate in the case of an unrelated change to Prelude.
Thanks for the review.
I'm happy to do that, and probably would have if there hadn't been another Bool argument for the filtering already. But you're also right that it's actually making the situation much worse, because there are now two Boolean arguments in direct succession.
Do you think I should introduce a data for the other Bool argument as well then, even if that'd be an unrelated refactoring?
This is an adapted copy of an already existing test case, namely holes.hs, which suffers from exactly the same problem. I am nevertheless happy to change it though.