
#12395: Misleading GHCi errors when package is installed -------------------------------------+------------------------------------- Reporter: crockeea | Owner: Type: bug | Status: new Priority: high | Milestone: Component: GHCi | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: #11536 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ezyang): Try using `cabal new-build` (http://blog.ezyang.com/2016/05/announcing- cabal-new-build-nix-style-local-builds/), it's designed *exactly* for your use-case. Actually, sandboxes should have also worked, but sandboxes are buggy and you should use new-build instead. I know that GHCi picks up local modules, and so it is just in the particular case you've reported here that things work poorly (missing local module). But it is hard to see how we can behave differently. On workaround for this particular case is to set `exposed: False` in your Cabal file, so that it is NOT pulled in by default when you invoke GHCi. Maybe that's good enough for you, if you don't want to use new-build? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12395#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler