[Haskell-cafe] Refactor unqualified imports to qualified ones automatically?

Henning Thielemann lemming at henning-thielemann.de
Mon Feb 16 08:20:33 UTC 2015

On Sun, 15 Feb 2015, Jeffrey Brown wrote:

> Thank you, Henning. I found a description [1] of what the -ddump-minimal-imports flag you suggest does ("Dump
> a minimal set of imports"), and I don't know what that means. I tried running it anyway, but I can't get the
> code to compile via GHC (or make, or cabal install, though it seems to want to be built via at least one of
> those). It was abandoned long ago, and I'm not convinced its network of dependencies is something I can
> disentangle.

Then you have a problem. That's also the reason why I promote qualified 
and explicit imports again and again. If code can no longer be compiled, 
the compiler cannot help anymore.

Btw. there is another nice flag -fwarn-missing-import-lists that warns 
about unqualified implicit imports. It should be enabled in the 
Cabal.GHC-Options field.

More information about the Haskell-Cafe mailing list