Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify and unify result tuples #38

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Conversation

solnic
Copy link
Owner

@solnic solnic commented Jan 24, 2024

This moves the predicate input value to the meta portion of the result tuple. Previously it caused issues as it was hard to differentiate path from input value.

In general, result tuples shouldn't use values as left-side of a tuple. These positions should be reserved for defining types of information that a tuple carry. ie {:error, {:map, meta}} uses :map to indicate it's a map result.

This moves the predicate input value to the meta portion of the result
tuple. Previously it caused issues as it was hard to differentiate path
from input value.

In general, result tuples shouldn't use values as left-side of a tuple.
These positions should be reserved for defining types of information that
a tuple carry. ie `{:error, {:map, meta}}` uses `:map` to indicate it's
a map result.
@solnic solnic added this to the v0.2.0 milestone Jan 24, 2024
@solnic solnic merged commit 578bdd5 into main Jan 24, 2024
4 checks passed
@solnic solnic deleted the unify-and-simplify-result-tuples branch January 24, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant