From cbce46fb44affa30d7ef2a0690dd045bed819051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Er=C3=A8be?= Date: Thu, 15 Sep 2016 23:10:26 +0200 Subject: [PATCH] Bump to lts 7.0 Former-commit-id: b3b57bcba2a7d50ebf38054b67792af1e6e755ce Former-commit-id: e70e4f3f49958c45dbe66aef59ad046fddac801c [formerly 10a6d99cc79e84205bd64fb9c17932cc346b40f3 [formerly 10a6d99cc79e84205bd64fb9c17932cc346b40f3 [formerly 10a6d99cc79e84205bd64fb9c17932cc346b40f3 [formerly 1571c1e641d0b00cbbb494fe5b3f4da6b05ca02a]]]] Former-commit-id: e62e91900bb398c287ecc8fab53bcad539dc51ec Former-commit-id: 3da4f732c156662ecdb10a854a941399ab53048e Former-commit-id: ebaeec43d0a7c399f0401898471c084d4e47042c Former-commit-id: b540ee5a98380a08c3672247f99cc7f83732e490 [formerly 34f795463f2de5b859abba86d7bddeb7abd0d34c] Former-commit-id: d9adc79359d666beb64827e2ef59796ab37de408 --- src/Tunnel.hs | 12 +++++++++--- stack.yaml | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Tunnel.hs b/src/Tunnel.hs index 2b67add..ae33de0 100644 --- a/src/Tunnel.hs +++ b/src/Tunnel.hs @@ -12,7 +12,6 @@ module Tunnel ) where import ClassyPrelude -import Control.Concurrent.Async (race_) import Data.Maybe (fromJust) import qualified Data.ByteString.Char8 as BC @@ -47,11 +46,11 @@ import qualified Credentials rrunTCPClient :: N.ClientSettings -> (Connection -> IO a) -> IO a rrunTCPClient cfg app = bracket (N.getSocketFamilyTCP (N.getHost cfg) (N.getPort cfg) (N.getAddrFamily cfg)) - (\r -> catch (N.sClose $ fst r) (\(_ :: SomeException) -> return ())) + (\r -> catch (N.close $ fst r) (\(_ :: SomeException) -> return ())) (\(s, _) -> app Connection { read = Just <$> N.safeRecv s (N.getReadBufferSize cfg) , write = N.sendAll s - , close = N.sClose s + , close = N.close s , rawConnection = Just s }) @@ -280,3 +279,10 @@ propagateWrites :: Connection -> Connection -> IO () propagateWrites hTunnel hOther = do payload <- fromJust <$> read hOther unless (null payload) (write hTunnel payload >> propagateWrites hTunnel hOther) + + + +toto :: String -> Connection +toto = undefined +toto :: Int -> Connection +toto = undefined diff --git a/stack.yaml b/stack.yaml index 21b242c..b467343 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ # resolver: # name: custom-snapshot # location: "./custom-snapshot.yaml" -resolver: nightly-2016-06-12 +resolver: lts-7.0 # User packages to be built. # Various formats can be used as shown in the example below. @@ -63,4 +63,4 @@ extra-package-dbs: [] # extra-lib-dirs: [/path/to/dir] # # Allow a newer minor version of GHC than the snapshot specifies -# compiler-check: newer-minor \ No newline at end of file +# compiler-check: newer-minor