@@ -35,6 +35,7 @@ import Text.Pandoc.Shared (camelCaseToHyphenated)
3535import qualified Data.Text as T
3636import Data.Aeson (defaultOptions, Options(..), FromJSON(..), ToJSON(..),
3737 Value(..))
38+import Data.Aeson.Types (typeMismatch)
3839#ifdef DERIVE_JSON_VIA_TH
3940import Data.Aeson.TH (deriveJSON)
4041#else
@@ -53,7 +54,7 @@ instance FromJSON LineEnding where
5354 "crlf" -> return CRLF
5455 "native" -> return Native
5556 _ -> fail "Expecting LF, CRLF, or Native"
56− parseJSON _ = fail "Expecting string"
57+ parseJSON v = typeMismatch "String" v
5758
5859-- | Data structure for command line options.
5960data Opt = Opt