clash-lang / clash-compiler

Haskell to VHDL/Verilog/SystemVerilog compiler
https://clash-lang.org/
Other
1.4k stars 147 forks source link

Error reporting on source files got worse in #2663 #2680

Open leonschoorl opened 4 months ago

leonschoorl commented 4 months ago

PR #2663 changed the error reporting on source files from:

SyntaxError.hs:1:20: error: [GHC-58481] parse error on input ‘here’
  |
1 | module SyntaxError here
  |                    ^^^^

to:

<no location info>: error:
    Other error:
    Failed to load module 'SyntaxError.hs'.

    Tried to load it from precompiled sources, error was:

      <no location info>: error:
          Could not find module `SyntaxError.hs'
          Use -v (or `:set -v` in ghci) to see a list of the files searched for.

    Tried to load it from local sources, error was:

      SyntaxError.hs:1:20: error: [GHC-58481] parse error on input `here'

It would be nice if we could:

  1. restore the prettier errors we had before
  2. hide the part about precompiled sources when it doesn't apply