]> git.rkrishnan.org Git - functorrent.git/blobdiff - src/FuncTorrent/Peer.hs
Cleanup a few bad types
[functorrent.git] / src / FuncTorrent / Peer.hs
index 6c27019634861ac2676a94d970849015ec4258e3..f9fdbc32c45fb6afae5378a6fd425aad68f6ec19 100644 (file)
@@ -37,8 +37,8 @@ toInt = read
 getPeerResponse :: ByteString -> PeerResp
 getPeerResponse body = case decode body of
                         Right (Bdict peerM) ->
-                          let (Just (Bint i)) = lookup (Bstr (pack "interval")) peerM
-                              (Bstr peersBS) = peerM ! Bstr (pack "peers")
+                          let (Just (Bint i)) = lookup "interval" peerM
+                              (Bstr peersBS) = peerM ! "peers"
                               pl = map (\peer -> let (ip', port') = splitAt 4 peer
                                                  in Peer (toIPNum ip') (toPortNum port'))
                                    (splitN 6 peersBS)