From 5f9014cec2b99254bb9d250abbb75926a1f7e4b1 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Tue, 29 Dec 2009 11:21:20 +0100 Subject: Expplicit use of Context, in an attempt to solve build errors on hackage. --- src/Text/Hakyll/Page.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/Text/Hakyll') diff --git a/src/Text/Hakyll/Page.hs b/src/Text/Hakyll/Page.hs index ed5f7cf..25ba880 100644 --- a/src/Text/Hakyll/Page.hs +++ b/src/Text/Hakyll/Page.hs @@ -11,23 +11,24 @@ module Text.Hakyll.Page import qualified Data.Map as M import qualified Data.List as L import qualified Data.ByteString.Lazy.Char8 as B -import Data.Maybe -import Control.Monad +import Data.Maybe (fromMaybe) -import System.FilePath +import System.FilePath (FilePath, takeExtension) import System.IO import Text.Hakyll.File -import Text.Hakyll.Util +import Text.Hakyll.Util (trim) import Text.Hakyll.Renderable import Text.Pandoc +import Text.Template (Context) + -- | A Page is basically key-value mapping. Certain keys have special -- meanings, like for example url, body and title. -data Page = Page (M.Map B.ByteString B.ByteString) +data Page = Page Context -- | Create a Page from a key-value mapping. -fromContext :: (M.Map B.ByteString B.ByteString) -> Page +fromContext :: Context -> Page fromContext = Page -- | Obtain a value from a page. Will resturn an empty string when nothing is -- cgit v1.2.3