From 2abd00f548b7b9565b2a6bc1bed793d2a6f8c9cd Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Sun, 1 Dec 2013 17:57:59 +0400 Subject: Add functor instances to Block and Piece --- src/Data/Torrent/Piece.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Data/Torrent/Piece.hs') diff --git a/src/Data/Torrent/Piece.hs b/src/Data/Torrent/Piece.hs index 7eb4e3d5..c6223348 100644 --- a/src/Data/Torrent/Piece.hs +++ b/src/Data/Torrent/Piece.hs @@ -7,8 +7,9 @@ -- -- Pieces are used to validate torrent content. -- -{-# LANGUAGE TemplateHaskell #-} -{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Data.Torrent.Piece ( -- * Piece attributes @@ -115,7 +116,7 @@ data Piece a = Piece -- | Payload. , pieceData :: !a - } deriving (Show, Read, Eq, Typeable) + } deriving (Show, Read, Eq, Functor, Typeable) $(deriveJSON (L.map toLower . L.dropWhile isLower) ''Piece) -- cgit v1.2.3