Extending ghc-pkg to handle installed package IDs

Edward Z. Yang ezyang at mit.edu
Sat Jul 26 19:49:42 UTC 2014

Hello all,

Since we're relaxing the constraint that a package ID correspond to
exactly one installed package in the package database, it will now
sometimes be necessary to query the package database using ghc-pkg
for a specific installed package ID.  At the moment, none of the
commands support this, and I'd like to request comments on proposed ways
of adding this functionality.  Here are the proposals:

1. All command line modes stay the same, but anywhere a package ID
was previously accepted, now we also accept an installed package ID.
We distinguish the two by using the IPID parser from Cabal, and falling
back the the package ID parser (assuming that version tags are not
used, this is unambiguous).

2. Add a new flag --id which changes the meaning of a package ID field
to be an installed package ID field.

3. Add new variants of all commands such as 'ghc-pkg unregister-id'
which accept package IDs.

4. ...

5. Profit!!


More information about the ghc-devs mailing list