[Haskell] class instance lost during re-export & packaging

Conal Elliott conal at conal.net
Mon Feb 12 18:54:36 EST 2007


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.

In ghci, after loading the module successfully, if I comment out the "import
P.M()" and re-load, the instance is found.

Is this behavior known, and perhaps even intended?  Is there anything I can
do to make sure my instance gets packaged up with module P?

Thanks,  - Conal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell/attachments/20070212/75752df2/attachment.htm


More information about the Haskell mailing list