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
This commit is contained in:
Erèbe 2016-09-15 23:10:26 +02:00
parent 81fa4969ce
commit cbce46fb44
2 changed files with 11 additions and 5 deletions

View file

@ -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

View file

@ -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
# compiler-check: newer-minor