Use AI to craft more readable error and warning messages
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Even though we are adopting GHC's stance on AI-assisted programming, one area it could help us in is crafting more readable error and warning messages.
Here are my prompts for https://www.google.com/search in AI mode with its suggested change that is better, isn't it?
> how would I better report this warning message, Warning, in package, Cabal-tests: [no-default-language] Packages using cabal-version: >= 1.10 and before cabal-version: 3.4 must specify the default-language field for each component (e.g. Haskell98 or Haskell2010). If a component uses different languages in different modules then list the other ones in the other-languages field.
> I'm actually working on cabal and want to have it produce a more readable message.
> Yeah, I know technically how to make the change. I want a suggestion about the wording only!
```
[no-default-language] Component is missing the 'default-language' field.
Why this happens:
Your 'cabal-version' is set between 1.10 and 3.4. Within this range,
specifying a default language version is mandatory for every component.
How to fix:
1. Add 'default-language: Haskell2010' (or Haskell98) to the component.
2. Or, update 'cabal-version' at the top of the file to 3.4 or higher
to enable automatic language inference.
Note: If modules within this component require different languages,
list the alternative versions under the 'other-languages' field.
```
Contributor guide
Research direction
Start by locating the Cabal warning identified by the [no-default-language] tag and compare its current wording with the proposed rewrite in the issue. Done means an agreed, more readable message that clearly explains the cause and fix, including the default-language and other-languages cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100