ambiguous module name Network.URI

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ambiguous module name Network.URI

Kees Bleijenberg

If i import these 2 packages in a project:

import Network.HTTP

import qualified Network.URI as NU

 

I get:

testNetw.hs:7:18:

    Ambiguous module name `Network.URI':

      it was found in multiple packages:

      network-uri-2.6.0.3 network-2.4.2.3

 

I’am using the latest 32 bits haskell platform on Windows 7 64 bits.

I need the NU.parseURI function. What can I do?

 

Kees

 

 


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: ambiguous module name Network.URI

Christopher Reichert

On Wed, Jul 08 2015, "Kees Bleijenberg" <[hidden email]> wrote:

> If i import these 2 packages in a project:
>
> import Network.HTTP
>
> import qualified Network.URI as NU
>
>
>
> I get:
>
> testNetw.hs:7:18:
>
>     Ambiguous module name `Network.URI':
>
>       it was found in multiple packages:
>
>       network-uri-2.6.0.3 network-2.4.2.3
>
>
>
> I'am using the latest 32 bits haskell platform on Windows 7 64 bits.
>
> I need the NU.parseURI function. What can I do?
>
>
Check out the Hackage page for network-uri:
https://hackage.haskell.org/package/network-uri


The parseURI function is in the version of network you are using already
so there is no need to import modules from network-uri.

>
> Kees
>
>
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
--
Christopher Reichert
irc: creichert
gpg: C81D 18C8 862A 3618 1376  FFA5 6BFC A992 9955 929B

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

signature.asc (834 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ambiguous module name Network.URI

Kees Bleijenberg
In reply to this post by Kees Bleijenberg
Thanks Christopher,


-----Oorspronkelijk bericht-----

Check out the Hackage page for network-uri:
https://hackage.haskell.org/package/network-uri

The parseURI function is in the version of network you are using already so
there is no need to import modules from network-uri.

----------------------------------------

If I remove the import of Network-URI and leave the import Network.Http and
use parseURI, ghc complains:  not in scope parseURI.
Do I have to change someting in the packages?

Kees

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: ambiguous module name Network.URI

Christopher Reichert


On Wed, Jul 08 2015, "Kees Bleijenberg" <[hidden email]> wrote:

> Thanks Christopher,
>
>
> -----Oorspronkelijk bericht-----
>
> Check out the Hackage page for network-uri:
> https://hackage.haskell.org/package/network-uri
>
> The parseURI function is in the version of network you are using already so
> there is no need to import modules from network-uri.
>
> ----------------------------------------
>
> If I remove the import of Network-URI and leave the import Network.Http and
> use parseURI, ghc complains:  not in scope parseURI.
> Do I have to change someting in the packages?
>
You should leave the import of Network.URI. Are you trying to build a
cabal project? Did you install the network-uri package yourself?


If you're creating a cabal project try adding:

build-depends: network-uri < 2.6, network < 2.6

Otherwise, can you describe the install steps you are taking?

> Kees
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

--
Christopher Reichert
irc: creichert
gpg: C81D 18C8 862A 3618 1376  FFA5 6BFC A992 9955 929B

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

signature.asc (834 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ambiguous module name Network.URI

Greg Horn
Sorry I'm late to the party, -XPackageImports is the solution to this issue: https://downloads.haskell.org/~ghc/7.10.2/docs/html/users_guide/syntax-extns.html#idp23827600

On Wed, Jul 8, 2015 at 7:10 AM Christopher Reichert <[hidden email]> wrote:


On Wed, Jul 08 2015, "Kees Bleijenberg" <[hidden email]> wrote:
> Thanks Christopher,
>
>
> -----Oorspronkelijk bericht-----
>
> Check out the Hackage page for network-uri:
> https://hackage.haskell.org/package/network-uri
>
> The parseURI function is in the version of network you are using already so
> there is no need to import modules from network-uri.
>
> ----------------------------------------
>
> If I remove the import of Network-URI and leave the import Network.Http and
> use parseURI, ghc complains:  not in scope parseURI.
> Do I have to change someting in the packages?
>

You should leave the import of Network.URI. Are you trying to build a
cabal project? Did you install the network-uri package yourself?


If you're creating a cabal project try adding:

build-depends: network-uri < 2.6, network < 2.6

Otherwise, can you describe the install steps you are taking?

> Kees
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

--
Christopher Reichert
irc: creichert
gpg: C81D 18C8 862A 3618 1376  FFA5 6BFC A992 9955 929B
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe