In case any readers don’t know (it is not well documented):
- you can disable the “In the first argument of” etc. contextual messages with the GHC option
-fno-show-error-context, see Debugging Haskell Type Errors - #4 by MangoIV - you can set a limit for the “Relevant bindings include” section with
-fmax-relevant-binds=⟨n⟩, see 5.3. Optimisation (code improvement) — Glasgow Haskell Compiler 9.14.1 User's Guide … but-fmax-relevant-binds=0didn’t work as expected for me