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

[ bsd3, data, library, possehl-analytics ] [ Propose Tags ]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS]
Change log
Dependencies base (<5), containers, pa-prelude [details]
License BSD-3-Clause
Copyright 2023 Possehl Analytics GmbH
Maintainer Philip Patsch <>
Category Data, Possehl-Analytics
Home page
Uploaded by Profpatsch at 2023-05-19T14:43:19Z
Distributions NixOS:
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 61 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-05-19 [all 1 reports]

Readme for pa-error-tree-

[back to package description]


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.