[GHC] #3122: Enhance --info

GHC trac at galois.com
Tue Mar 24 11:42:59 EDT 2009


#3122: Enhance --info
---------------------------------+------------------------------------------
    Reporter:  igloo             |        Owner:  igloo           
        Type:  feature request   |       Status:  new             
    Priority:  normal            |    Milestone:  6.12 branch     
   Component:  Compiler          |      Version:  6.10.1          
    Severity:  normal            |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Comment (by duncan):

 We should double-check what Cabal needs to ask ghc and make sure we can
 get it all in a single call to `ghc --info`.

 Currently Cabal has to guess which ghc-pkg and gcc to use. We have an
 algorithm for guessing the ghc-pkg given the name of the ghc program. Eg
 if ghc is called "ghc-6.10.1" then we look for "ghc-pkg-6.10.1". Then we
 double check by calling ghc-pkg --version and checking the version numbers
 are the same. That's pretty good, though it doesn't guarantee they share
 the same global package db. Perhaps this is enough and perhaps asking ghc
 to know where ghc-pkg is all the time is too annoying.

 Strictly speaking we should be using ghc's libexec dir not lib dir for
 programs like ghc-pkg etc.

 It is useful to know which gcc ghc is using, but ghc has potentially
 different programs for C compiler, assembler and linker. Perhaps we need
 to know all three. If ghc --info tells us this then it had better work
 when we do:

 {{{
 ghc --info -pgmc=foobar
 }}}
 and have it tell us that the C compiler is `foobar` and not gcc. Similarly
 for the location of the global package db.

 Things that should not be in there: location of random other programs like
 haddock and hsc2hs. They are not intimately tied to ghc, don't pretend
 that it's a monolithic distribution.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3122#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list