diff options
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/Network.hs | 10 |
1 files changed, 10 insertions, 0 deletions
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. -} |