logo       

RE: warning when exporting imported module: msg#00025

lang.haskell.glasgow.bugs

Subject: RE: warning when exporting imported module

Quite right. Actually it turns out that there are several deficiencies
in GHC's unused-import reporting, of which this is only one, alas. I've
improved the situation for this particular case, though, and added a
test for it. Thanks for pointing it out.

SImon

| -----Original Message-----
| From: glasgow-haskell-bugs-bounces@xxxxxxxxxxx
[mailto:glasgow-haskell-bugs-
| bounces@xxxxxxxxxxx] On Behalf Of Brian Smith
| Sent: 12 January 2005 06:41
| To: glasgow-haskell-bugs@xxxxxxxxxxx
| Subject: warning when exporting imported module
|
| Hi,
|
| consider some modules:
|
| module A(e,f)
| where
| e = id
| f = e
|
| module B (g,module A)
| where
| import A
| g = f
|
| module C (module A, h)
| where
| import A
| import B
| h = g
|
| If you do "ghc --make C -Wall -Werror", then you get
| Warning: Module `A' is imported, but nothing from it is used
| (except perhaps instances visible in `A')
|
| However, if you remove the import of module A, like this:
|
| module C (module A, h)
| where
| import B
| h = g
|
| you get:
| Unknown module in export list: module 'A'
|
| I think that the first definition of C should be accepted with no
| warning. Or, put another way, I think that this warning should only be
| issued when the removal of the import would not cause an error.
|
| Thanks,
| Brian
| _______________________________________________
| Glasgow-haskell-bugs mailing list
| Glasgow-haskell-bugs@xxxxxxxxxxx
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise