aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-04-14 13:25:49 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-04-14 13:25:49 -0400
commit8129a9bd3397bf9b27bab3ae2b81855cc61753be (patch)
treeb934cdf67032e993c67754db792e40b83eb7a2d4
parentd815a186a23f8c59032f343f15ebbab58ab4317e (diff)
add missing Network.URI Ord instance for Debian stable
-rw-r--r--Annex/Init.hs1
-rw-r--r--Common.hs1
-rw-r--r--Utility/Network.hs10
3 files changed, 11 insertions, 1 deletions
diff --git a/Annex/Init.hs b/Annex/Init.hs
index e095aef61..0cb41872c 100644
--- a/Annex/Init.hs
+++ b/Annex/Init.hs
@@ -16,7 +16,6 @@ module Annex.Init (
) where
import Common.Annex
-import Utility.Network
import qualified Annex
import qualified Git
import qualified Git.LsFiles
diff --git a/Common.hs b/Common.hs
index 4d6165ac5..0f3dc71d0 100644
--- a/Common.hs
+++ b/Common.hs
@@ -32,5 +32,6 @@ import Utility.Data as X
import Utility.Applicative as X
import Utility.FileSystemEncoding as X
import Utility.PosixFiles as X
+import Utility.Network as X
import Utility.PartialPrelude as X
diff --git a/Utility/Network.hs b/Utility/Network.hs
index 62523c9e9..015c004d7 100644
--- a/Utility/Network.hs
+++ b/Utility/Network.hs
@@ -5,6 +5,8 @@
- Licensed under the GNU GPL version 3 or higher.
-}
+{-# LANGUAGE CPP #-}
+
module Utility.Network where
import Utility.Process
@@ -12,6 +14,14 @@ import Utility.Exception
import Control.Applicative
+-- Old versions of network lacked an Ord for URI
+#if ! MIN_VERSION_network(2,4,0)
+import Network.URI
+
+instance Ord URI where
+ a `compare` b = show a `compare` show b
+#endif
+
{- Haskell lacks uname(2) bindings, except in the
- Bindings.Uname addon. Rather than depend on that,
- use uname -n when available. -}