Open erikd-ambiata opened 7 years ago
out of curiosity, does mafia repl
work? might suffice as a workaround for now
Indeed it does. Curious!
That is the explicit difference between repl and ghci. repl
uses cabal and related info, ghci
is for using ghc directly and explicitly ignoring anything to do with cabal.
explicitly ignoring anything to do with cabal
It doesn't ignore everything to do with cabal. For instance, it uses the local cabal sandbox. The ghci
command only exists to work around what I consider a bug in cabal's repl
command, ie that you can't tell cabal repl
to load a file that is not mentioned in the cabal file. If that bug was fixed, I think the desired behavior of repl
and ghci
could actually be the same.
Ok, that is not what I use it for, repl is project based, ghci is file based, this distinction has always existed and wasn't to work around anything. They are very different things for very different purposes for me.
My main use of mafia ghci
is try out experimental code that is related to the current project, but may or may not end up in the current project.
If ghci
was "fixed" to correctly handle flags defined in the local cabal file, would it break anything for you?
Messing with the tls package using
mafia ghci Network/TLS/Backend.hs
I get:Problem is that the include of
Network.Socket
is guarded:with a flag set in the cabal file:
Mafia can build this just fine, but its a pity I can't just load it into GHCi.