Commit graph

46 commits

Author SHA1 Message Date
Albert Krewinkel
37a82b0b11 Add missing copyright notices and remove license boilerplate (#5112)
Quite a few modules were missing copyright notices.

This commit adds copyright notices everywhere via haddock module
headers.  The old license boilerplate comment is redundant with this and has
been removed.

Update copyright years to 2019.

Closes #4592.
2019-02-04 13:52:31 -08:00
John MacFarlane
2018f41193 Update benchmarks for ghc 8.6.1. 2018-10-13 23:13:53 -07:00
John MacFarlane
48f0e73c55 Added Prelude imports to sources in benchmark and trypandoc. 2018-03-18 11:52:40 -07:00
Albert Krewinkel
0d935bd081
Update copyright notices to include 2018 2018-01-05 20:39:12 +01:00
John MacFarlane
e0cf8e64b5 Improve benchmarks.
Previously we weren't setting the default extensions
properly, so e.g. 'markdown' wasn't being tested with
pandoc markdown extensions.
2017-12-30 14:26:13 -08:00
John MacFarlane
07b06cb6e6 Improved benchmark argument parsing.
You can now say 'make bench BENCHARGS="markdown latex reader"'
and both the markdown and latex readers will be benchmarked.
2017-12-30 11:22:55 -08:00
John MacFarlane
6afdc89699 Remove redundant import. 2017-12-28 21:51:07 -08:00
John MacFarlane
12b792ba73 Revised benchmark so it doesn't use FileTree constructor. 2017-12-28 21:21:36 -08:00
John MacFarlane
1e1a7a9b83 Fixed warnings. 2017-10-29 15:19:49 -07:00
Kolen Cheung
0b09409385 update years in copyright 2017-10-26 22:57:13 -07:00
John MacFarlane
710bb18443 Fixed name shadowing in benchmark. 2017-06-19 23:42:27 +02:00
John MacFarlane
49830555fa Removed redundant import. 2017-06-11 07:45:35 +02:00
John MacFarlane
fa719d0264 Switched Writer types to use Text.
* XML.toEntities: changed type to Text -> Text.
* Shared.tabFilter -- fixed so it strips out CRs as before.
* Modified writers to take Text.
* Updated tests, benchmarks, trypandoc.

[API change]

Closes #3731.
2017-06-11 00:46:31 +02:00
John MacFarlane
f43504f9f4 Fixed benchmark to work with Text readers. 2017-06-10 20:57:38 +02:00
Or Neeman
fa43e36449 Fix stale references to tests directory (#3469)
Some of the benchmarks were failing due to references to files in the
`tests` directory, which is now called `test`.  A search found other
references to it also.  This commit updates all these references.
2017-02-25 10:31:40 +01:00
John MacFarlane
86b9a51ee3 benchmark: allow benchmark arguments.
These pattern match: so, '--benchmark-arguments "markdown reader"'
will only benchmark the markdown reader; with just "markdown" it
will do the writer too; with no arguments all benchmarks are run.
2017-01-27 11:29:26 +01:00
John MacFarlane
8a61d943f5 Fix up benchmarks so they compile. 2017-01-27 11:15:55 +01:00
John MacFarlane
35699ee533 Fixed up weigh-pandoc and benchmark-pandoc so they build. 2017-01-25 17:07:41 +01:00
John MacFarlane
478e15dc3b Removed unused import. 2016-11-30 14:53:22 +01:00
John MacFarlane
3e005aa413 Fixed benchmark for new API. 2015-12-14 20:34:53 -08:00
John MacFarlane
23b693c029 Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."
This reverts commit c423dbb5a3.
2015-11-09 10:08:22 -08:00
John MacFarlane
c423dbb5a3 Use -XNoImplicitPrelude and 'import Prelude' explicitly.
This is needed for ghci to work with pandoc, given that we
now use a custom prelude.

Closes #2503.
2015-11-08 16:56:59 -08:00
John MacFarlane
82b3e0ab97 Use custom Prelude to avoid compiler warnings.
- The (non-exported) prelude is in prelude/Prelude.hs.
- It exports Monoid and Applicative, like base 4.8 prelude,
  but works with older base versions.
- It exports (<>) for mappend.
- It hides 'catch' on older base versions.

This allows us to remove many imports of Data.Monoid
and Control.Applicative, and remove Text.Pandoc.Compat.Monoid.

It should allow us to use -Wall again for ghc 7.10.
2015-10-14 09:09:10 -07:00
John MacFarlane
59193d81fb Removed unneeded imports in benchmark program. 2015-10-09 21:15:18 -07:00
John MacFarlane
70ebccf93b Updated benchmark program. 2015-10-09 18:08:47 -07:00
John MacFarlane
8944ccdaca benchmark: Use Criterion.Monad not Criterion.Config. 2015-10-09 14:38:39 -07:00
John MacFarlane
c2cb64379e benchmark - removed kludge we needed before CommonMark writer. 2015-03-30 00:06:40 -07:00
John MacFarlane
6a3a04c428 Merge branch 'errortype' of https://github.com/mpickering/pandoc into mpickering-errortype
Conflicts:
	benchmark/benchmark-pandoc.hs
	src/Text/Pandoc/Readers/Markdown.hs
	src/Text/Pandoc/Readers/Org.hs
	src/Text/Pandoc/Readers/RST.hs
	tests/Tests/Readers/LaTeX.hs
2015-03-28 12:12:48 -07:00
John MacFarlane
e0d234e54d Added CommonMark reader using cmark (libcmark bindings).
- Added commonmark as an input format.
- Added `Text.Pandoc.Readers.CommonMark.readCommonMark`.
- For now, we use the markdown writer to generate benchmark
  text for the CommonMark reader.  We can change this when we
  get a writer.
2015-03-17 16:15:57 -07:00
Matthew Pickering
f046531a6b Update benchmarks 2015-02-18 21:09:07 +00:00
John MacFarlane
36c9537b90 benchmark: use only test suite for benchmark.
This way the benchmarks don't take so long to run.
2014-08-01 13:40:26 -07:00
John MacFarlane
836d1f06bb Use nfIO in benchmark instead of getLength trick. 2014-08-01 13:20:08 -07:00
Artyom Kazak
857c63f77e Make benchmarks compile again.
Additionally, fix the problem which caused one failing benchmark
to stop other benchmarks from running.
2014-08-01 15:40:25 +04:00
Albert Krewinkel
8fdbef841d Update copyright notices for 2014, add missing notices 2014-05-09 00:46:08 +02:00
John MacFarlane
96f64c7c49 benchmark: Remove haddock (no writer to create reader input). 2013-09-10 09:56:56 -07:00
John MacFarlane
3aa5733f30 Revised benchmark for new metadata. 2013-06-25 18:17:32 -07:00
John MacFarlane
5f4a32e465 Use aeson for json.
Benchmarked:  about twice as slow as json!
2013-06-24 20:27:37 -07:00
John MacFarlane
024c1ad3c5 Updated benchmark code for changes in Text.Pandoc. 2013-01-04 11:11:42 -08:00
John MacFarlane
78425c90e3 Fixed benchmark file to find documentation files. 2012-12-29 19:23:24 -08:00
John MacFarlane
1864bb0994 Data files changes.
* Added `embed_data_files` flag.  (not yet used)
* Shared no longer exports `findDataFile`.
* `readDataFile` now returns a strict bytestring.
* Shared now exports `readDataFileUTF8` which returns a string like
  the old `readDataFile`.
* Rewrote modules to use new data file functions and to avoid
  using functions from Paths_pandoc directly.
2012-12-29 17:54:07 -08:00
John MacFarlane
dfa4b76630 Changes to literate haskell options.
- Removed writerLiterateHaskell from WriterOptions.
- Removed readerLiterateHaskell from ReaderOptions.
- Added Ext_literate_haskell to Extensions.  Test for this
  instead of the above.
- Removed failUnlessLHS from Shared.

Note:  At this point, +lhs and .lhs extension no longer has any effect.
Need to fix.
2012-08-08 23:18:19 -07:00
John MacFarlane
fc738c6315 Benchmark: default to sample size of 20 for speed. 2012-07-27 11:13:18 -07:00
John MacFarlane
5b6e70c3b5 Use README + testsuite in benchmarks. 2012-07-27 11:06:24 -07:00
John MacFarlane
00dc1e715e Moved WriterOptions and associated types Shared -> Options. 2012-07-26 22:59:56 -07:00
John MacFarlane
1de26d0857 Added type signature. 2012-07-26 10:02:00 -07:00
John MacFarlane
c414a08bcf Integrated benchmark into cabal.
Can now do:

cabal configure --enable-benchmarks && cabal build
cabal bench --benchmark-option='markdown' --benchmark-option='-s 20'
2012-07-26 09:19:40 -07:00
Renamed from Benchmark.hs (Browse further)