All Versions
4
Latest Version
Avg Release Cycle
23 days
Latest Release
-

Changelog History

  • v0.4.0.0 Changes

    • โž• Added styling individual pointers with PointerStyle (e.g. characters, highlighting).

      • This changes how styleLine and highlight works and moves styleUnderline to PointerStyle.
      • This also adds a PointerStyle parameter to the helper functions so e.g. blockSimple fancyStyle ... should now be blockSimple fancyStyle fancyPointer ....
      • Crazy example from the tests (you can imagine coloring things differently): an error --> here:1:1 | 1 | abcdefghijk | .. ~~ ^^ z | | : | | 2 y | 1 x 2 | lmnopqrstuv | ''' w an error occurred here
    • ๐Ÿ’… Moved existing and added new premade styles to Errata.Styles. Errata no longer exports premade styles. Also moved highlight there.

    • โž• Added support for characters with different widths (full-width, combining characters, others). The cabal flag usewcwidth (default false) can be enabled to use the native wcwidth function.

    • โž• Added support for replacing tabs with spaces with the styleTabWidth option in Style (defaults to 4).

    • โž• Added option for the lines before and after the omission line with styleExtraLinesAfter and styleExtraLinesBefore in Style.

    • โž• Added option for padding lines before and after the source stylePaddingTop and stylePaddingBottom in Style.

    • โž• Added option for disabling the hook with styleEnableHook in PointerStyle.

    • โž• Added option for toggling all decorations completely with styleEnableDecorations in Style. Useful if you only want highlighting and not underlining. Combine with stylePaddingTop = False for a compact source code block.

    • โž• Added option for toggling the line prefixes with styleEnableLinePrefix in Style.

    • โž• Added Show instances to all the types. Style functions are applied to some sample text.

    • ๐Ÿ”„ Changed Monoid constraint of Source to just requiring an emptySource value.

    • ๐Ÿ›  Fixed trailing whitespace in the omission line.

  • v0.3.0.0 Changes

    • ๐Ÿ‘Œ Support GHC 9.0.1 (and eventually 9.2).

    • โšก๏ธ Optimized rendering of errors (#5). Huge thanks to RiugaBachi for this! This also adds a Monoid constraint to Source.

    • ๐Ÿ–จ Reworked the pretty printer so that it no longer prints trailing whitespace in most places.

    • โœ‚ Removed the errataBlock field, and only use errataBlocks. Now, an Errata can have no blocks attached to it at all. They will also no longer be sorted beforehand, as that should be up to the user.

    • โœ‚ Removed prettyErrorsNE, as it is no longer useful for what it was documented for.

    • ๐Ÿ›  Fixed the rendering of Blocks with no Pointers adding extra blank lines.

  • v0.2.0.0 Changes

    September 27, 2020
    • โž• Added new blockHeader field to Block, which will put text underneath the location text but above the source lines. This also affects all the block helper functions, which now have an argument for the header.

    • The blockSimple and blockSimple' functions are now passed tuples of positions and labels instead of Ints, which is more consistent with the rest of the helper functions.

    • ๐Ÿ“š Defined type synonyms for line, column, headers, bodies, and labels, for the purpose of documentation. It should be much easier to know what is expected by just reading the types now.

    • ๐Ÿ‘‰ Use GHC.Arr.Array for keeping source lines, which should be faster for indexing and should not force the individual lines until they are needed.

  • v0.1.0.0 Changes

    September 04, 2020
    • ๐ŸŽ‰ Initial release.