haskell / haskell/haskell-language-server

Make the maximum number of inserted patterns an HLS setting, and make it separate from GHC's `-fmax-uncovered-patterns`

Open
#5,070 0 comments 0 reactions 0 assignees View on GitHub
component: hls-case-split-plugin
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
3d 21h
Merged PRs (30d)
13

Description

The case-split plugin currently adds only as many missing patterns as the `-fmax-uncovered-patterns` GHC flag (or its default) commands… plus 1¹.

This is a bit of an annoying limitation, because that flag is intended to determine the maximum number of missing patterns _**listed in the diagnostic message shown the user**_, which has - in principle - nothing to do with how many patterns, at max, the user might want to be added.

On the other hand, our strategy for the plugin implementation goes precisely through dissecting the diagnostic message to retrieve the missing patterns, so it is bound to `-fmax-uncovered-patterns`, in a way.

I don't think this is an easy task.

Originally considered during [my GSoC 2026 project](https://gist.github.com/Aster89/69a57c364ec2d0cc89f474cc3d194371#future-work--stretch-goals).

---

¹ Don't ask me why, I have no clue.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the case-split plugin's use of GHC's `-fmax-uncovered-patterns` and the diagnostic message it dissects. The GSoC future-work link provides context; done means the plugin has its own HLS setting for the maximum patterns to add, independently of the diagnostic's pattern-list limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.