Skip to content

Coherence constraints for Choose #2

Description

@ebfull

None of these have safety implications, but there are a number of coherence constraints ideal for Choose:

  • We don't want types like Choose<A, Choose<B, Finally<A>>> to be expressible. That is, there exists no Chooser<A, B> such that Chooser<A, B>: Chooser<S> and B: Chooser<S>.
  • We should ensure that Choose<P, Q> only allows Choose and Finally to exist as Q.
  • Finally should not exist outside of Choose, if possible.

As a bonus, it may not be necessary to use Finally at all, but I am doubtful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions