Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
This comparison is big! We’re only showing the most recent 250 commits
Commits on Dec 08, 2008
@dcoutts dcoutts Check for absolute, outside-of-tree and dist/ paths f35b0d1
Commits on Dec 09, 2008
@dcoutts dcoutts Add ModuleName.fromString and deprecate ModuleName.simple
Also document the functions in the ModuleName module.
@dcoutts dcoutts Fix configCompilerAux to consider user-supplied program flags
This fixes a bug in cabal-install
Commits on Dec 10, 2008
@dcoutts dcoutts Fix implementation of withinIntervals 89daf73
@dcoutts dcoutts Add checking of Version validity to the VersionIntervals invariant
Version numbers have to be a non-empty sequence of non-negataive ints.
@dcoutts dcoutts Export withinVersion and deprecate betweenVersionsInclusive 0db6ea5
@dcoutts dcoutts Add documentation for VersionRange functions
With properties.
@dcoutts dcoutts Update and extend the Version quickcheck properties
One property fails. The failure reveals that the VersionInterval type
is not quite a canonical representation of the VersionRange semantics.
This is because the lowest Version is [0] and not -infinity, so for
example the intervals (.., 0] and [0,0] are equivalent.
@dcoutts dcoutts Eliminate NoLowerBound, Versions do have a lower bound of 0.
This eliminates the duplicate representation of ">= 0" vs "-any"
and makes VersionIntervals properly canonical.
@dcoutts dcoutts Update the VersionInterval properties which now all pass e6dba97
Commits on Dec 11, 2008
@dcoutts dcoutts Remove obsolete test code 67a48a2
@dcoutts dcoutts Use the first three lhc version digits
Rather than two, and do it in a simpler way.
@dcoutts dcoutts Make the compiler PackageDB stuff more flexible
We support using multiple package dbs, however the method for
specifying them is very limited. We specify a single package db
and that implicitly specifies any other needed dbs. For example
the user or a specific db require the global db too. We now
represent that stack explicitly. The user interface still uses
the single value method and we convert internally.
@dcoutts dcoutts Update changelog for release 8c66acc
Commits on Dec 12, 2008
@igfoo igfoo Un-deprecate Distribution.ModuleName.simple for now
Distribution/Simple/PreProcess.hs uses it, so this causes build failures
with -Werror.
@igfoo igfoo Fix Show/Read for License
We were ending up with things like
    InstalledPackageInfo {
        license = LGPL Nothing,
i.e. "LGPL Nothing" rather than "LGPL", which we couldn't then read.
Commits on Dec 23, 2008
@dcoutts dcoutts Ban ghc-options: --make
I dunno, some people...
Commits on Jan 09, 2009
@igfoo igfoo On Windows, if gcc isn't where we expect it then keep looking cb773d0
Commits on Jan 13, 2009
@dcoutts dcoutts Enable the global command usage to be set
extend it rather than overriding it.
Also rearrange slightly the default global --help output.
@dcoutts dcoutts Swap the order of global usage messages
Put the more important one first.
@dcoutts dcoutts The Read instance for License and InstalledPackageInfo is authoritative
It is ghc's optimised InstalledPackageInfo parser that needs updating.

rolling back:

Fri Dec 12 18:36:22 GMT 2008  Ian Lynagh <>
  * Fix Show/Read for License
  We were ending up with things like
      InstalledPackageInfo {
          license = LGPL Nothing,
  i.e. "LGPL Nothing" rather than "LGPL", which we couldn't then read.

    M ./Distribution/License.hs -2 +14
Commits on Jan 16, 2009
@dcoutts dcoutts Improve runE parse error message
Only really used in parsing config files derived from command line flags.
Commits on Jan 18, 2009
@dcoutts dcoutts Make 'ghc-options: -O0' a warning rather than an error 2193ff9
Commits on Jan 21, 2009
@nomeata nomeata Typo in docs for source-repository b7ac3de
Commits on Jan 22, 2009
@dcoutts dcoutts Fix installIncludeFiles to create target directories properly
Previously for 'install-includes: subdir/blah.h' we would not
create the subdir in the target location.
@dcoutts dcoutts Move installDataFiles out of line to match installIncludeFiles 1fa471c
@dcoutts dcoutts filter -threaded when profiling is on
Fixes #317. Based on a patch by
@dcoutts dcoutts Fix openNewBinaryFile on Windows with ghc-6.6
fdToHandle calls fdGetMode which does not work with ghc-6.6 on
windows, the workaround is not to call fdToHandle, but call
openFd directly. Bug reported by Alistair Bayley, ticket #473.
Commits on Jan 23, 2009
@dcoutts dcoutts Update changelog for ab90959
@dcoutts dcoutts New changelog entries for 1.7.x 966acde
Commits on Jan 25, 2009
@dcoutts dcoutts Filter ghc-options -threaded for libs too 3df1b0a
@dcoutts dcoutts Check for ghc-options: -threaded in libraries
It's totally unnecessary and messes up profiling in older ghc versions.
Commits on Jan 26, 2009
@alexeevg alexeevg Warn if C dependencies not found (kind of fixes #262)
This is just a basic check - generate a sample program and check if it compiles and links with relevant flags. Error messages (warning messages, 
actually) could use some improvement.
Commits on Jan 27, 2009
@SamB SamB Pass include directories to LHC 246b44e
Commits on Jan 28, 2009
@dcoutts dcoutts Remove unused support for installing dynamic exe files
No idea why this was ever added, they've never been built.
@dcoutts dcoutts Add Distribution.Compat.CopyFile module
This is to work around the file permissions problems with the
standard System.Directory.copyFile function. When installing
files we do not want to copy permissions or attributes from the
source files. On unix we want to use specific permissions and
on windows we want to inherit default permissions. On unix:
copyOrdinaryFile   sets the permissions to -rw-r--r--
copyExecutableFile sets the permissions to -rwxr-xr-x
Commits on Jan 29, 2009
@dcoutts dcoutts Export setFileOrdinary and setFileExecutable from Compat.CopyFile 2dfbf32
@dcoutts dcoutts Use setFileExecutable instead of copyPermissions
This lets us get rid of the Compat.Permissions module
@dcoutts dcoutts Add a bunch of utility functions for installing files
We want to separate the functions that do ordinary file copies
from the functions that install files because in the latter
case we have to do funky things with file permissions.
@dcoutts dcoutts Make the Compat.CopyFile module with with old and new ghc ac05fff
@dcoutts dcoutts Use installOrdinaryFile and installExecutableFile in various places
instead of copyFileVerbose
@dcoutts dcoutts Stop using smartCopySources or copyDirectoryRecursiveVerbose
Instead if copyDirectoryRecursiveVerbose use installDirectoryContents
and for smartCopySources use findModuleFiles and installExecutableFiles
In both cases the point is so that we use functions for installing
files rather than functions to copy files.
@dcoutts dcoutts Switch last uses of copyFile to copyFileVerbose a882f6f
@dcoutts dcoutts Switch hugs wrapper code to use setFileExecutable
instead of get/setPermissions which don't really work properly.
@dcoutts dcoutts Let the setFileExecutable function work with hugs too 63144db
@dcoutts dcoutts Switch copyFileVerbose to use compat copyFile
All remaining uses of it do not require copying permissions
@dcoutts dcoutts Deprecate smartCopySources and copyDirectoryRecursiveVerbose
Also use simplified implementation in terms of recently added functions.
@dcoutts dcoutts Misc minor comment and help message changes b254c7d
Commits on Jan 30, 2009
@alexeevg alexeevg #262 iterative tests for foreign dependencies
Optimize for succesful case. First try all libs and includes in one command, 
proceed with further tests only if the first test fails. The same goes for libs 
and headers: look for an offending one only when overall test fails.
@dcoutts dcoutts Document most of the new file utility functions 5483e8c
@RossPaterson RossPaterson move imports outside ifdef GHC 02464cd
Commits on Jan 31, 2009
@dcoutts dcoutts Do the check for foreign libs after running configure
This lets us pick up build info discovered by the ./configure script
@dcoutts dcoutts Use the cc, cpp and ld options when checking foreign headers and libs
In partiular this is needed for packages that use ./configure
scripts to write .buildinfo files since they typically do not
split the cpp/cc/ldoptions into the more specific fields.
@dcoutts dcoutts Improve the error message for missing foreign libs and make it fatal
The check should now be accurate enough that we can make it an
error rather than just a warning.
Commits on Feb 01, 2009
@dcoutts dcoutts Add createTempDirectory to Compat.TempFile module
Also clean up imports
@dcoutts dcoutts Make withTempDirectory create a new secure temp dir
Rather than taking a specific dir to create.
Update the one use of the function.
@SamB SamB Fix message suggesting the --executables flag 1b56b49
Commits on Feb 02, 2009
@dcoutts dcoutts Remove #ifdefery for windows, renameFile now works properly
It's even atomic on windows so we don't need the workaround.
Commits on Feb 03, 2009
@SamB SamB Correct docdir -> mandir in InstallDirs d7c2910
Commits on Feb 05, 2009
@dcoutts dcoutts Fix compat functions for setting file permissions on windows
Spotted by Dominic Steinitz
Commits on Feb 06, 2009
@dcoutts dcoutts Don't build ghci lib if we're not making vanilla libs
As the .o files will not exist.
@dcoutts dcoutts Only print message about ignoring -threaded if its actually present 1441a95
Commits on Feb 12, 2009
@SamB SamB Make documentation validate f434683
Commits on Feb 13, 2009
@SamB SamB Folly the directions for docbook-xsl
As it says in

  - Use the base canonical URI in combination with one of the
    pathnames below. For example, for "chunked" HTML, output:
@dcoutts dcoutts Validate the docbook xml before processing.
Apparently xsltproc does not validate against the dtd.
This should stop errors creaping back in.
Commits on Feb 18, 2009
@dcoutts dcoutts Use more cc options when checking for header files and libs
Use -I. to simulate the search path that gets used when we tell ghc
to -#include something. Also use the include dirs and cc options of
dependent packages. These two changes fix about 3 packages each.
@dcoutts dcoutts Final changelog updates for 0752210
@dcoutts dcoutts Specify a temp output file for the header/lib checks
Otherwise we litter the current dir with a.out and *.o files.
Commits on Feb 19, 2009
@dcoutts dcoutts Fix user guide docs about --disable-library-vanilla
It is not default. Looks like it was a copy and paste error.
@Saizan Saizan rewrite of Distribution.Simple.Haddock
In addition to (hopefully) making clear what's going on
we now do the additional preprocessing for all the versions of haddock 
(but not for hscolour) and we run cpp before moving the files.
Commits on Feb 21, 2009
@RossPaterson RossPaterson fix imports for non-GHC e511f5b
Commits on Feb 25, 2009
@igfoo igfoo Allow --with-ghc to be specified when running Cabal 81ebedc
Commits on Mar 01, 2009
@dcoutts dcoutts Make die use an IOError that gets handled at the top level
Rather than printing the error there and then and throwing an
exit exception. The top handler now catches IOErrors and
formats and prints them before throwing an exit exception.
Fixes ticket #512.
Commits on Mar 02, 2009
@Saizan Saizan use -D__HADDOCK__ only when preprocessing for haddock < 2
haddock-2.x doesn't define any additional macros.
Commits on Mar 24, 2009
@igfoo igfoo Add for the new GHC build system a54be43
Commits on Mar 29, 2009
@igfoo igfoo GHC new build system fixes 2b81702
Commits on Apr 04, 2009
@igfoo igfoo Tweak new build system cebe754
Commits on Apr 22, 2009
@dcoutts dcoutts Print a more helpful message when haddock's ghc version doesn't match
Eg now says something like:
cabal: Haddock's internal GHC version must match the configured GHC version.
The GHC version is 6.8.2 but haddock is using GHC version 6.10.1
Commits on May 15, 2009
@Lemmih Lemmih Update the support for LHC. ff632ed
Commits on May 19, 2009
@dcoutts dcoutts Use dynlibdir = libdir for the moment
It will need more thought about how much control the user needs
and what the default shared libs management scheme should be.
Commits on May 21, 2009
@Lemmih Lemmih LHC: register the external core files. edcd388
Commits on May 26, 2009
rubbernecking.trumpet.stephen Ticket #89 part 1: add targetBuildDepends field to PackageDescription…
…'s target-specific BuildInfos

This provides dependencies specifically for each library and executable target.
buildDepends is calculated as the union of the individual targetBuildDepends,
giving a result that's exactly equivalent to the old behaviour.
rubbernecking.trumpet.stephen Ticket #89 part 2: Dependency-related test cases and a simple test ha…

The purpose of these tests is mostly to pin down some existing behaviour to
ensure it doesn't get broken by the ticket #89 changes.
Commits on May 27, 2009
@dcoutts dcoutts Add new ComponentLocalBuildInfo
We want to have each component have it's own dependencies,
rather than using the union of deps of the whole package.
@dcoutts dcoutts Remove the makefile generation feature
It was an ugly hack and ghc no longer uses it.
@dcoutts dcoutts Fix warnings about unused definitions and imports ddfc0e3
@dcoutts dcoutts Fixup .cabal file with the removed modules and files c1a53d8
@dcoutts dcoutts Remove unused ghc-only executable wrapper feature
Some kind of shell script wrapper feature might be useful,
but we should design it properly.
@dcoutts dcoutts Split ghc's build action into buildLib and buildExe 2f5e0f2
@dcoutts dcoutts Fix types of libModules and exeModules
Take a Library/Executable rather than a PackageDescription
Means we're more precise in using it, just passing the info we need.
@dcoutts dcoutts Give withLib and withExe sensible types 535b463
@dcoutts dcoutts Sync LHC module from GHC module a53140b
@dcoutts dcoutts Split JHC's build into buildLib and buildExe 52471bc
@dcoutts dcoutts Split nhc and hugs's build action into buildLib and buildExe 035b14d
@dcoutts dcoutts Rejig calls to per-compiler build functions
So it's now a bit clearer what is going on in the generic build code
Also shift info calls up to generic code
@dcoutts dcoutts Make absoluteInstallDirs only take the package id
It doesn't need the entire PackageDescription
@dcoutts dcoutts No need to drop dist/installed-pkg-config after every build
We generate this file if necessary when registering.
@dcoutts dcoutts Simplify writeInstalledConfig slightly 1cf651e
@dcoutts dcoutts Pass ComponentLocalBuildInfo to the buildLib/Exe
Not yet used
@dcoutts dcoutts Use componentPackageDeps, remove packageDeps, add externalPackageDeps
So now when building, we actually use per-component set of package deps.
There's no actual change in behaviour yet as we're still setting each of
the componentPackageDeps to the union of all the package deps.
Commits on May 28, 2009
@dcoutts dcoutts Resolve merge conflict with dynlibPref patch
The dynlibPref patch accidentally was only pushed to ghc's branch.
rubbernecking.trumpet.stephen Add *LBI variants of withLib and withExe that give corresponding buil…
…d info
Commits on May 29, 2009
@niklasbroberg niklasbroberg Register XmlSyntax and RegularPatterns as known extensions in Languag…

Concrete XML syntax is used in the Haskell Server Pages extension 
language, and a description can be found in the paper "Haskell Server 
Pages through Dynamic Loading" by Niklas Broberg, published in Haskell 
Workshop '05.

Regular expression pattern matching is described in the paper "Regular 
Expression Patterns" by Niklas Broberg, Andreas Farre and Josef 
Svenningsson, published in ICFP '04.
Commits on May 30, 2009
@dcoutts dcoutts Use accurate per-component package deps
Based on an original patch by Stephen Blackheath
Previously each component got built using the union of all package
deps of all components in the entire package. Now we use exactly the
deps specified for that component. To prevent breaking old packages
that rely on the sloppy behaviour, package will only get the new
behaviour if they specify they need at least cabal-version: >= 1.7.1
@dcoutts dcoutts Detect intra-package build-depends
Based on an original patch by Stephen Blackheath
With this change build-depends on a library within the same package
are detected. Such deps are not full handled yet so for the moment
they are explicitly banned, however this is another step towards
actually supporting such dependencies. In particular deps on
internal libs are resolved to the internal one in preference to any
existing external version of the same lib.
@dcoutts dcoutts Improve an internal error message slightly e18f58c
@dcoutts dcoutts Minor renaming
Part of one of Stephen Blackheath's patches
@dcoutts dcoutts Bump version to 1.7.1 due to recent changes 881f864
@dcoutts dcoutts Simplify version ranges before printing in configure error message
Part of ticket #369. Now instead of:
  setup: At least the following dependencies are missing:
  base <3 && <4 && <3 && <3 && <4
we get:
  setup: At least the following dependencies are missing:
  base <3
Commits on May 31, 2009
@dcoutts dcoutts Use the PackageDbStack in the local build info and compiler modules
This lets us pass a whole stack of package databases to the compiler.
This is more flexible than passing just one and working out what
other dbs that implies. This also lets us us more than one specific
package db, which we need for the inplace package db use case.
@dcoutts dcoutts Add and export simplifyDependency
Just uses simplifyVersionRange on the version range in the dep
@dcoutts dcoutts Simplify version ranges in configure messages and errors
Part of #369
@dcoutts dcoutts Make rendering the ghc package db stack more lenient
Allow the user package db to appear after a specific one.
No reason not to and makes some things in cabal-install more convenient.
@dcoutts dcoutts Always build ar files with indexes
Since we have to be able to use these inplace we always need
the index it's not enough to just make the index on installing.
This particularly affects OSX.
@dcoutts dcoutts executables can now depend on a library in the same package.
Fixes ticket #89. The library gets registered into an inplace
package db file which is used when building the executables.
Based partly on an original patch by Stephen Blackheath.
@dcoutts dcoutts Ignore a byte order mark (BOM) when reading UTF8 text files
Yes of course UTF8 text files should not use the BOM but
notepad.exe does anyway. Fixes ticket #533.
Commits on Jun 01, 2009
@dcoutts dcoutts Split requireProgram into two different functions
Now requireProgram doesn't take a version range and does not check
the program version (indeed it doesn't need to have one). The new
function requireProgramVersion takes a required program version
range and returns the program version. Also update callers.
Also fixes the check that GHC has a version number.
@dcoutts dcoutts Ban upwardly open version ranges in dependencies on base
Fixes ticket #435. This is an approximation. It will ban most
but not all cases where a package specifies no upper bound.
There should be no false positives however, that is cases that
really are always bounded above that the check flags up.
Doing a fully precise test needs a little more work.
@dcoutts dcoutts Remove a couple unused imports. b27b6a9
rubbernecking.trumpet.stephen Make message "refers to a library which is defined within the same.."…
… more grammatical
rubbernecking.trumpet.stephen Ticket #89 final: Regression tests for new dependency behaviour. 0702bee
Commits on Jun 03, 2009
@dcoutts dcoutts Bump version due to recent changes 41812e9
@niklasbroberg niklasbroberg Deprecated PatternSignatures in favor of ScopedTypeVariables ac7a142
Commits on Jun 04, 2009
@dcoutts dcoutts Change UserHooks.readDesc to use GenericPackageDescription
Also changes Simple.defaultMainNoRead to use GenericPackageDescription.
This is an API change that in principle could break Setup.hs scripts
but in practise there are no Setup.hs scripts that use either.
@dcoutts dcoutts Change UserHooks.confHook to use simply GenericPackageDescription
Rather than Either GenericPackageDescription PackageDescription
In principle this is an interface change that could break Setup.hs
scripts but in practise the few scripts that use confHook just pass
the arguments through and so are not sensitve to the type change.
@dcoutts dcoutts Simplify checkPackageProblems function
Since we now always have a GenericPackageDescription
@dcoutts dcoutts Do not pass Maybe LocalBuildInfo to clean hook
It is a bad idea for clean to do anything different depending
on whether the package was configured already or not. The
actual cleaning code did not use the LocalBuildInfo so this
only changes in the UserHooks interface. No Setup.hs scripts
actually make of this parameter for the clean hook.
Part of ticket #133.
Commits on Jun 05, 2009
@igfoo igfoo Tweak a comment so that it doesn't confuse haddock 32fccd3
@igfoo igfoo Fix unlit
The arguments to isPrefixOf were the wrong way round. We want to see if
the line starts "\\begin{code}", not if the line is a prefix of that string.
@igfoo igfoo When build calls register, pass the verbosity level too aed277f
@igfoo igfoo Pass a verbosity flag to ghc-pkg 8c33d93
Commits on Jun 07, 2009
@dcoutts dcoutts Split the Program module up a bit
Add an explicit intermediate ProgramInvocation data type.
@dcoutts dcoutts Fix rawSystemStdin util function
Close the input after pushing it. Return any error message.
@dcoutts dcoutts Re-export the program invocation stuff from the Program module fbbb289
@dcoutts dcoutts New module to write program invocations as shell scripts or batch files
For tasks like registering where we call hc-pkg, this allows us to
produce a single program invocation and then either run it directly
or write it out as a script.
@dcoutts dcoutts New module for handling calling the hc-pkg program e4cbd33
@dcoutts dcoutts Add new Program modules 3c5fa56
@dcoutts dcoutts Use a better api for registering libs in the internal package db 52c362e
@dcoutts dcoutts Pass verbosity to hc-pkg ce24ed0
@dcoutts dcoutts Add improved xargs style function
More flexible and based on the ProgramInvocation stuff
@dcoutts dcoutts Add specialised modules for handling ar and ld 7581297
@dcoutts dcoutts Use the new HcPkg module in the GHC getInstalledPackages function 9c179a1
@dcoutts dcoutts Use new Program.Ld and Program.Ar in GHC module 01bf027
@dcoutts dcoutts Simplify OSX ranlib madness c6f55ac
@dcoutts dcoutts Rewrite the Register module
It was getting increasingly convoluted and incomprehensible.
Now uses the Program.HcPkg and Program.Scripts modules.
@dcoutts dcoutts Rearrange the PathTemplateEnv stuff and export more pieces 627e555
Commits on Jun 08, 2009
@igfoo igfoo Put a "%expect 0" directive in the .y file of a test f45ae6f
Commits on Jun 10, 2009
@RossPaterson RossPaterson fix typo of exitcode f397b56
@RossPaterson RossPaterson use Haskell 98 import syntax 0895fd2
Brent Yorgey documentation update: add a description of the syntax for 'compiler' …
…fields in .cabal files
Commits on Jun 12, 2009
@simonmar simonmar update to work with the new GHC IO library internals (fdToHandle) 38114cd
Commits on Jun 14, 2009
@dcoutts dcoutts Fix && entity refs in doc xml ba684da
@dcoutts dcoutts Describe the autoconfUserHooks option more accurately in the user guide f66819c
Commits on Jun 22, 2009
@simonmar simonmar follow change in System.Posix.Internals.c_open d8b7c5d
Commits on Jun 25, 2009
@simonmar simonmar clean up createTempDirectory, using System.Posix or System.Directory
rather than low-level System.Posix.Internals operations which are
about to go away.
@igfoo igfoo TAG 2009-06-25 d9d6800
Commits on Jun 26, 2009
@simonmar simonmar Help Cabal find gcc/ld on Windows
the layout changed in the new GHC build system
Commits on Jul 05, 2009
@dcoutts dcoutts Undo a simplification in the type of absoluteInstallDirs
Existing Setup scripts use it so we can't change it. Fixes #563.
@igfoo igfoo Follow changes in haddock
The --verbose flag is now called --verbosity
@dcoutts dcoutts Rename and export substituteInstallDirTemplates
This does the mutual substituition of the installation
directory templates into each other.
@dcoutts dcoutts Simplify and generalise installDirsTemplateEnv
Take a set of templates rather than file paths.
Commits on Jul 07, 2009
@dcoutts dcoutts Bump version to 1.7.3 due to recent API changes ea876e8
@igfoo igfoo Remove unused imports 2e1c57f
@igfoo igfoo Fix unused import warnings d12ac98
Commits on Jul 10, 2009
@igfoo igfoo Fix some "warn-unused-do-bind" warnings where we want to ignore the v…
@igfoo igfoo Don't ask for the output of running ld, as we ignore it anyway c471bb3
@igfoo igfoo Don't use the Stdout variant of rawSystemProgramConf to call gcc
We ignore the output anyway
@igfoo igfoo Fix a "warn-unused-do-bind" warning c4d5d70
Commits on Jul 23, 2009
@igfoo igfoo Follow the change in GHC's split-objs directory naming 6107170
Commits on Jul 26, 2009
@igfoo igfoo Pass GHC >= 6.11 the -fbuilding-cabal-package flag e021c18
Commits on Jul 27, 2009
@dcoutts dcoutts Undo incorrect fixes for "unused-do-bind" warnings.
We capture (and discard) the program output because we do not
want it printed to the console. We do not currently have a
specific variant for redirecting the output to /dev/null so
we simply use the variant that captures the output.

rolling back:

Fri Jul 10 22:04:45 BST 2009  Ian Lynagh <>
  * Don't ask for the output of running ld, as we ignore it anyway

    M ./Distribution/Simple/GHC.hs -2 +2
    M ./Distribution/Simple/LHC.hs -2 +2
Fri Jul 10 22:08:02 BST 2009  Ian Lynagh <>
  * Don't use the Stdout variant of rawSystemProgramConf to call gcc
  We ignore the output anyway

    M ./Distribution/Simple/Configure.hs -2 +3
@dcoutts dcoutts Fix "unused-do-bind" warnings properly
Though I'm not at all sure I like the _ <- bind idiom.
Commits on Aug 06, 2009
@simonmar simonmar Refactoring: fit into 80 columns c6bfee7
@simonmar simonmar Add a unuque identifier for installed packages (part 1 of 9)
  NOTE: the patch has been split into 9 pieces for easy
  reviewing, the individual pieces won't build on their own.
Part 1 does the following:

  - define the InstalledPackageId type as a newtype of String

  - add an installedPackageId field to InstalledPackageInfo
  - change the type of the depends field from [PackageIdentifier]
    to [InstalledPackageId]

The idea behind this change is to add a way to uniquely identify
installed packages, letting us decouple the identity of an installed
package instance from its package name and version.  The benefits of
this are

  - We get to detect when a package is broken because its
    dependencies have been recompiled, or because it is being
    used with a different package than it was compiled against.

  - We have the possibility of having multiple instances of a
    given <package>-<version> installed at the same time.  In the
    future this might be used for "ways".  It might also be
    useful during the process of upgrading/recompiling packages.
@simonmar simonmar Add a unuque identifier for installed packages (part 2 of 9)
Note: this patch doesn't build on its own, you also need the rest of
the patch series.

Compatibility with older GHCs.  When reading a package database
created by an older version of GHC without installedPackageIds, we
have to fake an InstalledPackageId for the internal

So, when reading in an InstalledPackageInfo from an older GHC, we set
the installedPackageId to be the textual representation of the
PackageIdentifier: i.e. <package>-<version>.  Now, previously the
depends field of InstalledPackageInfo was [PackageIdentifier], and is
now [InstalledPackageId], so we will read each PackageIdentifier as an
InstalledPackageId (a String).  The dependencies will still point to
the correct package, however, because we have chosen the
installedPackageId to be the textual representation of the
@simonmar simonmar Add a unuque identifier for installed packages (part 3 of 9)
This part adds the InstalledPackageIndex type to
Distribution.Simple.PackageIndex.  Now that packages have a unique
identifier within a package database, it makes sense to use this as
the key for looking up installed packages, so InstalledPackageIndex is
a mapping from InstalledPackageId to InstalledPackageInfo.

Distribution.Simple.PackageIndex still supports other kinds of package
mappings: PackageIndex is a mapping from PackageName.

All the functions in the section "Special Queries" now work on
InstalledPackageIndex rather than PackageFixedDeps pkg => PackageIndex

@simonmar simonmar Add a unuque identifier for installed packages (part 4 of 9)

  - the LocalBuildInfo record contains an index of the installed
    packages; this has changed from PackageIndex InstalledPackageInfo
    to InstalledPackageIndex.

  - ComponentLocalBuildInfo stores the "external package dependencies"
    of the component, which was 
      componentPackageDeps :: [PackageId]
    and is now
      componentInstalledPackageDeps :: [InstalledPackageId]

  - we now export
      componentPackageDeps :: LocalBuildInfo -> [PackageId]
    (since to get the PackageId for an InstalledPackageId, you need
    to look it up in the InstalledPackageIndex, which is in the

  - similarly, previously
      externalPackageDeps :: LocalBuildInfo -> [PackageId]
    is now
      externalPackageDeps :: LocalBuildInfo -> [InstalledPackageId]
@simonmar simonmar Add a unuque identifier for installed packages (part 5 of 9)
Follow changes to Distribution.Simple.LocalBuildInfo.componentPackageDeps.
@simonmar simonmar Add a unuque identifier for installed packages (part 6 of 9)
Add libAbiHash, which extracts a String representing a hash of
the ABI of a built library.  It can fail if the library has not
yet been built.
@simonmar simonmar Add a unuque identifier for installed packages (part 8 of 9)
Distribution.Simple.Configure: follow changes to PackageIndex and
@simonmar simonmar Add a unuque identifier for installed packages (part 7 of 9)
Follow changes in Distribution.Simple.LocalBuildInfo (installedPkgs is
now an InstalledPackageIndex).
@simonmar simonmar Add a unuque identifier for installed packages (part 9 of 9)
When registering, choose the InstalledPackageId.

 - When registering inplace, use "foo-1.0-inplace"

 - If this isn't GHC, just use "foo-1.0-installed"

 - When installing a package with GHC, call
   Distribution.Simple.GHC.libAbiHash to get the hash, and
   use "foo-1.0-<hash>".
Commits on Aug 11, 2009
@igfoo igfoo Fix the base-upper-bound Cabal check error 777b347
Commits on Aug 12, 2009
@dcoutts dcoutts Use a simpler method for the check on the base-upper-bound
The key point is that we do not complain for packages
that do not depend on base at all (like ghc-prim).
Commits on Aug 22, 2009
@dcoutts dcoutts Rename the InstalledPackageInfo field package to sourcePackageId
The old one was always too generic and it now contrasts
better with the new installedPackageId field.
@dcoutts dcoutts Refactor and simplify the fixup in "hc-pkg dump"
We have to set the installedPackageId if it's missing.
There's no need for this to depend on the version of ghc which
is nice since this module is not supposed to be ghc specific.
@dcoutts dcoutts Add a bunch of TODOs and minor doc changes
Most TODOs related to the new InstalledPackageId stuff.
@dcoutts dcoutts Add a HACKING file
Seems people do not know that the source guide exists.
@dcoutts dcoutts Change finalizePackageDescription to take dep test function
Ths is instead of taking a set of installed packages. This insulates
us from the representation of the installed package set which is good
since we now have several representations. It also opens the door to
generalising the kinds of constraints we can handle.
Commits on Aug 24, 2009
@dcoutts dcoutts Bump minor version to 1.7.4
due to recent API changes
Commits on Aug 26, 2009
@simonmar simonmar Add the ABI hash to the InstalledPackageId for inplace registrations too
Previously, we just added a -inplace suffix, but this will cause
problems when developing multiple packages inplace, and then
installing them.

Also, there was a round of refactoring: registerPackage now takes the
InstalledPackageId as an argument, and generateRegistrationInfo is
exposed for constructing it.  This means that callers of
registerPackage get to munge the InstalledPackageInfo before it is
Commits on Aug 28, 2009
@dcoutts dcoutts Use -R flags for hsc2hs wherever we use -L flags on ELF platforms.
This fixes use of hsc2hs in cases where things like libgmp
is not on the system's dynamic linker path. It's ok to use
rpath in the case of hsc2hs because the linked programs are
run immediately and never installed.
Commits on Sep 06, 2009
@simonmar simonmar Use -package-id rather than -package with GHC 6.11+ 78a85ed
Commits on Sep 08, 2009
@dcoutts dcoutts Install dyn way hi files 4908382
Commits on Sep 11, 2009
Malcolm.Wallace Fix the version-range parser to allow arbitrary expressions over cons…

Previously, only a single conjunction (&&) or disjunction (||) was
parseable, despite an internal representation that permits arbitrary
combinations.  Now, any sequence of (&&) and (||) combining forms is
parsed.  (&&) binds more tightly than (||).
Commits on Sep 17, 2009
@dcoutts dcoutts Modify foldVersionRange and add foldVersionRange'
Now foldVersionRange gives a view with no syntactic sugar
while foldVersionRange' gives a view with the syntactic sugar.
@dcoutts dcoutts Fix the depth calculation for the version range expression check
Previously it was complaining about expressions like
 >= 2 && < 3
because internally >= is represented in terms of >, == and ||.
The fix is to use new fold that gives a view with the extra
syntactic sugar so that <= and <= can be counted as one.
@dcoutts dcoutts Fix pretty printing of version ranges to use parens in the right places 7880d47
Commits on Sep 20, 2009
@dcoutts dcoutts Don't simplify empty/inconsistent version ranges
They all get squashed to ">1 && <1" which while canonical is not helpful.
@dcoutts dcoutts Fix Integer defaulting 3b0b33e
@dcoutts dcoutts Simplify the use of simplifyVersionRange
Use the simplifyDependency wrapper
@igfoo igfoo Update dependencies 80272ed
Commits on Sep 22, 2009
@igfoo igfoo TAG GHC 6.12-branch created 9c9c6be
Commits on Sep 28, 2009
@igfoo igfoo Fix deadlocks when calling waitForProcess; GHC trac #3542
We now wait on MVars indicating that stdout and stderr have been
closed before making the waitForProcess call.
Commits on Oct 02, 2009
@dcoutts dcoutts Fix sdist for packages using .lhs-boot files eb19159
Commits on Oct 04, 2009
@dcoutts dcoutts Don't use -#include flag with ghc-6.12 c2cf41e
Commits on Oct 05, 2009
@dcoutts dcoutts Rewrite the PackageIndex again
It's a unified index again, rather than one for looking up by an
InstalledPackageId and one for the source PackageId. The new one
lets you look up by either. It also maintains the order of
preference of different installed packages that share the same
source PackageId. In configure we just pick the first preference.
@dcoutts dcoutts Get and merge ghc's package dbs more sensibly
Use the merge rather than just making a big list.
@dcoutts dcoutts Reduce the insanity in Configure
It was making so many different kinds of package index and converting
back and forth between package id and installed package id that it
made my brain hurt. Thou shalt not convert blithly between package Id
and installed package Id for thou know not what thy doest.
@dcoutts dcoutts Stop converting between installed package id and source package id
In the LocalBuildInfo, for each component, for the list of component
dependencies, keep both the InstalledPackageId and the PackageId.
That way we don't need to keep converting the InstalledPackageId
to the PackageId, via the package index (which is just horrible).
@dcoutts dcoutts Bump minor version a6a536e
@dcoutts dcoutts Fix configuring for packages with internal lib deps.
Was using the wrong set of packages when doing the finalise.
@dcoutts dcoutts Keep asserts for testing pre-releases d17da7a
Stephen Blackheath Fix test case InternalLibrary4 on account of a change in Cabal's beha…
Commits on Oct 06, 2009
@simonmar simonmar Loosen the invariant, it was too strict
The packages do not need to be in the same order when sorted by
package name as when sorted by InstalledPackageId.
@igfoo igfoo Bump version number to 1.8.0 28cbc89
@dcoutts dcoutts Unbreak configure for packages that depend on different versions of t…
@dcoutts dcoutts I was wrong, the test was correct before.
rolling back:

Mon Oct  5 17:32:02 BST 2009  Stephen Blackheath <>
  * Fix test case InternalLibrary4 on account of a change in Cabal's behaviour.

    M ./tests/PackageTests/BuildDeps/InternalLibrary4/Check.hs -5 +4
@dcoutts dcoutts Don't complain if there is no ghc rts package registered a23976d
@dcoutts dcoutts Use -Wl,-R, for the gcc rpath flag.
Apparently it was only gcc on Solaris that groks -R directly,
so we have to use -Wl to pass it through to ld. Both GNU and
Solaris ld grok -R, only GNU ld accepts -rpath.
Commits on Oct 12, 2009
@igfoo igfoo Only pass -B... to gcc for GHC < 6.11
It is no longer needed in 6.12.
Commits on Oct 21, 2009
@dcoutts dcoutts Fix haddock markup f40ee22
Commits on Oct 28, 2009
@dcoutts dcoutts Build with ghc-6.6 d88e79f
haskell JHC.getInstalledPackages: adapt to package lists emitted by jhc-0.7.2 f0d7086
haskell JHC.buildLib: make this working for JHC-0.7.2 6ee88bd
Commits on Oct 29, 2009
haskell JHC.getInstalledPackages: remove check for --user flag, since JHC-0.7…
….2 supports local packages
Commits on Nov 03, 2009
@int-e int-e Pass profiling flag to ghc when compiling C files.
The main effect of this change is that the PROFILING macro gets defined
when compiling C files and profiling is enabled. This is useful for code
that inspects closures.

  The change relies on the fact that Cabal does not track dependencies
  of C files but recompiles them every time. If dependency tracking is
  added, we'll need different extensions for profiling and non-profiling
  object files.
Commits on Nov 04, 2009
@dcoutts dcoutts Exclude non-buildable components when constructing the overall packag…
…e deps
@dcoutts dcoutts Tweak the assertion on overall package deps 83511a9
@dcoutts dcoutts Bump minor version
A few changes since version 1.8.0 that was released with ghc-6.12rc1
Commits on Nov 06, 2009
@dcoutts dcoutts Remove some commented out code 55a9c19
Commits on Nov 09, 2009
@dcoutts dcoutts JHC support requires jhc >= 0.7.2 b8cfadc
@dcoutts dcoutts Improve the error message for missing sh.exe on Windows
When ettempting to run ./configure scripts. Fixes ticket #403.
@dcoutts dcoutts Canonicalise the package deps returned by finalizePackageDescription
The guarantee is supposed to be that each package name appears at most
once with all the constraints for that dependency. The cabal-install
planner relies on this property.
Commits on Nov 17, 2009
@dcoutts dcoutts Fix building with base 3 a3469a2
Commits on Nov 28, 2009
@dcoutts dcoutts Add backwards compat version of findProgramOnPath
Break a couple fewer package's Setup.hs files
@dcoutts dcoutts Add backwards compat version of packageDeps e5db038
@dcoutts dcoutts Be less verbose when checking foreign deps b95f307
@dcoutts dcoutts Update docs for class Package fb1521a
@dcoutts dcoutts Update docs on a couple util functions 50e9321
@dcoutts dcoutts Change where we add a trailing newline when showing InstalledPackageInfo
Do it in the pretty-printing rather than just before writing the file.
Commits on Nov 29, 2009
@dcoutts dcoutts Add support for text encoding when invoking a program
Can be either locale text or specifically UTF8.
Also tidy up the rawSystemStd* variants and pass
a text/binary mode flag for the input and output.
@dcoutts dcoutts Package registration files are always UTF8
As is the output from ghc-pkg dump.
@dcoutts dcoutts Update changelog for 1.8.x release 0afda1c
@igfoo igfoo Fix warnings 5200161
Commits on Dec 01, 2009
@igfoo igfoo Install shared libraries as executable files
Fixes GHC trac #3682. Patch from juhpetersen.
@igfoo igfoo Bump version number to 0fb0c89
@dcoutts dcoutts Update other version number locations d876c40
Commits on Dec 02, 2009
@dcoutts dcoutts Take line endings into account in IOEncodingUTF8 mode
When collecting the output from programs.
Commits on Dec 15, 2009
@igfoo igfoo TAG GHC 6.12.1 release 0439d60