From d004dc19996c5d1a96a36c46c2580c3f0db33261 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Wed, 25 May 2011 11:24:33 +0200 Subject: Test for UnixFilter --- src/Hakyll/Core/Resource/Provider/Dummy.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Hakyll/Core/Resource/Provider/Dummy.hs') diff --git a/src/Hakyll/Core/Resource/Provider/Dummy.hs b/src/Hakyll/Core/Resource/Provider/Dummy.hs index bc0b16d..9f15178 100644 --- a/src/Hakyll/Core/Resource/Provider/Dummy.hs +++ b/src/Hakyll/Core/Resource/Provider/Dummy.hs @@ -7,15 +7,17 @@ module Hakyll.Core.Resource.Provider.Dummy import Data.Map (Map) import qualified Data.Map as M -import qualified Data.ByteString.Lazy.Char8 as LBC +import qualified Data.Text.Lazy as TL +import qualified Data.Text.Lazy.Encoding as TL +import Data.ByteString.Lazy (ByteString) import Hakyll.Core.Resource import Hakyll.Core.Resource.Provider -- | Create a dummy 'ResourceProvider' -- -dummyResourceProvider :: Map String String -> IO ResourceProvider +dummyResourceProvider :: Map String ByteString -> IO ResourceProvider dummyResourceProvider vfs = makeResourceProvider (map Resource (M.keys vfs)) + (return . TL.unpack . TL.decodeUtf8 . (vfs M.!) . unResource) (return . (vfs M.!) . unResource) - (return . LBC.pack . (vfs M.!) . unResource) -- cgit v1.2.3