Tue, 22 Jan 2002 12:10:40 -0000
> QForeign under ghc consists of several packages with some=20
> I'm getting warnings during compilation, e.g.:
> /usr/local/bin/ghc -c -O -Wall -fglasgow-exts -package lang=20
> -package data -package concurrent -package posix -iexamples=20
> -ilib -Iexamples -Ilib -package-name qforeign-curses=20
> Warning: Module `QIntegral' is located in package=20
> but its interface file claims it is part of=20
> 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!=20
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.