
New patches:

[Fix a non-total function definition warning
Pepe Iborra <mnislaih@gmail.com>**20080319165526] {
hunk ./Distribution/Simple/Command.hs 333
+    showOptDescr x _ = error "Distribution.Simple.Command.showOptDescr: unreachable"
}

[wibbles (some more)
Pepe Iborra <mnislaih@gmail.com>**20080320171144] {
hunk ./Distribution/Simple/Command.hs 137
-option sf (n:lf) d get set arg = OptionField n [arg sf (n:lf) d get set]
+option sf lf@(n:_) d get set arg = OptionField n [arg sf lf d get set]
}

Context:

[Bump version number due to recent api changes
Duncan Coutts <duncan@haskell.org>**20080319221643] 
[Update a couple things in the README and update changelog
Duncan Coutts <duncan@haskell.org>**20080319123712] 
[Documentation the --enable/disable-executable-stripping options
Duncan Coutts <duncan@haskell.org>**20080319121212] 
[Add --enable/disable-executable-stripping option
Duncan Coutts <duncan@haskell.org>**20080319120924
 The default is enabled
] 
[Allow '_' char in buld tool names
Duncan Coutts <duncan@haskell.org>**20080319115323
 eg we have build-tools like "pg_config"
] 
[Refactor sdist code a bit
Duncan Coutts <duncan@haskell.org>**20080318235916
 Separate the phases of sdist better so that they can be reused in
 cabal-install. This part is similar to Andrea Vezzosi's patch.
 Separate the snapshot code rather than mixing it all in with prepareTree.
 Use a proper withTempDirectory which fixes one FIXME.
 Better separate UI code from actions, move the notices to sdist.
] 
[fix 'clean' bug on windows caused by leaked Handle.
Andrea Vezzosi <sanzhiyan@gmail.com>**20080318161237
 Using readFile to read dist/setup-config keeps the Handle open when we try to delete the file, causing an error. 
 So we instead read the file strictly and close the Handle early.
] 
[Change mkLibName and friends to take a package id and not take the dir
Duncan Coutts <duncan@haskell.org>**20080317221259
 So now it really gives just the lib name and not its location as well.
 It turned out that we more often want just the name since we're copying
 the same named file from one directory to another.
 Taking a PackageIdentifier means we do the conversion to string in one
 place rather than all over the place.
 It also means we're chaning the lib names for nhc98 to include the lib
 version number. This should not make any real difference to nhc98.
] 
[Document the --extra-include-dirs and --extra-lib-dirs options
Duncan Coutts <duncan@haskell.org>**20080318134913
 Though they actually only take one dir each so perhaps they should be
 renamed to just --extra-include-dir and --extra-lib-dir. You can of
 course use them multiple times to get a list of dirs.
] 
[Add a CompilerId type and use it in appropriate places
Duncan Coutts <duncan@haskell.org>**20080312031247
 Especially instead of abusing a PackageIdentifier for the purpose.
] 
[Move Dependency and it's show and parser into Package module
Duncan Coutts <duncan@haskell.org>**20080312020042
 Rather than having it in Version and its parser elsewhere.
 The Package module already imports the Version module which exports the
 VersionRange type.
] 
[Wibbles
Pepe Iborra <mnislaih@gmail.com>**20080318203230] 
[Move the call to ranlib out into a separate function
Duncan Coutts <duncan@haskell.org>**20080317193258
 It's a bit more readable that way.
] 
[Strip executables during installation for ghc
Duncan Coutts <duncan@haskell.org>**20080317193214
 Does not yet have a configure flag to turn this behaviour on and off.
 That can wait until after the command line flag infrastructure changes.
] 
[#223 part 1: Extend Distribution.Command.Simple.Option
Pepe Iborra <mnislaih@gmail.com>**20080317203015
      so that it really represents an option and not just a flag.
      It's been renamed to OptionField as it models a field in a flags-like data structure. 
      
         data OptionField a = OptionField {
           optionName        :: Name,
           optionDescr       :: [OptDescr a] }
       
         data OptDescr a  = ReqArg Description OptFlags ArgDescr (ReadE (a->a))         (a -> [String])
                          | OptArg Description OptFlags ArgDescr (ReadE (a->a)) (a->a)  (a -> [Maybe String])
                          | ChoiceOpt [(Description, OptFlags, a->a, a -> Bool)]
 			 | BoolOpt Description OptFlags{-True-} OptFlags{-False-} (Bool -> a -> a) (a -> Bool)
       
       An option field can expand to several command line options, which are all defined together.
       For example, the compiler flag is defined as follows.
       
             option [] ["compiler"] "compiler"
                configHcFlavor (\v flags -> flags { configHcFlavor = v })
                (choiceOpt [ (Flag GHC, ("g", ["ghc"]), "compile with GHC")
                           , (Flag NHC, ([] , ["nhc98"]), "compile with NHC")
                           , (Flag JHC, ([] , ["jhc"]), "compile with JHC")
                           , (Flag Hugs,([] , ["hugs"]), "compile with Hugs")])
       
       We can need to use several kinds of OptDescr for the same option, as in the 
       optimization Option (really a extreme case):
       
             ,multiOption "optimization"
                configOptimization (\v flags -> flags { configOptimization = v })
                [optArg' "n" (Flag . flagToOptimisationLevel)
                 ....
                 ....
                         "Build with optimization (n is 0--2, default is 1)",
                 noArg (Flag NoOptimisation) []
 
] 
[#221: specific include and library search paths options
Pepe Iborra <mnislaih@gmail.com>**20080317181203
 
   This patch adds two new command line options to configure,
   --extra-include-dirs and extra-lib-dirs.
   These have effect over all the buildables in a project.
 
   What is missing now is support for reading these from the .cabal/config file.
   That will be done as part of ticket #223.
 
 
] 
[Fix search dirs used for pre-processing executables
Duncan Coutts <duncan@haskell.org>**20080312203947
 It was combining the executable's hs-source-dirs with the library's
 hs-source-dirs when pre-processing executables. This was inconsistent
 with the search path used for finding ordinary .hs files and with
 sdist and lead to confusing behaviour. See ticket #161.
 If an executable needs source files from the library then it must specify
 the right hs-source-dirs, including '.' if appropriate.
 The behaviour is that if hs-source-dirs is not specified then the default
 is '.' however if hs-source-dirs is specified then '.' is not implicitly
 added. If it's needed then it must be added explicitly. This was always
 the case for ordinary .hs files, this patch just brings things into line
 for files that need pre-processing.
] 
[move inDir to Distribution.Simple.Utils
Andrea Vezzosi <sanzhiyan@gmail.com>**20080306155316] 
[Remove manual formatting and line breaking from error messages
Duncan Coutts <duncan@haskell.org>**20080311125022
 It now gets line wrapped automatically by the logging functions
] 
[Fix rejection of non-ambigious options
Duncan Coutts <duncan@haskell.org>**20080308120902
 This GetOpt patch was sent the the libraries list by Eelis van der Weegen
 with the explanation:
 There is a bug in System.Console.GetOpt causing it to mistakenly reject
 options as ambiguous. Example:
   optsDesc = [Option "" ["color", "colour"] (ReqArg id "color") ""]
 Output:
   option `--col' is ambiguous; could be one of:
       --color=color, --colour=color  Foreground color
       --color=color, --colour=color  Foreground color
 This error is silly, because the two alternatives listed are the same option.
] 
[Add packageName, packageVersion and use them
Duncan Coutts <duncan@haskell.org>**20080307115838
 (pkgName . packageId) and (pkgVersion . packageId)
 turn out to be very common so give them names.
] 
[Make BuildInfo an instance of Monoid
Duncan Coutts <duncan@haskell.org>**20080307115659] 
[Use the right program config when reporting found programs
Duncan Coutts <duncan@haskell.org>**20080306124735] 
[Remove the #ifdef'ed unit test code from several modules
Duncan Coutts <duncan@haskell.org>**20080310191806
 They have all been moved to tests/UnitTest/
 So we don't need so much CPP in the ordinary modules now.
] 
[Use the same ReadP for all compilers, remove CPP hacks
Duncan Coutts <duncan@haskell.org>**20080310191422
 If we're bundling a whole copy of ReadP then why bother trying to use
 the version from the base package, especially when that requires hacks
 to use the H98 version with some compilers and the non-H98 version in
 base. It just makes testing harder because we're using different versions
 with different compilers.
 As a bonus, hugs should no longer need the -98 flag to use Cabal.
 Added all the type signatures back in and fixed some warnings.
] 
[Rearange unit tests some more add extract more tests from the other modules
Duncan Coutts <duncan@haskell.org>**20080310190651] 
[Reorganise and prune tests/
Duncan Coutts <duncan@haskell.org>**20080310183938
 Split them into unit tests and system tests. Also remove the rather large
 bundled HSQL and HUnit packages. We can just depend on HUnit for the tests
 rather than bundling it. HSQL is very large for a system test and we can
 just as easily get it and others from hackage.
] 
[Import Data.Tree rather than defining it locally
Duncan Coutts <duncan@haskell.org>**20080310164343
 Since we've dropped ghc-6.2 compatibility we can now use Data.Tree directly.
] 
[When generating default Setup.hs use defaultMain
Duncan Coutts <duncan@haskell.org>**20080307021350
 not defaultMainWithHooks defaultUserHooks since the latter is deprecated
] 
[Add test for ticket #257
Duncan Coutts <duncan@haskell.org>**20080307021233
 Not automated yet, the testsuite needs resurrecting first.
] 
[Fix sdist to ignore the buildable attribute
Duncan Coutts <duncan@haskell.org>**20080307020933
 Fixes ticket #257
] 
[Check that the --prefix is always specified as an absolute path
Duncan Coutts <duncan@haskell.org>**20080306113532
 Should eliminate confusion with doing: cabal configure --prefix=~/local
 Instead use --prefix ~/local or --prefix=$HOME/local
] 
[Use CompilerFlavor rather than String in configurations expressions
Duncan Coutts <duncan@haskell.org>**20080305011046
 Better type safety and more robust parsing.
] 
[Add read/show for CompilerFlavour like for OS and Arch
Duncan Coutts <duncan@haskell.org>**20080305010820
 Also add YHC compiler flavour.
] 
[Rename Distribution.System.os to .buildOS and eliminate Windows sub-type
Duncan Coutts <duncan@haskell.org>**20080304234358] 
[Make an Arch enum like we have for OS and use it
Duncan Coutts <duncan@haskell.org>**20080304203802
 We get more robust parsing and comparisons of arch names this way
 and it'll allows us to detect and warn about unknown arches.
] 
[Fix configure for hugs where we don't know what packages are installed
Duncan Coutts <duncan@haskell.org>**20080305023626
 For Hugs, nhc98 and other compilers we do not know what packages are
 already installed, so we just make some up, pretend that they do exist
 and just hope for the best. We make them up based on what other package
 the package we're currently building happens to depend on.
 See inventBogusPackageId. Let's hope they really are installed... :-)
 One could see this as all rather redundant - carefully making up bogus
 information to satisfy a careful check. I prefer to see it as making
 explicit something that was previously implicit. The proper solution is
 to discover what packages are currently installed.
] 
[Restore using 30k max command line sizes when linking
Duncan Coutts <duncan@haskell.org>**20080305020857
 See http://hackage.haskell.org/trac/hackage/ticket/98#comment:17
] 
[Include .hs-boot files into the sdist tarball
Duncan Coutts <duncan@haskell.org>**20080304015334
 Tested using Agda which uses several .hs-boot files.
] 
[Fix speling.
Thomas Schilling <nominolo@gmail.com>**20080303221735] 
[Clarify commenting rule for package description files.
Thomas Schilling <nominolo@gmail.com>**20080303221657] 
[Actually we don't need wrapText'
Duncan Coutts <duncan@haskell.org>**20080303214150
 Any users of custom wrapText versions can go from the underlying wrapLine
] 
[Bump version to 1.3.7
Duncan Coutts <duncan@haskell.org>**20080303204000
 Keep up with recent minor api changes
] 
[Put a header in the dist/setup-config file and check it on loading
Duncan Coutts <duncan@haskell.org>**20080303202855
 This should fix ticket #120 in future which is the problem where you do
 something like "sudo runghc Setup install" and you accidentally end up
 using a different version of the compiler or of the Cabal lib and you get
 an unhelpful error message:
 > Setup.hs: error reading ./.setup-config; run "setup configure" command?
 Well now you'll get a helpful error message:
 > setup: You need to re-run the 'configure' command. The version of Cabal
 > being used has changed (was Cabal-1.3.6, now Cabal-1.3.7).
 If the compiler version being used has changed too we get the extra helpful:
 > setup: You need to re-run the 'configure' command. The version of Cabal
 > being used has changed (was Cabal-1.3.6, now Cabal-1.3.7). Additionally
 > the compiler is different (was ghc-6.8, now ghc-6.9) which is probably
 > the cause of the problem.
 Of course this does not help for older versions of Cabal but there's not a
 lot we can do about that.
] 
[Extend and use the OS data type in the package description
Duncan Coutts <duncan@haskell.org>**20080303200338
 Rather than just using a string. This makes comparing OSs easier since
 we can normalise them once when we parse rather than every time we compare.
 Also makes it easy to discover when a package mentions an unknown OS since
 it's marked as Other "whatever".
] 
[Wrap the output of the logging functions
Duncan Coutts <duncan@haskell.org>**20080303182623
 So we'll not have to keep adjusting newline breaks.
] 
[Warn about use of the BSD4 license
Duncan Coutts <duncan@haskell.org>**20080301000344] 
[-Wall clean, remove unused import
Duncan Coutts <duncan@haskell.org>**20080229232129] 
[Document configure --package-db flag
Duncan Coutts <duncan@haskell.org>**20080229230614] 
[Reformat License declaration and add related TODOs
Duncan Coutts <duncan@haskell.org>**20080229224932
 The real difficulty with changing the license stuff is the parser in current
 and older cabal versions is very fragile, it parses using Read so only
 recognises those exact enum values and if parsing fails, then parsing the
 whole .cabal file fails. We really need to make this more permissive for all
 the enumerations so that we can make changes in future.
] 
[fix import-breakage for non-GHC
Malcolm.Wallace@cs.york.ac.uk**20080228095403] 
[Document the new parameter to configure -O
Duncan Coutts <duncan@haskell.org>**20080227183000] 
[Add optional 'n' parameter to configure -O flag, ie -O0 -O1 -O2
Duncan Coutts <duncan@haskell.org>**20080227181257
 No change to the defaults.
] 
[Don't yet treat package registration files as UTF8
Duncan Coutts <duncan@haskell.org>**20080227020734
 Though we'll probably need to do so eventually because they contain many of
 the same fields as the .cabal files which are UTF8. This will need agreement
 with ghc-pkg.
] 
[Read captured process output as text
Duncan Coutts <duncan@haskell.org>**20080227020115
 So we get windows cr/lf conversion and don't need a special lines'
 implementation to deal with it. I'm guessing this is the problem that
 Satoshi Kodama encountered with ghc-6.9 on Windows.
] 
[Fix typos reported by Satoshi Kodama
Duncan Coutts <duncan@haskell.org>**20080227014735
 Not applying that patch as a whole since part of it
 needs to be done differently.
] 
[Revert some of the UTF8 changes, use UTF8 only for files we know are UTF8
Duncan Coutts <duncan@haskell.org>**20080227014549
 So we use ordinary read/writeFile for ordinary text files. For console
 output we use ordinary putStr etc and we'll just hope that haskell
 implementations catch up and deal with that sensibly. Don't assume
 captured program output is UTF8, use the default encoding.
 So we use binary mode IO along with UTF8 encoding and decoding only for 
 file types that we specify to be UTF8, which are .cabal files and
 .hs/.lhs files only.
] 
[Add liftOption for making derived command parsers
Duncan Coutts <duncan@haskell.org>**20080226200215
 liftOption :: (b -> a) -> (a -> (b -> b)) -> Option a -> Option b
 For example:
 liftOption fst (\a (_,b) -> (a,b)) :: Option a -> Option (a,b)
 Needed to be able to make a CommandUI (a, b) using an existing CommandUI a.
 That's what we want to do in cabal-install where the 'install' command
 to support all the 'configure' flags and some extra of it's own, for example
 --dry-run and probably several more in future.
] 
[GHC's package db files are actually ascii, not UTF8
Duncan Coutts <duncan@haskell.org>**20080225133255
 Because they're in Haskell Read/Show format which escapes non-ascii chars
 in Strings.
] 
[Check for invalid UTF8 when parsing .cabal files
Duncan Coutts <duncan@haskell.org>**20080225132824
 This assumes a permissive UTF8 decoder has inserted '\xfffd' as a replacement
 character. We should check strictly for errors when we decode instead, though
 it's nice to do that where we have some kind of error reporting infrastructure
 which is why I've added it to the parser for the moment. The current error
 message is not too bad, as it reports the line number.
] 
[Don't include the version number in the xsl-stylesheets path
Duncan Coutts <duncan@haskell.org>**20080225131838
 This is still shockingly platform dependent. Sigh.
] 
[Specify in the user guide that .cabal files must be valid UTF-8
Duncan Coutts <duncan@haskell.org>**20080225131756] 
[Don't warn about missing license file for public domain packages
Duncan Coutts <duncan@haskell.org>**20080225130228
 Fixes ticket #247.
 The whole concept of public domain as a license is also rather dodgy. In
 many legal jurisdictions it has no legal meaning and where it does one
 usually has to disclaim any copyright interest explicitly.
] 
[help nhc98 by hinting an import decl
Malcolm.Wallace@cs.york.ac.uk**20080225102450] 
[Switch all file read/writes and process output to use UTF8
Duncan Coutts <duncan@haskell.org>**20080224175524
 Added readTextFile and writeTextFile which use UTF8. rawSystemStdout now
 assumes the programs are producing output in UTF8 encoding.
] 
[Fix oversight in imports
Duncan Coutts <duncan@haskell.org>**20080224014631] 
[Bump version to 1.3.6
Duncan Coutts <duncan@haskell.org>**20080223184242
 Due to recent api changes
] 
[First pass at parsing .cabal files as UTF8
Duncan Coutts <duncan@haskell.org>**20080223184025
 Also print output and error messages etc in UTF8.
] 
[Make the user guide docbook xml validate
Duncan Coutts <duncan@haskell.org>**20080223183920] 
[Remove the old attic file
Duncan Coutts <duncan@haskell.org>**20080222205939] 
[Add writeFileAtomic to and use it everywhere in place of ordinary writeFile
Duncan Coutts <duncan@haskell.org>**20080222205735
 It uses the renaming trick to make the write atomic.
 Not yet tested on Windows.
] 
[Use withTempFile for the prelude file we pass to haddock
Duncan Coutts <duncan@haskell.org>**20080222205215] 
[Remove some more ghc pre-6.4 support and common up some showPackageId uses
Duncan Coutts <duncan@haskell.org>**20080222174227] 
[Import ReadP qualified and factor out parseFreeText
Duncan Coutts <duncan@haskell.org>**20080222174124] 
[Use packageId from the Package class in more places
Duncan Coutts <duncan@haskell.org>**20080222170923
 Using 'packageId' seems a bit clearer that it's just the PackageIdentifier 
 rather than 'package' which might indicate something containing more info.
 contain
] 
[Move Package class to Distribution.Package
Duncan Coutts <duncan@haskell.org>**20080222141910] 
[Export the PackageFixedDeps class
Duncan Coutts <duncan@haskell.org>**20080221204426
 and make GenericPackageDescription an instance of the Package class
] 
[Avoid a rare problem where we fail to find the haddock program
Duncan Coutts <duncan@haskell.org>**20080221204351] 
[Remove a coule unused imports
Duncan Coutts <duncan@haskell.org>**20080221204315] 
[more import/qualified name hints to help nhc98
Malcolm.Wallace@cs.york.ac.uk**20080221162700] 
[Use PackageIndex in finalisePackageDescription
Duncan Coutts <duncan@haskell.org>**20080220212741
 rather than [PackageIdentifier]
] 
[generalise remaining PackageIndex functions over class of pkgs with fixed deps
Duncan Coutts <duncan@haskell.org>**20080220195143
 Add a class for packages with fixed deps, like InstalledPackageInfo and
 generalise the few functions that used PackageIndex InstalledPackageInfo
 specifically to use PackageFixedDeps pkg => PackageIndex pkg
 This will be helpful in cabal-install for configured but not-yet-installed
 packages.
] 
[Generalise InstalledPackageIndex over all Package instances
Duncan Coutts <duncan@haskell.org>**20080220191031
 New Package class of things that can be identified by a PackageIdentifier
 so that covers at least PackageIdentifier, PackageDescription and
 InstalledPackageInfo. Most PackageIndex operations work for any package type.
] 
[Fix haddock markup
Duncan Coutts <duncan@haskell.org>**20080219132543] 
[Use the InstalledPackageIndex rather than calling ghc-pkg in Haddock module
Duncan Coutts <duncan@haskell.org>**20080219125050
 Previously we made two calls to ghc-pkg per-dependent package which starts
 to get very slow once you have 100's of installed packages and the package
 you're building depends on several of them. Now we use the cached information
 about the installed packages. Also refactored the code to generate the haddock
 package flags so we can export it and use it elsewhere more easily.
] 
[Add the InstalledPackageIndex to the LocalBuildInfo
Duncan Coutts <duncan@haskell.org>**20080219124932
 So now all the info about installed packages is available to all the
 verious build phases.
] 
[Detect broken and inconsistent package deps
Duncan Coutts <duncan@haskell.org>**20080219000139
 We now check for packages that are broken due to their dependencies having
 been unregistered. We fail and print a fairly sensible message in this case.
 We also check for inconsistent dependencies and give a warning saying which
 packages are depending on inconsistent versions of a third. This is a warning
 not an error because it does not always lead to failure. Hopefully it'll help
 people who are otherwise just running into random compile errors.
 This fixes ticket #220.
] 
[Save horazontal space in the --help output by omitting options to short flags
Duncan Coutts <duncan@haskell.org>**20080218235744
 So instead of "-f FLAGS --flags=FLAGS" we get just "-f --flags=FLAGS"
 This makes rather better use of 80 cols and means the flag descriptsion
 are not squeesed into such a narrow column.
] 
[Add warnings about missing and out-of-tree relative paths
Duncan Coutts <duncan@haskell.org>**20080218203242] 
[Eliminate use of cpp in Distribution.Compiler
Duncan Coutts <duncan@haskell.org>**20080218182338] 
[Fix: Distribution.Make's configure doesn't work on Windows.
shelarcy <shelarcy@gmail.com>**20080216062433] 
[help nhc98 to disambiguate imports
Malcolm.Wallace@cs.york.ac.uk**20080218103907] 
[Bump version to 1.3.5 due to more api changes
Duncan Coutts <duncan@haskell.org>**20080215130513] 
[Make the GHC.Makefile private
Duncan Coutts <duncan@haskell.org>**20080215130459] 
[Add InstalledPackageIndex type and use it in place of [InstalledPackageInfo]
Duncan Coutts <duncan@haskell.org>**20080215124051
 The new index module is adapted from the similar module in cabal-install but
 with renamed functions and extended to work with full InstalledPackageInfo
 rather than just PackageIdentifier. So the getInstalledPackages functions now
 return an InstalledPackageIndex.
] 
[Simplify configure code by relying on ghc >= 6.4
Duncan Coutts <duncan@haskell.org>**20080215092628
 We changed to require ghc >= 6.4 a while ago, this is just a simplification
 that was missed at the time.
] 
[Add some more common utils we'll need in a sec and make use of intercalate
Duncan Coutts <duncan@haskell.org>**20080215092443
 Have to define it locally since it only appeared in Data.List recently.
] 
[getInstalledPackages now returns full InstalledPackageInfo
Duncan Coutts <duncan@haskell.org>**20080215091536
 rather than just PackageIdentifier. This will enable us to do lots more in
 future, for example detecting inconsistent package depends, doing our
 own cpp pre-processing or module chasing.
] 
[Don't re-export Compiler from Distribution.Simple.Setup
Duncan Coutts <duncan@haskell.org>**20080213192756] 
[Add x-* extension field parsing (trac #210)
Brent Yorgey <byorgey@gmail.com>**20080212174138] 
[Moved --program-prefix and --program-suffix out of InstallDirs
phigley@gmail.com**20080212042631
 The program prefix and suffix have been moved out of InstallDirs so that InstallDirs is now all directories.  The prefix and suffix have been moved into LocalBuildInfo as stand-alone PathTemplate flags.
] 
[Allow lower-case spellings for boolean fields.
Thomas Schilling <nominolo@gmail.com>**20080211175117] 
[Add lots of new package checks
Duncan Coutts <duncan@haskell.org>**20080211162831
 Check that Setup.(l)hs exists.
 Check for ./configure file if build-type: Configure
 Check for duplicate modules in library and executables.
 Check ghc-options and cc-options for -I -l -L flags that should be elsewhere
 Check for lots of insane ghc-options that people have used in real packages.
 Check for old ghc -f flags that correspond to extensions
] 
[Document main-is behaviour with preprocessors
Duncan Coutts <duncan@haskell.org>**20080211161854] 
[Bump version to 1.3.4
Duncan Coutts <duncan@haskell.org>**20080211012054
 Various recent api changes
] 
[Move ppField(s) utils into ParseUtils module
Duncan Coutts <duncan@haskell.org>**20080211004605
 and stop exporting various internal stuff from PackageDescription.Parse
 which was previously being used by the sanity checking code.
] 
[Note the form of jhc --version output
Duncan Coutts <duncan@haskell.org>**20080211004423] 
[Unify sanity and other checks and separate IO checks
Duncan Coutts <duncan@haskell.org>**20080211003830
 And rename from QA so we no longer pretend to assure anything :-)
 We now distinguish different kinds of tests with a PackageCheck type so the
 caller gets to decide which kinds of checks are relevant to the context.
 This PackageCheck type should be extensible if we want to add more kinds or
 more info besides a brief human readable explanation.
] 
[Fix a bug where the destdir prefix got included in the prog prefix and suffix
Duncan Coutts <duncan@haskell.org>**20080208192613
 Previously all members of InstallDirs were paths so it was safe to prefix
 them all with the destdir, but now we've also got these two non-paths, so
 we have to not apply the prefix to them. Perhaps the program prefix and suffix
 should just be PathTemplates on their own and not part of InstallDirs.
 Reported by MarcWeber while hacking on Haskell packages for Nix.
] 
[Fix --package-conf= for unregister too
Duncan Coutts <duncan@haskell.org>**20080206142023] 
[fix --package-conf=<file> is correct when creating register.sh
marco-oweber@gmx.de**20080205210221] 
[Replace moduleToFilePath with findFileWithExtension
Duncan Coutts <duncan@haskell.org>**20080206014554
 moduleToFilePath encouraged bad error handling and becuase it was specific
 to module names it made it hard to treat modules and main.hs files uniformly.
 This is one step towards using the same code paths for modules and main.hs
 files so that main.hs files always work properly with pre-processors etc.
] 
[Fix up Cabal.cabal after module renaming
Duncan Coutts <duncan@haskell.org>**20080205195316] 
[Finish moving GenericPackageDescription into PackageDescription module
Duncan Coutts <duncan@haskell.org>**20080205195051
 and fix up remaing imports.
 hcOptions is back in the PackageDescription module but with a different type.
 GenericPackageDescription now derives Show as having the separate pretty
 printer is inconvenient and in any case it is incomplete.
] 
[Rearrange PackageDescription some more
Duncan Coutts <duncan@haskell.org>**20080205194341
 Previously we moved the types into Distribution.PackageDescription.Types.
 Now all the remaining utils have been removed from D.PackageDescription we
 can move D.PackageDescription.Types back to D.PackageDescription. Also move
 D.Configuration to be D.PackageDescription.Configuration and move the types
 used for GenericPackageDescription into D.PackageDescription and move the
 functions that convert GenericPackageDescription -> PackageDescription into
 the D.PackageDescription.Configuration module.
] 
[Finish moving build path functions
Duncan Coutts <duncan@haskell.org>**20080205192439] 
[Move cabalVersion, setupMessage and a bunch of paths into differnt modules
Duncan Coutts <duncan@haskell.org>**20080205190230
 New Distribution.Simple.BuildPaths module similar to the .InstallDirs module
 to hold all the paths and filenames used during a build.
 It's currently somewhat of a miscellaneous collection.
] 
[nhc98 does not have System.Posix.Internals
Malcolm.Wallace@cs.york.ac.uk**20080205120516] 
[Move PackageDescription unit tests into a dedicated module
Duncan Coutts <duncan@haskell.org>**20080204221028
 and make the unit test module build again.
 The PackageDescription module no longer needs CPP.
] 
[Split Distribution.PackageDescription into three other modules
Duncan Coutts <duncan@haskell.org>**20080204213306
 New D.PackageDescription.Types with the types and simple utils
 New D.PackageDescription.Parse module for parsing and printing functions.
 The sanity check code is moved into the existing QA module.
 The public api of Distribution.PackageDescription remains the same.
] 
[Rewrite the Makefile and build the user-guide using xsltproc like ghc does
Duncan Coutts <duncan@haskell.org>**20080204172634] 
[Fudge comment indentation in unliting to work with haddock
Duncan Coutts <duncan@haskell.org>**20080203042308
 The rule is, if we see any bird track style code then we will indent all
 comments by two spaces so that it should line up with the code. Otherwise
 we use no indentation so that it'll work with latex style literate files.
 This makes it work for takusen (once you change the '.' lines to be blank).
] 
[Tweak the ghc-options: -O -O2 messages again
Duncan Coutts <duncan@haskell.org>**20080201113121] 
[Fix haddock markup
Duncan Coutts <duncan@haskell.org>**20080131193804] 
[Improve wording of -O and -O2 QA tests.
Duncan Coutts <duncan@haskell.org>**20080131143933
 Including a typo noted by Johan Tibell.
] 
[Adjust unlit's behaviour on continuing comments
Duncan Coutts <duncan@haskell.org>**20080131142901
 This behaviour is not set in stone, there is not full agreement yet.
 The previous code was deciding wether to continue a comment based on wether
 the intervenienting lines were completely blank or had at least one space in.
 The other suggestion was to use a '.' to continue a comment line.
 Instead, this change uses a single blank line between comments to continue
 a comment and anything else terminates it with a blank line.
] 
[Use Setup.hs like everyone else does
Duncan Coutts <duncan@haskell.org>**20080131115953
 and note the issue about custom vs simple build-type for Cabal itself.
] 
[Improve the QA messages a bit, use the same style as the sanity check messages
Duncan Coutts <duncan@haskell.org>**20080131115739
 Slightly more like full sentances and using '' quotes for field names etc.
] 
[Find original sources for main-is when creating sdist
Duncan Coutts <duncan@haskell.org>**20080131114909
 Also add a package sanity check that main-is must specify a .hs or .lhs file.
 So the bahaviour is now that main-is specifies the main source file, even if
 that is generated by a pre-processor. This isn't really a change in behaviour
 since previously if you specified main-is: main.hsc then it would try to
 pass the .hsc file to ghc dirctly which would not work. For ticket #14 things
 were fixed to that it would look for main.hsc if you used main-is: main.hs an
 that file did not exist directy. This completes the other half, of actually
 being able to make a src distribution. So this should fix bug #217.
 Note that this still needs some work, we do not run platform-independent
 preprocessors and put the result into the tarball for main-is files.
 Generally, main-is has been the second class citizen compared to normal
 modules. We should try and refactor so both use the same code paths.
] 
[Eliminate now-redundant Bool flag on smartCopySources
Duncan Coutts <duncan@haskell.org>**20080131114511
 and simplfy the implementation to be a simple composition of
 findFileWithExtension' and copyFiles with some additonal error checking.
] 
[Stop using smartCopySources in SrcDist
Duncan Coutts <duncan@haskell.org>**20080131114143
 This was the old module using it in with preserveDirs = True.
 Anyway, we should be using smartCopySources for each lib and exe, we should be
 collecting all the files to copy together into one list, then eliminating
 duplicates and doing a single copyFiles operation. Yes, there can be
 duplicates because for example exes can specify the libbrary's modules or 
 even the other exe's main module as other-modules.
] 
[findPackageDesc has to return a relative path for SrcDist
Duncan Coutts <duncan@haskell.org>**20080131113726
 otherwise we fail to copy the .cabal file when into the src tree
] 
[Remove one Bool parameter to smartCopySources which was True in all uses
Duncan Coutts <duncan@haskell.org>**20080130112842
 The remaining Bool parameter is False for all uses except in SrcDirs
] 
[Remove handling for .hi-boot files, which was only needed for ghc-6.2
Duncan Coutts <duncan@haskell.org>**20080130001845
 which we have removed support for. It is not clear if we need any similar
 handling for .hs-boot files. These were also the only uses of smartCopySources
 which used exitIfNone set to False.
] 
[Remove utils testing code for functions that are being removed
Duncan Coutts <duncan@haskell.org>**20080130000848] 
[Simplify smartCopySources using findFileWithExtension' and copyFiles
Duncan Coutts <duncan@haskell.org>**20080130000129
 Previously it used moduleToFilePath2 which returns all the locations in which
 a source file is found, in different search dirs and with different extensions
 and it just collected all these locations. This is totally bogus since we do
 not want to copy multiple source files per-module, only one of them could have
 been used to be pre-processed into the final source module. This is one
 example of how almost every use of moduleToFilePath is convoluted or broken.
 This function it still used for too many different purposes, witness the two
 flags to customise its behaviour which at all call sites are constants.
] 
[Add utils functions copyFiles, findFileWithExtension, findFileWithExtension'
Duncan Coutts <duncan@haskell.org>**20080129235559
 and rewrite findFile in a similar style. These are to help simplify and
 replace the existing functions smartCopySources, moduleToFilePath and
 moduleToFilePath2.
] 
[Update testsuite for unlit changes
Duncan Coutts <duncan@haskell.org>**20071230013843
 Follow the H98 report and replace ">" with " " not "".
 Output the whitespace for blank lines rather than "".
 Adjust to changes in unlit error handling, now more explicit.
] 
[Add Alistair Bayley's unlit test suite
Duncan Coutts <duncan@haskell.org>**20071230013723] 
[Refactor unlit code to improve error and line pragma handling
Duncan Coutts <duncan@haskell.org>**20071230012530
 And to make it more like the original code that classified lines
 separately from checking and transforming them.
] 
[haddock: run unlit before cpp, like ghc does.
alistair@abayley.org**20071204211356] 
[unlit preserves comments for Haddock's benefit. More complex algorithm to handle cases where we want blank lines (containing whitespace) to become comment lines in the output.
alistair@abayley.org**20071204211550] 
[Document --program-prefix and --program-suffix
Duncan Coutts <duncan@haskell.org>**20080130205011
 and a couple other trivial tidyups
] 
[Add --program-prefix and --program-suffix options to configure (#208)
phigley@gmail.com**20080129054940] 
[Remove programatica support
Duncan Coutts <duncan@haskell.org>**20080127171629
 I doubt it works or that anyone uses it.
 If anyone genuinely does use it we can add it back in cabal-install.
] 
[Simplify findPackageDesc code, removing old checks
Duncan Coutts <duncan@haskell.org>**20080127165139
 It used to look for and warn about Setup.description files.
 That's from a very very old transition which is now complete.
 We can just ignore any files like that now.
] 
[Add configure --package-db= flag to use specific package db
Duncan Coutts <duncan@haskell.org>**20080113232536
 Should allow satisfying deps from the given package db and should register
 into that db. It is not thoroughly tested however.
] 
[fix build for Hugs and nhc98
Ross Paterson <ross@soi.city.ac.uk>**20080129005105] 
[rawSystemStdout': do hGetContents synchonously, to avoid a race condition
Simon Marlow <simonmar@microsoft.com>**20080128150644] 
[PackageDescription.hs: add check for existence of license file
Brent Yorgey <byorgey@gmail.com>**20080127031033
 Added a check for the existence of the license file (if one is
 specified in a license-file: field) during description file
 sanity checking.  If a license is specified but does not exist,
 a warning is generated.  This patch resolves issue #180.
] 
[Tweak flags error message and use monad failure rather than error
Duncan Coutts <duncan@haskell.org>**20080127001137] 
[fix for Trac #164: better error reporting for undefined flags
Brent Yorgey <byorgey@gmail.com>**20080126233057] 
[Fix warnings in Distribution.Simple.hs, clean no longer takes LocalBuildInfo
Duncan Coutts <duncan@haskell.org>**20080127000125
 Though of course we cannot yet change the UserHooks interface so that it is
 never given the LocalBuildInfo.
] 
[Delete rawSystemPathExit, use rawSystemExit
Duncan Coutts <duncan@haskell.org>**20080126235620
 There was only one use and no point since rawSystem uses the path anyway.
] 
[Remove the debian/ and debianTemplate/ files since they never get updated
Duncan Coutts <duncan@haskell.org>**20080126233914
 so they are almost certainly useless to the debian folks anyway.
] 
[Simplify default Setup.hs example
Duncan Coutts <duncan@haskell.org>**20080126233427
 make it a .hs like everyone else uses
] 
[Remove examples dir which seemed rather pointless
Duncan Coutts <duncan@haskell.org>**20080126233308] 
[Remove TODO, all remaining items were transfered into the trac (see bug #2)
Duncan Coutts <duncan@haskell.org>**20080126232936] 
[delete removePreprocessed function, it's unused except for cleaning jhc files
Duncan Coutts <duncan@haskell.org>**20080126230256
 and jhc should just be putting its generated files under dist/ anyway.
 The latter issue is filed as bug #219.
] 
[Check if dist/ exists before trying to delete it
Duncan Coutts <duncan@haskell.org>**20080126223528
 Saves printing an error message when it fails.
] 
[Rewrite rawSystemStdout to not use runInteractiveProcess with ghc
Duncan Coutts <duncan@haskell.org>**20080125175517
 So it doesn't use a temp file to capture the output.
 Since runInteractiveProcess is only available on ghc we
 use the temp file method for other implementations.
] 
[Add a Distribution.Setup module that re-exports Distribution.Simple.Setup
Duncan Coutts <duncan@haskell.org>**20070920121125
 Many Setup.hs files import Distribution.Setup so this unbreaks them.
 It's marked DEPRECATED so will generate a warning for scripts that use it.
 This patch is only going to the cabal-1.2 branch, not HEAD.
] 
[Document the fact that --user now changes the default --prefix
Duncan Coutts <duncan@haskell.org>**20080124025352
 to $HOME/.cabal on unix and on WinXP: (not sure about vista)
 C:\Documents And Settings\user\Application Data\cabal
] 
[flush stdout before running subprograms
Ross Paterson <ross@soi.city.ac.uk>**20080125102053
 
 This is needed to separate Cabal and subprogram output if stdout is
 buffered (e.g. a file), especially if stdout and stderr are the same.
] 
[Update user guide on reporting bugs and stability of cabal interfaces
Duncan Coutts <duncan@haskell.org>**20080124201250
 Fixes ticket #11. Though the section could do with a bit more detail.
 It corresponds to what's on the wiki:
 http://hackage.haskell.org/trac/hackage/wiki/StableInterfaces
] 
[Rework withTempFile code and use System.IO.openTempFile where available
Duncan Coutts <duncan@haskell.org>**20080123235847
 The System.IO.openTempFile is much better because it opens the temp files
 securely. Howver it is only available in base-2 and only of GHC. In base-3
 it is available for all implementations. So in practice that means it's only
 for GHC and we have to use our compatability implementation for hugs and
 nhc98. Not sure of the status for jhc.
] 
[bootstrapping setup does not need -cpp, all the files that need it say so.
Duncan Coutts <duncan@haskell.org>**20080123212224] 
[Replace remaining OPTIONS pragmas with LANGUAGE + OPTIONS_GHC/JHC/NHC98
Duncan Coutts <duncan@haskell.org>**20080123211923
 ghc-6.4 and above recognise the OPTIONS_GHC pragma.
 ghc-6.6 and above recognise the LANGUAGE pragma.
 Added OPTIONS_JHC and OPTIONS_NHC pragmas with equivalant flags.
] 
[Remove more {-# OPTIONS -cpp #-} where it was only used for empty hunit tests
Duncan Coutts <duncan@haskell.org>**20080123211739] 
[Remove unnecessary {-# OPTIONS -cpp #-}
Duncan Coutts <duncan@haskell.org>**20080123203454] 
[Make Data.Version parsing stricter
Duncan Coutts <duncan@haskell.org>**20080123201930
 Dissalows version strings like "1.05". It'd have to be "1.5" or "1.0.5".
 That is, leading '0's in version components are no longer allowed.
 The Version parser & pretty printer should now be exactly 1-1 and invertable.
] 
[Make the Compat/ReadP.hs cpp conditionals be opt-in rather than opt-out.
Duncan Coutts <duncan@haskell.org>**20080123201644
 Previusly everyone got the compat version, except for ghc and hugs which
 opted out. Now just nhc98 opts in.
] 
[Remove unneeded {-# OPTIONS -fglasgow-exts #-}
Duncan Coutts <duncan@haskell.org>**20080123201512] 
[Assuming ghc-6.4 or nhc-1.20 as a minimum allows us to remove much cpp cruft
Duncan Coutts <duncan@haskell.org>**20080123192258] 
[check for ghc-6.4 as minimum version supported at runtime
Duncan Coutts <duncan@haskell.org>**20080123191729] 
[Remove support for using ghc-6.2
Duncan Coutts <duncan@haskell.org>**20080122200635
 No longer inlcude compatability hacks and remove code that handles
 the old style of ghc-pkg package registration files.
] 
[Remove many Distribution.Compat modules that were only needed for ghc-6.2
Duncan Coutts <duncan@haskell.org>**20080122194317] 
[Fix warnings in Cabal
Ian Lynagh <igloo@earth.li>*-20080118191230] 
[Fixup breakage from previous changes
Duncan Coutts <duncan@haskell.org>**20080121220743] 
[Fix --with-compiler / --with-hc inconsistency in ./configure flags
Duncan Coutts <duncan@haskell.org>**20080121182948
 setup configure takes a --with-compiler option, but used to change 
 that into a --with-hc option when calling ./configure.
 Now that we've added autoconfUserHooks and deprecated defaultUserHooks we
 can fix this without breaking any existing scripts. The autoconfUserHooks
 now passes --with-compiler to ./configure and defaultUserHooks is unchanged.
 Fixes ticket #114.
] 
[Move chattyTry into Utils module
Duncan Coutts <duncan@haskell.org>**20080121171031] 
[Deprecate defaultUserHooks, export autoconfUserHooks. Fix ticket #165
Duncan Coutts <duncan@haskell.org>**20080121163411
 Setup scripts should switch to simpleUserHooks or autoconfUserHooks.
 autoconfUserHooks now fails if ./configure is not present.
 defaultUserHooks does the same thing it always did.
] 
[Remove commandAddActionWithEmptyFlags as it's redundant
Duncan Coutts <duncan@haskell.org>**20080115120129
 since you can get the same effect just by setting the command's default flags
 to empty.
] 
[Make a missing build-type a QA error
Duncan Coutts <duncan@haskell.org>**20080121003530] 
[Improve wording in sdist QA message.
Duncan Coutts <duncan@haskell.org>**20080121002148] 
[Update QA TODOs and remove unneded OPTIONS -cpp
Duncan Coutts <duncan@haskell.org>**20080121002107] 
[Move the license check from a sanity check to a QA check
Duncan Coutts <duncan@haskell.org>**20080121001722
 Also extend the check. It's now a QA error to use a license that is empty
 or AllRightsReserved. It's a warning to not specify a license file. It's an
 error for the license file to be given but not exist.
 Note that QA errors are not fatal for generating tarballs. But they will become
 fatal errors for uploading to the public hackage server. It will still be
 possible to use AllRightsReserved or another license on a private hackagedb.
] 
[Run QA when running sdist
Lennart Kolmodin <kolmodin@gentoo.org>**20080120215823
 Code written in a session with Duncan Coutts
] 
[Separate into two QA categories, and readjust levels
Lennart Kolmodin <kolmodin@gentoo.org>**20080120215549
 Much code written in a session with Duncan Coutts
] 
[Don't fail QA if no license file is set
Lennart Kolmodin <kolmodin@gentoo.org>**20080118194041] 
[Rename QA function for PackageDescription
Lennart Kolmodin <kolmodin@gentoo.org>**20080117230439] 
[Fix haddock module doc for QA
Lennart Kolmodin <kolmodin@gentoo.org>**20080117230423] 
[Implement QA for PackageDescription
Lennart Kolmodin <kolmodin@gentoo.org>**20080117223610
 Addresses #191 (QA) and #180 (QA for missing license).
 This patch only adds a new exposed module, it's not yet used anywhere.
] 
[Remove some functions that were deprecated in the last stable series
Duncan Coutts <duncan@haskell.org>**20080120130012
 So they should be safe to remove now.
] 
[Inform users of max verbosity (fixes ticket 176)
thomas.dubuisson@gmail.com*-20080113203536] 
[Ticket 176: Fix verbosity error to include the valid -v values
agl@imperialviolet.org**20071231174709
 
 Fixed:
 http://hackage.haskell.org/trac/hackage/ticket/176
 
 
] 
[Ticket 201: report IO errors during clean
agl@imperialviolet.org**20071231180516] 
[Fix warnings in Cabal
Ian Lynagh <igloo@earth.li>**20080118191230] 
[Comment out an unused binding
Ian Lynagh <igloo@earth.li>**20080116172204] 
[Inform users of max verbosity (fixes ticket 176)
thomas.dubuisson@gmail.com**20080113203536] 
[Warn if a build-type is not specified. We want all packages to use this now.
Duncan Coutts <duncan@haskell.org>**20080111023917] 
[We default configUserInstall to False so we should not set configPackageDB
Duncan Coutts <duncan@haskell.org>**20080111023733
 because we use the value of configUserInstall to set the default value for
 configPackageDB, and any value the user sets will override that.
] 
[Bump minor version number due to more minor api and behaviour changes
Duncan Coutts <duncan@haskell.org>**20080110201117] 
[Make --user --global change the default prefix
Duncan Coutts <duncan@haskell.org>**20080110193830
 Previously --user and --global didn't mean what it looks like they mean,
 instead of doing a per-user or a global installation they just meant to
 register in the per-user or global package databases (and to allow
 dependencies to be satisfied from the per-user or global db)
 With this patch --user / --global means to do a per-user or global install
 so in addition to the package db differences it also sets the default 
 installation prefix. This prefix can of course still be overridden using the
 --prefix= flag. The global prefix is as before, the default per-user prefix
 is $HOME/.cabal on Unix and on Windows it's something like:
 C:/Documents And Settings/$user/Application Data/cabal
 (using getAppUserDataDirectory "cabal"). This is the per-user prefix that
 cabal-install currently uses. We can change it if people think it's not good.
] 
[Un-deprecate configCompilerAux
Duncan Coutts <duncan@haskell.org>**20080110175148
 but make it do something sensible with the ProgramConfiguration
] 
[Export the Flag constructors
Duncan Coutts <duncan@haskell.org>**20080110175123] 
[Allow symbol characters (e.g '+') in the components of a build-tool name
David Waern <davve@dtek.chalmers.se>**20080108211218] 
[Set dynlibdir to $libdir per default.
Clemens Fruhwirth <clemens@endorphin.org>**20071228183604] 
[Use os(windows) not os(win32) in user guide configurations example
Duncan Coutts <duncan@haskell.org>**20071228125735
 Spotted by Spencer Janssen
] 
[Use getTemporaryDirectory from Distribution.Compat.Direcotry
Duncan Coutts <duncan@haskell.org>**20071228125530
 for compatability with ghc-6.2.2
] 
[Fix haddock parse error ($prefix -> \$prefix)
Clemens Fruhwirth <clemens@endorphin.org>**20071227124051] 
[Rejig --list-options handling so it takes priority
Duncan Coutts <duncan@haskell.org>**20071218191636
 --list-options no takes priority over errors in other flags and over --help
 this is so that it can be used consistently for command completion without
 returning garbage (ie error messages on ill formed partial command lines
 or producing --help output). Also make --list-options list all the common
 options appart from itself, so that's just --help at the moment.
] 
[Export flagToList for cabal-install to use
Duncan Coutts <duncan@haskell.org>**20071217185359] 
[Support command completion in the Make module
Duncan Coutts <duncan@haskell.org>**20071217185328] 
[Add correct^H^H^H^H British English spelling of optimisation
Duncan Coutts <duncan@haskell.org>**20071217133533
 For the --enable/disable-optimi(z|s)ation flag, allow the British English
 spelling of the flags as an alias. The current one is still the one
 displayed, and it does not list bith in the --help text, though the command
 completion would list both.
 Perhaps the default should be on the basis of the current locale :-).
] 
[Add --list-options flag, should be useful for shell command line completion
Duncan Coutts <duncan@haskell.org>**20071217132048
 It applies at the top level in which case it lists the global flags and
 the sub-commands. It applies for each sub-command in which case it lists
 the sub-command's available flags.
] 
[Make all command line flags and flag collection types monoids
Duncan Coutts <duncan@haskell.org>**20071215193650
 And specify command flags in a way that allows converting from or two strings.
 So not only can we parse command lines into the various flag types, we can
 convert back. This is crucial in cabal-install so that we can call Setup.hs
 scripts with all the various args, and override certain flags in a typed way
 rather than just representing them all as strings.
] 
[Export Command constructor so cabal-install can make derived commands
Duncan Coutts <duncan@haskell.org>**20071208192401
 Also move commandHelp out of the structure into a helper function. Change
 the type of commandOptions so it doesn't include the CommonFlag. Instead,
 add those in whenever necessary. This makes deriving commands easier.
 Also fix docs.
] 
[Replace lots of configBlahDir fields with just one InstallDirs
Duncan Coutts <duncan@haskell.org>**20071208182620
 So instead of 10 fields like this:
 configPrefix   :: Maybe FilePath,
 ...
 we have just one compound one:
 configInstallDirs   :: InstallDirs (Maybe FilePath)
 Now that LocalBuildInfo and cabal-install's config use InstallDirs it makes
 converting a lot easier since we can use fmap and combineInstallDirs.
 This should also be easier to maintain as it has significantly reduced the
 number of places in the code you have to change when you add/change a dir.
] 
[Merge InstallDirTemplates into InstallDirs
Duncan Coutts <duncan@haskell.org>**20071208182334
 This simplifies things and makes it a bit more versatile since
 we can use things like InstallDirs (Maybe PathTemplate).
] 
[Bump version number as we've made api changes
Duncan Coutts <duncan@haskell.org>**20071215194028] 
[Make fromPathTemplate not drop vars
Duncan Coutts <duncan@haskell.org>**20071215193943
 It's useful to be able to convert String <-> PathTeplate without loosing info.
] 
[Don't supress warnings, fix uncovered warnings
Duncan Coutts <duncan@haskell.org>**20071208191939] 
[Move CopyDest from Setup to InstallDirs module
Duncan Coutts <duncan@haskell.org>**20071208170913
 It's a better place to put it and it allows Setup to use InstallDirs later
] 
[Add more to the user guide intro trying to explain the scope and use model
Duncan Coutts <duncan@haskell.org>**20071208161402] 
[Fix haddock markup
Duncan Coutts <duncan@haskell.org>**20071207162314] 
[Rename interfacedir to haddockdir
Duncan Coutts <duncan@haskell.org>**20071207142824
 Since it really only refers to haddock interfaces, so interface is too
 general a term. Cannot push to 1.2 branch as it changes the api.
] 
[Add mandir support to InstallDirs
Duncan Coutts <duncan@haskell.org>**20071207141839
 It's not used by Cabal at all but some packages want to install man pages
 and this should make it easier for them to figure out where to install them.
 In particular c2hs and lhs2tex have man pages.
] 
[Fix hscolour code so it only outputs the css once per-lib or exe
Duncan Coutts <duncan@haskell.org>**20071207130309
 Rather than for every module in the lib. Tidy the code up a little too.
] 
[First go at supporting ghc-6.9's ghc-pkg list --simple-output
Duncan Coutts <duncan@haskell.org>**20071207123107
 We used to have to parse the human readable output from ghc-pkg list because
 previously it was not possible to specify which package dbs to query.
 Now the behaviour is that you specify exactly which dbs you want and you
 only get those packages listed. For example ghc-pkg list --global lists only
 packages from the global db. So we now use:
 ghc-pkg list --simple-output --global
 ghc-pkg list --simple-output --global --user
] 
[Note what form of string we get from invoking hmake --version
Duncan Coutts <duncan@haskell.org>**20071207122829] 
[Add -framework arguments when linking executables.
judah.jacobson@gmail.com**20071210174056] 
[Support --hyperlink-source for Haddock >= 2.0
David Waern <davve@dtek.chalmers.se>**20071209180555] 
[Use a default HsColour CSS if available
Duncan Coutts <duncan@haskell.org>**20071206145937
 Supported in HsColour 1.9 and later
] 
[export ccLdOptionsBuildInfo helper function
Duncan Coutts <duncan@haskell.org>**20071205194146
 Useful in Setup.hs scripts for things like HSQL that need to
 find CC and LD flags by calling foo-config style programs.
 The same function is used internally for pkg-config support.
] 
[make rawSystemStdout put its temp files in the temp dir rather than cwd
Duncan Coutts <duncan@haskell.org>**20071202220620
 Should fixe reported wierdness with finding program version numbers
] 
[The NHC module now uses cpp
Duncan Coutts <duncan@haskell.org>**20071129124745] 
[Rename defaultMain__ to defaultMainHelper
Duncan Coutts <duncan@haskell.org>**20071121203604
 It was a silly name.
] 
[Bump development version number due to api change
Duncan Coutts <duncan@haskell.org>**20071120164121
 Since we've changed the exports of the Setup module significantly.
 However since this is a dev series I don't think it makes sense to
 bump the major version number as in the PVP, or we'd end up doing
 it all the time in a development series.
] 
[Remove unused code in Setup module
Duncan Coutts <duncan@haskell.org>**20071120163922
 This changes the API so cannot be pushed to the 1.2 branch.
] 
[Use the new Command stuff for Distribution.Simple
Duncan Coutts <duncan@haskell.org>**20071120161816] 
[Use the new Command stuff for Distribution.Make
Duncan Coutts <duncan@haskell.org>**20071120161605] 
[Stop using deprecated setup code in SetupWrapper
Duncan Coutts <duncan@haskell.org>**20071120161435] 
[Add Command module to exposed-modules
Duncan Coutts <duncan@haskell.org>**20071116145234] 
[Add new Command abstraction for handling command line args
Duncan Coutts <duncan@haskell.org>**20071116141225
 Add instances of it for all existing Cabal commands.
 This should makes command line handling more regular and hopefully make it
 easier to override or make derived commands in cabal-install.
 So far we're only adding code, not modifying existing stuff except renaming
 some existing internal functions so they do not clash with the new code.
] 
[Add emptyPFEFlags and emptySDistFlags for consistency
Duncan Coutts <duncan@haskell.org>**20071116135625] 
[Simplify parameters to defaultMain__
Duncan Coutts <duncan@haskell.org>**20071116132323
 Don't use maybe, just have the callers pass the defaults instead.
 Eliminate the Maybe PackageDescription parameter and instead just have
 the called override the readDesc in the UserHooks.
 This simplifies defaultMainWorker too as it can always just use readDesc.
] 
[Make scratchdir into a proper configure flag
Duncan Coutts <duncan@haskell.org>**20071116131604
 rather than using the flag extension mechanism.
 It was the old flag using it and I'm about to replace that whole system.
] 
[Refactor: move UserHooks into it's own module
Duncan Coutts <duncan@haskell.org>**20071114150659] 
[Tidy up args in the pfe, clean, haddock and hscolour default hooks
Duncan Coutts <duncan@haskell.org>**20071114150131
 Don't pass unnecessary args and inline trivial definitions
] 
[Partial implementation of installing for nhc98
Duncan Coutts <duncan@haskell.org>**20071127174132
 Doesn't install into the right place by default yet.
] 
[Library archive creation for nhc98
Duncan Coutts <duncan@haskell.org>**20071127174017
 So far only for vanilla not profiling libs.
] 
[Escape some special characters
Ian Lynagh <igloo@earth.li>**20071126163253] 
[Fix a broken link
Ian Lynagh <igloo@earth.li>**20071126163137] 
[Escape some special characters in the haddock docs
Ian Lynagh <igloo@earth.li>**20071126155145] 
[Fix what looks like a doc braino
Ian Lynagh <igloo@earth.li>**20071126154824] 
[Put nhc98 .hi files in the target dir rather than the src dir
Duncan Coutts <duncan@haskell.org>**20071127003800
 So they end up next to the .o files under dist/ just like for ghc.
] 
[Workaround import bug in nhc98
Duncan Coutts <duncan@haskell.org>**20071123210009
 Cabal can now build using itself and nhc98
] 
[Add support for building libs and exes with nhc98 via hmake
Duncan Coutts <duncan@haskell.org>**20071123205750
 Doesn't do installation yet or check for existence of dependent packages.
] 
[FIX BUILD with GHC 6.2: getTemporaryDirectory wasn't available
Simon Marlow <simonmar@microsoft.com>**20071123093121] 
[Do proper pre-processing for Haddock 2
David Waern <davve@dtek.chalmers.se>**20071109162557
 Besides pre-processing, this patch adds include paths and output paths
 to the ghc flags passed to Hadddock.
] 
[Import changelog changes from the 1.2 branch
Duncan Coutts <duncan@haskell.org>**20071116145738] 
[Export PreProcessor constructor and mkSimplePreProcessor
Duncan Coutts <duncan@haskell.org>**20071116145327
 Otherwise it is impossible to declare new pre-processors in Setup.hs files
] 
[Fix finding ghc's ld.exe on windows.
Duncan Coutts <duncan@haskell.org>**20071120101110
 It looks like it had worked but the ld -x test broke that too. Grr.
] 
[Fix configure --interfacedir=
Duncan Coutts <duncan@haskell.org>**20071114191550
 bug #178
] 
[Fix haddock interface file location used when registering inplace packages
Ian Lynagh <igloo@earth.li>**20071110171424
 This fixes inter-package doc links when building GHC.
] 
[Add extensions that ghc-6.6 supports
Duncan Coutts <duncan@haskell.org>**20071109142250] 
[The extension is NoMonoPatBinds not MonoPatBinds
Duncan Coutts <duncan@haskell.org>**20071109142217] 
[Add language extensions introduced in GHC 6.8
Duncan Coutts <duncan@haskell.org>**20071108185612] 
[Make the ld -x test use the temp dir rather than dist dir
Duncan Coutts <duncan@haskell.org>**20071108141349
 Should fix cabal-install.
] 
[fix compilation with GHC 6.2.x
Simon Marlow <simonmar@microsoft.com>**20071105113004] 
[Install the haddock interface file to the right place
Ian Lynagh <igloo@earth.li>**20071030170254] 
[Add an interfacedir configure flag, for where to put haddock insterface files
Ian Lynagh <igloo@earth.li>**20071029174908] 
[put the binary-dist copy in the right place
Simon Marlow <simonmar@microsoft.com>**20071026132515] 
[fix $(TOP)
Simon Marlow <simonmar@microsoft.com>**20071026101915] 
[fix XML (at least, makes it work here)
Simon Marlow <simonmar@microsoft.com>**20071026101907] 
[no longer need to pass --allow-missing-html to haddock
Ross Paterson <ross@soi.city.ac.uk>**20071026084124
 
 This option only affects Haddock if it is invoked with --use-package,
 and Cabal no longer uses that option, as it now gets the arguments for
 --read-interface from ghc-pkg directly (cf patch "rejig location of
 package interfaces for haddock").
] 
[no longer need to pass --ghc-pkg to haddock
Ross Paterson <ross@soi.city.ac.uk>**20071026073126
 
 Haddock only runs ghc-pkg if invoked with --use-package, and Cabal no
 longer uses that option, as it now gets the arguments for --read-interface
 from ghc-pkg directly (cf patch "rejig location of package interfaces
 for haddock").
] 
[fix help text (--PROG-arg is now --PROG-option)
Ross Paterson <ross@soi.city.ac.uk>**20071026001045] 
[Fix a bug in the Unlit pre-processor
David Waern <davve@dtek.chalmers.se>**20071024181908
 With this patch, unlit can handle line pragmas with filenames that contain
 spaces.
] 
[Adjust verbosity of a step in configure
Duncan Coutts <duncan@haskell.org>**20071024160758] 
[Compile a .c rather than a .hs file to make a .o file in ld -x configure test
Duncan Coutts <duncan@haskell.org>**20071024150505
 Since when bootstrapping ghc we're not in any position to compile .hs files
 that easily.
] 
[Create the dist/ dir early in the configuration process
Duncan Coutts <duncan@haskell.org>**20071024133554] 
[Create temp files in dist, since it is now guaranteed to exist
Duncan Coutts <duncan@haskell.org>**20071024102850] 
[Regenerate GHC/Makefile.hs from GHC/Makefile.in
Duncan Coutts <duncan@haskell.org>**20071023183804] 
[Only use ld -x on systems where ld supports that.
Duncan Coutts <duncan@haskell.org>**20071023183738
 Hopefully this fixes it for both ordinary builds and via ghc makefiles.
] 
[pass cpp-options to cpphs
Ross Paterson <ross@soi.city.ac.uk>**20071023184210] 
[Refuse to run any commands if the .cabal has been modified
Simon Marlow <simonmar@microsoft.com>**20071023093111
 See GHC bug #1372
 This is a consistency check, intended to prevent this class of build
 failures:
 
    * Package P is updated, its version number is bumped, the
      new version is compiled and installed.
 
    * Package Q depends on P.  Q is modified to use the new P, and Q's
      .cabal file is updated with changes to the build-depends field to
      depend on the new version of P.
 
    * The user has an old build of Q.  They pull the changes to Q and
      'setup build' without cleaning or re-configuring.  Build errors
      ensue, because the code of Q depends on changes to P's API, and
      we're still building against the old P.
 
 Note that you can't get segfaults this way, only build errors.
 
 This also relies on some new consistency checking in GHC 6.8 to work
 properly.  If the user re-configures their Q build and then issues
 'setup build' without cleaning, GHC must now realise that the package
 flags have changed, and re-compile all the affected Q modules.  GHC
 6.6 would not do this, but 6.8 does.
] 
[Add support for Haddock 2.0
David Waern <davve@dtek.chalmers.se>**20071021231415] 
[Be explicit about the base version dependency
Duncan Coutts <duncan@haskell.org>**20071023122417
 don't just leave it up to the default search order
] 
[typo in comment
Ross Paterson <ross@soi.city.ac.uk>**20071022091235] 
[Correct the spelling of mingw32 in os alias list
Duncan Coutts <duncan@haskell.org>**20071018195641
 Doh!
] 
[refinement of fix for #1785: don't use xargs' -s option at all
Simon Marlow <simonmar@microsoft.com>**20071019124522] 
[FIX GHC bug #1785: use 2048 as the maximum command-line size
Simon Marlow <simonmar@microsoft.com>**20071018140500
 Apparently Solaris sets a limit of 2048 here
] 
[don't fail if xxx_hsc_make.c is gone
Ross Paterson <ross@soi.city.ac.uk>**20071018164245
 
 The non-GHC hsc2hs deletes it even if the compilation fails.
] 
[Use cpp-options rather than abusing ghc-options
Duncan Coutts <duncan@haskell.org>**20071017164914] 
[Add a "cpp-options:" field and use it for pre-processing .hs .hsc .chs files
Duncan Coutts <duncan@haskell.org>**20071017164747
 This is for pre-processing Haskell modules, not for C code. We already have
 cc-options for that purpose. Up 'til now people have been abusing ghc-options
 for this purpose. Even Cabal itself was guilty of doing that.
] 
[Figure out if hsc2hs is using gcc or ghc as it's C compiler
Duncan Coutts <duncan@haskell.org>**20071017143108
 and pass the appropriate flags on the basis of knowing that.
 This is a hack.
 What we should do longer term is make hsc2hs always use gcc as it's C compiler
 and have Cabal figure out the right flags to pass it, rather than using ghc
 to pass on the appropriate flags to gcc.
] 
[Change the handling of cpp & ghc flags for hsc2hs
Duncan Coutts <duncan@haskell.org>**20071016231652
 The hsc2hs that comes with ghc uses ghc as the C compiler. This means we must
 escape the real cc flags. It also means we can ask ghc to add extra include
 dirs that we might need to find includes of dependent packages. This is a bit
 of a hack. In the longer term it'd be better for Cabal to collect the include
 dirs and cc options of dependent packages and to pass them explicitly itself.
] 
[Improve error messages for failed sanity checks.
Thomas Schilling <nominolo@gmail.com>**20070925144955] 
[Translate flat files into sectionized files, by duplicating global
Thomas Schilling <nominolo@gmail.com>**20070925144921
 dependecies into each non-empty section.  The previous solution dumped
 them into the library section, even if it would have been empty
 otherwise.
] 
[Move ghcVerbosity function into GHC module to share code
Duncan Coutts <duncan@haskell.org>**20071014165730] 
[Note current development version number in release notes
Duncan Coutts <duncan@haskell.org>**20071012121835] 
[Update the TODO list, mostly removing things.
Duncan Coutts <duncan@haskell.org>**20071012121702
 Most of these are duplicated by Trac bugs.
 We should try and get rid of this TODO file completely and just use Trac.
] 
[Add logging functions notice, info, debug functions and use them consistently
Duncan Coutts <duncan@haskell.org>**20071012113237
 We previously had this kind of code all over the place:
 > when (verbosity >= verbose)
 >      (putStrLn "some message")
 We now replace that with:
 > info verbosity "some message"
 Much nicer.
] 
[When parsing ghc-pkg output, only look at the first package.conf file for GlobalPackageDB and SpecificPackageDB, and all package.conf files for UserPackageDB.
bjorn@bringert.net**20071016095254
 Before, we would consider user packages when fulfilling dependencies
 for global installs. ghc-pkg will refuse to install packages globally if they
 use user packages. Thus, without this patch, global installs can fail when you have user packages installed.
] 
[Pass -c (silent create) to ar when verbosity < normal.
bjorn@bringert.net**20071013220906] 
[Change --verbosity= option of SetupWrapper (cabal-setup) to --verbose=, since that is what the rest of Cabal uses.
bjorn@bringert.net**20071013215617] 
[Pass -w -v0 to ghc when compiling Setup.{lhs,hs} in SetupWrapper when verbosity == silent.
bjorn@bringert.net**20071013214820] 
[Update documentation on configurations
Duncan Coutts <duncan@haskell.org>**20071012015338
 Describe the new syntax and make variuous changes to the
 description of the meaning.
] 
[Use -O2 for compiling .c files when we configure --enable-optimization
Duncan Coutts <duncan@haskell.org>**20071011223607
 Seems a reasonable default behaviour.
] 
[parameterise InstalledPackageInfo over the type of module names
Simon Marlow <simonmar@microsoft.com>**20071003114947
 This is useful in GHC, we can instantiate InstalledPackageInfo to
 ModuleName and avoid lots of String<->FastString conversions.
] 
[Remove commented-out code. 
bjorn@bringert.net**20071006083615
 Push to 1.2.
] 
[Rename parseDescription to parsePackageDescription.
bjorn@bringert.net**20071006083354
 This should be pushed to cabal-1.2 to make cabal-install work with 1.2.
] 
[Bump version number to 1.3
bjorn@bringert.net**20071005105412] 
[Expose parseDescription.
bjorn@bringert.net**20071005104554] 
[Fix GenericPrackageDescription pretty printing to make it parsable. It still does not include all information.
bjorn@bringert.net**20071005102555] 
[Haddock comment for the available dependencies argument to finalizePackageDescription.
bjorn@bringert.net**20071004134544] 
[Add extra-libs to shared library linking
Clemens Fruhwirth <clemens@endorphin.org>**20070927123923] 
[Actually -stubdir only works well in ghc-6.8 due to -I search dir mess
Duncan Coutts <duncan@haskell.org>**20070926131843
 In ghc-6.6 the Foo/Bar.hc files only #include "Bar_stub.h" rather than
 #include "Foo/Bar_stub.h". This means when we set the stubdir so that the
 _stub.h files don't sit next to the .hs file then the include search path
 is not right to find the _stub.h file. In ghc-6.8 this is fixed so that
 it adds the -stubdir path to the include search path when calling gcc.
] 
[The -stubdir flag is supported in ghc-6.6 not just 6.6.1
Duncan Coutts <duncan@haskell.org>**20070926114223] 
[Add -package-name to GHC invocation when linking DSOs
Clemens Fruhwirth <clemens@endorphin.org>**20070926090025] 
[Be more fuzzy with os, arch and impl matching in conditions. Fixes bug #158.
Duncan Coutts <duncan@haskell.org>**20070925132608
 Do all the comparisons case insensitively and add some OS aliases so that
 if os(windows)  works if the System.Info.os is actually "mingw32".
] 
[Don't generate links when dependent docs not installed. Fixes bug #157.
Duncan Coutts <duncan@haskell.org>**20070924142520
 Generates a warning rather than failing as before.
] 
[Fix warnings
Ian Lynagh <igloo@earth.li>**20070923122921] 
[Fix pre-processing for executables
Duncan Coutts <duncan@haskell.org>**20070922105414
 The pre-processed files should go into the exe's build dir, not the
 lib's build dir. Also pre-process main modules, fixing bug #14.
] 
[Add a boring file
Ian Lynagh <igloo@earth.li>**20070913203550] 
[Remove some now-unecessary cleaning that causes problems for haskell-src
Ian Lynagh <igloo@earth.li>**20070920203257
 The code that removes .hs files in the source tree generated from .y files
 had a comment:
     XXX: This is actually no longer necessary, but we keep it, so that
     clean works correctly on packages built with an older version of Cabal
 This was causing problems for source distributions that include such
 generated files (including haskell-src in extralibs).
] 
[Move expensive conviguration actions inside branch where they're used
Duncan Coutts <duncan@haskell.org>**20070917085834
 We only need to configure the compiler and resolve any "Cabal-Version:"
 dependency when we're actually going to compile the Setup.hs program.
 We can otherwise save time by not calling ghc and ghc-pkg unnecessarily.
 (I only noticed this because I've got >150 registered packages which
 causes ghc and ghc-pkg to be very slow to start.)
] 
[Note in .cabal file that we're using a custom build-type
Duncan Coutts <duncan@haskell.org>**20070917033959] 
[Pass on all the cabal-setup options to cabal, not just unrecognised ones
Duncan Coutts <duncan@haskell.org>**20070917025121
 So for example -v and -w get passed on rather than swallowed by cabal-setup
 itself.
] 
[Put setup program and setup .o/.hi files into dist/setup
Duncan Coutts <duncan@haskell.org>**20070917024907
 That way they get cleaned automatically and do not clutter the top dir.
] 
[Correct the verbosity range in the "--help" text
Duncan Coutts <duncan@haskell.org>**20070917024416
 The correct range in 0--3, not 0--2 or 0--5
] 
[look in odir for source and .hs files, not buildDir lbi
Duncan Coutts <duncan@haskell.org>**20070917145030
 odir = buildDir lbi for the lib case, which is why it worked most of the time
 in testing but in the exe case it's a different dir.
] 
[Put _stub.{c|h} files under dist/ so they'll get cleaned. Fixes bug #154.
Duncan Coutts <duncan@haskell.org>**20070917123042
 Only used with ghc-6.6 and later which supports the -stubdir flag.
 With earlier ghc versions the files still end up in the src dirs and so do not
 get cleaned.
] 
[Fix haddockDir
Ian Lynagh <igloo@earth.li>**20070912133051] 
[Add htmlDirTemplate to inplaceDirs
Ian Lynagh <igloo@earth.li>**20070912125749] 
[Add a --htmldir flag
Ian Lynagh <igloo@earth.li>**20070912122145] 
[Don't forcibly append "pkgName (package pkg_descr)" to htmldir
Ian Lynagh <igloo@earth.li>**20070911192814] 
[TAG 2007-09-06
Ian Lynagh <igloo@earth.li>**20070906212150] 
[use OPTIONS instead of OPTIONS_GHC for now, the latter doesn't work with GHC 6.2.x
Simon Marlow <simonmar@microsoft.com>**20070912105243] 
[Don't create empty data dirs. Fixes bug #153.
Duncan Coutts <duncan@haskell.org>**20070912113803
 Patch contributed by Sven Panne.
] 
[Use confgurations to help build Cabal for ghc-6.2.x
Duncan Coutts <duncan@haskell.org>**20070912112934
 Replacing a long-standing comment telling people how to do it manually.
] 
[warning police
Simon Marlow <simonmar@microsoft.com>**20070907140731] 
[Update D.S.GHC/Makefile.hs
Clemens Fruhwirth <clemens@endorphin.org>**20070906213507] 
[Add shared library building to GHC module (also via Makefile)
Clemens Fruhwirth <clemens@endorphin.org>**20070906213132] 
[fix type clash: Data.Version -> Distribution.Version
Malcolm.Wallace@cs.york.ac.uk**20070906163051] 
[fix broken #ifdefs for nhc98
Malcolm.Wallace@cs.york.ac.uk**20070906161553] 
[spell nhc98-options correctly
Malcolm.Wallace@cs.york.ac.uk**20070906150411] 
[Fix various mispellings of nhc98.
Malcolm.Wallace@cs.york.ac.uk**20070906143959] 
[nhc-options should be spelled nhc98-options
Malcolm.Wallace@cs.york.ac.uk**20070906143536] 
[TAG 1.2.0
Duncan Coutts <duncan@haskell.org>**20070906121830] 
Patch bundle hash:
e0682ecdcaef4dc522cb06f42dd1b4e2447d7d92
