alunduil / alunduil/collection-json.hs

Enable `-Wmissing-export-lists`

Ouverte
#345 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement infrastructure
Langage dominant
Haskell
Étoiles
3
Forks
1
Merge moyen
5 h 53 min
PR mergées (30 j)
63

Description

## Summary

Add `-Wmissing-export-lists` to the `warnings` stanza in
`collection-json.cabal`.

## Motivation

#170 enabled hlint's `Use explicit module export list`, which rejects
`module X (module X) where`. It does not catch a module with no export
list at all, which exports everything just the same. Confirmed on GHC
9.14.1: a bare `module Probe where` draws no hlint hint and no `-Wall`
warning, but does warn under `-Wmissing-export-lists`:

```
Probe3.hs:1:1: warning: [GHC-85401] [-Wmissing-export-lists]
The export item 'module Probe3' is missing an export list
```

Together the two cover both shapes. An incidental export forces a major
PVP bump, so no module should leak whatever it happens to define.
`-Wmissing-export-lists` has existed since GHC 8.4, below the 9.6 floor
in `tested-with:`.

Zero hits today: `Data.CollectionJSON` already carries an explicit
export list.

## Scope

- Add `-Wmissing-export-lists` to the `common warnings` stanza in
`collection-json.cabal`.
- Check the test modules too; CI builds them under the same warnings.

## Acceptance criteria

- [ ] Flag present in the `warnings` stanza.
- [ ] CI stays green across the GHC matrix.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.