
Fergus Henderson
Unfortunately, ghc-6 seems to be rather over-eager to report ambiguous use of identifiers, ...
The Hat.Hat versions are imported unqualified in line 30 of Hat/Foo/List.hs, which is "import Hat.Prelude". So I think this is a Hat bug, not a ghc bug.
Yes, I realised this shortly after posting, when I discovered the indirect import route via Hat.Prelude. I am cooking up a relatively simple hack to fix this. Patch attached. (Hoping you can re-build the hat-lib from sources.)
Ideally we will try to find a fix for this. In the meantime, you can work around the bug either by renaming your own versions of the overlapping identifiers, or always using them qualified (including in export lists).
And including in _implicit_ export lists?
Well, in that case, global renaming might be the better workaround than identifier qualification.
Well, I tried that, but the result was another Hat bug: a pattern match failure for the following function in src/hattrans/TraceId.hs:
tyClsInfo :: TraceId -> TyCls tyClsInfo (TI _ (Just (TyCls tyCls))) = tyCls
Fail: TraceId.hs:152: Non-exhaustive patterns in function tyClsInfo
I couldn't reproduce this bug with the current CVS sources. In any case, if the other patch works, you shouldn't need to alter your own sources after all, so hopefully this issue will go away. Regards, Malcolm