diff options
-rw-r--r-- | examples/dhtd.hs | 4 | ||||
-rw-r--r-- | src/Network/QueryResponse.hs | 2 | ||||
-rw-r--r-- | src/Network/Tox/DHT/Transport.hs | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/examples/dhtd.hs b/examples/dhtd.hs index f96f0ba7..1821cb1c 100644 --- a/examples/dhtd.hs +++ b/examples/dhtd.hs | |||
@@ -482,14 +482,14 @@ clientSession s@Session{..} sock cnum h = do | |||
482 | "gc" -> do hPutClient h "Performing garbage collection..." | 482 | "gc" -> do hPutClient h "Performing garbage collection..." |
483 | performMajorGC | 483 | performMajorGC |
484 | "" -> do | 484 | "" -> do |
485 | #if MIN_VERSION_base(4,11,1) | 485 | #if MIN_VERSION_base(4,10,1) |
486 | is_enabled <- getRTSStatsEnabled | 486 | is_enabled <- getRTSStatsEnabled |
487 | #else | 487 | #else |
488 | is_enabled <- getGCStatsEnabled | 488 | is_enabled <- getGCStatsEnabled |
489 | #endif | 489 | #endif |
490 | if is_enabled | 490 | if is_enabled |
491 | then do | 491 | then do |
492 | #if MIN_VERSION_base(4,11,1) | 492 | #if MIN_VERSION_base(4,10,1) |
493 | RTSStats{..} <- getRTSStats | 493 | RTSStats{..} <- getRTSStats |
494 | let r = [ ("bytesAllocated", show allocated_bytes) | 494 | let r = [ ("bytesAllocated", show allocated_bytes) |
495 | , ("numGcs", show gcs) | 495 | , ("numGcs", show gcs) |
diff --git a/src/Network/QueryResponse.hs b/src/Network/QueryResponse.hs index d612ac05..e4c73cd8 100644 --- a/src/Network/QueryResponse.hs +++ b/src/Network/QueryResponse.hs | |||
@@ -505,7 +505,7 @@ sockAddrFamily :: SockAddr -> Family | |||
505 | sockAddrFamily (SockAddrInet _ _ ) = AF_INET | 505 | sockAddrFamily (SockAddrInet _ _ ) = AF_INET |
506 | sockAddrFamily (SockAddrInet6 _ _ _ _) = AF_INET6 | 506 | sockAddrFamily (SockAddrInet6 _ _ _ _) = AF_INET6 |
507 | sockAddrFamily (SockAddrUnix _ ) = AF_UNIX | 507 | sockAddrFamily (SockAddrUnix _ ) = AF_UNIX |
508 | sockAddrFamily (SockAddrCan _ ) = AF_CAN | 508 | sockAddrFamily _ = AF_CAN -- SockAddrCan constructor deprecated |
509 | 509 | ||
510 | -- | Packets with an empty payload may trigger EOF exception. | 510 | -- | Packets with an empty payload may trigger EOF exception. |
511 | -- 'udpTransport' uses this function to avoid throwing in that | 511 | -- 'udpTransport' uses this function to avoid throwing in that |
diff --git a/src/Network/Tox/DHT/Transport.hs b/src/Network/Tox/DHT/Transport.hs index c6fe121c..0c69ea8b 100644 --- a/src/Network/Tox/DHT/Transport.hs +++ b/src/Network/Tox/DHT/Transport.hs | |||
@@ -69,12 +69,12 @@ data DHTMessage (f :: * -> *) | |||
69 | | DHTLanDiscovery NodeId | 69 | | DHTLanDiscovery NodeId |
70 | 70 | ||
71 | deriving instance ( Show (f (Cookie Encrypted)) | 71 | deriving instance ( Show (f (Cookie Encrypted)) |
72 | , Show (Asymm (f Ping)) | 72 | , Show (f Ping) |
73 | , Show (Asymm (f Pong)) | 73 | , Show (f Pong) |
74 | , Show (Asymm (f GetNodes)) | 74 | , Show (f GetNodes) |
75 | , Show (Asymm (f SendNodes)) | 75 | , Show (f SendNodes) |
76 | , Show (Asymm (f CookieRequest)) | 76 | , Show (f CookieRequest) |
77 | , Show (Asymm (f DHTRequest)) | 77 | , Show (f DHTRequest) |
78 | ) => Show (DHTMessage f) | 78 | ) => Show (DHTMessage f) |
79 | 79 | ||
80 | mapMessage :: forall f b. (forall a. Nonce24 -> f a -> b) -> DHTMessage f -> Maybe b | 80 | mapMessage :: forall f b. (forall a. Nonce24 -> f a -> b) -> DHTMessage f -> Maybe b |