Skip to content

Document the fact that the tactics plugin turns on -Wincomplete-patterns #2449

@ncfavier

Description

@ncfavier

Is your feature request related to a problem? Please describe.

I just spent a long time troubleshooting why I was getting diagnostics for incomplete patterns despite explicitly disabling the incomplete-patterns warning. Turns out hls-tactics-plugin is enforcing that warning:

-- | Wingman wants to support destructing of empty cases, but these are a parse
-- error by default. So we want to enable 'EmptyCase', but then that leads to
-- silent errors without 'Opt_WarnIncompletePatterns'.
allowEmptyCaseButWithWarning :: DynFlags -> DynFlags
allowEmptyCaseButWithWarning =
flip xopt_set EmptyCase . flip wopt_set Opt_WarnIncompletePatterns

Describe the solution you'd like

Either disable that behaviour, or make it clear in the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: wingmantype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..type: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions