diff options
Diffstat (limited to 'src/Network/BitTorrent/Tracker/List.hs')
-rw-r--r-- | src/Network/BitTorrent/Tracker/List.hs | 5 |
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 | ||
142 | toList :: TrackerList a -> [[TierEntry a]] | ||
143 | toList (Announce e) = [[e]] | ||
144 | toList (TierList xxs) = xxs | ||
145 | |||
141 | {----------------------------------------------------------------------- | 146 | {----------------------------------------------------------------------- |
142 | -- Special traversals (suppressed RPC exceptions) | 147 | -- Special traversals (suppressed RPC exceptions) |
143 | -----------------------------------------------------------------------} | 148 | -----------------------------------------------------------------------} |