@@ -1,3 +1,4 @@
1+{-# LANGUAGE DeriveDataTypeable #-}
12module Hakyll.Web.Tags
23 ( Tags (..)
34 , readTagsWith
@@ -5,17 +6,29 @@ module Hakyll.Web.Tags
56 , readCategories
67 ) where
78
9+import Control.Applicative ((<$>))
810import Data.Map (Map)
911import qualified Data.Map as M
1012
13+import Data.Typeable (Typeable)
14+import Data.Binary (Binary, get, put)
15+
1116import Hakyll.Web.Page
1217import Hakyll.Web.Util.String
18+import Hakyll.Core.Writable
1319
1420-- | Data about tags
1521--
1622data Tags a = Tags
1723 { tagsMap :: Map String [Page a]
18− } deriving (Show)
24+ } deriving (Show, Typeable)
25+
26+instance Binary a => Binary (Tags a) where
27+ get = Tags <$> get
28+ put (Tags m) = put m
29+
30+instance Writable (Tags a) where
31+ write _ _ = return ()
1932
2033-- | Higher-level function to read tags
2134--