Opened 4 years ago

Closed 4 years ago

#5511 closed bug (wontfix)

-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 Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

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 (1)

comment:1 Changed 4 years ago by simonmar

  • Resolution set to wontfix
  • Status changed from new to closed

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.