Skip to content

Feature request: add missing cases #1732

@kcsongor

Description

@kcsongor

Thanks for the great work on Wingman @isovector!
Something that would be quite useful is a code action to add missing cases to a function/case expression. The main use case is extending a data type with a new constructor. For example, given

data Foo
 = A
 | B

split :: Foo -> Int
split A = 0
split B = 1

if I add a new constructor to Foo:

data Foo
  = A
  | B
  | C

then a warning shows up about split not covering all the cases. It would be nice if a code action could add the missing case!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions