Open emeinhardt opened 9 months ago
Sorry for taking so long to look at this.
@jwaldmann, do you have an opinion on the use of error
vs. Maybe
to represent partial functions?
@jwaldmann any chance you've had a moment to consider error handling in the Relation
modules?
This PR adds properties and operations for modeling functional relations to
Ersatz.Relation
.With respect to #78, where #78 uses
error
when two argument relations have mismatched bounds, the functions here useMaybe
as an error strategy, because they have exactly one expected condition of failure. Per discussion in #81, there doesn't seem to be much in the way of a convention inersatz
yet for when to use what error strategy, but consistency seems preferable.