
Hello, I have a midsize program, and would like to simplify the module interfaces for my own sanity. I know there are tools to check for extraneous imports, but is there something similar for exports? For instance, if module A exports f, but A.f is never used in my compiled program, I would like to be warned of this fact. Thanks, Sean

seanmcl:
Hello,
I have a midsize program, and would like to simplify the module interfaces for my own sanity. I know there are tools to check for extraneous imports, but is there something similar for exports? For instance, if module A exports f, but A.f is never used in my compiled program, I would like to be warned of this fact.
ghc -ddump-minimal-imports I think that's the flag. -- Dump

On 3 March 2010 08:25, Sean McLaughlin
For instance, if module A exports f, but A.f is never used in my compiled program, I would like to be warned of this fact.
My SourceGraph program ( http://hackage.haskell.org/package/SourceGraph ) does this, but you'll have to look through the generated report to find it. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Hi Ivan,
I ran SourceGraph on the program above. Could you help me find where A.g
is unused?
In particular, I can't see a difference in the output in the following
cases:
main = do
let a = A.f 7
putStrLn $ show a
main = do
let a = A.f $ A.g 7
putStrLn $ show a
Thanks!
Sean
On Tue, Mar 2, 2010 at 5:14 PM, Ivan Miljenovic
For instance, if module A exports f, but A.f is never used in my compiled
On 3 March 2010 08:25, Sean McLaughlin
wrote: program, I would like to be warned of this fact.
My SourceGraph program ( http://hackage.haskell.org/package/SourceGraph ) does this, but you'll have to look through the generated report to find it.
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On 4 March 2010 02:57, Sean McLaughlin
Hi Ivan, I ran SourceGraph on the program above. Could you help me find where A.g is unused? In particular, I can't see a difference in the output in the following cases: main = do let a = A.f 7 putStrLn $ show a main = do let a = A.f $ A.g 7 putStrLn $ show a
Is that the complete file? If so, then it's probably a bug. (Maybe we should continue this off-list.) -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
participants (3)
-
Don Stewart
-
Ivan Miljenovic
-
Sean McLaughlin