diff options
-rw-r--r-- | src/Hakyll/Web/Page.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Hakyll/Web/Page.hs b/src/Hakyll/Web/Page.hs index 151364f..92303c1 100644 --- a/src/Hakyll/Web/Page.hs +++ b/src/Hakyll/Web/Page.hs @@ -7,8 +7,11 @@ module Hakyll.Web.Page , toMap ) where +import Control.Applicative ((<$>), (<*>)) + import Data.Map (Map) import qualified Data.Map as M +import Data.Binary (Binary, get, put) import Hakyll.Core.Writable @@ -22,6 +25,10 @@ data Page a = Page instance Functor Page where fmap f (Page m b) = Page m (f b) +instance Binary a => Binary (Page a) where + put (Page m b) = put m >> put b + get = Page <$> get <*> get + instance Writable a => Writable (Page a) where write p (Page _ b) = write p b |