Skip to content

[addition] pattern to matching Modifiers / exporting Modifiers constructor #14

@epoberezkin

Description

@epoberezkin

Modifiers do not allow pattern matching - it makes code more complex than it could have been.

The change could be backwards compatible by defining and exporting pattern synonyms for Modifiers in addition to the existing functions.

pattern NoModifiers = Modifiers 0
pattern ShiftKey = Modifiers 1
pattern CtrlKey  = Modifiers 2
pattern AltKey   = Modifiers 4
pattern MetaKey  = Modifiers 8

Or, at the very least, it would help exporting Modifiers constructor so they can be defined in the code (e.g. if you don't want to use pattern synonyms extension).

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions