Previously, if :show targets displayed a path, we would attempt to join that path to each of the module search paths and to GHCi's working directory to find the file.
In reality, GHCi only checks such paths relative to its working directory. (Indeed, if you change the working directory with :cd, GHCi will unload all modules. 1)
Also, the logic for checking these paths was broken, considering that the search paths can be relative to the working directory, but we weren't properly joining these paths.
In the future, I'll write some tests that do --after-startup-ghci ":cd ../" and see how much of ghciwatch explodes.
Previously, if
:show targets
displayed a path, we would attempt to join that path to each of the module search paths and to GHCi's working directory to find the file.In reality, GHCi only checks such paths relative to its working directory. (Indeed, if you change the working directory with
:cd
, GHCi will unload all modules. 1)Also, the logic for checking these paths was broken, considering that the search paths can be relative to the working directory, but we weren't properly joining these paths.
In the future, I'll write some tests that do
--after-startup-ghci ":cd ../"
and see how much of ghciwatch explodes.