Ticket #5511 (closed bug: wontfix)

Opened 20 months ago

Last modified 20 months ago

-package should take priority over modules in the filesystem

Reported by: peteg Owned by:
Priority: normal Milestone:
Component: Package system Version: 7.0.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Imagine I have a GHC package called P. I build it using Cabal and a directory structure like so:

P/ -- project root, containing P.cabal etc.
P/Code/M.hs
P/Tests/T.hs

I build P and install it.

In P/ I want to say:

ghci -package P Tests/T.hs

but ghci insists on loading Code/M.hs rather than using P - it seems to ignore the -package flag.

cheers peter

Change History

Changed 20 months ago by simonmar

  • status changed from new to closed
  • resolution set to wontfix

This is a deliberate policy. For example, you can build and test new versions of your package without having to say -hide-package P. In your situation, just put the tests in a different directory that doesn't overlap with your package sources.

Note: See TracTickets for help on using tickets.