diff --git a/src/Types.hs b/src/Types.hs index f3007c7..777a271 100644 --- a/src/Types.hs +++ b/src/Types.hs @@ -13,8 +13,7 @@ import Data.ByteString (hGetSome, hPutStr) import qualified Data.Streaming.Network as N import qualified Network.Connection as NC -import Network.Socket (HostName, PortNumber(..)) -import Network.Socket.Internal (PortNumber(..)) +import Network.Socket (HostName, PortNumber) import qualified Network.Socket as N hiding (recv, recvFrom, send, sendTo) import qualified Network.Socket.ByteString as N @@ -22,11 +21,14 @@ import qualified Network.Socket.ByteString as N import qualified Network.WebSockets.Connection as WS import System.IO.Unsafe (unsafeDupablePerformIO) -deriving instance Generic PortNumber -deriving instance Hashable PortNumber + +instance Hashable PortNumber where + hashWithSalt s p = hashWithSalt s (fromEnum p) + deriving instance Generic N.SockAddr deriving instance Hashable N.SockAddr + {-# NOINLINE defaultRecvBufferSize #-} defaultRecvBufferSize :: Int defaultRecvBufferSize = unsafeDupablePerformIO $ diff --git a/stack.yaml b/stack.yaml index 69d1316..daa0633 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: lts-14.11 +resolver: lts-16.4 # User packages to be built. # Various formats can be used as shown in the example below. diff --git a/wstunnel.cabal b/wstunnel.cabal index 7e9bbc5..2d18736 100644 --- a/wstunnel.cabal +++ b/wstunnel.cabal @@ -26,7 +26,7 @@ library , connection , hslogger , mtl - , network < 3.0.0.0 + , network , network-conduit-tls , streaming-commons , text >= 1.2.2.1 @@ -46,7 +46,7 @@ test-suite wstunnel-test , text >= 1.2.2.1 , classy-prelude , bytestring - , network < 3.0.0.0 + , network , network-conduit-tls , streaming-commons , wstunnel