Skip to content

Commit 445b910

Browse files
author
Devin Lyons
committed
Update change log and readme.
1 parent 59eb5d4 commit 445b910

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Revision history for fsharp-data-validation
22

3-
## Unreleased Changes
3+
## 1.0.0 - 03/14/2022
44

55
* First version. Released on an unsuspecting world.

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@
6666
- [The `isInvalid` Helper](#the-isinvalid-helper)
6767
- [The `flattenProofs` Helper](#the-flattenproofs-helper)
6868
- [The `raiseIfInvalid` Helper](#the-raiseifinvalid-helper)
69+
- [Proof Helpers](#proof-helpers)
70+
- [`toResult` Helper](#toresult-helper)
71+
- [`toValidationFailures` Helper](#tovalidationfailures-helper)
6972
- [Data-Validation Library for Haskell](#data-validation-library-for-haskell)
7073

7174
## Getting Started
@@ -1506,6 +1509,18 @@ If the value is `Valid`, it is transformed to `'A`.
15061509
Otherwise, an `InvalidProofException` is raised with the given message.
15071510
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.
15081511

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+
15091524
## Data-Validation Library for Haskell
15101525

15111526
This library is based on our original library for [Haskell](https://www.haskell.org/).

0 commit comments

Comments
 (0)