summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/Tracker/List.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/Tracker/List.hs')
-rw-r--r--src/Network/BitTorrent/Tracker/List.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Network/BitTorrent/Tracker/List.hs b/src/Network/BitTorrent/Tracker/List.hs
index d92dd4ba..0eb11641 100644
--- a/src/Network/BitTorrent/Tracker/List.hs
+++ b/src/Network/BitTorrent/Tracker/List.hs
@@ -19,6 +19,7 @@ module Network.BitTorrent.Tracker.List
19 , trackerList 19 , trackerList
20 , shuffleTiers 20 , shuffleTiers
21 , mapWithURI 21 , mapWithURI
22 , Network.BitTorrent.Tracker.List.toList
22 23
23 -- * Traversals 24 -- * Traversals
24 , traverseAll 25 , traverseAll
@@ -138,6 +139,10 @@ mapWithURI f (TierList xs ) = TierList (L.map (L.map mapEntry) xs)
138 where 139 where
139 mapEntry (uri, a) = (uri, f uri a) 140 mapEntry (uri, a) = (uri, f uri a)
140 141
142toList :: TrackerList a -> [[TierEntry a]]
143toList (Announce e) = [[e]]
144toList (TierList xxs) = xxs
145
141{----------------------------------------------------------------------- 146{-----------------------------------------------------------------------
142-- Special traversals (suppressed RPC exceptions) 147-- Special traversals (suppressed RPC exceptions)
143-----------------------------------------------------------------------} 148-----------------------------------------------------------------------}