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

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. [1] https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/flag-referen... On Sun, Feb 15, 2015 at 1:20 PM, Henning Thielemann < lemming@henning-thielemann.de> wrote:
Maybe the GHC flag
-ddump-minimal-imports
helps?

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.

wxPython is well documented and tutorialed. Today I began learning that. It has already clarified a lot of what was opaque in Blobs, such as the distinction between a frame and a window (windows are smaller!), and what a DC is for. When I turned to wxPython I thought I was giving up on Haskell. It will be poetic if that having given up is what allows me to persist. (It's lucky that didn't switch to pyQt!) On Mon, Feb 16, 2015 at 12:20 AM, Henning Thielemann < lemming@henning-thielemann.de> wrote:
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.
participants (2)
-
Henning Thielemann
-
Jeffrey Brown