summaryrefslogtreecommitdiff
path: root/src/Data/Torrent.hs
diff options
context:
space:
mode:
authorSam T <pxqr.sta@gmail.com>2013-07-14 03:25:46 +0400
committerSam T <pxqr.sta@gmail.com>2013-07-14 03:25:46 +0400
commit5a6e5634452ff463a7442dbd8761678651517d20 (patch)
tree5ca9f455dee0aa6fcbf67e34f23b753f00bf3d55 /src/Data/Torrent.hs
parente160fcee699c7012d8f50a6e4bcd3b8a9c02aedf (diff)
~ Minor changes.
Diffstat (limited to 'src/Data/Torrent.hs')
-rw-r--r--src/Data/Torrent.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs
index ae40bef4..3f555a5b 100644
--- a/src/Data/Torrent.hs
+++ b/src/Data/Torrent.hs
@@ -27,7 +27,7 @@
27module Data.Torrent 27module Data.Torrent
28 ( -- * Torrent 28 ( -- * Torrent
29 Torrent(..), ContentInfo(..), FileInfo(..) 29 Torrent(..), ContentInfo(..), FileInfo(..)
30 , torrent, simpleTorrent 30 , mktorrent, simpleTorrent
31 , torrentExt, isTorrentPath 31 , torrentExt, isTorrentPath
32 , fromFile 32 , fromFile
33 33
@@ -279,16 +279,16 @@ instance Hashable Torrent where
279-} 279-}
280 280
281-- | Smart constructor for 'Torrent' which compute info hash. 281-- | Smart constructor for 'Torrent' which compute info hash.
282torrent :: URI -> ContentInfo 282mktorrent :: URI -> ContentInfo
283 -> Maybe [[URI]] -> Maybe Text -> Maybe ByteString 283 -> Maybe [[URI]] -> Maybe Text -> Maybe ByteString
284 -> Maybe Time -> Maybe ByteString -> Maybe URI 284 -> Maybe Time -> Maybe ByteString -> Maybe URI
285 -> Maybe URI -> Maybe ByteString 285 -> Maybe URI -> Maybe ByteString
286 -> Torrent 286 -> Torrent
287torrent announce info = Torrent (hashlazy (BE.encoded info)) announce info 287mktorrent announce info = Torrent (hashlazy (BE.encoded info)) announce info
288 288
289-- | A simple torrent contains only required fields. 289-- | A simple torrent contains only required fields.
290simpleTorrent :: URI -> ContentInfo -> Torrent 290simpleTorrent :: URI -> ContentInfo -> Torrent
291simpleTorrent announce info = torrent announce info 291simpleTorrent announce info = mktorrent announce info
292 Nothing Nothing Nothing 292 Nothing Nothing Nothing
293 Nothing Nothing Nothing 293 Nothing Nothing Nothing
294 Nothing Nothing 294 Nothing Nothing