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

Convert Types #218

Merged

Conversation

uncomputable
Copy link
Collaborator

Convert finalized types to unfinalized ones, for use during unification.

If we have a finalized type that we want to use inside the union bound
algorithm, then we can convert it to `Type`. The latter is mutable while
the former remains unchanged, as expected.
@uncomputable uncomputable requested a review from apoelstra May 29, 2024 15:10
Copy link
Collaborator

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3b64943

@apoelstra apoelstra merged commit 497b88f into BlockstreamResearch:master May 30, 2024
16 checks passed
@uncomputable uncomputable deleted the 2024-05-convert-types branch May 30, 2024 21:29
uncomputable added a commit to uncomputable/simfony that referenced this pull request Jun 6, 2024
apoelstra added a commit that referenced this pull request Jun 30, 2024
This eliminates an `unwrap`, cleans up a bit of code in named_node.rs,
and moves every instance of `Type::from` into types/mod.rs, where it
will be easy to modify or remove in a later commit.

Also removes From<Arc<Final>> for Type, a somewhat-weird From impl which
was introduced in #218. It is now superceded by Type::complete.

In general I would like to remove From impls from Type because they have
an inflexible API and because they have somewhat nonobvious behavior.
apoelstra added a commit that referenced this pull request Jun 30, 2024
This eliminates an `unwrap`, cleans up a bit of code in named_node.rs,
and moves every instance of `Type::from` into types/mod.rs, where it
will be easy to modify or remove in a later commit.

Also removes From<Arc<Final>> for Type, a somewhat-weird From impl which
was introduced in #218. It is now superceded by Type::complete.

In general I would like to remove From impls from Type because they have
an inflexible API and because they have somewhat nonobvious behavior.
apoelstra added a commit that referenced this pull request Jun 30, 2024
This eliminates an `unwrap`, cleans up a bit of code in named_node.rs,
and moves every instance of `Type::from` into types/mod.rs, where it
will be easy to modify or remove in a later commit.

Also removes From<Arc<Final>> for Type, a somewhat-weird From impl which
was introduced in #218. It is now superceded by Type::complete.

In general I would like to remove From impls from Type because they have
an inflexible API and because they have somewhat nonobvious behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants