-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
## 0.1.0 (Unreleased) | ||
## 0.1.0 (2022-05-16) | ||
Initial release. | ||
|
||
* basic instances (lists, numerics) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,24 @@ | ||
# strongweak | ||
TODO | ||
Definitions for transforming between types. | ||
|
||
* `strong -> weak` drops invariants (e.g. going from a bounded to an unbounded | ||
numeric type) | ||
* `weak -> Maybe strong` introduces invariants | ||
|
||
This is not a `Convertible` library that enumerates transformations between | ||
types into a dictionary. | ||
|
||
* A "strong" type has exactly one "weak" representation. | ||
* Weakening a type is safe. | ||
* Strengthening a type may fail. | ||
|
||
There are generic derivers for generating `Strengthen` and `Weaken` instances | ||
for arbitrary data types. The `Strengthen` instances annotate errors | ||
extensively, telling you the datatype & record for which strengthening failed - | ||
recursively, for nested types. | ||
|
||
This is a validation library. We don't fail on the first error -- we attempt to | ||
validate every part of a data type, and collate the errors into a list. This | ||
happens magically in the generic deriver, but if you're writing your own | ||
instances, you may want `ApplicativeDo` so you can use do notation. So it'll | ||
monadic, but actually everything will get checked. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters