#4240: -ddump-minimal-imports vs. re-exported class methods
---------------------------------+------------------------------------------
Reporter: nomeata | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.12.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Please excuse me reporting a bug without testing it with the latest
released version, but I only have easy access to 6.12.1 now.
The following working import line:
{{{
import Darcs.Patch
}}}
is turned by ghc -ddump-minimal-imports into
{{{
import Darcs.Patch
( Invert(invert), FromPrims(fromPrims), namepatch )
}}}
which does not work:
{{{
$ ghc -ddump-minimal-imports --make ipatch.hs
[2 of 8] Compiling Common ( Common.hs, Common.o )
Common.hs:20:6:
Module `Darcs.Patch' does not export `Invert(invert)'
Common.hs:20:22:
Module `Darcs.Patch' does not export `FromPrims(fromPrims)'
}}}
The line
{{{
import Darcs.Patch ( invert, fromPrims, namepatch )
}}}
works though.
The reason seems to be this chain of imports (shortend of course):
{{{
module Darcs.Patch.Patchy ( Invert(..) ) where
class MyEq p => Invert p where
invert :: p C(x y) -> p C(y x)
}}}
is re-exported without the Class name by
{{{
module Darcs.Patch ( invert ) where
import Darcs.Patch.Patchy ( invert )
}}}.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4240>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs