Skip to content

RFC: Coercible and HasPrefix for Zero Cost Coercions #270

@rust-highfive

Description

@rust-highfive

This is largely based on (with lots of copied text) @glaebhoerl's proposal in rust-lang/rust#9912, but with a few changes:

  • I formalized the idea of "contexts" by using GHC's roles.
  • I used this role system to include user-defined pointers and data structures.
  • I dropped contravariance for simplicity. This may have been a bad idea, but it's unclear how useful contravariance is.

Tracking issue for postponed PR #91

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-coercionsProposals relating to coercions.T-langRelevant to the language team, which will review and decide on the RFC.postponedRFCs that have been postponed and may be revisited at a later time.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions