The network-uri-flag package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.


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

  if flag(network-uri)
    build-depends: network-uri >= 2.6, network >= 2.6
    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.

    network >= 2.5 && < 2.7,
    network-uri >= 2.7 && < 2.8,
    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!


Versions0.1, 0.1
Dependenciesnetwork, network-uri [details]
AuthorHerbert Valerio Riedel
UploadedSat Aug 27 08:43:19 UTC 2016 by HerbertValerioRiedel



Get Network.URI from the network-uri package


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


Maintainers' corner

For package maintainers and hackage trustees