Skip to content

Coherence constraints for Choose #2

@ebfull

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.

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