summaryrefslogtreecommitdiff
path: root/utils/ghc-pkg/Main.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* Update ghc-pkg to follow Cabal changesIan Lynagh2008-05-101-20/+21
|
* Tweak whitespaceIan Lynagh2008-02-171-1/+1
|
* Fix typoIan Lynagh2008-02-171-1/+1
|
* Remove some of the old compat stuff now that we assume GHC 6.4Simon Marlow2008-02-081-7/+1
|
* matchesPkg: match against the pkg Id (foo-1.0) not just the package name (foo)Simon Marlow2008-02-051-1/+1
| | | | Fixes the ghcpkg01 test.
* FIX BUILD with ghc-6.4.xSimon Marlow2008-02-011-1/+11
|
* FIX #1750: in isBrokenPackage, don't loop if the deps are recursiveSimon Marlow2008-01-231-3/+8
|
* FIX #1839, #1463, by supporting ghc-pkg bulk queries with substring matchingclaus.reinke@talk21.com2008-01-211-43/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - #1839 asks for a ghc-pkg dump feature, #1463 for the ability to query the same fields in several packages at once. - this patch enables substring matching for packages in 'list', 'describe', and 'field', and for modules in find-module. it also allows for comma-separated multiple fields in 'field'. substring matching can optionally ignore cases to avoid the rather unpredictable capitalisation of packages. - the patch is not quite as full-featured as the one attached to #1839, but avoids the additional dependency on regexps. open ended substrings are indicated by '*' (only the three forms prefix*, *suffix, *infix* are supported) - on windows, the use of '*' for package/module name globbing leads to conflicts with filename globbing: by default, windows programs are self-globbing, and bash adds another level of globbing on top of that. it seems impossible to escape '*' from both levels of globbing, so we disable default globbing for ghc-pkg and ghc-pkg-inplace. users of bash will still have filename globbing available, users of cmd won't. - if it is considered necessary to reenable filename globbing for cmd users, it should be done selectively, only for filename parameters. to this end, the patch includes a glob.hs program which simply echoes its parameters after filename globbing. see the commented out glob command in Main.hs for usage or testing. - this covers both tickets, and permits for the most common query patterns (finding all packages contributing to the System. hierarchy, finding all regex or string packages, listing all package maintainers or haddock directories, ..), which not only i have wanted to have for a long time. examples (the quotes are needed to escape shell-based filename globbing and should be omitted in cmd.exe): ghc-pkg list '*regex*' --ignore-case ghc-pkg list '*string*' --ignore-case ghc-pkg list '*gl*' --ignore-case ghc-pkg find-module 'Data.*' ghc-pkg find-module '*Monad*' ghc-pkg field '*' name,maintainer ghc-pkg field '*' haddock-html ghc-pkg describe '*'
* always try to remove the new file before restoring the old one (#1963)Simon Marlow2007-12-141-7/+6
|
* FIX #1963: catch Ctrl-C and clean up properlySimon Marlow2007-12-131-20/+61
|
* "list --simple-output" should be quiet when there are no packages to listSimon Marlow2007-12-121-2/+2
| | | | | | | | | | | | | Previously: $ ghc-pkg list --user --simple-output ghc-pkg: no matches $ Now: $ ghc-pkg list --user --simple-output $
* Change the command-line semantics for query commandsSimon Marlow2007-11-161-19/+44
| | | | | | | | | | | | | From the help text: Commands that query the package database (list, latest, describe, field) operate on the list of databases specified by the flags --user, --global, and --package-conf. If none of these flags are given, the default is --global --user. This makes it possible to query just a single database (e.g. the global one without the user one), which needed tricks to accomplish before.
* Disallow installing packages whose names differ in case only.Simon Marlow2007-11-161-4/+12
| | | | | --force overrides. Requested by Duncan Coutts, with a view to treating package names as case-insensitive in the future.
* FIX #1596 (remove deprecated --define-name)Simon Marlow2007-11-141-139/+14
| | | | | Also remove the old command-line syntax for ghc-pkg, which was not documented. Do not merge.
* FIX #1837: remove deprecated support for unversioned dependencies (do not merge)Simon Marlow2007-11-141-36/+1
|
* FIX 1463 (implement 'ghc-pkg find-module')claus.reinke@talk21.com2007-11-091-6/+14
| | | | | | | | | | | | | | | | | | | | | | | - the ticket asks for a module2package lookup in ghc-pkg (this would be useful to have in cabal, as well) - we can now ask which packages expose a module we need, eg, when preparing a cabal file or when getting errors after package reorganisations: $ ./ghc-pkg-inplace find-module Var c:/fptools/ghc/driver/package.conf.inplace: (ghc-6.9.20071106) $ ./ghc-pkg-inplace find-module Data.Sequence c:/fptools/ghc/driver/package.conf.inplace: containers-0.1 - implemented as a minor variation on listPackages (as usual, it would be useful if one could combine multiple queries into one)
* remove --define-name from the --help usage message (#1596)Simon Marlow2007-11-141-4/+8
|
* FIX #1837: emit deprecated message for unversioned dependenciesSimon Marlow2007-11-141-3/+11
|
* Teach ghc-pkg about $httptopdirIan Lynagh2007-10-291-6/+11
|
* Add a --names-only flag for list --simple-outputIan Lynagh2007-09-071-2/+7
| | | | | We use this in the testsuite to find out which libraries we should run the tests from.
* Fix warnings in ghc-pkg on WindowsIan Lynagh2007-09-021-0/+3
|
* convert to use System.FilePathSimon Marlow2007-08-261-85/+8
|
* Fix up whitespaceIan Lynagh2007-06-091-270/+269
|
* Make package.conf files a bit more readableIan Lynagh2007-05-301-1/+3
|
* remove #if branches for pre-ghc-6.0Isaac Dupree2007-06-051-17/+0
| | | | | | I skipped utils/hsc2hs/Main.hs since its ifs also involved checking for old versions of nhc98 (I don't want to figure that out), but removed everything else I found relating to building with pre-6.0
* Don't use compat when compiling utils with stage1Ian Lynagh2007-02-061-2/+8
|
* Fix ghc-pkg now showError has been removedIan Lynagh2007-01-151-2/+4
|
* expand $topdir in the output of 'ghc-pkg field'Simon Marlow2007-01-091-1/+28
| | | | | this fixed #937, and gets us further towards 'setup haddock' working for Cabal on Windows.
* Change a comma to a colonIan Lynagh2006-11-251-1/+1
|
* ghc-pkg: New command 'check' and made 'list' indicate broken packagesLennart Kolmodin2006-11-051-5/+49
| | | | | | | Command 'check': print a list of all packages that are broken and which dependencies they are missing. Command 'list': updated by making it put brackets around broken packages.
* add --force-files, like --force but doesn't allow missing dependenciesSimon Marlow2006-09-181-24/+43
|
* savingOldConfig: add Exception.block for extra paranoiaSimon Marlow2006-08-011-1/+1
|
* Refactor ghc-pkgIan Lynagh2006-07-291-36/+33
| | | | | | | This patch fixes a couple of issues with the Be lazier in user config creation, and don't fail on missing configs. patch. It puts the createDirectoryIfMissing back in and removes assumptions that the package.conf file already exists.
* oops, remove old packages when updatingSimon Marlow2006-07-271-1/+2
|
* Remove most of the conflict checking and auto-hidingSimon Marlow2006-07-251-140/+6
| | | | | | Now that the module restriction has been lifted, the auto-hiding is mostly not required. GHC itself automatically hides old versions of a package.
* Be lazier in user config creation, and don't fail on missing configs.Ian Lynagh2006-06-241-8/+1
|
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+1184
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.