id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
1386,foreign exports not taken into account when calculating -fwarn-unused-imports,duncan,,"Here we have a program that imports and uses {{{liftM}}} from {{{Control.Monad}}}, but only as a result of being used in the definition of a function that is foreign exported.

{{{
module Foo () where

import Control.Monad (liftM)

foo :: IO ()
foo = id `liftM` return ()

foreign export ccall ""hs_foo""
  foo :: IO ()
}}}

GHC 6.6 and HEAD report:

{{{
foo.hs:3:0:
    Warning: Module `Control.Monad' is imported, but nothing from it is used,
               except perhaps instances visible in `Control.Monad'
             To suppress this warning, use: import Control.Monad()
}}}

So I suppose all that needs to happen is to add in foreign exports as roots when building the usage graph.",bug,closed,normal,,Compiler,6.7,fixed,,,Unknown/Multiple,Unknown/Multiple,,Unknown,rn058,,,
