From 6ed114cb5d34641253c8be0079bfc4a3bf906af4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 29 Jun 2018 11:47:58 +0200 Subject: Use decodeEither' not decodeEither (deprecated). --- src/Text/Pandoc/App.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index f2b7ab7a3..5cbbe13e7 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -62,7 +62,7 @@ import qualified Data.Text as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.Encoding as TE import qualified Data.Text.Encoding.Error as TE -import Data.Yaml (decodeEither) +import Data.Yaml (decodeEither') import qualified Data.Yaml as Yaml import GHC.Generics import Network.URI (URI (..), parseURI) @@ -702,7 +702,7 @@ removeMetaKeys :: [(String,String)] -> Pandoc -> Pandoc removeMetaKeys kvs pdc = foldr (deleteMeta . fst) pdc kvs readMetaValue :: String -> MetaValue -readMetaValue s = case decodeEither (UTF8.fromString s) of +readMetaValue s = case decodeEither' (UTF8.fromString s) of Right (Yaml.String t) -> MetaString $ T.unpack t Right (Yaml.Bool b) -> MetaBool b _ -> MetaString s -- cgit v1.2.3