Skip to content

WIP: In GHCi don't defer the error message `Could not find module`. (Fixes #11596)

Roland Senn requested to merge RolandSenn/ghc:T11596 into master

When should GHC report the error message Could not find module? There are 2 options:

  1. at the time GHC tries to read the file with the module code.
  2. at the time GHC tries to compile code from the missing input file.

The patch ff3f918d for #11256 (closed) changed from option 1. to option 2. As a side effect we got #11596: A GHCi :reload command gets confused if an input file has been deleted: GHCi doesn't report the error on a :reload command, however the evaluation of the next expression fails with a very obscure error message!

Therefore this patch uses again option 1. for GHCi, and continues to use option 2. for GHC.

Merge request reports