Skip to content

Snippets: suggest names based on labels if they exist #1885

Closed

Description

@cartermp

If I define a type with labels, e.g.

type BST<'T> =
    | Empty
    | Node of value:'T * left:BST<'T> * right:BST<'T>

Then if I use that type with destructuring syntax and I need to assign names to things, I think that the IDE should suggest a name based on the label if it exists.

let rec flip t = 
    match t with
    | Empty -> t
    | Node(value, left, right) -> ...
//          ^^     ^^   ^^
//   These are each suggested to me by the IDE.

Activity

  1. added this to the milestone on Jan 6, 2017
  2. xperiandri commented on Mar 8, 2017

    @xperiandri
    Contributor

    Would be extremely nice!

  3. modified the milestones: , 16.0 on Jul 29, 2018
  4. modified the milestones: 16.0, Unknown on Aug 25, 2018
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

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions