summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent.hs
diff options
context:
space:
mode:
authorSam T <pxqr.sta@gmail.com>2013-06-11 06:00:57 +0400
committerSam T <pxqr.sta@gmail.com>2013-06-11 06:00:57 +0400
commit1b4fdf35dd6c21d600130c42a1bcb5c56b25afa6 (patch)
tree136bb1467f5d3b5929620ddb0ab2adffc656504d /src/Network/BitTorrent.hs
parenta6490c275b6c688df1f654bff92f96aaeb998805 (diff)
~ 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.
Diffstat (limited to 'src/Network/BitTorrent.hs')
-rw-r--r--src/Network/BitTorrent.hs2
1 files changed, 2 insertions, 0 deletions
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
28import Network.BitTorrent.Exchange as BT 28import Network.BitTorrent.Exchange as BT
29import Network.BitTorrent.Tracker as BT 29import Network.BitTorrent.Tracker as BT
30 30
31-- discover should hide tracker and DHT communication under the hood
32-- thus we can obtain unified interface
31 33
32discover :: SwarmSession -> (TSession -> IO a) -> IO a 34discover :: SwarmSession -> (TSession -> IO a) -> IO a
33discover SwarmSession {..} action = do 35discover SwarmSession {..} action = do