diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Data/Torrent.hs | 4 | ||||
-rw-r--r-- | src/Data/Torrent/Progress.hs | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs index 59c4af8c..dddd1832 100644 --- a/src/Data/Torrent.hs +++ b/src/Data/Torrent.hs | |||
@@ -159,6 +159,9 @@ ppPrivacy :: Bool -> Doc | |||
159 | ppPrivacy privacy = | 159 | ppPrivacy privacy = |
160 | "Privacy: " <> if privacy then "private" else "public" | 160 | "Privacy: " <> if privacy then "private" else "public" |
161 | 161 | ||
162 | ppAdditionalInfo :: InfoDict -> Doc | ||
163 | ppAdditionalInfo layout = PP.empty | ||
164 | |||
162 | -- | Format info dictionary in human-readable form. | 165 | -- | Format info dictionary in human-readable form. |
163 | ppInfoDict :: InfoDict -> Doc | 166 | ppInfoDict :: InfoDict -> Doc |
164 | ppInfoDict InfoDict {..} = | 167 | ppInfoDict InfoDict {..} = |
@@ -336,5 +339,6 @@ fromFile filepath = do | |||
336 | Right !t -> return t | 339 | Right !t -> return t |
337 | Left msg -> throwIO $ userError $ msg ++ " while reading torrent file" | 340 | Left msg -> throwIO $ userError $ msg ++ " while reading torrent file" |
338 | 341 | ||
342 | -- | Encode and write a .torrent file. | ||
339 | toFile :: FilePath -> Torrent -> IO () | 343 | toFile :: FilePath -> Torrent -> IO () |
340 | toFile filepath = BL.writeFile filepath . encode | 344 | toFile filepath = BL.writeFile filepath . encode |
diff --git a/src/Data/Torrent/Progress.hs b/src/Data/Torrent/Progress.hs index c1515cf0..9abf0380 100644 --- a/src/Data/Torrent/Progress.hs +++ b/src/Data/Torrent/Progress.hs | |||
@@ -1,7 +1,7 @@ | |||
1 | {-# LANGUAGE TemplateHaskell #-} | 1 | {-# LANGUAGE TemplateHaskell #-} |
2 | {-# LANGUAGE ViewPatterns #-} | 2 | {-# LANGUAGE ViewPatterns #-} |
3 | module Data.Torrent.Progress | 3 | module Data.Torrent.Progress |
4 | ( -- * Peer progress | 4 | ( -- * Progress |
5 | Progress (..) | 5 | Progress (..) |
6 | , left | 6 | , left |
7 | , uploaded | 7 | , uploaded |
@@ -13,7 +13,6 @@ module Data.Torrent.Progress | |||
13 | , enqueuedProgress | 13 | , enqueuedProgress |
14 | , uploadedProgress | 14 | , uploadedProgress |
15 | , dequeuedProgress | 15 | , dequeuedProgress |
16 | |||
17 | ) where | 16 | ) where |
18 | 17 | ||
19 | import Control.Applicative | 18 | import Control.Applicative |