summaryrefslogtreecommitdiff
path: root/src/Data/Torrent/Layout.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Torrent/Layout.hs')
-rw-r--r--src/Data/Torrent/Layout.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Data/Torrent/Layout.hs b/src/Data/Torrent/Layout.hs
index a4b55b3d..ef8d45eb 100644
--- a/src/Data/Torrent/Layout.hs
+++ b/src/Data/Torrent/Layout.hs
@@ -71,6 +71,7 @@ import Data.BEncode.Types
71import Data.ByteString as BS 71import Data.ByteString as BS
72import Data.ByteString.Base16 as Base16 72import Data.ByteString.Base16 as Base16
73import Data.ByteString.Char8 as BC 73import Data.ByteString.Char8 as BC
74import Data.Default
74import Data.Foldable as F 75import Data.Foldable as F
75import Data.List as L 76import Data.List as L
76import Data.Text as T 77import Data.Text as T
@@ -222,6 +223,10 @@ instance NFData LayoutInfo where
222 rnf SingleFile {..} = () 223 rnf SingleFile {..} = ()
223 rnf MultiFile {..} = rnf liFiles 224 rnf MultiFile {..} = rnf liFiles
224 225
226-- | Empty multifile layout.
227instance Default LayoutInfo where
228 def = MultiFile [] ""
229
225getLayoutInfo :: Get LayoutInfo 230getLayoutInfo :: Get LayoutInfo
226getLayoutInfo = single <|> multi 231getLayoutInfo = single <|> multi
227 where 232 where