package treating

2003-10-21 Thread Serge D. Mechveliani
I wrote recently about `strange' package management in 
ghc-6.0.1.

I thank Swenn Pan, who explained the effect to me:
about  List  from  haskell98 package  and  data  depending on
haskell98.
I missed the point because I am a bit stupid and also because the 
package treating changes rapidy from version to version.

I presumed that, as the   ghci  
command loads all usable libraries, then

ghci -package-conf myPackage.conf -package myPackage

will load   all that `ghci' loads  +
what is specified in  myPackage.conf.

But, probably, this is not (should not be?) so: the option

 -package-conf myPackage.conf 

fully replaces the configuration, and the package search is done 
only according to what is specified in  
   myPackage.conf
, right? 
The program needs to link module  List.
List  is of  haskell98  package (right?), 
and  myPackage  does not mention any package dependency which could 
lead  haskell98.  
Therefore the linker does not find in the loaded libraries some
needed item for List. 
Then,  ghci  reports of `panic'.
Maybe, it should report instead
  library item Foo not found, List items are of haskell98 package,
   do you have it on package dependecies?
  
, something like this.

Also there remains a question about concrete usage of  ghc-pkg -g
. Please, explain this
   (to  [EMAIL PROTECTED]).

Regards,

-
Serge Mechveliani
[EMAIL PROTECTED]




___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


RE: package treating

2003-10-21 Thread Simon Marlow
 
 I presumed that, as the   ghci  
 command loads all usable libraries, then
 
 ghci -package-conf myPackage.conf -package myPackage
 
 will load   all that `ghci' loads  +
 what is specified in  myPackage.conf.
 
 But, probably, this is not (should not be?) so: the option
 
  -package-conf myPackage.conf 
 
 fully replaces the configuration, and the package search is done 
 only according to what is specified in  
myPackage.conf
 , right?

No, packages are loaded on a demand-driven basis.  Packages must have
correct dependencies specified, so that GHC can ensure that they are
loaded in dependency order.  The -package-conf flag does not cause the
configuration to be fully replaced.

Cheers,
Simon
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs