No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc/hal2016
src
test
.gitignore
.travis.yml
LICENSE
README.md
Setup.hs
pretty-test.cabal
stack.yaml

README.md

Test case generator for pretty combinators

https://github.com/haskell/pretty/issues/32#issuecomment-223213838

Build Status

Results:

  • pretty does seem to have some quadratic behaviour (As a user, I am shocked. Ndm says that after reading the source, he would have been shocked if it was less than quadratic.)
  • It seems it's not getting worse that that. I enumerated small contexts and found none that shows drastically different behaviour.
  • For these tests, it does not matter that we render to plain Strings which has inefficient (++). I used a different render function that just computes a number: results are quite exactly the same.
  • There's something wrong in wl-pprint (including -text, -extras), see https://github.com/ekmett/wl-pprint-extras/issues/16

Conclusion:

  • use this for testing:
length $ render $ iterate ( \ hole ->  sep [text  "l", cat [hole], text  "l"] ) (text  "l") !! 1000

NB: the Series module might be a nice alternative to smallcheck