This is a really brief post to call out a nice trick for providing users a nice migration message when you delete a constructor in a sum type. The Problem You have a sum type, and you want to delete a redundant constructor to refactor things. data Foo = Bar Int | Baz Char | Quux Double
Break Gently with Pattern Synonyms
Break Gently with Pattern Synonyms
Break Gently with Pattern Synonyms
This is a really brief post to call out a nice trick for providing users a nice migration message when you delete a constructor in a sum type. The Problem You have a sum type, and you want to delete a redundant constructor to refactor things. data Foo = Bar Int | Baz Char | Quux Double