Fwd: [Haskell-cafe] minimal interface

Sean McLaughlin seanmcl at gmail.com
Tue Mar 2 16:38:08 EST 2010


Hi Don,

  This doesn't tell me what is extraneous in the exports.  For instance

If I have two modules A and Main

module A (f, g) where

f :: a -> a
f = id

g :: a -> a
g = id


module Main (main) where

import qualified A

main :: IO ()
main = do
  let a = A.f 7
  putStrLn $ show a

I'd like something to tell me that A.g is not used in the program.

Thanks,

Sean


On Tue, Mar 2, 2010 at 4:28 PM, Don Stewart <dons at galois.com> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100302/490e2087/attachment.html


More information about the Haskell-Cafe mailing list