From 1b4fdf35dd6c21d600130c42a1bcb5c56b25afa6 Mon Sep 17 00:00:00 2001 From: Sam T Date: Tue, 11 Jun 2013 06:00:57 +0400 Subject: ~ Use exception in fromFile. Again, the problem is that one function returns errors in two different ways: Either and IO exceptions. It's better to just throw exception in either case. --- src/Network/BitTorrent.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Network/BitTorrent.hs') diff --git a/src/Network/BitTorrent.hs b/src/Network/BitTorrent.hs index 61185d08..c37129cb 100644 --- a/src/Network/BitTorrent.hs +++ b/src/Network/BitTorrent.hs @@ -28,6 +28,8 @@ import Network.BitTorrent.Peer as BT import Network.BitTorrent.Exchange as BT import Network.BitTorrent.Tracker as BT +-- discover should hide tracker and DHT communication under the hood +-- thus we can obtain unified interface discover :: SwarmSession -> (TSession -> IO a) -> IO a discover SwarmSession {..} action = do -- cgit v1.2.3