pa-error-tree: Collect a tree of errors and pretty-print

[ bsd3, data, library, possehl-analytics ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0
Change log CHANGELOG.md
Dependencies base (<5), containers, pa-prelude [details]
License BSD-3-Clause
Copyright 2023 Possehl Analytics GmbH
Author
Maintainer Philip Patsch <philip.patsch@possehl-analytics.com>
Category Data, Possehl-Analytics
Home page https://github.com/possehl-analytics/pa-hackage
Uploaded by Profpatsch at 2024-09-04T12:36:12Z
Distributions NixOS:0.1.1.0
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 108 total (6 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-09-04 [all 1 reports]

Readme for pa-error-tree-0.1.1.0

[back to package description]

pa-error-tree

Oftentimes you want to validate a bunch of things, recursively.

In that case, stopping at the first error is not the best thing to do, instead you’d want to accumulate errors and print the whole tree of problems in one go (e.g. when validating some input).

This library provides a simple wrapper around Data.Tree and Error which can be combined with Validation (NonEmpty Error) and Validation (NonEmpty ErrorTree) to elegantly collect and annotate errors recursively.

Note that it only deals with errors that should be displayed to other programmers, and only error strings. If you need to validate and display (structured) user errors, this is not it.