summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Resource/Provider/Dummy.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-05-25 11:24:33 +0200
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-05-25 11:24:33 +0200
commitd004dc19996c5d1a96a36c46c2580c3f0db33261 (patch)
tree9976bcbf12d2b91c069275d6345e929d61184b36 /src/Hakyll/Core/Resource/Provider/Dummy.hs
parent63a637f27cc51006c6b432337c232c17bfe0b0c2 (diff)
downloadhakyll-d004dc19996c5d1a96a36c46c2580c3f0db33261.tar.gz
Test for UnixFilter
Diffstat (limited to 'src/Hakyll/Core/Resource/Provider/Dummy.hs')
-rw-r--r--src/Hakyll/Core/Resource/Provider/Dummy.hs8
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)