git.iko.soy/typeable/pandoc
on master help sign in
Fixed warnings.
1e1a7a9John MacFarlane
benchmark/benchmark-pandoc.hs+3−3
@@ -16,7 +16,6 @@ along with this program; if not, write to the Free Software
16Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17-}
17-}
18import Text.Pandoc
18import Text.Pandoc
19−import Text.Pandoc.Class hiding (getCurrentTime, trace)
20import qualified Text.Pandoc.UTF8 as UTF8
19import qualified Text.Pandoc.UTF8 as UTF8
21import Data.Text (Text)
20import Data.Text (Text)
22import Data.Time (getCurrentTime)
21import Data.Time (getCurrentTime)
@@ -38,7 +37,8 @@ readerBench doc (name, reader) =
38 $ writer def{ writerWrapText = WrapAuto} doc
37 $ writer def{ writerWrapText = WrapAuto} doc
39 in return $ bench (name ++ " reader") $ nf
38 in return $ bench (name ++ " reader") $ nf
40 (reader def) inp
39 (reader def) inp
40+ _ -> Debug.Trace.trace
41− _ -> trace ("\nCould not find writer for " ++ name ++ "\n") Nothing
41+ ("\nCould not find writer for " ++ name ++ "\n") Nothing
42
42
43writerBench :: Pandoc
43writerBench :: Pandoc
44 -> (String, WriterOptions -> Pandoc -> Text)
44 -> (String, WriterOptions -> Pandoc -> Text)
@@ -66,7 +66,7 @@ main = do
66 inp <- UTF8.toText <$> B.readFile "test/testsuite.txt"
66 inp <- UTF8.toText <$> B.readFile "test/testsuite.txt"
67 lalune <- B.readFile "test/lalune.jpg"
67 lalune <- B.readFile "test/lalune.jpg"
68 movie <- B.readFile "test/movie.jpg"
68 movie <- B.readFile "test/movie.jpg"
69− time <- getCurrentTime
69+ time <- Data.Time.getCurrentTime
70 let setupFakeFiles = modifyPureState $ \st -> st{ stFiles =
70 let setupFakeFiles = modifyPureState $ \st -> st{ stFiles =
71 FileTree $ Map.fromList [
71 FileTree $ Map.fromList [
72 ("lalune.jpg", FileInfo time lalune),
72 ("lalune.jpg", FileInfo time lalune),
src/Text/Pandoc/App.hs−5
@@ -77,11 +77,6 @@ import System.IO.Error (isDoesNotExistError)
77import Text.Pandoc
77import Text.Pandoc
78import Text.Pandoc.BCP47 (Lang (..), parseBCP47)
78import Text.Pandoc.BCP47 (Lang (..), parseBCP47)
79import Text.Pandoc.Builder (setMeta)
79import Text.Pandoc.Builder (setMeta)
80−import Text.Pandoc.Class (PandocIO, extractMedia, fillMediaBag, getLog, openURL,
81− readDataFile, readDefaultDataFile, readFileStrict,
82− report, setInputFiles, setOutputFile,
83− setRequestHeader, setResourcePath, setTrace,
84− setTranslations, setUserDataDir)
85import Text.Pandoc.Highlighting (highlightingStyles)
80import Text.Pandoc.Highlighting (highlightingStyles)
86import Text.Pandoc.Lua (LuaException (..), runLuaFilter)
81import Text.Pandoc.Lua (LuaException (..), runLuaFilter)
87import Text.Pandoc.PDF (makePDF)
82import Text.Pandoc.PDF (makePDF)