diff options
Diffstat (limited to 'Hosts.hs')
-rw-r--r-- | Hosts.hs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,5 +1,9 @@ | |||
1 | {-# LANGUAGE CPP #-} | ||
1 | {-# LANGUAGE ScopedTypeVariables #-} | 2 | {-# LANGUAGE ScopedTypeVariables #-} |
2 | {-# LANGUAGE OverloadedStrings #-} | 3 | {-# LANGUAGE OverloadedStrings #-} |
4 | #if ! MIN_VERSION_network(2,4,0) | ||
5 | {-# LANGUAGE StandaloneDeriving #-} | ||
6 | #endif | ||
3 | module Hosts | 7 | module Hosts |
4 | ( Hosts | 8 | ( Hosts |
5 | , assignName | 9 | , assignName |
@@ -31,6 +35,10 @@ import Control.Applicative ( (<$>), (<*>) ) | |||
31 | import Control.Monad (mplus) | 35 | import Control.Monad (mplus) |
32 | import Network.Socket | 36 | import Network.Socket |
33 | 37 | ||
38 | #if ! MIN_VERSION_network(2,4,0) | ||
39 | deriving instance Ord SockAddr | ||
40 | #endif | ||
41 | |||
34 | handleIO_ h a = Exception.catch a (\(_ :: IOException) -> h) | 42 | handleIO_ h a = Exception.catch a (\(_ :: IOException) -> h) |
35 | 43 | ||
36 | inet_pton :: String -> Maybe SockAddr | 44 | inet_pton :: String -> Maybe SockAddr |