The network-uri-flag package

[ Tags: bsd3, library, network ] [ Propose Tags ]

This empty package does not provide any modules; its sole purpose is to provide the network-uri Cabal flag logic below so you don't have to include that boilerplate in your .cabal file.

flag network-uri
  description: Get Network.URI from the network-uri package
  default: True

library
  if flag(network-uri)
    build-depends: network-uri >= 2.6, network >= 2.6
  else
    build-depends: network-uri < 2.6, network < 2.6

This avoids combining network-uri >= 2.6 with network < 2.6 which both export a name-clashing Network.URI module, because in network-2.6 the Network.URI module was split off from the network package into network-uri-2.6.

In other words, the logic above makes sure that the Network.URI module is provided by either network-uri or by network (in the XOR sense).

In order to benefit from this module, simply include it in your build-depends declaration alongside network and network-uri.

  build-depends:
    network >= 2.5 && < 2.7,
    network-uri >= 2.5 && < 2.7,
    network-uri-flag == 0.1.*

NOTE: It's almost always an error to list this package if network and network-uri aren't both listed as well!

Properties

Versions 0.1
Change log ChangeLog.md
Dependencies network, network-uri [details]
License BSD3
Author Herbert Valerio Riedel
Maintainer hvr@gnu.org
Category Network
Uploaded Sat Aug 27 08:44:41 UTC 2016 by HerbertValerioRiedel
Updated Sat Aug 27 08:46:34 UTC 2016 by HerbertValerioRiedel to revision 2   [What is this?]
Distributions NixOS:0.1, Tumbleweed:0.1
Downloads 380 total (34 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2016-11-20 [all 1 reports]
Hackage Matrix CI

Flags

NameDescriptionDefaultType
network-uri

Get Network.URI from the network-uri package

EnabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees