@@ -176,17 +176,17 @@ parseFormatSpec = parse formatSpec ""
176176 _ -> Set.insert ext
177177
178178-- | Association list of formats and readers.
179−readers :: [(String, ReaderOptions -> String -> Pandoc)]
180−readers = [("native" , \_ -> readNative)
181− ,("json" , \_ -> decodeJSON)
182− ,("markdown_strict" , readMarkdown)
183− ,("markdown" , readMarkdown)
184− ,("rst" , readRST)
185− ,("mediawiki" , readMediaWiki)
186− ,("docbook" , readDocBook)
187− ,("textile" , readTextile) -- TODO : textile+lhs
188− ,("html" , readHtml)
189− ,("latex" , readLaTeX)
179+readers :: [(String, ReaderOptions -> String -> IO Pandoc)]
180+readers = [("native" , \_ s -> return $ readNative s)
181+ ,("json" , \_ s -> return $ decodeJSON s)
182+ ,("markdown_strict" , \o s -> return $ readMarkdown o s)
183+ ,("markdown" , \o s -> return $ readMarkdown o s)
184+ ,("rst" , \o s -> return $ readRST o s)
185+ ,("mediawiki" , \o s -> return $ readMediaWiki o s)
186+ ,("docbook" , \o s -> return $ readDocBook o s)
187+ ,("textile" , \o s -> return $ readTextile o s) -- TODO : textile+lhs
188+ ,("html" , \o s -> return $ readHtml o s)
189+ ,("latex" , \o s -> return $ readLaTeX o s)
190190 ]
191191
192192data Writer = PureStringWriter (WriterOptions -> Pandoc -> String)
@@ -240,7 +240,7 @@ getDefaultExtensions "markdown_strict" = strictExtensions
240240getDefaultExtensions _ = pandocExtensions
241241
242242-- | Retrieve reader based on formatSpec (format+extensions).
243−getReader :: String -> Either String (ReaderOptions -> String -> Pandoc)
243+getReader :: String -> Either String (ReaderOptions -> String -> IO Pandoc)
244244getReader s =
245245 case parseFormatSpec s of
246246 Left e -> Left $ intercalate "\n" $ [m | Message m <- errorMessages e]