
In a larger project I use qualified imports a lot. Now, when I try to compile the program with nhc98 I get ... ... nhc98 -98 -I/home/ralf/Haskell/LibRH/nhc98/ -P/home/ralf/Haskell/LibRH/nhc98/ -c -o Future.o Future.lhs Warning: when renaming newtype of imported newtype: Real type of OrdUniqListFM.FM is not visible. I might get boxed/unboxed info wrong. nhc98 -98 -I/home/ralf/Haskell/LibRH/nhc98/ -P/home/ralf/Haskell/LibRH/nhc98/ -c -o LR0.o LR0.lhs ==================================== Error when renaming:: Identifier unionMany defined 3 times. Identifier fromList defined 3 times. Identifier lookup defined 2 times. Identifier union defined 3 times. Identifier elem defined 2 times. Identifier length defined 3 times. This is basically true. However, the definitions reside in different modules that are imported qualified. Unfortunately, I wasn't able to boil down the error (all the toy programs I came up with work fine). I'll send you the files, if you have time to chase down the bug. Cheers, Ralf

==================================== Error when renaming:: Identifier unionMany defined 3 times. Identifier fromList defined 3 times. Identifier lookup defined 2 times. Identifier union defined 3 times. Identifier elem defined 2 times. Identifier length defined 3 times.
This is basically true. However, the definitions reside in different modules that are imported qualified.
Unfortunately, I wasn't able to boil down the error (all the toy programs I came up with work fine).
I think this is very likely the same bug that Manuel reported. I'll bet that you are importing a module *both* qualified and unqualified at some point. Regardless of whether the two imports have different lists of imported entities, nhc98 currently marks the whole module as either qualified or unqualified. I'm working on a solution to this bug right now, but like I said to Manuel, it means replacing the entire import mechanism in the compiler, so it will take a little while to complete. Regards, Malcolm
participants (2)
-
Malcolm Wallace
-
Ralf Hinze