THRIFT-2677 haskell library and tutorial: build with network > 2.5
diff --git a/tutorial/hs/ThriftTutorial.cabal b/tutorial/hs/ThriftTutorial.cabal
index b38fc5c..e6f0182 100755
--- a/tutorial/hs/ThriftTutorial.cabal
+++ b/tutorial/hs/ThriftTutorial.cabal
@@ -32,12 +32,16 @@
 Description:
   Haskell tutorial for the Apache Thrift RPC system. Requires the use of the thrift code generator.
 
+flag network-uri
+   description: Get Network.URI from the network-uri package
+   default: True
+
 Executable HaskellServer
   Main-is: HaskellServer.hs
   Hs-Source-Dirs:
     ., gen-hs/
   Build-Depends:
-    base >= 4, base < 5, network, ghc-prim, containers, thrift, vector, unordered-containers, text, hashable, bytestring, QuickCheck
+    base >= 4, base < 5, ghc-prim, containers, thrift, vector, unordered-containers, text, hashable, bytestring, QuickCheck
   Extensions:
     DeriveDataTypeable,
     ExistentialQuantification,
@@ -53,7 +57,11 @@
   Hs-Source-Dirs:
     ., gen-hs/
   Build-Depends:
-    base >= 4, base < 5, network, ghc-prim, containers, thrift, vector, QuickCheck
+    base >= 4, base < 5, ghc-prim, containers, thrift, vector, QuickCheck
+  if flag(network-uri)
+     build-depends: network-uri >= 2.6, network >= 2.6
+  else
+     build-depends: network < 2.6
   Extensions:
     DeriveDataTypeable,
     ExistentialQuantification,