GHCi 9.14.1 breaks `:add`
## Summary
Compared to GHC 9.12.3 and earlier, GHCi 9.14.1 breaks the `:add` command. This, consequently, affects `stack ghci` and may possibly have adverse implications for HLS support for people who build with Stack.
## Steps to reproduce
With GHC 9.12.3 on Ubuntu 24.04.1 LTS (via WSL 2) and a 'toy' package (see further below), all is as expected:
~~~text
$ stack ghc -- --interactive -i/home/mpilgrem/code/Haskell/testGhc9123/src
GHCi, version 9.12.3: https://www.haskell.org/ghc/ :? for help
ghci> :add Lib
[1 of 1] Compiling Lib ( /home/mpilgrem/code/Haskell/testGhc9123/src/Lib.hs, interpreted )
Ok, one module added.
ghci> :! ls /home/mpilgrem/code/Haskell/testGhc9123/src
Lib.hs
ghci>
~~~
However, the direct equivalent with GHC 9.14.1 is as follows (and GHC cannot now find the `Lib` module):
~~~text
$ stack ghc -- --interactive -i/home/mpilgrem/code/Haskell/testGhc9141/src
GHCi, version 9.14.1: https://www.haskell.org/ghc/ :? for help
ghci> :add Lib
<interactive>: error: [GHCi-23305]
Module Lib not found
Ok, no modules added.
ghci> :! ls /home/mpilgrem/code/Haskell/testGhc9141/src
Lib.hs
ghci>
~~~
In both cases, the toy package is a simple one (created using, say, `stack --snapshot ghc-9.14.1 new testGhc9141`) with a `Lib` module in `Lib.hs` in the location indicated above by the `ls` command. (`stack ghc` just executes `ghc` with the arguments following `--`.)
The same changed behaviour occurs on Windows.
## Expected behavior
Either (a) that GHCi 9.14.1 behaves the same way as GHC 9.12.3 and earlier, in this regard; or (b) that the reason for GHCi 9.14.1's changed behaviour is documented in the GHC User's Guide.
## Environment
* GHC version used: 9.14.1 (bug) 9.12.3 (working)
Optional:
* Operating System: Ubuntu 24.04.1 LTS (via WSL 2), or Microsoft Windows [Version 10.0.26200.7623]
* System Architecture: x86_64
issue