#2437: More accurate package dependencies
------------------------------+---------------------------------------------
Reporter: simonmar | Type: task
Status: new | Priority: lowest
Milestone: 7.6.1 | Component: Package system
Version: 6.8.3 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Difficulty: Moderate (less than a day)
Testcase: | Blockedby:
Blocking: | Related:
------------------------------+---------------------------------------------
Changes (by simonmar):
* failure: => None/Unknown
Comment:
I tried to implement the suggestion from #3560, thinking it would be easy,
but there are two reasons we link in packages eagerly when they are
mentioned on the command line:
* So that you can link in extra object files or libraries that depend on
the packages. e.g. `ghc -package foo -lbar` where `bar` is a C library
that depends on something in `foo`. So we could link in `foo` eagerly if
and only if there are extra C libs or objects to link in, but....
* Haskell code can depend on a C function exported by a package, and the
normal dependency tracking that TH uses can't know about these
dependencies. The test `ghcilink004` relies on this, for example.
I conclude that we need two `-package` flags: one that says "this is a
package I want to make available", and one that says "this is a package I
want to link in eagerly". Would that be too complicated for users?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2437#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs