aboutsummaryrefslogtreecommitdiff
path: root/Assistant/Pairing
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-13 00:57:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-13 00:57:52 -0400
commitdf337bb63b4ed6e5d2ce563ec89d28d192e791db (patch)
tree638813a415727b8a5441ba450e20e6dc2632c970 /Assistant/Pairing
parenta3913f52e52777b18bd8e50ff593a4f4085e8b93 (diff)
hlint
Diffstat (limited to 'Assistant/Pairing')
-rw-r--r--Assistant/Pairing/MakeRemote.hs8
-rw-r--r--Assistant/Pairing/Network.hs4
2 files changed, 6 insertions, 6 deletions
diff --git a/Assistant/Pairing/MakeRemote.hs b/Assistant/Pairing/MakeRemote.hs
index 1b39fcff7..f3c5e0d50 100644
--- a/Assistant/Pairing/MakeRemote.hs
+++ b/Assistant/Pairing/MakeRemote.hs
@@ -37,7 +37,7 @@ finishedPairing st dstatus scanremotes msg keypair = do
{- Ensure that we know
- the ssh host key for the host we paired with.
- If we don't, ssh over to get it. -}
- unlessM (knownHost $ sshHostName sshdata) $ do
+ unlessM (knownHost $ sshHostName sshdata) $
void $ sshTranscript
[ sshOpt "StrictHostKeyChecking" "no"
, sshOpt "NumberOfPasswordPrompts" "0"
@@ -59,14 +59,14 @@ pairMsgToSshData msg = do
let dir = case remoteDirectory d of
('~':'/':v) -> v
v -> v
- return $ SshData
+ return SshData
{ sshHostName = T.pack hostname
, sshUserName = Just (T.pack $ remoteUserName d)
, sshDirectory = T.pack dir
, sshRepoName = genSshRepoName hostname dir
, needsPubKey = True
, rsyncOnly = False
- }
+ }
{- Finds the best hostname to use for the host that sent the PairMsg.
-
@@ -75,7 +75,7 @@ pairMsgToSshData msg = do
- Otherwise, looks up the hostname in the DNS for the remoteAddress,
- if any. May fall back to remoteAddress if there's no DNS. Ugh. -}
bestHostName :: PairMsg -> IO HostName
-bestHostName msg = case (remoteHostName $ pairMsgData msg) of
+bestHostName msg = case remoteHostName $ pairMsgData msg of
Just h -> do
let localname = h ++ ".local"
addrs <- catchDefaultIO (getAddrInfo Nothing (Just localname) Nothing) []
diff --git a/Assistant/Pairing/Network.hs b/Assistant/Pairing/Network.hs
index 7ce34962d..a6289c035 100644
--- a/Assistant/Pairing/Network.hs
+++ b/Assistant/Pairing/Network.hs
@@ -58,7 +58,7 @@ multicastPairMsg repeats secret pairdata stage = go M.empty repeats
threadDelaySeconds (Seconds 2)
go cache' $ pred <$> n
{- The multicast library currently chokes on ipv6 addresses. -}
- sendinterface cache (IPv6Addr _) = noop
+ sendinterface _ (IPv6Addr _) = noop
sendinterface cache i = void $ catchMaybeIO $
withSocketsDo $ bracket setup cleanup use
where
@@ -106,7 +106,7 @@ showAddr (IPv6Addr (o1, o2, o3, o4)) = show $ IPv6 o1 o2 o3 o4
activeNetworkAddresses :: IO [SomeAddr]
activeNetworkAddresses = filter (not . all (`elem` "0.:") . showAddr)
- . concat . map (\ni -> [toSomeAddr $ ipv4 ni, toSomeAddr $ ipv6 ni])
+ . concatMap (\ni -> [toSomeAddr $ ipv4 ni, toSomeAddr $ ipv6 ni])
<$> getNetworkInterfaces
{- A human-visible description of the repository being paired with.