All Versions
13
Latest Version
3.0
Avg Release Cycle
156 days
Latest Release
13483 days ago

Changelog History
Page 1

  • v3.0 Changes

    May 28, 1987
    • ๐ŸŽ Cured massive performance bug. If you write:

      foldl <> empty (map (text.show) [1..10000])

    You get quadratic behaviour with V2.0. Why? For just the same reason as you get quadratic behaviour with left-associated (++) chains.

    This is really bad news. One thing a pretty-printer abstraction should certainly guarantee is insensitivity to associativity. It matters: suddenly GHC's compilation times went up by a factor of 100 when I switched to the new pretty printer.

    I fixed it with a bit of a hack (because I wanted to get GHC back on the road). I added two new constructors to the Doc type, Above and Beside:

    <> = Beside
    $$ = Above
    

    Then, where I need to get to a "TextBeside" or "NilAbove" form I "force" the Doc to squeeze out these suspended calls to Beside and Above; but in so doing I re-associate. It's quite simple, but I'm not satisfied that I've done the best possible job. I'll send you the code if you are interested.

    • โž• Added new exports: punctuate, hang int, integer, float, double, rational, lparen, rparen, lbrack, rbrack, lbrace, rbrace,

    • fullRender's type signature has changed. Rather than producing a string it now takes an extra couple of arguments that tells it how to glue fragments of output together:

      fullRender :: Mode -> Int -- Line length -> Float -- Ribbons per line -> (TextDetails -> a -> a) -- What to do with text -> a -- What to do at the end -> Doc -> a -- Result

    The "fragments" are encapsulated in the TextDetails data type:

    data TextDetails = Chr  Char
                     | Str  String
                     | PStr FAST_STRING
    

    The Chr and Str constructors are obvious enough. The PStr constructor has a packed string (FAST_STRING) inside it. It's generated by using the new "ptext" export.

    An advantage of this new setup is that you can get the renderer to do output directly (by passing in a function of type (TextDetails -> IO () -> IO ()), rather than producing a string that you then print.

  • v1.1.3.6 Changes

    January 30, 2018
    • ๐Ÿ›  Fix compatability with GHC-8.4/base-4.11 (by Herbert Valerio Riedel).
    • โž• Add in benchmarking framework (by Alfredo Di Napoli).
  • v1.1.3.5 Changes

    February 01, 2017
    • ๐Ÿ›  Fix documentation formatting bug (by Ivan Lazar Miljenovic)
    • ๐Ÿ›  Fix missing git tag on Github for v1.1.3.4 release.
  • v1.1.3.4 Changes

    June 03, 2016
    • ๐Ÿ›  Fix over-zeleaous use of strictness causing stack allocation, fixes part of issue #32 (by Neil Mitchell).
  • v1.1.3.3 Changes

    February 29, 2016
    • ๐Ÿ‘Œ Improve documentation.
  • v1.1.3.2 Changes

    March 19, 2015
    • ๐Ÿ›  Fix bug with haddock documentation.
    • ๐Ÿ“š Clean up module intro documentation.
  • v1.1.3.1 Changes

    March 11, 2015
    • โž• Add support for annotations in pretty (by Trevor Elliott).
  • v1.1.2.1 Changes

    December 25, 2014
    • ๐Ÿ›  Fix overly-strict issue preventing use of pretty for very large docs (by Eyal Lotem).
  • v1.1.2.0 Changes

    December 25, 2014
    • ๐Ÿ“ฆ Merge in prettyclass package -- new Text.PrettyPrint.HughesPHClass.
    • โž• Add in 'maybe*' variants of various bracket functins.
    • โž• Add Generic instances for appropriate data types.
    • ๐Ÿ›  Fix compilation under GHC 7.10
  • v1.1.1.3 Changes

    December 21, 2014
    • โœ‚ Remove upper bound on deepseq package to fix build issues with latest GHC.