
QForeign under ghc consists of several packages with some interdependencies. I'm getting warnings during compilation, e.g.:
/usr/local/bin/ghc -c -O -Wall -fglasgow-exts -package lang -package data -package concurrent -package posix -iexamples -ilib -Iexamples -Ilib -package-name qforeign-curses examples/Curses.hs
Curses.hsc:1: Warning: Module `QIntegral' is located in package `qforeign-curses' but its interface file claims it is part of package `qforeign'
I understand what it means but I don't know how to fix it. QIntegral should be in package qforeign, but's found by -ilib during compilation of other modules which use it because it's not installed yet!
The only real solution is to install the qforeign package before using its modules in another import. But 'installing' the package just consists of generating a suitable package.conf file and using the -package-conf flag. The -i flag should only really be used to bring into scope modules in the same package as the one being compiled. The warning is relatively harmless, it might just result in your .hi files containing some extra dependencies that they might not otherwise have (inter-package dependencies aren't normally recorded in .hi files because packages are assumed to be "stable"). Perhaps the package story could be simplified - I need to work through the ramifications first though. Cheers, Simon
participants (1)
-
Simon Marlow