Conal Elliott wrote:
I have a package P that contains a class instance specified in one
module P.M and re-exported in packaging module P (one that gathers &
re-exports for the whole P package). When I import the package module P
in a test module, Under ghc-6.6, my instance is not found. If the test
module also says "import P.M()", the instance is found. Oddly, I only
have this problem with classes defined in a package other than P.
That sounds like a bug. It might be an instance of the last bullet point here:
http://www.haskell.org/ghc/docs/latest/html/users_guide/bugs.html#bugs-ghc
but I suggest you open a ticket for it and we'll check.
In ghci, after loading the module successfully, if I comment out the
"import P.M()" and re-load, the instance is found.
This one is definitely an instance of the known bug above. GHCi just keeps
collecting instances from packages and never throws any away.
Cheers,
Simon
_______________________________________________
Haskell mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell