You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Data-Validation Library for Haskell](#data-validation-library-for-haskell)
70
73
71
74
## Getting Started
@@ -1506,6 +1509,18 @@ If the value is `Valid`, it is transformed to `'A`.
1506
1509
Otherwise, an `InvalidProofException` is raised with the given message.
1507
1510
This is useful when we are receiving data that you know to be valid, such as from a database, and know that validation will succeed.
1508
1511
1512
+
## Proof Helpers
1513
+
1514
+
There are helper functions for the `Proof` type to make it easier to work with.
1515
+
1516
+
### `toResult` Helper
1517
+
1518
+
The `toResult` helper converts a `Proof<'F,'A>` value to a `Result<'A,ValidationFailures<'F>>`.
1519
+
1520
+
### `toValidationFailures` Helper
1521
+
1522
+
If you are only interested in the failures, you can use the `toValidationFailures` function to convert a `Proof<'F,'A>` to a `Option<ValidationFailures<'F>>`.
1523
+
1509
1524
## Data-Validation Library for Haskell
1510
1525
1511
1526
This library is based on our original library for [Haskell](https://www.haskell.org/).
0 commit comments