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

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.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 2023-05-19T14:34:54Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for pa-error-tree-0.1.0.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.