om-plugin-imports: Plugin-based import warnings

[ compiler-plugin, library, mit ] [ Propose Tags ]


[Index] [Quick Jump]


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,,,,,
Dependencies base (>= && <4.20), containers (>=0.6.8 && <0.7), ghc (>=9.8.1 && <9.9), safe (>=0.3.19 && <0.4) [details]
License MIT
Copyright 2022 Rick Owens
Author Rick Owens
Revised Revision 1 made by rickowens at 2024-01-24T03:02:22Z
Category Compiler Plugin
Home page
Uploaded by rickowens at 2024-01-24T02:59:11Z
Downloads 173 total (9 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for om-plugin-imports-

[back to package description]


This plugin behaves similarly to the native GHC options -ddump-minimal-imports. It will dump a file of the form <src-file>.full-imports. E.g. if the Haskell file was src/Foo/Bar.hs, then the dump file will be src/Foo/Bar.hs.full-imports. The file will contain a set of imports which can be copy/pasted over the imports in your module in a way that satisfies -Wmissing-import-lists.

This is almost what -ddump-minimal-imports does, but -ddump-minimal-imports has the following deficiencies:

  • It will not always produce output that satisfies -Wmissing-import-lists. E.g. it will sometimes produce something like:

    import Foo (Bar(..))
  • It will explicitly import all the names from modules which are already qualified, E.g:

    import qualified Foo as F (foo, bar, baz)