#2630: installed packages should have a src-dirs field, for access to optionally
installed sources
------------------------------+---------------------------------------------
 Reporter:  claus             |          Owner:                  
     Type:  feature request   |         Status:  new             
 Priority:  normal            |      Milestone:  _|_             
Component:  GHC API           |        Version:  6.9             
 Severity:  normal            |     Resolution:                  
 Keywords:                    |     Difficulty:  Unknown         
 Testcase:                    |   Architecture:  Unknown/Multiple
       Os:  Unknown/Multiple  |  
------------------------------+---------------------------------------------
Comment (by simonmar):

 Replying to [comment:6 claus]:

 > (a) just last week, I wanted to trace the import hierarchies of my 6.8.3
 installation, for which I don't have sources

 Well, if we didn't have any orphan instances you wouldn't need to do that
 :-)

 In fact GHC does keep track of the import hierarchy in the .hi files, so
 you can do this using the GHC API (perhaps not everything you need is
 exposed via the official parts of the API currently though).

 > (b) even haddock needs package sources long enough to create its
 `*.haddock` files, and if any of the dependencies was installed without
 being haddocked, I need to be able to remedy that

 I don't buy this as an important use case.  You should have Haddocked the
 package when you installed it, or it should be possible to download the
 package again, 'cabal haddock' and then install just the Haddock docs.

 > For Ghc Api clients like Ghc, I'd hope that extracting the source dirs
 from the package database, adding them to the import path and asking for
 `-fforce-recomp` would be sufficient, or that `-fforce-recomp` would look
 up the sources itself, but that might be optimistic?-)

 Sure you can put sources in your import path and then GHC will pick them
 up instead of the package modules, no -fforce-recomp necessary.  But I
 think you're forgetting about the package metadata again - just having the
 sources won't be enough in many cases.

 > I'm not sure whether it would be sufficient, but is there any reason not
 to have a `src-dirs` field in installed packages descriptions?

 I'm not convinced it's useful.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2630#comment:7>
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

Reply via email to