Line wrap when pp long expressions (fixes #16874)
Hello good humans,
this is my 3rd attempt over the years to actually contribute to GHC, and I hope this time is the lucky third ;)
This commit tries to fix #16874 (closed) by switching sep
in favour of fsep
in two places when we pretty print patterns and expressions. This allows the compilation error messages to me more succinct in case of lots of arguments (see testcase attached).
I have marked this PR as WIP because:
- Being my first PR it's unlikely I will get this right the first time;
- I had to shoehorn the testcase inside the
should_fail
category to exploit the handy feature of comparing the stderr with a golden.stderr
file, but in practice I am not sure this is the most appropriate place. - I have no clue how much breakage this seemly-innocent change will cause -- it seems I am getting a bunch of failures in tests (which are still running as we speak) which might not necessarily be related; I would like to understand if this is a false positive as my build setup is borked (I am using Hadrian and I am quite inexperienced on building GHC in general, so maybe I am doing something silly here).
Let me know what you think!
Alfredo