summaryrefslogtreecommitdiff
path: root/src/Data/Torrent/Layout.hs
diff options
context:
space:
mode:
authorSam Truzjan <pxqr.sta@gmail.com>2013-12-07 23:10:27 +0400
committerSam Truzjan <pxqr.sta@gmail.com>2013-12-07 23:10:27 +0400
commit1ae7d4877a2a30131babbee54bc0c24651eaba90 (patch)
tree1d2b6835d70a546859569933d0a34037b029d7c5 /src/Data/Torrent/Layout.hs
parent44fc77ee51b5aef9d43e3d384845d73646ea1d0e (diff)
Move JSON options to separate module
Diffstat (limited to 'src/Data/Torrent/Layout.hs')
-rw-r--r--src/Data/Torrent/Layout.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Data/Torrent/Layout.hs b/src/Data/Torrent/Layout.hs
index a32d74fa..453c0d4f 100644
--- a/src/Data/Torrent/Layout.hs
+++ b/src/Data/Torrent/Layout.hs
@@ -70,7 +70,6 @@ import Data.BEncode.Types
70import Data.ByteString as BS 70import Data.ByteString as BS
71import Data.ByteString.Base16 as Base16 71import Data.ByteString.Base16 as Base16
72import Data.ByteString.Char8 as BC 72import Data.ByteString.Char8 as BC
73import Data.Char as Char
74import Data.Foldable as F 73import Data.Foldable as F
75import Data.List as L 74import Data.List as L
76import Data.Text as T 75import Data.Text as T
@@ -81,6 +80,7 @@ import Text.PrettyPrint.Class
81import System.FilePath 80import System.FilePath
82import System.Posix.Types 81import System.Posix.Types
83 82
83import Data.Torrent.JSON
84 84
85{----------------------------------------------------------------------- 85{-----------------------------------------------------------------------
86-- File attribytes 86-- File attribytes
@@ -123,7 +123,7 @@ data FileInfo a = FileInfo {
123 , Functor, Foldable 123 , Functor, Foldable
124 ) 124 )
125 125
126$(deriveJSON defaultOptions { fieldLabelModifier = (L.map Char.toLower . L.dropWhile isLower) } ''FileInfo) 126$(deriveJSON omitRecordPrefix ''FileInfo)
127 127
128makeLensesFor 128makeLensesFor
129 [ ("fiLength", "fileLength") 129 [ ("fiLength", "fileLength")
@@ -208,7 +208,7 @@ data LayoutInfo
208 , liDirName :: !ByteString 208 , liDirName :: !ByteString
209 } deriving (Show, Read, Eq, Typeable) 209 } deriving (Show, Read, Eq, Typeable)
210 210
211$(deriveJSON defaultOptions { fieldLabelModifier = (L.map Char.toLower . L.dropWhile isLower) } ''LayoutInfo) 211$(deriveJSON omitRecordPrefix ''LayoutInfo)
212 212
213makeLensesFor 213makeLensesFor
214 [ ("liFile" , "singleFile" ) 214 [ ("liFile" , "singleFile" )