errata: Source code error pretty printing

[ library, mit, pretty-printer, program ] [ Propose Tags ] [ Report a vulnerability ]

An extremely customizable error pretty printer that can handle many kinds of error formatting. It can handle errors that are connected, disconnected, and those spanning multiple lines.

You can get started by importing the Errata module.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
usewcwidth

Enable the use of wcwidth for character widths. If disabled, uses an incomplete premade version.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.4.0.0, 0.4.0.1, 0.4.0.2
Change log CHANGELOG.md
Dependencies base (>=4.12 && <4.20), containers (>=0.6 && <0.7), errata, text (>=1.2.3 && <2.2) [details]
Tested with ghc ==8.6.5, ghc ==8.8.4, ghc ==8.10.7, ghc ==9.0.2, ghc ==9.2.8, ghc ==9.4.5, ghc ==9.6.2, ghc ==9.8.1
License MIT
Copyright (c) 2020- comp
Author comp
Maintainer onecomputer00@gmail.com
Category Pretty Printer
Home page https://github.com/1Computer1/errata
Bug tracker https://github.com/1Computer1/errata/issues
Source repo head: git clone https://github.com/1Computer1/errata.git
Uploaded by comp at 2023-12-26T14:49:14Z
Distributions LTSHaskell:0.4.0.2, Stackage:0.4.0.2
Reverse Dependencies 2 direct, 1 indirect [details]
Executables errata-example
Downloads 997 total (36 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for errata-0.4.0.2

[back to package description]

Errata

MIT License Hackage CI

Errata is an extremely customizable error pretty printer that can handle many kinds of error formatting.

Features

Errata can handle errors that are all over the source or errors that are connected to each other spanning multiple lines. You can be as simple or as fancy as you like!

You can also customize the format of the printer in several ways:

  • Custom messages and labels
  • Custom character sets for symbols
  • Highlighting the source, messages, and symbols

Examples

A clean, modern error message that is trying to be helpful:

An error message that points out that the fold function was not found in scope. It then asks if the user meant to use foldl or foldr

A busy error message with underlining and connections:

An error message that highlights mismatching types in an if expression. The first section underlines the mismatching values, and the second section underlines the if expression