镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Exhaustive pattern matching for variants and poly variants. #253

Closed

Description

@amiralies
recording.mp4

Example from scala. I'm not sure how this should be done. scala has advantage of match keyworkd coming after target expression so can decide to show that snippet based on that. can we do this with opening brace?
for example

type user = Owner | Admin | User

let isSuperUser = (user: user) => switch user { // show snippet

Activity

  1. cristianoc commented on May 26, 2021

    @cristianoc
    Collaborator

    We have some templates in the extension.
    @chenglou would templates give that ^ behaviour?

  2. amiralies commented on May 26, 2021

    @amiralies
    ContributorAuthor

    I don't think if those snippets now about type extensions. it should be done in analysis binary

  3. added a commit that references this issue on Jun 6, 2021
  4. changed the title [-]Exhaustive pattern matching for variants[/-] [+]Exhaustive pattern matching for variants and poly variants.[/+] on Jul 5, 2021
  5. cristianoc commented on Jul 5, 2021

    @cristianoc
    Collaborator

    For poly variants, see suggestions in #283.

  6. zth commented on Jun 2, 2022

    @zth
    Member

    This would be very cool to have at least some version of. We don't have the "luxury" of Scala obviously in the order of the keywords/identifier, but maybe we can figure something out anyway.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions