logo       

inconsistency with "ghc-pkg describe": msg#00020

lang.haskell.glasgow.bugs

Subject: inconsistency with "ghc-pkg describe"

In an invocation of "ghc-pkg describe PACKAGE", if a package PACKAGE
is found in multiple package.conf files (which are specified via the
--package-conf option on the ghc-pkg command line) then a description
for *each* such occurrence of that package is printed, one after the
other.

But since "ghc-pkg register" does not accept a concatenated sequence
of more than one package descriptions as input, this behavior is
inconsistent with the "ghc-pkg --help" documentation for the
"describe" command:

ghc-pkg describe {pkg-id}
Give the registered description for the specified package. The
description is returned in precisely the syntax required by ghc-pkg
register.

I suggest changing the behavior of "ghc-pkg describe" to print a
description for only the first matching package encountered when
searching the package databases, to make it consistent with the
documentation. Furthermore, I suggest adding another command, "ghc-pkg
which", (corresponding to 'which' in the shell, 'gcc
-print-file-name=' for libraries, 'perldoc -l' in perl) to print the
name of the package database holding this first matching package,
which would be used by ghc, ghci, etc. to satisfy a request for that
package.

Frederik

--
http://ofb.net/~frederik/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise