Ambiguous module name `System.Directory'

Hi, i am using ghc version 7.0.3 and a pretty recent version of the haskell-platform. Whenever i use the System.Directory module, i run into this conflict: Ambiguous module name `System.Directory': it was found in multiple packages: system-fileio-0.2.1 directory-1.1.0.0 How can i resolve this conflict permamently (i know about :set -hide-package ... )? And shouldn't there be a rule in the haskell platform which forbids modules of the same name? Greetings Chris

On 26 August 2011 18:00, informationen
Hi,
i am using ghc version 7.0.3 and a pretty recent version of the haskell-platform.
Whenever i use the System.Directory module, i run into this conflict:
Ambiguous module name `System.Directory': it was found in multiple packages: system-fileio-0.2.1 directory-1.1.0.0
How can i resolve this conflict permamently (i know about :set -hide-package ... )? And shouldn't there be a rule in the haskell platform which forbids modules of the same name?
1) Use PackageImports: http://www.haskell.org/ghc/docs/7.0.3/html/users_guide/syntax-extns.html#pac... import "network" Network.Socket 2) Use cabal-dev ghci which will only have packages available that you specify in your .cabal file.

On 11-08-26 12:00 PM, informationen wrote:
How can i resolve this conflict permamently (i know about :set -hide-package ... )? And shouldn't there be a rule in the haskell platform which forbids modules of the same name?
Two permanent resolutions, choose one: ghc-pkg hide system-fileio ghc-pkg unregister system-fileio Haskell platform has never included system-fileio, so it contains no ambiguous module name.

One other solution on this one: upgrade system-fileio. The newest
version does not contain any conflicting names.
As a side point, system-fileio (and system-filepath, which it depends
upon) are both excellent packages, I use them all the time at work.
Michael
On Sat, Aug 27, 2011 at 12:44 AM, Albert Y. C. Lai
On 11-08-26 12:00 PM, informationen wrote:
How can i resolve this conflict permamently (i know about :set -hide-package ... )? And shouldn't there be a rule in the haskell platform which forbids modules of the same name?
Two permanent resolutions, choose one:
ghc-pkg hide system-fileio
ghc-pkg unregister system-fileio
Haskell platform has never included system-fileio, so it contains no ambiguous module name.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks, that's a good idea.
One other solution on this one: upgrade system-fileio. The newest version does not contain any conflicting names.
As a side point, system-fileio (and system-filepath, which it depends upon) are both excellent packages, I use them all the time at work.
Michael
On Sat, Aug 27, 2011 at 12:44 AM, Albert Y. C. Lai
wrote: On 11-08-26 12:00 PM, informationen wrote:
How can i resolve this conflict permamently (i know about :set -hide-package ... )? And shouldn't there be a rule in the haskell platform which forbids modules of the same name?
Two permanent resolutions, choose one:
ghc-pkg hide system-fileio
ghc-pkg unregister system-fileio
Haskell platform has never included system-fileio, so it contains no ambiguous module name.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Bloß weil du nicht paranoid bist, heißt das noch lange nicht, daß sie nicht hinter dir her sind.

Note that once you upgrade it (to >=0.4), you'll still need to remove the older version to fix the error. I wish cabal-install defaulted to hiding every package it installs. The current behavior of exposing every installed module is unreasonable and confusing. Packages should be namespaces, not just installation aliases.
participants (5)
-
Albert Y. C. Lai
-
Christopher Done
-
informationen
-
John Millikin
-
Michael Snoyman