Ticket #4240 (closed bug: fixed)
-ddump-minimal-imports vs. re-exported class methods
| Reported by: | nomeata | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0.1 |
| Component: | Compiler | Version: | 6.12.3 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | rename/should_compile/T4240 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
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 ) }}}.
Change History
Note: See
TracTickets for help on using
tickets.
