summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core/Provider
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2016-05-17 10:53:11 -0400
committerJasper Van der Jeugt <m@jaspervdj.be>2016-05-17 10:53:11 -0400
commitb1be76da5b7340dd648885e0bfdadc4cc6fa8cbf (patch)
treeb04dd880369bdd04eea6eb5657a1dd3b82e0f1dc /src/Hakyll/Core/Provider
parentb6dfc61f75ff48a4dacc7f21ddd0f22b1e75b780 (diff)
downloadhakyll-b1be76da5b7340dd648885e0bfdadc4cc6fa8cbf.tar.gz
Read `.metadata` files using bytestring
Diffstat (limited to 'src/Hakyll/Core/Provider')
-rw-r--r--src/Hakyll/Core/Provider/Metadata.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Hakyll/Core/Provider/Metadata.hs b/src/Hakyll/Core/Provider/Metadata.hs
index 0b0291c..6285ce1 100644
--- a/src/Hakyll/Core/Provider/Metadata.hs
+++ b/src/Hakyll/Core/Provider/Metadata.hs
@@ -14,6 +14,7 @@ module Hakyll.Core.Provider.Metadata
import Control.Arrow (second)
import Control.Exception (Exception, throwIO)
import Control.Monad (guard)
+import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC
import Data.List.Extended (breakWhen)
import qualified Data.Map as M
@@ -59,7 +60,8 @@ loadMetadataHeader fp = do
--------------------------------------------------------------------------------
loadMetadataFile :: FilePath -> IO Metadata
loadMetadataFile fp = do
- errOrMeta <- Yaml.decodeFileEither fp
+ fileContent <- B.readFile fp
+ let errOrMeta = Yaml.decodeEither' fileContent
either (fail . show) return errOrMeta