mkStringReaderWithWarnings :: (ReaderOptions -> String -> Either PandocError (Pandoc, [String])) -> Reader
mkStringReaderWithWarnings r  = StringReader $ \o s ->
  case r o s of
    Left err -> return $ Left err
    Right (doc, warnings) -> do
      mapM_ warn warnings
      return (Right doc)
mkStringReaderWithWarnings :: (ReaderOptions -> String -> Either PandocError (Pandoc, [String])) -> Reader
mkStringReaderWithWarnings r  = StringReader $ \o s ->
  case r o s of
    Left err -> return $ Left err
    Right (doc, warnings) -> do
      mapM_ warn warnings
      return (Right doc)
mkStringReaderWithWarnings r  = StringReader $ \o s ->
  case r o s of
    Left err -> return $ Left err
    Right (doc, warnings) -> do
      mapM_ warn warnings
      return (Right doc)