summaryrefslogtreecommitdiff
path: root/src/Data/Torrent.hs
diff options
context:
space:
mode:
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