diff options
Diffstat (limited to 'src/Hakyll/Core')
-rw-r--r-- | src/Hakyll/Core/Resource/Provider/Dummy.hs | 8 |
1 files changed, 5 insertions, 3 deletions
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) |