what if two package contains same module?

it seems that cabal install different into different folders. if two package contains same module name, can they all exist? since cabal have no "remvoe" or "uninstall". how can I hide some packages? Cheers! ---------------- 吴兴博 Wu Xingbo

On 30 June 2011 17:40, 吴兴博
it seems that cabal install different into different folders. if two package contains same module name, can they all exist? since cabal have no "remvoe" or "uninstall". how can I hide some packages?
ghc-pkg hide foo-1.2.3 This will work for using them in ghci and explicit ghc calls. Otherwise, when using packages built with cabal, you specify which libraries you use and Cabal hides the rest. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

吴兴博 wrote:
it seems that cabal install different into different folders. if two package contains same module name, can they all exist? since cabal have no "remvoe" or "uninstall". how can I hide some packages?
The ghc-pkg program organizes GHC's package database. You want to run the command ghc-pkg hide offending-package Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com

吴兴博
it seems that cabal install different into different folders. if two package contains same module name, can they all exist? since cabal have no "remvoe" or "uninstall". how can I hide some packages?
Alternatively for small programs for which you don't use a Cabal file you can use the PackageImports extension (-XPackageImports) and import modules from specific packages. For example both the 'pool' and the 'resource-pool' packages provide a Data.Pool module. You can choose to import the one from 'resource-pool' using this: import "resource-pool" Data.Pool Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/
participants (4)
-
Ertugrul Soeylemez
-
Heinrich Apfelmus
-
Ivan Lazar Miljenovic
-
吴兴博