Relax requirements on hidden modules in GHCi
I'm working on debugging something at work, and I've built up a decent amount of local state in GHCi. I need to check how Aeson encodes/decodes something, so I write:
λ> import Data.Aeson
and I get back:
λ> import Data.Aeson <no location info>: error: Could not load module ‘Data.Aeson’ It is a member of the hidden package ‘aeson-184.108.40.206’. You can run ‘:set -package aeson’ to expose it. (Note: this unloads all the modules in the current scope.)
I need to blow away my GHCi session, edit my cabal file, re-enter the REPL, re-build my context, all so I can import and use some functions that GHC knows exists.
I'd like to turn that error into a warning in GHCi. If you try to import a module that GHC knows about, but it is "hidden", then GHCi should be able to import it. This'll make GHCi much more useful for exploratory work.