diff options
author | Sam Truzjan <pxqr.sta@gmail.com> | 2013-11-20 22:02:31 +0400 |
---|---|---|
committer | Sam Truzjan <pxqr.sta@gmail.com> | 2013-11-20 22:02:31 +0400 |
commit | 05c444079632946807e5311e24b06e13c4205515 (patch) | |
tree | cc2c321b81b0466cfa28e4b36b871fd2baea004c /src/Data/Torrent.hs | |
parent | cdd1782b0d55ed0119ac905904437ab8209f7cf2 (diff) |
Minor changes
Diffstat (limited to 'src/Data/Torrent.hs')
-rw-r--r-- | src/Data/Torrent.hs | 4 |
1 files changed, 4 insertions, 0 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 |