Thu May 28 01:02:39 BST 2009  Max Bolingbroke <batterseapower@hotmail.com>
  * Rather ugly patch to add 'cabal interactive' support

New patches:

[Rather ugly patch to add 'cabal interactive' support
Max Bolingbroke <batterseapower@hotmail.com>**20090528000239] {
hunk ./Distribution/PackageDescription.hs 62
-        withLib,
+        withLib, withLib_,
hunk ./Distribution/PackageDescription.hs 69
-        withExe,
+        withExe, withExe_,
hunk ./Distribution/PackageDescription.hs 258
-withLib :: PackageDescription -> (Library -> IO ()) -> IO ()
-withLib pkg_descr f =
-   maybe (return ()) f (maybeHasLibs pkg_descr)
+withLib :: PackageDescription -> a -> (Library -> IO a) -> IO a
+withLib pkg_descr def f =
+   maybe (return def) f (maybeHasLibs pkg_descr)
+
+withLib_ :: PackageDescription -> (Library -> IO ()) -> IO ()
+withLib_ pkg_descr f = withLib pkg_descr () f >> return ()
hunk ./Distribution/PackageDescription.hs 308
-withExe :: PackageDescription -> (Executable -> IO ()) -> IO ()
+withExe :: PackageDescription -> (Executable -> IO a) -> IO [a]
hunk ./Distribution/PackageDescription.hs 310
-  sequence_ [f exe | exe <- executables pkg_descr, buildable (buildInfo exe)]
+  sequence [f exe | exe <- executables pkg_descr, buildable (buildInfo exe)]
+
+withExe_ :: PackageDescription -> (Executable -> IO a) -> IO ()
+withExe_ pkg_descr f = withExe pkg_descr f >> return ()
hunk ./Distribution/Simple/Build.hs 50
+    interactive,
hunk ./Distribution/Simple/Build.hs 71
-         , Library(..), withLib, Executable(..), withExe )
+         , Library(..), withLib_, Executable(..), withExe_ )
hunk ./Distribution/Simple/Build.hs 75
-         ( BuildFlags(..), fromFlag )
+         ( BuildFlags(..), InteractiveFlags(..), fromFlag )
hunk ./Distribution/Simple/Build.hs 113
-  withLib pkg_descr $ \lib -> do
+  withLib_ pkg_descr $ \lib -> do
hunk ./Distribution/Simple/Build.hs 118
-  withExe pkg_descr $ \exe -> do
+  withExe_ pkg_descr $ \exe -> do
hunk ./Distribution/Simple/Build.hs 145
+interactive :: PackageDescription  -- ^mostly information from the .cabal file
+            -> LocalBuildInfo -- ^Configuration information
+            -> InteractiveFlags -- ^Flags that the user passed to interactive
+            -> [ PPSuffixHandler ] -- ^preprocessors to run before compiling
+            -> IO ()
+interactive pkg_descr lbi flags suffixes = do
+  let distPref  = fromFlag (interactiveDistPref flags)
+      verbosity = fromFlag (interactiveVerbosity flags)
+  initialBuildSteps distPref pkg_descr lbi verbosity suffixes
+  setupMessage verbosity "Entering interactive mode" (packageId pkg_descr)
+  case compilerFlavor (compiler lbi) of
+    GHC  -> GHC.interactive  pkg_descr lbi flags
+    _    -> die ("The interactive prompt is not supported for this compiler.")
+
hunk ./Distribution/Simple/GHC.hs 67
+        interactive,
hunk ./Distribution/Simple/GHC.hs 75
-         ( CopyFlags(..), fromFlag )
+         ( CopyFlags(..), InteractiveFlags(..), fromFlag )
hunk ./Distribution/Simple/GHC.hs 77
-         ( PackageDescription(..), BuildInfo(..), Executable(..), withExe
-         , Library(..), libModules, hcOptions )
+         ( PackageDescription(..), BuildInfo(..)
+         , Executable(..), hasExes, withExe, withExe_
+         , Library(..), hasLibs, withLib, libModules, hcOptions )
hunk ./Distribution/Simple/GHC.hs 666
+          ++ ["--make"]
hunk ./Distribution/Simple/GHC.hs 703
-    filterHcOptions p hcoptss =
-      [ (hc, if hc == GHC then filter p opts else opts)
-      | (hc, opts) <- hcoptss ]
+
+-- | Filter the "-prof" flag when using GHCi
+hackProfFlagForGhci :: Verbosity -> BuildInfo -> IO BuildInfo
+hackProfFlagForGhci verbosity bi
+  | not ("-prof" `elem` hcOptions GHC bi) = return bi
+  | otherwise = do
+    warn verbosity $ "The ghc flag '-prof' is not compatible with GHCi. It will be disabled."
+    return bi { options = filterHcOptions (/= "-prof") (options bi) }
+
+filterHcOptions :: (a -> Bool) -> [(CompilerFlavor, [a])] -> [(CompilerFlavor, [a])]
+filterHcOptions p hcoptss =
+  [ (hc, if hc == GHC then filter p opts else opts)
+  | (hc, opts) <- hcoptss ]
hunk ./Distribution/Simple/GHC.hs 744
-        ["--make"]
-     ++ ghcVerbosityOptions verbosity
+        ghcVerbosityOptions verbosity
hunk ./Distribution/Simple/GHC.hs 817
+-- -----------------------------------------------------------------------------
+-- Interactive
+
+-- |Interactive prompt for GHC.
+interactive :: PackageDescription -> LocalBuildInfo -> InteractiveFlags -> IO ()
+interactive pkg_descr lbi flags = do
+  let verbosity = fromFlag (interactiveVerbosity flags)
+      pref = buildDir lbi
+      pkgid = packageId pkg_descr
+      runGhcProg = rawSystemProgramConf verbosity ghcProgram (withPrograms lbi)
+      
+      -- Prepare lib
+      prepareLib lib = do
+          info verbosity "Preparing library..."
+          
+          let Just clbi = libraryConfig lbi
+          libBi <- hackProfFlagForGhci verbosity (libBuildInfo lib)
+          
+          let libTargetDir = pref
+          createDirectoryIfMissingVerbose verbosity True libTargetDir
+          -- TODO: do we need to put hs-boot files into place for mutually recurive modules?
+          
+          let args = ["-package-name", display pkgid ]
+                  ++ constructGHCCmdLine lbi libBi clbi libTargetDir verbosity
+          return (map display (exposedModules lib), args)
+      
+      -- Prepare executable
+      prepareExe exe@Executable { exeName = exeName', modulePath = modPath } = do
+          info verbosity $ "Preparing executable: " ++ exeName' ++ "..."
+          
+          let Just clbi = lookup exeName' (executableConfigs lbi)
+          exeBi <- hackProfFlagForGhci verbosity (buildInfo exe)
+          
+          let targetDir = pref </> exeName'
+          let exeDir    = targetDir </> (exeName' ++ "-tmp")
+          createDirectoryIfMissingVerbose verbosity True targetDir
+          createDirectoryIfMissingVerbose verbosity True exeDir
+          -- TODO: do we need to put hs-boot files into place for mutually recursive modules?
+          -- FIX: what about exeName.hi-boot?
+          
+          -- build executables
+          unless (null (cSources exeBi)) $ do
+           info verbosity "Building C Sources."
+           sequence_ [do let (odir,args) = constructCcCmdLine lbi exeBi clbi
+                                                  exeDir filename verbosity
+                         createDirectoryIfMissingVerbose verbosity True odir
+                         runGhcProg args
+                     | filename <- cSources exeBi]
+          
+          srcMainFile <- findFile (exeDir : hsSourceDirs exeBi) modPath
+          
+          let cObjs = map (`replaceExtension` objExtension) (cSources exeBi)
+              args = constructGHCCmdLine lbi exeBi clbi exeDir verbosity
+                  ++ [exeDir </> x | x <- cObjs]
+                  ++ ["-optl" ++ opt | opt <- PD.ldOptions exeBi]
+                  ++ ["-l"++lib | lib <- extraLibs exeBi]
+                  ++ ["-L"++libDir | libDir <- extraLibDirs exeBi]
+                  ++ concat [["-framework", f] | f <- PD.frameworks exeBi]
+          return ([srcMainFile], args)
+      
+      prepareExes = do
+          (defaults, argss) <- fmap unzip $ withExe pkg_descr prepareExe
+          return (concat defaults, concat argss)
+      
+  -- Work out the actual module names that we are going to pass to GHCi.
+  -- In particular, if we didn't get any module names at all we need to infer some.
+  let moduleNms = interactiveModules flags
+  (toLoad, allArguments) <- case moduleNms of
+      [] -- Default to the first EXE, if available - otherwise use the exposed modules of the library
+         | hasExes pkg_descr -> prepareExes
+         | hasLibs pkg_descr -> withLib pkg_descr ([], []) prepareLib
+         | otherwise         -> die $ "No suitable target for execution with GHCi found - make sure" ++
+                                      "you have at least one buildable library or executable"
+      _ -> do -- In general the given flags will refer to both libraries and executable, so prepare both
+              (_ignore_def1, exeArguments) <- prepareExes
+              -- Prepare only those libraries that have modules in the list
+              let conditionallyPrepareLibrary lib | null (libModules lib `intersect` moduleNms) = return ([], [])
+                                                  | otherwise                                   = prepareLib lib
+              (_ignore_def2, libArguments) <- withLib pkg_descr ([], []) conditionallyPrepareLibrary
+              return $ (map display moduleNms, exeArguments ++ libArguments)
+
+  -- We're finally ready to run GHCi!
+  let ghciArgs = ["--interactive"]
+                 -- Just concatenating the arguments is sort of a hack, as the arguments will
+                 -- probably contain duplicates and contradictory information in general (as
+                 -- they may have been gathered from all libraries and executables in the package)
+                 ++ allArguments
+                 ++ toLoad
+  runGhcProg ghciArgs
+
hunk ./Distribution/Simple/GHC.hs 922
-         withExe pkg_descr $ \Executable { exeName = e } -> do
+         withExe_ pkg_descr $ \Executable { exeName = e } -> do
hunk ./Distribution/Simple/Haddock.hs 59
-          Library(..), hasLibs, withLib,
-          Executable(..), withExe)
+          Library(..), hasLibs, withLib_,
+          Executable(..), withExe_)
hunk ./Distribution/Simple/Haddock.hs 200
-    withLib pkg_descr $ \lib -> do
+    withLib_ pkg_descr $ \lib -> do
hunk ./Distribution/Simple/Haddock.hs 209
-      withExe pkg_descr $ \exe -> do
+      withExe_ pkg_descr $ \exe -> do
hunk ./Distribution/Simple/Haddock.hs 471
-    withLib pkg_descr $ \lib -> do
+    withLib_ pkg_descr $ \lib -> do
hunk ./Distribution/Simple/Haddock.hs 477
-         withExe pkg_descr $ \exe -> do
+         withExe_ pkg_descr $ \exe -> do
hunk ./Distribution/Simple/Hugs.hs 52
-           Executable(..), withExe, Library(..), withLib, libModules )
+           Executable(..), withExe_, Library(..), withLib_, libModules )
hunk ./Distribution/Simple/Hugs.hs 382
-    withLib pkg_descr $ \ lib ->
+    withLib_ pkg_descr $ \ lib ->
hunk ./Distribution/Simple/Hugs.hs 388
-    withExe pkg_descr $ \ exe -> do
+    withExe_ pkg_descr $ \ exe -> do
hunk ./Distribution/Simple/Install.hs 50
-        hasLibs, withLib, hasExes, withExe )
+        hasLibs, withLib_, hasExes, withExe_ )
hunk ./Distribution/Simple/Install.hs 146
-     GHC  -> do withLib pkg_descr $ \_ ->
+     GHC  -> do withLib_ pkg_descr $ \_ ->
hunk ./Distribution/Simple/Install.hs 148
-                withExe pkg_descr $ \_ ->
+                withExe_ pkg_descr $ \_ ->
hunk ./Distribution/Simple/Install.hs 150
-     LHC  -> do withLib pkg_descr $ \_ ->
+     LHC  -> do withLib_ pkg_descr $ \_ ->
hunk ./Distribution/Simple/Install.hs 152
-                withExe pkg_descr $ \_ ->
+                withExe_ pkg_descr $ \_ ->
hunk ./Distribution/Simple/Install.hs 154
-     JHC  -> do withLib pkg_descr $ JHC.installLib verbosity libPref buildPref pkg_descr
-                withExe pkg_descr $ JHC.installExe verbosity binPref buildPref (progPrefixPref, progSuffixPref) pkg_descr
+     JHC  -> do withLib_ pkg_descr $ JHC.installLib verbosity libPref buildPref pkg_descr
+                withExe_ pkg_descr $ JHC.installExe verbosity binPref buildPref (progPrefixPref, progSuffixPref) pkg_descr
hunk ./Distribution/Simple/Install.hs 160
-     NHC  -> do withLib pkg_descr $ NHC.installLib verbosity libPref buildPref (packageId pkg_descr)
-                withExe pkg_descr $ NHC.installExe verbosity binPref buildPref (progPrefixPref, progSuffixPref)
+     NHC  -> do withLib_ pkg_descr $ NHC.installLib verbosity libPref buildPref (packageId pkg_descr)
+                withExe_ pkg_descr $ NHC.installExe verbosity binPref buildPref (progPrefixPref, progSuffixPref)
hunk ./Distribution/Simple/LHC.hs 74
-         ( PackageDescription(..), BuildInfo(..), Executable(..), withExe
+         ( PackageDescription(..), BuildInfo(..), Executable(..), withExe_
hunk ./Distribution/Simple/LHC.hs 685
-         withExe pkg_descr $ \Executable { exeName = e } -> do
+         withExe_ pkg_descr $ \Executable { exeName = e } -> do
hunk ./Distribution/Simple/PreProcess.hs 65
-         ( PackageDescription(..), BuildInfo(..), Executable(..), withExe
-         , Library(..), withLib, libModules )
+         ( PackageDescription(..), BuildInfo(..), Executable(..), withExe_
+         , Library(..), withLib_, libModules )
hunk ./Distribution/Simple/PreProcess.hs 182
-    withLib pkg_descr $ \ lib -> do
+    withLib_ pkg_descr $ \ lib -> do
hunk ./Distribution/Simple/PreProcess.hs 188
-                  | modu <- libModules lib ]
+                  | modu <- libModules lib]
hunk ./Distribution/Simple/PreProcess.hs 191
-    withExe pkg_descr $ \ theExe -> do
+    withExe_ pkg_descr $ \ theExe -> do
hunk ./Distribution/Simple/Setup.hs 61
-  GlobalFlags(..),   emptyGlobalFlags,   defaultGlobalFlags,   globalCommand,
-  ConfigFlags(..),   emptyConfigFlags,   defaultConfigFlags,   configureCommand,
-  CopyFlags(..),     emptyCopyFlags,     defaultCopyFlags,     copyCommand,
-  InstallFlags(..),  emptyInstallFlags,  defaultInstallFlags,  installCommand,
-  HaddockFlags(..),  emptyHaddockFlags,  defaultHaddockFlags,  haddockCommand,
-  HscolourFlags(..), emptyHscolourFlags, defaultHscolourFlags, hscolourCommand,
-  BuildFlags(..),    emptyBuildFlags,    defaultBuildFlags,    buildCommand,
-  buildVerbose,
-  CleanFlags(..),    emptyCleanFlags,    defaultCleanFlags,    cleanCommand,
-  RegisterFlags(..), emptyRegisterFlags, defaultRegisterFlags, registerCommand,
-                                                               unregisterCommand,
-  SDistFlags(..),    emptySDistFlags,    defaultSDistFlags,    sdistCommand,
-  TestFlags(..),     emptyTestFlags,     defaultTestFlags,     testCommand,
+  GlobalFlags(..),      emptyGlobalFlags,      defaultGlobalFlags,      globalCommand,
+  ConfigFlags(..),      emptyConfigFlags,      defaultConfigFlags,      configureCommand,
+  CopyFlags(..),        emptyCopyFlags,        defaultCopyFlags,        copyCommand,
+  InstallFlags(..),     emptyInstallFlags,     defaultInstallFlags,     installCommand,
+  HaddockFlags(..),     emptyHaddockFlags,     defaultHaddockFlags,     haddockCommand,
+  HscolourFlags(..),    emptyHscolourFlags,    defaultHscolourFlags,    hscolourCommand,
+  BuildFlags(..),       emptyBuildFlags,       defaultBuildFlags,       buildCommand,
+  buildVerbose,                                                         
+  CleanFlags(..),       emptyCleanFlags,       defaultCleanFlags,       cleanCommand,
+  RegisterFlags(..),    emptyRegisterFlags,    defaultRegisterFlags,    registerCommand,
+                                                                        unregisterCommand,
+  SDistFlags(..),       emptySDistFlags,       defaultSDistFlags,       sdistCommand,
+  TestFlags(..),        emptyTestFlags,        defaultTestFlags,        testCommand,
+  InteractiveFlags(..), emptyInteractiveFlags, defaultInteractiveFlags, interactiveCommand,
hunk ./Distribution/Simple/Setup.hs 92
+import Distribution.ModuleName ( ModuleName )
hunk ./Distribution/Simple/Setup.hs 1235
+-- ------------------------------------------------------------
+-- * Interactive flags
+-- ------------------------------------------------------------
+
+data InteractiveFlags = InteractiveFlags {
+    interactiveProgramPaths :: [(String, FilePath)],
+    interactiveProgramArgs :: [(String, [String])],
+    interactiveDistPref :: Flag FilePath,
+    interactiveVerbosity :: Flag Verbosity,
+    interactiveModules :: [ModuleName]
+  }
+  deriving Show
+
+defaultInteractiveFlags :: InteractiveFlags
+defaultInteractiveFlags = InteractiveFlags {
+    interactiveProgramPaths = [],
+    interactiveProgramArgs = [],
+    interactiveDistPref = Flag defaultDistPref,
+    interactiveVerbosity = Flag normal,
+    interactiveModules = []
+  }
+
+interactiveCommand :: ProgramConfiguration -> CommandUI InteractiveFlags
+interactiveCommand progConf = CommandUI {
+    commandName         = "interactive",
+    commandSynopsis     = "Open a part of the package in the interative prompt",
+    commandDescription  = Nothing,
+    commandUsage        = \pname ->
+         "Usage: " ++ pname ++ " interactive [MODULES]",
+         -- NB: can't use @makeCommand@ because here we accept [MODULES], not [FLAGS]
+    commandDefaultFlags = defaultInteractiveFlags,
+    commandOptions      = \showOrParseArgs ->
+      [optionVerbosity interactiveVerbosity (\v flags -> flags { interactiveVerbosity = v })
+      ,optionDistPref
+          interactiveDistPref (\d flags -> flags { interactiveDistPref = d })
+          showOrParseArgs
+      ] ++ programConfigurationPaths progConf showOrParseArgs
+             interactiveProgramPaths (\v flags -> flags { interactiveProgramPaths = v})
+        ++ programConfigurationOptions progConf showOrParseArgs
+             interactiveProgramArgs (\v flags -> flags { interactiveProgramArgs = v})
+  }
+
+emptyInteractiveFlags :: TestFlags
+emptyInteractiveFlags  = mempty
+
+instance Monoid InteractiveFlags where
+  mempty = InteractiveFlags {
+    interactiveProgramPaths = mempty,
+    interactiveProgramArgs  = mempty,
+    interactiveDistPref     = mempty,
+    interactiveVerbosity    = mempty,
+    interactiveModules      = mempty
+  }
+  mappend a b = InteractiveFlags {
+    interactiveProgramPaths = combine interactiveProgramPaths,
+    interactiveProgramArgs  = combine interactiveProgramArgs,
+    interactiveDistPref     = combine interactiveDistPref,
+    interactiveVerbosity    = combine interactiveVerbosity,
+    interactiveModules      = combine interactiveModules
+  }
+    where combine field = field a `mappend` field b
+
hunk ./Distribution/Simple/SrcDist.hs 153
-  withLib $ \Library { exposedModules = modules, libBuildInfo = libBi } ->
+  withLib_ $ \Library { exposedModules = modules, libBuildInfo = libBi } ->
hunk ./Distribution/Simple/SrcDist.hs 156
-  withExe $ \Executable { modulePath = mainPath, buildInfo = exeBi } -> do
+  withExe_ $ \Executable { modulePath = mainPath, buildInfo = exeBi } -> do
hunk ./Distribution/Simple/SrcDist.hs 178
-  withLib $ \ l -> do
+  withLib_ $ \ l -> do
hunk ./Distribution/Simple/SrcDist.hs 221
-    withLib action = maybe (return ()) action (library pkg_descr)
-    withExe action = mapM_ action (executables pkg_descr)
+    withLib_ action = maybe (return ()) action (library pkg_descr)
+    withExe_ action = mapM_ action (executables pkg_descr)
hunk ./Distribution/Simple/UserHooks.hs 69
-          HaddockFlags)
+          HaddockFlags, InteractiveFlags)
hunk ./Distribution/Simple/UserHooks.hs 109
+    -- |Hook to run before interactive command.  Second arg indicates verbosity level.
+    preInteractive  :: Args -> InteractiveFlags -> IO HookedBuildInfo,
+
+    -- |Over-ride this hook to get different behavior during interactive.
+    interactiveHook :: PackageDescription -> LocalBuildInfo -> UserHooks -> InteractiveFlags -> IO (),
+    -- |Hook to run after interactive command.  Second arg indicates verbosity level.
+    postInteractive :: Args -> InteractiveFlags -> PackageDescription -> LocalBuildInfo -> IO (),
+
hunk ./Distribution/Simple/UserHooks.hs 190
+      preInteractive = rn,
+      interactiveHook = ru,
+      postInteractive = ru,
hunk ./Distribution/Simple.hs 95
-import Distribution.Simple.Build        ( build )
+import Distribution.Simple.Build        ( build, interactive )
hunk ./Distribution/Simple.hs 118
-         ( display )
+         ( display, simpleParse )
hunk ./Distribution/Simple.hs 183
-      [configureCommand progs `commandAddAction` configureAction    hooks
-      ,buildCommand     progs `commandAddAction` buildAction        hooks
-      ,installCommand         `commandAddAction` installAction      hooks
-      ,copyCommand            `commandAddAction` copyAction         hooks
-      ,haddockCommand         `commandAddAction` haddockAction      hooks
-      ,cleanCommand           `commandAddAction` cleanAction        hooks
-      ,sdistCommand           `commandAddAction` sdistAction        hooks
-      ,hscolourCommand        `commandAddAction` hscolourAction     hooks
-      ,registerCommand        `commandAddAction` registerAction     hooks
-      ,unregisterCommand      `commandAddAction` unregisterAction   hooks
-      ,testCommand            `commandAddAction` testAction         hooks
+      [configureCommand progs   `commandAddAction` configureAction    hooks
+      ,buildCommand     progs   `commandAddAction` buildAction        hooks
+      ,installCommand           `commandAddAction` installAction      hooks
+      ,copyCommand              `commandAddAction` copyAction         hooks
+      ,haddockCommand           `commandAddAction` haddockAction      hooks
+      ,cleanCommand             `commandAddAction` cleanAction        hooks
+      ,sdistCommand             `commandAddAction` sdistAction        hooks
+      ,hscolourCommand          `commandAddAction` hscolourAction     hooks
+      ,registerCommand          `commandAddAction` registerAction     hooks
+      ,unregisterCommand        `commandAddAction` unregisterAction   hooks
+      ,testCommand              `commandAddAction` testAction         hooks
+      ,interactiveCommand progs `commandAddAction` interactiveAction  hooks
hunk ./Distribution/Simple.hs 331
+interactiveAction :: UserHooks -> InteractiveFlags -> Args -> IO ()
+interactiveAction hooks flags args = do
+  let distPref  = fromFlag $ interactiveDistPref flags
+      verbosity = fromFlag $ interactiveVerbosity flags
+
+  lbi <- getBuildConfig hooks distPref
+  progs <- reconfigurePrograms verbosity
+             (interactiveProgramPaths flags)
+             (interactiveProgramArgs flags)
+             (withPrograms lbi)
+
+  let consumeModulePrefix (True, moduleNms, realArgs) currentArg = (True, moduleNms, currentArg : realArgs)
+      consumeModulePrefix (False, moduleNms, realArgs) currentArg = case simpleParse currentArg of
+        Just moduleNm -> (False, moduleNm : moduleNms, realArgs)
+        Nothing       -> (True, moduleNms, currentArg : realArgs)
+      (_, finalModuleNms, finalRealArgs) = foldl consumeModulePrefix (False, [], []) args
+      flagsWithMods = flags { interactiveModules = reverse finalModuleNms }
+
+  hookedAction preInteractive interactiveHook postInteractive
+               (return lbi { withPrograms = progs })
+               hooks flagsWithMods (reverse finalRealArgs)
+
hunk ./Distribution/Simple.hs 445
+       interactiveHook = defaultInteractiveHook,
hunk ./Distribution/Simple.hs 571
+defaultInteractiveHook :: PackageDescription -> LocalBuildInfo
+        -> UserHooks -> InteractiveFlags -> IO ()
+defaultInteractiveHook pkg_descr localbuildinfo hooks flags = do
+  interactive pkg_descr localbuildinfo flags (allSuffixHandlers hooks)
+
}

Context:

[Use componentPackageDeps, remove packageDeps, add externalPackageDeps
Duncan Coutts <duncan@haskell.org>**20090527225016
 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.
] 
[Pass ComponentLocalBuildInfo to the buildLib/Exe
Duncan Coutts <duncan@haskell.org>**20090527210731
 Not yet used
] 
[Simplify writeInstalledConfig slightly
Duncan Coutts <duncan@haskell.org>**20090527204755] 
[No need to drop dist/installed-pkg-config after every build
Duncan Coutts <duncan@haskell.org>**20090527204500
 We generate this file if necessary when registering.
] 
[Make absoluteInstallDirs only take the package id
Duncan Coutts <duncan@haskell.org>**20090527203112
 It doesn't need the entire PackageDescription
] 
[Rejig calls to per-compiler build functions
Duncan Coutts <duncan@haskell.org>**20090527195146
 So it's now a bit clearer what is going on in the generic build code
 Also shift info calls up to generic code
] 
[Split nhc and hugs's build action into buildLib and buildExe
Duncan Coutts <duncan@haskell.org>**20090527194206] 
[Split JHC's build into buildLib and buildExe
Duncan Coutts <duncan@haskell.org>**20090527192036] 
[Sync LHC module from GHC module
Duncan Coutts <duncan@haskell.org>**20090527191615] 
[Give withLib and withExe sensible types
Duncan Coutts <duncan@haskell.org>**20090527185634] 
[Fix types of libModules and exeModules
Duncan Coutts <duncan@haskell.org>**20090527185108
 Take a Library/Executable rather than a PackageDescription
 Means we're more precise in using it, just passing the info we need.
] 
[Split ghc's build action into buildLib and buildExe
Duncan Coutts <duncan@haskell.org>**20090527183250] 
[Remove unused ghc-only executable wrapper feature
Duncan Coutts <duncan@haskell.org>**20090527183245
 Some kind of shell script wrapper feature might be useful,
 but we should design it properly.
] 
[Fixup .cabal file with the removed modules and files
Duncan Coutts <duncan@haskell.org>**20090527182344] 
[Fix warnings about unused definitions and imports
Duncan Coutts <duncan@haskell.org>**20090527175253] 
[Remove the makefile generation feature
Duncan Coutts <duncan@haskell.org>**20090527175002
 It was an ugly hack and ghc no longer uses it.
] 
[Add new ComponentLocalBuildInfo
Duncan Coutts <duncan@haskell.org>**20090527174418
 We want to have each component have it's own dependencies,
 rather than using the union of deps of the whole package.
] 
[Ticket #89 part 2: Dependency-related test cases and a simple test harness
rubbernecking.trumpet.stephen@blacksapphire.com**20090526133509
 Ignore-this: 830dd56363c34d8edff65314cd8ccb2
 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.
] 
[Ticket #89 part 1: add targetBuildDepends field to PackageDescription's target-specific BuildInfos
rubbernecking.trumpet.stephen@blacksapphire.com**20090526133729
 Ignore-this: 96572adfad12ef64a51dce2f7c5f738
 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.
] 
[LHC: register the external core files.
Lemmih <lemmih@gmail.com>**20090521021511
 Ignore-this: d4e484d7b8e541c3ec4cb35ba8aba4d0
] 
[Update the support for LHC.
Lemmih <lemmih@gmail.com>**20090515211659
 Ignore-this: 2884d3eca0596a441e3b3c008e16fd6f
] 
[Print a more helpful message when haddock's ghc version doesn't match
Duncan Coutts <duncan@haskell.org>**20090422093240
 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
] 
[use -D__HADDOCK__ only when preprocessing for haddock < 2
Andrea Vezzosi <sanzhiyan@gmail.com>**20090302015137
 Ignore-this: d186a5dbebe6d7fdc64e6414493c6271
 haddock-2.x doesn't define any additional macros.
] 
[Make die use an IOError that gets handled at the top level
Duncan Coutts <duncan@haskell.org>**20090301195143
 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.
] 
[rewrite of Distribution.Simple.Haddock
Andrea Vezzosi <sanzhiyan@gmail.com>**20090219153738
 Ignore-this: 5b465b2b0f5ee001caa0cb19355d6fce
 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.
] 
[Allow --with-ghc to be specified when running Cabal
Ian Lynagh <igloo@earth.li>**20090225172249] 
[fix imports for non-GHC
Ross Paterson <ross@soi.city.ac.uk>**20090221164939
 Ignore-this: 12756e3863e312352d5f6c69bba63b92
] 
[Fix user guide docs about --disable-library-vanilla
Duncan Coutts <duncan@haskell.org>**20090219165539
 It is not default. Looks like it was a copy and paste error.
] 
[Specify a temp output file for the header/lib checks
Duncan Coutts <duncan@haskell.org>**20090218233928
 Otherwise we litter the current dir with a.out and *.o files.
] 
[Final changelog updates for 1.6.0.2
Duncan Coutts <duncan@haskell.org>**20090218222106] 
[Use more cc options when checking for header files and libs
Duncan Coutts <duncan@haskell.org>**20090218110520
 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.
] 
[Validate the docbook xml before processing.
Duncan Coutts <duncan@haskell.org>**20090213134136
 Apparently xsltproc does not validate against the dtd.
 This should stop errors creaping back in.
] 
[Make documentation validate
Samuel Bronson <naesten@gmail.com>**20090212235057] 
[Folly the directions for docbook-xsl
Samuel Bronson <naesten@gmail.com>**20090213022615
 As it says in http://docbook.sourceforge.net/release/xsl/current/README:
 
   - Use the base canonical URI in combination with one of the
     pathnames below. For example, for "chunked" HTML, output:
 
     http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
 
] 
[Fix compat functions for setting file permissions on windows
Duncan Coutts <duncan@haskell.org>**20090205224415
 Spotted by Dominic Steinitz
] 
[Only print message about ignoring -threaded if its actually present
Duncan Coutts <duncan@haskell.org>**20090206174707] 
[Don't build ghci lib if we're not making vanilla libs
Duncan Coutts <duncan@haskell.org>**20090206173914
 As the .o files will not exist.
] 
[Correct docdir -> mandir in InstallDirs
Samuel Bronson <naesten@gmail.com>**20090203043338] 
[Fix message suggesting the --executables flag
Samuel Bronson <naesten@gmail.com>**20090201010708] 
[Remove #ifdefery for windows, renameFile now works properly
Duncan Coutts <duncan@haskell.org>**20090202004450
 It's even atomic on windows so we don't need the workaround.
] 
[Make withTempDirectory create a new secure temp dir
Duncan Coutts <duncan@haskell.org>**20090201233318
 Rather than taking a specific dir to create.
 Update the one use of the function.
] 
[Add createTempDirectory to Compat.TempFile module
Duncan Coutts <duncan@haskell.org>**20090201233213
 Also clean up imports
] 
[Improve the error message for missing foreign libs and make it fatal
Duncan Coutts <duncan@haskell.org>**20090131184813
 The check should now be accurate enough that we can make it an
 error rather than just a warning.
] 
[Use the cc, cpp and ld options when checking foreign headers and libs
Duncan Coutts <duncan@haskell.org>**20090131184016
 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.
] 
[Do the check for foreign libs after running configure
Duncan Coutts <duncan@haskell.org>**20090131182213
 This lets us pick up build info discovered by the ./configure script
] 
[move imports outside ifdef GHC
Ross Paterson <ross@soi.city.ac.uk>**20090130153505] 
[Document most of the new file utility functions
Duncan Coutts <duncan@haskell.org>**20090130151640] 
[#262 iterative tests for foreign dependencies
Gleb Alexeyev <gleb.alexeev@gmail.com>**20090130120228
 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.
 
] 
[Misc minor comment and help message changes
Duncan Coutts <duncan@haskell.org>**20090129233455] 
[Deprecate smartCopySources and copyDirectoryRecursiveVerbose
Duncan Coutts <duncan@haskell.org>**20090129233234
 Also use simplified implementation in terms of recently added functions.
] 
[Switch copyFileVerbose to use compat copyFile
Duncan Coutts <duncan@haskell.org>**20090129233125
 All remaining uses of it do not require copying permissions
] 
[Let the setFileExecutable function work with hugs too
Duncan Coutts <duncan@haskell.org>**20090129232948] 
[Switch hugs wrapper code to use setFileExecutable
Duncan Coutts <duncan@haskell.org>**20090129232542
 instead of get/setPermissions which don't really work properly.
] 
[Switch last uses of copyFile to copyFileVerbose
Duncan Coutts <duncan@haskell.org>**20090129232429] 
[Stop using smartCopySources or copyDirectoryRecursiveVerbose
Duncan Coutts <duncan@haskell.org>**20090129231656
 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.
] 
[Use installOrdinaryFile and installExecutableFile in various places
Duncan Coutts <duncan@haskell.org>**20090129231321
 instead of copyFileVerbose
] 
[Make the Compat.CopyFile module with with old and new ghc
Duncan Coutts <duncan@haskell.org>**20090129225423] 
[Add a bunch of utility functions for installing files
Duncan Coutts <duncan@haskell.org>**20090129180243
 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.
] 
[Use setFileExecutable instead of copyPermissions
Duncan Coutts <duncan@haskell.org>**20090129180130
 This lets us get rid of the Compat.Permissions module
] 
[Export setFileOrdinary and setFileExecutable from Compat.CopyFile
Duncan Coutts <duncan@haskell.org>**20090129173413] 
[Warn if C dependencies not found (kind of fixes #262)
gleb.alexeev@gmail.com**20090126185832
 
 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.
] 
[Pass include directories to LHC
Samuel Bronson <naesten@gmail.com>**20090127220021] 
[Add Distribution.Compat.CopyFile module
Duncan Coutts <duncan@haskell.org>**20090128181115
 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
] 
[Remove unused support for installing dynamic exe files
Duncan Coutts <duncan@haskell.org>**20090128170421
 No idea why this was ever added, they've never been built.
] 
[Check for ghc-options: -threaded in libraries
Duncan Coutts <duncan@haskell.org>**20090125161226
 It's totally unnecessary and messes up profiling in older ghc versions.
] 
[Filter ghc-options -threaded for libs too
Duncan Coutts <duncan@haskell.org>**20090125145035] 
[New changelog entries for 1.7.x
Duncan Coutts <duncan@haskell.org>**20090123175645] 
[Update changelog for 1.6.0.2
Duncan Coutts <duncan@haskell.org>**20090123175629] 
[Fix openNewBinaryFile on Windows with ghc-6.6
Duncan Coutts <duncan@haskell.org>**20090122172100
 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.
] 
[filter -threaded when profiling is on
Duncan Coutts <duncan@haskell.org>**20090122014425
 Fixes #317. Based on a patch by gleb.alexeev@gmail.com
] 
[Move installDataFiles out of line to match installIncludeFiles
Duncan Coutts <duncan@haskell.org>**20090122005318] 
[Fix installIncludeFiles to create target directories properly
Duncan Coutts <duncan@haskell.org>**20090122004836
 Previously for 'install-includes: subdir/blah.h' we would not
 create the subdir in the target location.
] 
[Typo in docs for source-repository
Joachim Breitner <mail@joachim-breitner.de>**20090121220747] 
[Make 'ghc-options: -O0' a warning rather than an error
Duncan Coutts <duncan@haskell.org>**20090118141949] 
[Improve runE parse error message
Duncan Coutts <duncan@haskell.org>**20090116133214
 Only really used in parsing config files derived from command line flags.
] 
[The Read instance for License and InstalledPackageInfo is authoritative
Duncan Coutts <duncan@haskell.org>**20090113234229
 It is ghc's optimised InstalledPackageInfo parser that needs updating.
 
 rolling back:
 
 Fri Dec 12 18:36:22 GMT 2008  Ian Lynagh <igloo@earth.li>
   * 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
] 
[Swap the order of global usage messages
Duncan Coutts <duncan@haskell.org>**20090113191810
 Put the more important one first.
] 
[Enable the global command usage to be set
Duncan Coutts <duncan@haskell.org>**20090113181303
 extend it rather than overriding it.
 Also rearrange slightly the default global --help output.
] 
[On Windows, if gcc isn't where we expect it then keep looking
Ian Lynagh <igloo@earth.li>**20090109153507] 
[Ban ghc-options: --make
Duncan Coutts <duncan@haskell.org>**20081223170621
 I dunno, some people...
] 
[Update changelog for 1.6.0.2 release
Duncan Coutts <duncan@haskell.org>**20081211142202] 
[Make the compiler PackageDB stuff more flexible
Duncan Coutts <duncan@haskell.org>**20081211141649
 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.
] 
[Fix Show/Read for License
Ian Lynagh <igloo@earth.li>**20081212183622
 We were ending up with things like
     InstalledPackageInfo {
         ...
         license = LGPL Nothing,
         ...
     }
 i.e. "LGPL Nothing" rather than "LGPL", which we couldn't then read.
] 
[Un-deprecate Distribution.ModuleName.simple for now
Ian Lynagh <igloo@earth.li>**20081212164540
 Distribution/Simple/PreProcess.hs uses it, so this causes build failures
 with -Werror.
] 
[Use the first three lhc version digits
Duncan Coutts <duncan@haskell.org>**20081211224048
 Rather than two, and do it in a simpler way.
] 
[Remove obsolete test code
Duncan Coutts <duncan@haskell.org>**20081211142054] 
[Update the VersionInterval properties which now all pass
Duncan Coutts <duncan@haskell.org>**20081210145653] 
[Eliminate NoLowerBound, Versions do have a lower bound of 0.
Duncan Coutts <duncan@haskell.org>**20081210145433
 This eliminates the duplicate representation of ">= 0" vs "-any"
 and makes VersionIntervals properly canonical.
] 
[Update and extend the Version quickcheck properties
Duncan Coutts <duncan@haskell.org>**20081210143251
 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.
] 
[Add documentation for VersionRange functions
Duncan Coutts <duncan@haskell.org>**20081210140632
 With properties.
] 
[Export withinVersion and deprecate betweenVersionsInclusive
Duncan Coutts <duncan@haskell.org>**20081210140411] 
[Add checking of Version validity to the VersionIntervals invariant
Duncan Coutts <duncan@haskell.org>**20081210134100
 Version numbers have to be a non-empty sequence of non-negataive ints.
] 
[Fix implementation of withinIntervals
Duncan Coutts <duncan@haskell.org>**20081210000141] 
[Fix configCompilerAux to consider user-supplied program flags
Duncan Coutts <duncan@haskell.org>**20081209193320
 This fixes a bug in cabal-install
] 
[Add ModuleName.fromString and deprecate ModuleName.simple
Duncan Coutts <duncan@haskell.org>**20081209151232
 Also document the functions in the ModuleName module.
] 
[Check for absolute, outside-of-tree and dist/ paths
Duncan Coutts <duncan@haskell.org>**20081208234312] 
[Export more VersionIntervals operations
Duncan Coutts <duncan@haskell.org>**20081208222420
 and check internal invariants
] 
[Check for use of cc-options: -O
Duncan Coutts <duncan@haskell.org>**20081208182047] 
[Fake support for NamedFieldPuns in ghc-6.8
Duncan Coutts <duncan@haskell.org>**20081208180018
 Implement it in terms of the -XRecordPuns which was accidentally
 added in ghc-6.8 and deprecates in 6.10 in favor of NamedFieldPuns
 So this is for compatability so we can tell package authors always
 to use NamedFieldPuns instead.
] 
[Make getting ghc supported language extensions its own function
Duncan Coutts <duncan@haskell.org>**20081208175815] 
[Check for use of deprecated extensions
Duncan Coutts <duncan@haskell.org>**20081208175441] 
[Add a list of deprecated extenstions
Duncan Coutts <duncan@haskell.org>**20081208175337
 Along with possibly another extension that replaces it.
] 
[Change the checking of new language extensions
Duncan Coutts <duncan@haskell.org>**20081207202315
 Check for new language extensions added in Cabal-1.2 and also 1.6.
 Simplify the checking of -X ghc flags. Now always suggest using
 the extensions field, as we separately warn about new extenssons.
] 
[Tweak docs for VersionRange and VersionIntervals
Duncan Coutts <duncan@haskell.org>**20081207184749] 
[Correct and simplify checkVersion
Duncan Coutts <duncan@haskell.org>**20081205232845] 
[Make users of VersionIntervals use the new view function
Duncan Coutts <duncan@haskell.org>**20081205232707] 
[Make VersionIntervals an abstract type
Duncan Coutts <duncan@haskell.org>**20081205232041
 Provide asVersionIntervals as the view function for a VersionRange
 This will let us enforce the internal data invariant
] 
[Slight clarity improvement in compiler language extension handling
Duncan Coutts <duncan@haskell.org>**20081205210747] 
[Slightly simplify the maintenance burden of adding new language extensions
Duncan Coutts <duncan@haskell.org>**20081205210543] 
[Distributing a package with no synopsis and no description is inexcusable
Duncan Coutts <duncan@haskell.org>**20081205160719
 Previously if one or the other or both were missing we only warned.
 Now if neither are given it's an error. We still warn about either
 missing.
] 
[Add Test.Laws module for checking class laws
Duncan Coutts <duncan@haskell.org>**20081204144238
 For Functor, Monoid and Traversable.
] 
[Add QC Arbitrary instances for Version and VersionRange
Duncan Coutts <duncan@haskell.org>**20081204144204] 
[Remove accidentally added bianry file
Duncan Coutts <duncan@haskell.org>**20081203000824] 
[Fix #396 and add let .Haddock find autogen modules
Andrea Vezzosi <sanzhiyan@gmail.com>**20081201114853] 
[Add checks for new and unknown licenses
Duncan Coutts <duncan@haskell.org>**20081202172742] 
[Add MIT and versioned GPL and LGPL licenses
Duncan Coutts <duncan@haskell.org>**20081202171033
 Since Cabal-1.4 we've been able to parse versioned licenses
 and unknown licenses without the parser falling over.
] 
[Don't nub lists of dependencies
Duncan Coutts <duncan@haskell.org>**20081202162259
 It's pretty meaningless since it's only a syntactic check.
 The proper thing is to maintain a dependency set or to
 simplify dependencies before printing them.
] 
[Fix the date in the LICENSE file
Duncan Coutts <duncan@haskell.org>**20081202161457] 
[Fix the version number in the makefile
Duncan Coutts <duncan@haskell.org>**20081202161441] 
[Use VersionRange abstractly
Duncan Coutts <duncan@haskell.org>**20081202160321] 
[Do the cabal version check properly.
Duncan Coutts <duncan@haskell.org>**20081202155410
 Instead of matching on the actual expression ">= x.y" we use the
 sematic view of the version range so we can do it precisely.
 Also use foldVersionRange to simplify a couple functions.
] 
[Drop support for ghc-6.4 era OPTIONS pragmas
Duncan Coutts <duncan@haskell.org>**20081202154744
 It's still possible to build with ghc-6.4 but you have to pass
 extra flags like "ghc --make -cpp -fffi Setup.hs" We could not
 keep those OPTIONS pragmas and make it warning-free with ghc-6.10.
 See http://hackage.haskell.org/trac/ghc/ticket/2800 for details.
] 
[Almost make the VersionRange type abstract
Duncan Coutts <duncan@haskell.org>**20081202154307
 Export constructor functions and deprecate all the real constructors
 We should not be pattern matching on this type because it's just
 syntax. For meaningful questions we should be matching on the
 VersionIntervals type which represents the semantics.
] 
[Change isAnyVersion to be a semantic rather than syntactic test
Duncan Coutts <duncan@haskell.org>**20081202142123
 Also add simplify and isNoVersion.
] 
[Add VersionIntervals, a view of VersionRange
Duncan Coutts <duncan@haskell.org>**20081202141040
 as a sequence of non-overlapping intervals. This provides a canonical
 representation for the semantics of a VersionRange. This makes several
 operations easier.
] 
[Fix pretty-printing of version wildcards, was missing leading ==
Duncan Coutts <duncan@haskell.org>**20081202135949] 
[Add a fold function for the VersionRange
Duncan Coutts <duncan@haskell.org>**20081202135845
 Use it to simplify the eval / withinRange function
] 
[Improve the error on invalid file globs slightly
Duncan Coutts <duncan@haskell.org>**20081202135335] 
[Use commaSep everywhere in the Check module
Duncan Coutts <duncan@haskell.org>**20081202135208] 
[Fix message in the extra-source-files field check
Duncan Coutts <duncan@haskell.org>**20081202135000] 
[Add checks for file glob syntax
Duncan Coutts <duncan@haskell.org>**20081202133954
 It requires cabal-version: >= 1.6 to be specified
] 
[Add check for use of "build-depends: foo == 1.*" syntax
Duncan Coutts <duncan@haskell.org>**20081202131459
 It requires Cabal-1.6 or later.
] 
[Distinguish version wild cards in the VersionRange AST
Duncan Coutts <duncan@haskell.org>**20081128170513
 Rather than encoding them in existing constructors.
 This will enable us to check that uses of the new syntax
 are flagged in .cabal files with cabal-version: >= 1.6
] 
[Fix comment in LHC module
Duncan Coutts <duncan@haskell.org>**20081123100710
 Yes, LHC really does use ghc-pkg (with a different package.conf)
] 
[Use the new bug-reports and source-repository info in the .cabal file
Duncan Coutts <duncan@haskell.org>**20081123100041] 
[Simplify build-depends and base3/4 flags
Duncan Coutts <duncan@haskell.org>**20081123100003] 
[Simplify default global libdir for LHC
Duncan Coutts <duncan@haskell.org>**20081123095802
 So it uses libdir=$prefix/lib rather than libdir=/usr/local/lib
] 
[Simplify the compat exceptions stuff
Duncan Coutts <duncan@haskell.org>**20081123095737] 
[Fix warnings in the LHC module
Duncan Coutts <duncan@haskell.org>**20081122224011] 
[Distribution/Simple/GHC.hs: remove tabs for whitespace to eliminate warnings in cabal-install
gwern0@gmail.com**20081122190011
 Ignore-this: 2fd54090af86e67e25e51ade42992b53
] 
[Warn about use of tabs
Duncan Coutts <duncan@haskell.org>**20081122154134] 
[Bump Cabal HEAD version to 1.7.x development series
Duncan Coutts <duncan@haskell.org>**20081122145817
 Support for LHC is the first divergence between 1.7
 and the stable 1.6.x series.
] 
[Update changelog for 1.6.0.x fixes
Duncan Coutts <duncan@haskell.org>**20081122145758] 
[LHC: Don't use --no-user-package-conf. It doesn't work with ghc-6.8.
Lemmih <lemmih@gmail.com>**20081122012341
 Ignore-this: 88a837b38cf3e897cc5ed4bb22046cee
] 
[Semi-decent lhc support.
Lemmih <lemmih@gmail.com>**20081121034138] 
[Make auto-generated *_paths.hs module warning-free.
Thomas Schilling <nominolo@googlemail.com>**20081106142734
 
 On newer GHCs using {-# OPTIONS_GHC -fffi #-} gives a warning which
 can lead to a compile failure when -Werror is activated.  We therefore
 emit this option if we know that the LANGUAGE pragma is supported 
 (ghc >= 6.6.1).
] 
[Escape ld-options with the -optl prefix when passing them to ghc
Duncan Coutts <duncan@haskell.org>**20081103151931
 Fixes ticket #389
] 
[Simplify previous pkg-config fix
Duncan Coutts <duncan@haskell.org>**20081101200309] 
[Fix bug where we'd try to configure an empty set of pkg-config packages
Duncan Coutts <duncan@haskell.org>**20081101195512
 This happened when the lib used pkg-config but the exe did not.
 It cropped up in hsSqlite3-0.0.5.
] 
[Add GHC 6.10.1's extensions to the list in Language.Haskell.Extension
Ian Lynagh <igloo@earth.li>**20081019141408] 
[Ensure that the lib target directory is present when installing
Duncan Coutts <duncan@haskell.org>**20081017004437
 Variant on a patch from Bryan O'Sullivan
] 
[Release kind is now rc
Duncan Coutts <duncan@haskell.org>**20081011183201] 
[TAG 1.6.0.1
Duncan Coutts <duncan@haskell.org>**20081011182516] 
[Bump version to 1.6.0.1
Duncan Coutts <duncan@haskell.org>**20081011182459] 
[Do not use the new meta-data fields yet
Duncan Coutts <duncan@haskell.org>**20081011182307
 Avoid chicken and egg problem. We cannot upload Cabsl-1.6 to
 hackage until hackage is using Cabal-1.6 if it uses features
 that are introduced in 1.6. So just comment them out for now.
] 
[Export a compat function for older Setup.hs scripts
Duncan Coutts <duncan@haskell.org>**20081011182131
 Makes it possible for alex and happy to work with cabal-1.2 -> 1.6
] 
[Fix instructions in README for building with 6.6 and filepath
Duncan Coutts <duncan@haskell.org>**20081011002819] 
[Update release procedure in Makefile
Duncan Coutts <duncan@haskell.org>**20081010181445
 Building the haddock docs requires building first. Arguably this is
 a Cabal bug. It should probably generate the "autogen" files for
 haddock and not just for build.
] 
[TAG 1.6.0.0
Duncan Coutts <duncan@haskell.org>**20081010061435] 
[Bump version number to 1.6.0.0
Duncan Coutts <duncan@haskell.org>**20081010052409] 
[Update changelog
Duncan Coutts <duncan@haskell.org>**20081010052354] 
[Remove the releaseNotes file
Duncan Coutts <duncan@haskell.org>**20081010052101
 It did not actually contain any release notes and just
 duplicated information in the README which was confusing.
] 
[Merge the info from the releaseNotes file into the README file
Duncan Coutts <duncan@haskell.org>**20081010052020] 
[Fix haddock comment for haddock-0.8
Duncan Coutts <duncan@haskell.org>**20081010050913] 
[Fix parsing of ld,cc,cpp-options for flags containing ','
Duncan Coutts <duncan@haskell.org>**20081010050829
 The ',' character is not used as a separator and is allowed
 within flag tokens. Fixes at least HsPerl5.
] 
[Update versions in regression check script
Duncan Coutts <duncan@haskell.org>**20081009223429] 
[Bump devel version number to 1.5.6
Duncan Coutts <duncan@haskell.org>**20081009223350
 To make easier to track recent Cabal / cabal-install changes
] 
[Update changelog
Duncan Coutts <duncan@haskell.org>**20081009223330] 
[Update the README
Duncan Coutts <duncan@haskell.org>**20081009221851] 
[Make sdist work for libs that use the Paths_pkgname module
Duncan Coutts <duncan@haskell.org>**20081009214507
 Do it by just filtering that module out of the package
 description before running sdist etc. This isn't lovely
 because it steals that module name from the module namespace
 but at least it now works. Thanks to Jean-Philippe Bernardy
 for the first iteration of this patch.
] 
[xargs -s breaks solaris
Duncan Coutts <duncan@haskell.org>**20081008185041
 Hopefully we can figure out a better fix for recent cygwin
 versions of xargs which are apparently broken.
 
 rolling back:
 
 Wed Oct  8 08:44:10 PDT 2008  Clemens Fruhwirth <clemens@endorphin.org>
   * Also respect the max. command line size in Makefile driven builds
 
     M ./Distribution/Simple/GHC.hs -7 +13
     M ./Distribution/Simple/GHC/Makefile.hs -1 +1
     M ./Distribution/Simple/GHC/Makefile.in -1 +1
] 
[Also respect the max. command line size in Makefile driven builds
Clemens Fruhwirth <clemens@endorphin.org>**20081008154410] 
[add missing exeExtension when stripping an executable
Simon Marlow <marlowsd@gmail.com>**20081007134757] 
[Add a few type sigs to help hugs and as documentation
Duncan Coutts <duncan@haskell.org>**20081007214120
 Thanks to Dimitry and Ross for identifying the problem.
] 
[Add -no-auto-link-packages also to Makefile driven build
Clemens Fruhwirth <clemens@endorphin.org>**20081007095454] 
[Also install dynamically linked executable (when present)
Clemens Fruhwirth <clemens@endorphin.org>**20081006095107] 
[Use "-no-auto-link-packages" when using GHC to link
Ian Lynagh <igloo@earth.li>**20081004111103
 When making packages like ghc-prim we need GHC to not automatically
 try to link with base and haskell98.
] 
[Relax dependencyInconsistencies to allow the base-3,4 thing
Duncan Coutts <duncan@haskell.org>**20081002074142
 Previously we said a package graph was inconsistent if two
 dependencies on the same package name specified different
 versions. Now we say that two such dependencies on different
 versions are ok if there is a direct dependency between those
 two package versions. So if your package graph ends up with
 both base 3 and base 4 in it, then that's ok because base 3
 directly depends on base 4, so we declare it not to be an
 inconsistency. This removes the scary warnings at configure
 time (fixing ticket #366) and also adjusts the invariant and
 assertion of the InstallPlan ADT in cabal-install.
] 
[Document the bug-reports field
Duncan Coutts <duncan@haskell.org>**20081001042635] 
[Add bug-reports field to Cabal.cabal
Duncan Coutts <duncan@haskell.org>**20081001035605] 
[Add bug-reports url field
Duncan Coutts <duncan@haskell.org>**20081001035516
 Ticket #323
] 
[Update the package description a bit
Duncan Coutts <duncan@haskell.org>**20081001034350] 
[Specify a source repository for Cabal in Cabal.cabal
Duncan Coutts <duncan@haskell.org>**20081001034325] 
[Document the source-repository stuff
Duncan Coutts <duncan@haskell.org>**20081001033928] 
[Add some checks on the repository sections
Duncan Coutts <duncan@haskell.org>**20081001033755] 
[Use unknown rather than specific other repo kinds
Duncan Coutts <duncan@haskell.org>**20081001033637
 We can still add more as necessary
] 
[Add support for specifying source repos in .cabal files
Duncan Coutts <duncan@haskell.org>**20080930222708
 Ticket #58. Does not yet include checking.
] 
[Simplify parsing sections in the .cabal file
Duncan Coutts <duncan@haskell.org>**20080930215509
 Allow flags, lib and exes in any order and handle unknown sections better.
] 
[Treat "cabal --flag command" as "cabal command --flag"
Duncan Coutts <duncan@haskell.org>**20080928070627
 eg "cabal -v configure" to mean "cabal configure -v"
 For flags that are not recognised as global flags,
 pass them on to the sub-command.
] 
[Fix how Cabal makes the value for __GLASGOW_HASKELL__
Ian Lynagh <igloo@earth.li>**20080920212207
 6.10.x was giving us 601 rather than 610.
] 
[Update the version number in the Makefile
Ian Lynagh <igloo@earth.li>**20080920175306] 
[Correct the version number in the Makefile
Ian Lynagh <igloo@earth.li>**20080920175105] 
[Update build-deps
Ian Lynagh <igloo@earth.li>**20080920175053] 
[Fix building with GHC 6.6
Ian Lynagh <igloo@earth.li>**20080920162927] 
[TAG 6.10 branch has been forked
Ian Lynagh <igloo@earth.li>**20080919123438] 
[Rename --distdir flag to --builddir
Duncan Coutts <duncan@haskell.org>**20080920180326
 Old aliases kept for compatibility
] 
[TAG 1.5.5
Duncan Coutts <duncan@haskell.org>**20080919142307] 
[Bump version number to 1.5.5
Duncan Coutts <duncan@haskell.org>**20080919140130
 Ready to make the 1.6 branch
] 
[filter mingw include directories out of rts's installDirs
Ian Lynagh <igloo@earth.li>**20080918142958
 GHC < 6.10 put "$topdir/include/mingw" in rts's installDirs. This
 breaks when you want to use a different gcc, so we need to filter
 it out.
] 
[Tell gcc on Windows where include/mingw is
Ian Lynagh <igloo@earth.li>**20080918135718
 We need to tell the gcc bundled with GHC on Windows where its mingw
 include directory is
] 
[On windows, fail if ghc's gcc or ld are not found
Duncan Coutts <duncan@haskell.org>**20080917235745] 
[Allow addKnownProgram to be used as an update, not just insert
Duncan Coutts <duncan@haskell.org>**20080917225856
 ie preserves any existing user-supplied path and args
] 
[Cope with gcc.exe and ld.exe not being where ex expect on Windows
Ian Lynagh <igloo@earth.li>**20080917221228] 
[Implement openNewBinaryFile in a Compat module
Ian Lynagh <igloo@earth.li>**20080917171257
 This is like openBinaryTempFile except it doesn't mark the permissions
 with 600. This means datafailes get the right permissions when they are
 installed.
 
 This should really be in the base package.
] 
[Generalise the type of onException
Ian Lynagh <igloo@earth.li>**20080917171233
 Now it matches Control.Exception's type
] 
[Yet another go at making gcc -B work properly on windows
Duncan Coutts <duncan@haskell.org>**20080916232553
 This time it should work on linux too! But more significantly
 it should work when the user specifies a particular gcc. It
 would be very bad if the user gave an alternative gcc but we
 still gave it -B for the lib files of ghc's gcc. This go is
 rather cleaner as it uses the new program post-conf system.
] 
[Pass any additional gcc options through to gcc when calling hsc2hs
Duncan Coutts <duncan@haskell.org>**20080916232502] 
[Add an additional program post-conf action
Duncan Coutts <duncan@haskell.org>**20080916210642
 The post-conf action gets given the configured program and is
 allowed to do more IO and can add any extra required program
 args. Should make it easier to do the gcc -B thing or ld -x
] 
[Make the new permissions compat module compile
Duncan Coutts <duncan@haskell.org>**20080916210550
 Needs cpp pragma as it has to work with just ghc --make
 Did I ever mention I that hate cpp and compat modules?
] 
[Fix the env var names used in the Paths module
Duncan Coutts <duncan@haskell.org>**20080916093525
 Convert any '-' in the package name to '_' when generating the
 path env var as most shells do not allow '-' in env var names.
] 
[Check for -optl-s as well as an alias of the more common -optl-Wl,-s
Duncan Coutts <duncan@haskell.org>**20080913005432] 
[pass -B flag to help gcc find libraries on Windows
dias@eecs.harvard.edu**20080827124436] 
[workaround for nhc98, which does not have System.Posix.Internals
Malcolm.Wallace@cs.york.ac.uk**20080915092747] 
[Set GHCI_LIB to "" in "Setup makefile" if GHC libs are disabled
Ian Lynagh <igloo@earth.li>**20080913144040] 
[In "Setup makefile", don't build the vanilla way if it's disabled
Ian Lynagh <igloo@earth.li>**20080913143132
 This needs a bit of a kludge, as the vanilla way doesn't really exist
 as far as the build system is concerned. It's just the absence of way.
] 
[Fix the permission that we give wrapper scripts
Ian Lynagh <igloo@earth.li>**20080913124445] 
[Documentation only: more typos/punctuation
Tim Chevalier <chevalier@alum.wellesley.edu>**20080914051331] 
[Documentation only: grammar fix in comment
Tim Chevalier <chevalier@alum.wellesley.edu>**20080914051008] 
[Documentation only: fix typo in comment
Tim Chevalier <chevalier@alum.wellesley.edu>**20080913214843] 
[Remove unused 'breaks' util function
Duncan Coutts <duncan@haskell.org>**20080910235804] 
[follow library changes
Ian Lynagh <igloo@earth.li>**20080903223608] 
[Fix to compile with base-1.0:Data.List
Duncan Coutts <duncan@haskell.org>**20080904233126
 which did not have isInfixOf
] 
[Fix cabal_macros.h for package names containing '-'
Duncan Coutts <duncan@haskell.org>**20080903220116
 As with the Paths_pkgname module, we map '-' to '_' as the
 former is not a valid character in cpp macro identifiers.
 Fixes cpp redefinition warnings. First reported by gwern.
] 
[Pass the interfaces for the transitive set of dependencies to haddock
Ian Lynagh <igloo@earth.li>**20080903123813
 Otherwise we don't get links to types from packages that we don't
 directly depend on.
] 
[Update CPP-Options in Cabal.cabal to define CABAL_VERSION=1,5,4
Ian Lynagh <igloo@earth.li>**20080902170348
 It was still defining CABAL_VERSION=1,5,3
] 
[Add more detail to the -Werror and -fvia-C checks
Duncan Coutts <duncan@haskell.org>**20080902171413
 Also, ban rather than just warn about the -optl-Wl,-s hack
 now that Cabal strips exes by default.
] 
[Haddock 2: #include <cabal_macros.h>
Simon Marlow <marlowsd@gmail.com>**20080901145843] 
[package concurrent not available in nhc98
Malcolm.Wallace@cs.york.ac.uk**20080902092802] 
[Display the right message for sdist --snapshot
Duncan Coutts <duncan@haskell.org>**20080831221756] 
[Bump the version number to 1.5.4
Duncan Coutts <duncan@haskell.org>**20080831220418
 due to the PackageSet/Index api changes
] 
[Use a hopefully more robust method of determining the gcc version
Duncan Coutts <duncan@haskell.org>**20080831220145] 
[Simplify the handling of --with-prog= in build/haddock commands.
Duncan Coutts <duncan@haskell.org>**20080831215551
 We allow extra rgs and the location of programs to be given to
 the build and haddock commands, not just at configure time. The
 code to do this is now simpler and more general. This should not
 be the default use mode however since it involves configuring
 the programs each time where as doing it at configure time allows
 it to be done once and saved. Further, specifying a different
 version of the program at build time than at configure time is
 likely to fail, especially for the compiler programs. Changing
 the compiler really requires reconfiguring.
] 
[Update the haddock command help text
Duncan Coutts <duncan@haskell.org>**20080831215325
 The haddock command now supports --haddock-options=
] 
[Add flags to build command for specifying program paths
Duncan Coutts <duncan@haskell.org>**20080831215135
 So we're going to allow --with-PROG for the build and haddock
 commands, in addition to the existing --PROG-options= flags.
] 
[Use the new Program utils to simplify code in Configure
Duncan Coutts <duncan@haskell.org>**20080831215054] 
[Add some more handy Program utils
Duncan Coutts <duncan@haskell.org>**20080831214813
 Mostly for dealing with lists of programs so that client
 code doesn't need quite to much flip foldl' (flip thing)
 Add specific helpers for reconfiguring programs and
 restoring a full ProgramConfiguration after usign read.
] 
[Don't redundantly pass programArgs in when calling programs.
Duncan Coutts <duncan@haskell.org>**20080831212526
 That's already done by the Program framework so we were passing
 those extra args in twice.
] 
[Merge PackageSet and PackageIndex
Duncan Coutts <duncan@haskell.org>**20080830130250
 Have just a single module that provides both the case sensitive and
 insensitive operations. Turns out we hardly use the case insensitive
 operations, and the places where we do are not performance sensitive
 at all. So we use the PackageSet implementation which stores the
 packages case sensitively and tack on the case insensitive operations
 but with linear time implementations rather than log time. For the
 merged module/type name use PackageIndex because that is what older
 released versions exported, so less needless client breakage.
] 
[Add checkPackageFileNames function to check portability of file names
Duncan Coutts <duncan@haskell.org>**20080827082349
 Windows has restrictions on names of files and portable
 tar archives have some weird length restrictions too.
 Not yet used but should be used in sdist and hackage.
] 
[In wrappers, $executablename needs to expand to something with DESTDIR
Ian Lynagh <igloo@earth.li>**20080828155554
 The installed wrapper needs to call the executable in its final place,
 not inside the DESTDIR where we are constructing a package.
] 
[Allow passing haddock's location and options to "Setup haddock"
Ian Lynagh <igloo@earth.li>**20080828142424] 
[We need to pass the CPP options to haddock 2
Ian Lynagh <igloo@earth.li>**20080828142303] 
[Add support for manually en/disabled flags
Ian Lynagh <igloo@earth.li>**20080827170105
 The immediate use for these is so that, in haddock, we can require
 ghc-paths normally, but in the GHC build we can manually turn off a flag
 so that this dependency isn't needed. We can't use a normal flag, or
 in the normal build Cabal would infer that the flag needs to be turned
 off if ghc-paths isn't available.
] 
[Add release date of 1.4.0.2
Duncan Coutts <duncan@haskell.org>**20080826204810] 
[Ban package names that are not valid windows file names
Duncan Coutts <duncan@haskell.org>**20080826005502
 At least for the purposes of distribution. So if you're on unix
 then you can call your package 'LPT1' if you feel you must, but
 you cannot distribute a package with this name.
] 
[Separate out and export installDirsOptions
Duncan Coutts <duncan@haskell.org>**20080826003240
 The InstallDirs is a separate type so it's handy to have the
 command line and config file options for it available
 separately. It'd be useful in cabal-install for one thing.
] 
[Note the per-user install path on Windows in the README
Duncan Coutts <duncan@haskell.org>**20080824203923] 
[More changelog updates for 1.4.0.2
Duncan Coutts <duncan@haskell.org>**20080824203744] 
[Teach Cabal about the PackageImports extension
Ian Lynagh <igloo@earth.li>**20080825132352] 
[Rename --distpref to --distdir
Duncan Coutts <duncan@haskell.org>**20080825164258
 It's more consistent with the other flag names for dirs.
 Kept the old name too, but it's not shown by --help.
] 
[We now depend on concurrent (split off from base)
Ian Lynagh <igloo@earth.li>**20080824135145] 
[Bump version number to 1.5.3
Duncan Coutts <duncan@haskell.org>**20080822160918] 
[Update changelog for recent 1.5.x changes
Duncan Coutts <duncan@haskell.org>**20080822160828] 
[Update changelog
Duncan Coutts <duncan@haskell.org>**20080802135452] 
[Fix for #333, "Setup sdist --snapshot fails"
Duncan Coutts <duncan@haskell.org>**20080821154913
 Credit to Spencer Janssen. This is just a slight alternative
 to the fix he proposed. It simplifies prepareSnapshotTree.
] 
[Don't pass cc-options to Haskell compilations
Simon Marlow <marlowsd@gmail.com>**20080821133421
 This has no effect with GHC 6.9, and with earlier GHC's it was a
 misuse of cc-options.
] 
[Don't propagate cc-options to the InstalledPackageInfo
Simon Marlow <marlowsd@gmail.com>**20080821132551
 cc-options is for options to be passed to C compilations in the
 current package.  If we propagate those options to the
 InstalledPackageInfo, they get passed to C compilations in any package
 that depends on this one, which could be disastrous.  I've seen
 cc-options like these:
 
    cc-options:      -optc-std=c99
    cc-options:         -D_FILE_OFFSET_BITS=64
    Cc-options:      -Wall
 
 these are all clearly intended to be local, but are in fact currently
 propagated to all dependent packages.
] 
[Fix spelling of compatibility
Duncan Coutts <duncan@haskell.org>**20080818194951
 At request of gwern who found that it was driving him nuts.
] 
[Minor info and help message improvements
Duncan Coutts <duncan@haskell.org>**20080813124957] 
[unbreak for non-GHC
Malcolm.Wallace@cs.york.ac.uk**20080814182558] 
[Catch exit exceptions as well as IO exceptions after running programs
Ian Lynagh <igloo@earth.li>**20080813213035
 We need to catch IO exceptions for things like "couldn't find the program",
 but we also need to catch exit exceptions as Cabal uses them to signal
 what the program returned.
] 
[Move Paths_pkgname and cabal_macros.h generation into their own modules
Duncan Coutts <duncan@haskell.org>**20080813193245] 
[Add util rewriteFile :: FilePath -> String -> IO ()
Duncan Coutts <duncan@haskell.org>**20080813192017
 Write a file but only if it would have new content.
 If we would be writing the same as the existing content
 then leave the file as is so that we do not update the
 file's modification time.
] 
[fix imports for nhc98
Malcolm.Wallace@cs.york.ac.uk**20080813132112] 
[Don't warn about missing strip.exe on Windows
Duncan Coutts <duncan@haskell.org>**20080812220415
 We don't expect Windows systems to have the strip program anyway.
] 
[Flush stdout when printing debugging messages
Duncan Coutts <duncan@haskell.org>**20080812212236] 
[Fix warnings in Windows Paths_pkgname module
Duncan Coutts <duncan@haskell.org>**20080812211349] 
[Fix the config-file field name of the install command's packagedb option
Duncan Coutts <duncan@haskell.org>**20080812171207] 
[Add alias type PackageId = PackageIdentifier
Duncan Coutts <duncan@haskell.org>**20080812171006] 
[Add data Platform = Platform Arch OS
Duncan Coutts <duncan@haskell.org>**20080812160941
 Since we tend to pass them around together rather a lot.
 Also add a Text instance with a format like "i386-linux"
] 
[Don't use tab characters in the generated Paths module
Duncan Coutts <duncan@haskell.org>**20080812160731] 
[Add auto-generated CPP macros for package version testing
Simon Marlow <marlowsd@gmail.com>**20080811173016
 
 Now when using CPP you get 
 
    MIN_VERSION_<package>(A,B,C)
 
 for each <package> in build-depends, which is true if the version of
 <package> in use is >= A.B.C, using the normal ordering on version
 numbers.
 
 This is done by auto-generating a header file
 dist/build/autogen/cabal_macros.h, and passing a -include flag when
 running CPP.
] 
[allow Cabal to use base-4
Simon Marlow <marlowsd@gmail.com>**20080806130512] 
[Make binary-dist do nothing in doc/Makefile, for now
Ian Lynagh <igloo@earth.li>**20080810005135] 
[When running "Setup makefile", put "default: all" at the top of the Makefile
Ian Lynagh <igloo@earth.li>**20080809211148
 This make "make" work even if Makefile.local contains any targets.
] 
[Use 'ghc-pkg dump' instead of 'ghc-pkg describe *'
David Waern**20080807190307
 
 Does not implement lazy parsing of the output of ghc-pkg dump, so this
 is only a partial fix of #311.
   
 For more information about why we want to use ghc-pkg dump, see GHC
 ticket #2201.
] 
[Simplify InstalledPackageInfo parser and pretty printer
Duncan Coutts <duncan@haskell.org>**20080806122807
 Using the new utils in ParseUtils.
] 
[Add parsse utils for simple flat formats.
Duncan Coutts <duncan@haskell.org>**20080806122613
 Should help to simplify the InstalledPackageInfo parser
 and also for similar formats in cabal-install.
] 
[Tidy up the ppFields function and uses
Duncan Coutts <duncan@haskell.org>**20080806121315
 Put the arguments in a more sensible order:
 ppFields :: [FieldDescr a] -> a -> Doc
 and make the implementation clearer.
 clean up the use of it in the PackageDescription.Parse module
] 
[Windows fixes
Ian Lynagh <igloo@earth.li>**20080803201253] 
[setup makefile: put the source-dir suffix rules after the distdir suffix rules
Simon Marlow <marlowsd@gmail.com>**20080806130309
 This matches the behaviour of 'setup build' works, and is robust to
 people accidentally having old preprocessed sources lying around in the
 source dir.
] 
[Generalise checkPackageFiles to any monad, not just IO
Duncan Coutts <duncan@haskell.org>**20080806001547
 This is to let us use the same checks for virtual or
 in-memory file systems, like tarball contents.
] 
[Move parseFreeText into ParseUtils and use it more widely
Duncan Coutts <duncan@haskell.org>**20080806001352] 
[Document and refactor 'parsePackageDescription'.
Thomas Schilling <nominolo@googlemail.com>**20080804190324
 
 Hopefully this makes this function more understandable and easier to
 modify.
] 
[Adjust registration to allow packages with no modules or objects
Duncan Coutts <duncan@haskell.org>**20080804155826
 So ghc-pkg does not complain about missing files and dirs.
] 
[Don't try to install libHSfoo.a if the lib had no object files
Duncan Coutts <duncan@haskell.org>**20080804143817
 To allow meta-packages.
] 
[Fix instance Monoid ConfigFlags for configStripExes
Duncan Coutts <duncan@haskell.org>**20080802002045] 
[Document the "exposed" .cabal file field
Duncan Coutts <duncan@haskell.org>**20080731162807] 
[Fix the Windows build
Ian Lynagh <igloo@earth.li>**20080731194841] 
[Remove unused imports
Ian Lynagh <igloo@earth.li>**20080730194526] 
[Make Cabal compatible with extensible exceptions
Ian Lynagh <igloo@earth.li>**20080730183910
 The code is now also more correct, e.g. when we are ignoring IO exceptions
 while trying to delete something, we don't also ignore timeout exceptions.
] 
[Remove unused imports
Duncan Coutts <duncan@haskell.org>**20080730182957] 
[Remove unused inDir util function
Duncan Coutts <duncan@haskell.org>**20080730165031] 
[Add an "exposed" field to the .cabal file library section
Duncan Coutts <duncan@haskell.org>**20080730164516
 It's a bool flag that says if by default the library should
 be registered with the compiler as exposed/unhidden (for
 compilers which have such a concept, ie ghc). You might want
 to do this for packages which would otherwise pollute the
 module namespace or clash with other common packages.
 It should be very rarely used. The only current examples we
 know of are the ghc api package and the dph packages.
] 
[Rearrange the Monoid instances for Library, Executable, BuildInfo
Duncan Coutts <duncan@haskell.org>**20080730163432
 No functional change, just moving code about.
 We now define the Monoid methods directly rather than in
 terms of emptyLibrary, unionLibrary etc.
] 
[Do the ghc rts ldOptions hack in a slightly more hygenic way
Duncan Coutts <duncan@haskell.org>**20080729195714] 
[Fix uses of verbosity > deafening to use >=
Duncan Coutts <duncan@haskell.org>**20080729191855
 The maximum verbosity value is deafening so >= the correct test.
 This primarily affected haddock.
] 
[Do not use ',' as a list separator for the cpp/cc/ld-options fields
Duncan Coutts <duncan@haskell.org>**20080729170556
 It breaks for some options like "ld-options: -Wl,-z,now"
 No existing .cabal files on hackage were using ',' as a
 list separator so this should not break anything.
] 
[Pass the right -F and --framework flags when running hsc2hs on OS X
Ian Lynagh <igloo@earth.li>**20080729172757] 
[Tweak a test to not go via the pretty printer
Ian Lynagh <igloo@earth.li>**20080729172750] 
[Fix linking with hsc2hs on OS X
Ian Lynagh <igloo@earth.li>**20080729170215
 We don't tell hsc2hs to link the actual Haskell packages, so with GHC's
 rts package we need to also filter out the -u flags.
] 
[Tweak whitespace
Ian Lynagh <igloo@earth.li>**20080729163729] 
[Move docs for build-depends into the build information section
Duncan Coutts <duncan@haskell.org>**20080729162024
 Since it is shared between libs and exes. Extend the documentation
 to describe the syntax of version constraints, including the new
 version range syntax "build-depends: foo ==1.2.*".
] 
[Remove references to cabal-setup from the documentation
Duncan Coutts <duncan@haskell.org>**20080729160950
 Change to runhaskell Setup or cabal-install as appropriate.
] 
[Move the docs for the buildable field to a better place.
Duncan Coutts <duncan@haskell.org>**20080729160808
 It doesn't need to be right up near the top.
] 
[Document more clearly that every modules must be listed
Duncan Coutts <duncan@haskell.org>**20080729160308
 in one of the fields exposed-modules, other-modules or main-is
 Add an extra note to the section on the Paths_pkgname module
 as the fact that it's automatically generated confuses people.
] 
[Document the wildcard behaviour in data-files and extra-source-files fields
Duncan Coutts <duncan@haskell.org>**20080729155920] 
[Document the $os and $arch install path vars
Duncan Coutts <duncan@haskell.org>**20080729155654] 
[File globs must match at least one file or it's an error.
Duncan Coutts <duncan@haskell.org>**20080729154050] 
[Fix the semantics of the simple file globbing to be sane
Duncan Coutts <duncan@haskell.org>**20080729152624
 I realised when I started to document it that the behaviour
 was not terribly consistent or sensible. The meaning now is:
   The limitation is that * wildcards are only allowed in
   place of the file name, not in the directory name or
   file extension. In particular, wildcards do not include
   directories contents recursively. Furthermore, if a
   wildcard is used it must be used with an extension, so
   "data-files: data/*" is not allowed. When matching a
   wildcard plus extension, a file's full extension must
   match exactly, so "*.gz" matches "foo.gz" but not
   "foo.tar.gz".
 The reason for providing only a very limited form of wildcard
 is to concisely express the common case of a large number of
 related files of the same file type without making it too easy
 to accidentally include unwanted files.
] 
[Allow $arch and $os in install paths.
Duncan Coutts <duncan@haskell.org>**20080729151952
 Fixes ticket #312. For example a user could use:
   cabal configure --libsubdir="$pkgid/$compiler/$arch"
 if they wanted to have packages for multiple architectures
 co-exist in the same filestore area.
] 
[Use "pkg == 1.2.*" as the version wildcard syntax
Duncan Coutts <duncan@haskell.org>**20080729151612
 Rather than "pkg ~ 1.2.*". This seemed to be the consensus.
 The syntax "pkg == 1.2.*" means "pkg >= 1.2 && < 1.3" and it
 is to encourage people to put upper bounds on api versions.
] 
[Pass -no-user-package-conf to ghc when not using UserPackageDB
Duncan Coutts <duncan@haskell.org>**20080729145040
 Should eliminate the corner case where we're doing a global
 install but the user package db contains the exact same
 version as in the global package db. Perhaps we should warn
 in that case anyway since it's likely to go wrong later.
] 
[disambiguate Control.Exception.catch for nhc98
Malcolm.Wallace@cs.york.ac.uk**20080728164506] 
[more import qualification to help nhc98
Malcolm.Wallace@cs.york.ac.uk**20080728153629] 
[help nhc98's module disambiguator a bit
Malcolm.Wallace@cs.york.ac.uk**20080724165753] 
[Substitute for $topdir when we read GHC's InstalledPackageInfo's
Ian Lynagh <igloo@earth.li>**20080723112232] 
[Fix the location of gcc.exe in a Windows GHC installation
Ian Lynagh <igloo@earth.li>**20080723101848] 
[Don't need the complex code in detecting hsc2hs anymore
Duncan Coutts <duncan@haskell.org>**20080720234019
 Since we do not need to know if hsc2hs uses ghc or gcc as cc
 by default since in either case we now tell it to use gcc.
] 
[Always use gcc as cc with hsc2hs
Duncan Coutts <duncan@haskell.org>**20080720233759
 Lookup what flags to use from the package index. Previously this
 was done by calling ghc as cc and passing -package flags to ghc.
 ghc would then lookup what extra flags to pass to gcc. We now do
 that ourselves directly and it's a good deal simpler and it's
 portable to the other haskell implementations. This is only a
 first go, the flags may not all be exactly right. Needs testing.
] 
[Add gccProgram
Duncan Coutts <duncan@haskell.org>**20080720232818
 on Windows we have to find ghc's private copy of gcc.exe
] 
[Add PackageSet.topologicalOrder and reverseTopologicalOrder
Duncan Coutts <duncan@haskell.org>**20080720223731
 with type :: PackageFixedDeps pkg => PackageSet pkg -> [pkg]
] 
[Change some PackageSet functions to return the package rather than the id
Duncan Coutts <duncan@haskell.org>**20080720221702
 dependencyGraph and reverseDependencyClosure now return the
 full package rather than just the PackageIdentifier
] 
[Convert from PackageIndex to PackageSet
Duncan Coutts <duncan@haskell.org>**20080720194924
 Turns out the feature to do case-insensitive lookups was only
 needed in cabal-install (and only in one little part) and
 elsewhere it causes problems. So use PackageSet instead.
] 
[If we have GHC >= 6.9 then use the new -optdep replacement flags
Ian Lynagh <igloo@earth.li>**20080722163346] 
[And exitcode of 2 from ghc-pkg when doing describe '*' means no packages
Ian Lynagh <igloo@earth.li>**20080722125759
 This is a bit of a kludge around GHC's #2201, until Cabal is updated to
 use ghc-pkg dump.
] 
[Fix warnings and add a comment explaining why we pass -x to strip on OS X
Ian Lynagh <igloo@earth.li>**20080720220851] 
[Pass -x to strip on OSX
Duncan Coutts <duncan@haskell.org>**20080720204609] 
[Generate expanded makefile rules directly, rather than using $(eval ...)
Ian Lynagh <igloo@earth.li>**20080720194801
 We used to do this with $(eval ...) and $(call ...) in the
 Makefile, but make 3.79.1 (which is what comes with msys)
 doesn't understand $(eval ...), so now we just stick the
 expanded loop directly into the Makefile we generate.
] 
[Put GHC's programArgs in GHC_OPTS when making a Makefile
Ian Lynagh <igloo@earth.li>**20080715132429] 
[Pass -package-conf foo when using GHC as CC
Ian Lynagh <igloo@earth.li>**20080713123958] 
[If we are using ghc as hsc2hs's cc, then tell it where package.conf is
Ian Lynagh <igloo@earth.li>**20080713110548
 if we have been told to use a specific one with --package-db
] 
[Fix installing datafiles
Ian Lynagh <igloo@earth.li>**20080712173934
 If datadir is foo and the datafile is bar then we should install it to
 $datadir/bar, not $datadir/foo/bar.
] 
[Fix the "Setup makefile" rules for C files
Ian Lynagh <igloo@earth.li>**20080712173851] 
[If install is given a distPref, pass it on to copy and register
Ian Lynagh <igloo@earth.li>**20080712121916] 
[derive Eq for ConfiguredProgram
Duncan Coutts <duncan@haskell.org>**20080711160138
 a request from Saizan
] 
[Simplify ghc version test slightly
Duncan Coutts <duncan@haskell.org>**20080711142026] 
[Add a hack to copy .hs-boot files into dist/...
Ian Lynagh <igloo@earth.li>**20080711000826
 When a preprocessor generates a .hs file we need to put the .hs-boot
 file next to it so that GHC can find it.
] 
[Teach "Setup makefile" how to cope with multiple hs-source-dirs
Ian Lynagh <igloo@earth.li>**20080711000726] 
[Fix some whitespace in Makefile.in
Ian Lynagh <igloo@earth.li>**20080710231519] 
[In Makefile.in, put all the rules that mentions srcdir together
Ian Lynagh <igloo@earth.li>**20080710231415] 
[Fix haddocking (with old haddocks?)
Ian Lynagh <igloo@earth.li>**20080703154714] 
[Correct the order of args given by --PROG-options
Duncan Coutts <duncan@haskell.org>**20080710181437
 They were getting reversed. Problem located by Igloo.
] 
[Remove the need for a compat Data.Map module
Duncan Coutts <duncan@haskell.org>**20080710154600
 Stop using Map.alter, use the same solution as the PackageIndex module.
] 
[fix #if __GLASGOW_HASKELL__ test
Ross Paterson <ross@soi.city.ac.uk>**20080705105048
 
 The problem is that
 
 #if __GLASGOW_HASKELL__ < NNN
 
 is also true for non-GHC.  It should be
 
 #if __GLASGOW_HASKELL__ && __GLASGOW_HASKELL__ < NNN
] 
[help nhc98's import overlap resolver
Malcolm.Wallace@cs.york.ac.uk**20080704140613] 
[massage a pattern-with-context around nhc98's typechecker
Malcolm.Wallace@cs.york.ac.uk**20080704140541] 
[Fix using specified package databases
Ian Lynagh <igloo@earth.li>**20080703001216
 If we are using a specified package database, we need to tell GHC what
 it is when building
] 
[Fix the build with GHC 6.4.2: Data.Map.alter doesn't exist
Ian Lynagh <igloo@earth.li>**20080703001151] 
[Allow installing executables in-place, and using shell script wrappers
Ian Lynagh <igloo@earth.li>**20080629164939
 GHC-only currently.
] 
[haddock typo
Ian Lynagh <igloo@earth.li>**20080629114342] 
[Fix a haddock typo
Ian Lynagh <igloo@earth.li>**20080629114239] 
[Update .darcs-boring
Ian Lynagh <igloo@earth.li>**20080627182013] 
[TAG 2008-05-28
Ian Lynagh <igloo@earth.li>**20080528004259] 
[Remove the SetupWrapper module
Duncan Coutts <duncan@haskell.org>**20080628173010
 It's not used in Cabal itself and while cabal-install used
 it previously, it now has its own extended implementation.
] 
[Update module headers
Duncan Coutts <duncan@haskell.org>**20080628172550
 Use cabal-devel@haskell.org as the maintainer in most cases except for
 a few which were pre-existing modules copied from elsewhere or modules
 like L.H.Extension which really belong to libraries@haskell.org
 Remove the useless stability module. We have more detailed information
 on stability elsewhere (in the version number and user guide).
 Add more top level module documentation, taken from the source guide.
] 
[Whitespace changes, convert tabs to spaces
Duncan Coutts <duncan@haskell.org>**20080626200933] 
[Remove a couple old deprecated empty modules
Duncan Coutts <duncan@haskell.org>**20080626195204] 
[Add ModuleName as a new type instead of using String everywhere
Duncan Coutts <duncan@haskell.org>**20080626192939] 
[Tweaks to the readme, hopefully will reduce confusion
Duncan Coutts <duncan@haskell.org>**20080625232051] 
[Add compat InstalledPackageInfo types for older GHCs
Duncan Coutts <duncan@haskell.org>**20080621013727
 We need these types for their Read instances so that we
 can still read older GHCs package db files when we make
 changes to the current InstalledPackageInfo type, or the
 types contained in it, like PackageIdentifier or License.
] 
[Add simple file name globbing (*) to data-files and extra-source-files
Duncan Coutts <duncan@haskell.org>**20080626171424] 
[Use conservative render style for display
Duncan Coutts <duncan@haskell.org>**20080619222258] 
[Include trailing newline in hscolour command description
Duncan Coutts <duncan@haskell.org>**20080619220940] 
[Add PackageSet, like PackageIndex but case sensitive
Duncan Coutts <duncan@haskell.org>**20080614003705
 Actually it turns out that we don't need case insensitivity in many
 cases, mosty just for simple lookups in the UI. For everything else
 the ordinary Ord instance is much simpler. The fact that listing the
 contents of a PackageIndex doesn't come out in Ord order actually
 causes real problems in cabal-install and necessitates re-sorting.
 So we should move to using PackageSet in most cases and just leave
 the search and lookup operations in PackageIndex.
] 
[Add PackageName as a newtype
Duncan Coutts <duncan@haskell.org>**20080614002926] 
[No more need for the distinction between null and emptyBuildInfo
Duncan Coutts <duncan@haskell.org>**20080614001654
 Now that we have removed the hsSourceDirs = [currentDir] default
 from emptyBuildInfo it is now equal to nullBuildInfo.
] 
[Add version wildcard syntax
Duncan Coutts <duncan@haskell.org>**20080619175006
   build-depends: foo ~1.2.*
 means:
   build-depends: foo >=1.2 && <1.3
 It's also valid everywhere else version ranges are used.
] 
[haddock-2.2 and later do now support the --hoogle flag
Duncan Coutts <duncan@haskell.org>**20080613205445] 
['.' should not always be in hs-source dirs
Duncan Coutts <duncan@haskell.org>**20080613230352
 We changed the parsing of list fields in the .cabal file so that it
 adds to the current value rather than replacing it. This allows you
 to put multiple entries for a list field and they all get
 concatenated. However that means that the '.' in the hsSourceDirs of
 emptyBuildInfo is always added to and not replaced like we did
 previously. That's not what we want in this case. We want to use '.'
 for hsSourceDirs *only* if hsSourceDirs is otherwise null. As it
 happens, due to the way the configurations code works, we're already
 filling in the default if it'd otherwise be null so we do not need
 '.' in the emptyBuildInfo at all.
] 
[Fix css location in generation of user guide
Duncan Coutts <duncan@haskell.org>**20080617133811] 
[Update changelog for 1.4.0.1
Duncan Coutts <duncan@haskell.org>**20080617130434] 
[Makefile tweak, setup depends on Setup.hs
Duncan Coutts <duncan@haskell.org>**20080616175446] 
[construct InstalledPackageInfo from scratch rather than by overriding
Duncan Coutts <duncan@haskell.org>**20080616171505
 It means we catch any fields that get added. As it happens we were
 missing a field, though its value is supposed to be just [] which is
 the same value as we got from the default emptyInstalledPackageInfo.
] 
[force results inside withHaskellFile
Ross Paterson <ross@soi.city.ac.uk>**20080614160707
 
 withUTF8FileContents now closes the file, so we need to force what we're
 computing from the contents before it's gone.
] 
[Include the readme and the changelog in the tarball
Duncan Coutts <duncan@haskell.org>**20080612190558] 
[Move the mkGHCMakefile.sh out of the root dir
Duncan Coutts <duncan@haskell.org>**20080612190317
 Having it there confuses people.
 They think they have to run it as part of the install process.
] 
[Put upper bounds on all the build-depends
Duncan Coutts <duncan@haskell.org>**20080612174958] 
[Add the 1.4.0.0 release to the changelog
Duncan Coutts <duncan@haskell.org>**20080612164242] 
[Add the 1.2.4.0 release to the changelog
Duncan Coutts <duncan@haskell.org>**20080612164144] 
[Update the README and convert it to markdown syntax
Duncan Coutts <duncan@haskell.org>**20080612162906] 
[Update the release notes
Duncan Coutts <duncan@haskell.org>**20080612154624] 
[Update copyright and authors list in the .cabal file
Duncan Coutts <duncan@haskell.org>**20080612154444] 
[base-1.0 does not have Data.Map.alter so use insertWith instead
Duncan Coutts <duncan@haskell.org>**20080612154309] 
[Lift the restriction that libraries must have exposed-modules
Duncan Coutts <duncan@haskell.org>**20080612092924
 This allows libs that have only private modules or C code. This
 might be used to make libs that have non-exposed modules and only
 export C APIs. It could also be used to make packages that consist
 only of C code. That might be useful for bindings where it may
 make sense to split the C and Haskell code into separate packages.
] 
[Use the standard autogenModulesDir rather than a local copy
Duncan Coutts <duncan@haskell.org>**20080612092855] 
[Fix the register --gen-pkg-config flag
Duncan Coutts <duncan@haskell.org>**20080612092425
 When specified without any file name it is supposed to use
 a default file name rather than be ignored completely.
] 
[Filter out the Paths_pkgname file in sdist
Duncan Coutts <duncan@haskell.org>**20080612091810
 Fixes ticket #187 finally (I hope).
] 
[Switch the hugs code to safe file reading and writing
Duncan Coutts <duncan@haskell.org>**20080610180947] 
[Use writeFileAtomic everywhere instead of writeFile
Duncan Coutts <duncan@haskell.org>**20080610180727] 
[Switch to scoped file reading rather than lazy readFile
Duncan Coutts <duncan@haskell.org>**20080610180528] 
[Close the package.conf file after reading it
Duncan Coutts <duncan@haskell.org>**20080610180217
 We had a bug on windows where we open and read ghc's package.conf
 database but because we did not consume the final newline we did
 not close the file. Then when we called ghc-pkg to register a
 package it failed because it could not rename the open file.
] 
[Add withFileContents and withUTF8FileContents
Duncan Coutts <duncan@haskell.org>**20080610180150
 Safe block scoped reading of files.
 These guarantee that the file gets closed.
] 
[Fix pre-processing for haddock and executables
Duncan Coutts <duncan@haskell.org>**20080609233609
 Now look in the right place to find the pre-processed source
 files belongign to executables. Fixes ticket #252.
] 
[Fail better when using haddock 2.x and the --hoogle flag
Duncan Coutts <duncan@haskell.org>**20080609190555
 Fixes ticket #249
] 
[Install haddock interface only when generated
Duncan Coutts <duncan@haskell.org>**20080609190251
 This is actually Andrea Rossato's patch but it didn't merge
 cleanly due to more recent changes. Fixes ticket #250.
] 
[Install license file into the right place
Duncan Coutts <duncan@haskell.org>**20080609185840
 even if the license file was kept in a subdir of the src tree.
 The canonical example was: license-file: debian/copyright
 It was being installed into $docdir/debian/ and failing since
 that dir did not exist. It's now installed into just $docdir.
] 
[Note compatability issue in deprecation message for defaultUserHooks
Duncan Coutts <duncan@haskell.org>**20080527135830] 
[Bump version due to api changes
Duncan Coutts <duncan@haskell.org>**20080529104714] 
[Put spaces round || and && when displaying version range expressions
Duncan Coutts <duncan@haskell.org>**20080529104214
 This makes them much more readable.
] 
[Change the PackageIndex invariant so the buckets are ordered
Duncan Coutts <duncan@haskell.org>**20080529095346
 Each bucket holds packages with the same name case-insensitively.
 Previously each buckets was internally unordered. Now they're
 ordered by the full package id which means first by package name
 case-sensitively and then by version.
] 
[Add thisPackageVersion and notThisPackageVersion
Duncan Coutts <duncan@haskell.org>**20080529092607
 Util functions for makeing dependencies from package identifiers.
 thisPackageVersion    (foo-1.0) = foo ==1.0
 notThisPackageVersion (foo-1.0) = foo /=1.0
 The latter is handy as a constraint in dependency resolution.
] 
[Add notThisVersion :: Version -> VersionRange
Duncan Coutts <duncan@haskell.org>**20080529092244
 Opposite of ThisVersion, it means /= x.y but is actually implemented
 as > x.y || < x.y as we do not have not or not equal as primitives.
] 
[Write out Bool config values correctly
Duncan Coutts <duncan@haskell.org>**20080521153420
 Used by cabal-install when writing the default ~/.cabal/config file.
 Previously it was using show for type Maybe Bool and writing out
 "Just True" when of course it should just be "True".
] 
[Rename doc/fptools.css to avoid the ghc build system cleaning it
Duncan Coutts <duncan@haskell.org>**20080520191700
 The user guide gets built in two different ways. There's a target
 in Cabal's the top level Makefile and there is also the stuff that
 the ghc build system uses. The ghc build system expects to copy in
 doc/fptools.css and then delete it again on make clean. We want a
 persistent copy so that we can make the docs when we've just got a
 standalone Cabal build tree, so that's now kept as doc/Cabal.css.
] 
[Remove gnerated file (doc/fptools.css)
Ian Lynagh <igloo@earth.li>*-20080511130035] 
[document data-dir field
Bertram Felgenhauer <int-e@gmx.de>**20080509131306] 
[add data-dir field to package config
Bertram Felgenhauer <int-e@gmx.de>**20080509130448
 Cabal will look for data files to install relative to the directory given
 in the data-dir field, allowing package authors to better structure their
 source tree. There's no behavioural change by default.
] 
[Allow the bindir, libdir and libexec dir to be specified via env vars too
Duncan Coutts <duncan@haskell.org>**20080519173808
 Same as for the datadir. Eg for package Foo, you'd use
 Foo_bindir=... Foo_datadir=... Foo_libexecdir=... ./Foo
 The next step would be generating a wrapper script that allows
 running the program inplace. It should also work for a library.
] 
[Remove unused import
Duncan Coutts <duncan@haskell.org>**20080513094301] 
[Do not display version tags
Duncan Coutts <duncan@haskell.org>**20080509094455] 
[Remove Distribution.Compat.Exception from other-modules
Duncan Coutts <duncan@haskell.org>**20080514171822] 
[Add PackageIndex.lookupPackageName and extra deletion functions
Duncan Coutts <duncan@haskell.org>**20080514162954] 
[Check invariant on every construction and elide on lookups
Duncan Coutts <duncan@haskell.org>**20080514154104] 
[Remove redundant Char test in parseBuildToolName
Duncan Coutts <duncan@haskell.org>**20080514153343
 It was made redundant after the isSymbol test was removed.
 Spotted by Igloo.
] 
[Eliminate use of bracketOnError, use handle instead
Duncan Coutts <duncan@haskell.org>**20080514153206
 It's actually more appropriate anyway.
 This means we don't need any Distribution.Compat.Exception.
] 
[Define bracketOnError in compat; fixes the build for GHC 6.4
Ian Lynagh <igloo@earth.li>*-20080514003919] 
[Add in {-# OPTIONS #-} for the benefit of ghc-6.4.x
Duncan Coutts <duncan@haskell.org>**20080514144728
 Which do not grok OPTIONS_GHC or LANGUAGE pragmas
] 
[fix scope errors in non-GHC branch of an #ifdef
Malcolm.Wallace@cs.york.ac.uk**20080514112530] 
[Prefix the datadir env var with the package name
Duncan Coutts <duncan@haskell.org>**20080514094203
 Partly as it is more likely not to clash with other users and since
 in general different libs within a program may need different paths.
] 
[Made it possible to run executeables with data files in place.
Johan Tibell <johan.tibell@gmail.com>**20080413134155
 Added an environment variable, DATA_DIR, that is checked before the
 installation data directory is used.
] 
[Don't use Data.Char.isSymbol as it doesn't exist in base-1.0
Duncan Coutts <duncan@haskell.org>**20080514083405
 This is an alternative fix to creating a Distribution.Compat.Char
] 
[Modules that use cpp have to have cpp language prama to say so
Duncan Coutts <duncan@haskell.org>**20080514082913
 Otherwise we cannot compile with just ghc --make
 which is actually essential for bootstrapping.
] 
[Make Distribution.Compat.Char for isSymbol; fixes the build with GHC 6.4
Ian Lynagh <igloo@earth.li>*-20080514004703] 
[Add new compat modules to Cabal file
Ian Lynagh <igloo@earth.li>**20080514022119] 
[Make Distribution.Compat.Char for isSymbol; fixes the build with GHC 6.4
Ian Lynagh <igloo@earth.li>**20080514004703] 
[Hack around lack of Read for Map in GHC 6.4
Ian Lynagh <igloo@earth.li>**20080514004400
 This is made worse by Show on Map being strange in GHC 6.4.
 The code could be better, but it works, and all the ugliness is in
 #if's that we can remove at some point down the line.
] 
[Define bracketOnError in compat; fixes the build for GHC 6.4
Ian Lynagh <igloo@earth.li>**20080514003919] 
[Print exit code and stderr for failing progs at debug level verbosity
Duncan Coutts <duncan@haskell.org>**20080513094055
 Also adjust the verbosity level we get during configure at -v3
 Should make it a bit easier to track down failing calls.
] 
[Remove a hardcoded "dist"
Ian Lynagh <igloo@earth.li>**20080511181305] 
[Make the "dist" directory configurable
Ian Lynagh <igloo@earth.li>**20080511155640] 
[Remove gnerated file (doc/fptools.css)
Ian Lynagh <igloo@earth.li>**20080511130035] 
[Fix a bug in the unlitter
Ian Lynagh <igloo@earth.li>**20080510233852
 If we see a birdtrack while we are in latex mode, then we stay in latex
 mode - don't change into bird mode!
] 
[Display Cabal version in configure output with -v
Duncan Coutts <duncan@haskell.org>**20080509163507
 eg "Using Cabal-1.5.1 compiled by ghc-6.8"
 Annoyingly ghc doesn't give us its full version number.
] 
[Add PackageIndex.reverseDependencyClosure
Duncan Coutts <duncan@haskell.org>**20080506234902
 It's similar to dependencyClosure but looks at reverse dependencies.
 For example it's useful to find all packages that depend on broken
 packages and are thus themselves broken.
] 
[Improve style and performance of PackageIndex.dependencyClosure
Duncan Coutts <duncan@haskell.org>**20080506234447
 Keep the completed set as another PackageIndex rather than a list.
 We want to return an index at the end anyway and in the mean time
 we want to do lots of lookups to see if we've visited previously.
] 
[Add PackageIndex.dependencyGraph that builds a Graph
Duncan Coutts <duncan@haskell.org>**20080506234326
 Useful for some more tricky queries.
] 
[Add PackageIndex.delete
Duncan Coutts <duncan@haskell.org>**20080506131603
 We occasionally need to remove packages from an index
 eg to restrict the choices of a dependency resolver.
] 
[Remove a test for the specific kind of exception for nhc98 compatibility
Duncan Coutts <duncan@haskell.org>**20080506102804
 This was the check for ghc-pkg failing. We cannot check for the
 exception being an ExitException since that assumes ghc's
 representation of the Exception type, whereas nhc98 defines:
 type Exception = IOError
] 
[Cope better with ghc bug #2201, display a better error message
Duncan Coutts <duncan@haskell.org>**20080505085746
 Otherwise it can (and does) really confuse people.
 The problem is that the command $ ghc-pkg-6.9 describe '*' --user
 returns a non-zero exit code if the user package db is empty.
 ghc-pkg intends this exit code to tell us if the query returned
 any results (one can use more complex queries as tests) but Cabal
 interprets it as failure. Indeed we cannot distinguish it from
 any other kind of failure from ghc-pkg.
] 
[Add PackageIndex.dependencyCycles
Duncan Coutts <duncan@haskell.org>**20080504131626
 Finds any cycles (strongly connected components) in the dependencies
 of set of packages. This is useful for checking the correctness of
 installation plans.
] 
[Change dependencyInconsistencies to not take the pseudo top package
Duncan Coutts <duncan@haskell.org>**20080504130802
 The one case where we need the pseudo top package we can use
 PackageIndex.insert instead to get the same effect and there
 are other cases in cabal-install where we do not want a pseudo
 top package.
] 
[Reverse the order of the args to PackageIndex.insert
Duncan Coutts <duncan@haskell.org>**20080504130317
 To take the index last like the other functions and like Data.Map.
 It is actually more convenient that way round.
] 
[Revert the change about the --internal flag and a warning about haddock
Duncan Coutts <duncan@haskell.org>**20080501223131
 Just a bit of confusion over the behaviour of the --executable flag.
] 
[Document --internal in Cabal.xml
Joachim Breitner <mail@joachim-breitner.de>**20080501153356] 
[With --executable, --internal just adds --ignore-all-exports
Joachim Breitner <mail@joachim-breitner.de>**20080501152544] 
[Implement --internal flag
Joachim Breitner <mail@joachim-breitner.de>**20080501152421
 Passing --internal to the haddock stage does these things:
  * Does not pass --hide parameter to haddock
  * Passes --ignore-all-exports parameter
  * Appends "(internal documentation)" to the title
] 
[Add an --internal flag to HaddockFlags
Joachim Breitner <mail@joachim-breitner.de>**20080501145103] 
[Revert the other `fmap` to (.)
Malcolm.Wallace@cs.york.ac.uk**20080501110006
 To avoid needing a non-H'98 instance of Functor for (->).
] 
[Revert one change of (.) to fmap. It was not necessary and broke nhc98.
Duncan Coutts <duncan@haskell.org>**20080501104620
 The other one was needed as we changed a type from Bool to Maybe Bool.
] 
[Add help command as per ticket #272
Duncan Coutts <duncan@haskell.org>**20080430133740
 "cabal help" behaves like "cabal --help"
 "cabal help cmd" behaves like "cabal cmd --help"
 Should still work with command line completion.
] 
[Change handling of bool command line args to allow an unset state
Duncan Coutts <duncan@haskell.org>**20080429201123
 For bool valued flags we were always producing the command line
 string corresponding to a false flag value, even if the flag was
 not set. For example we'd always get "--disable-shared".
 It is important for cabal-install to be able to take an empty set
 of flags, override a few flags and turn the flags back into
 command line strings without getting a lot of extra defaults.
 Partly this is because we have to work with older versions of the
 Cabal library command line which does not recognise the new options.
] 
[Remove the feature for highlighting the default cases in --help output
Duncan Coutts <duncan@haskell.org>**20080429191206
 Turns out it doesn't help us much because in many cases the initial/default
 flags are actually empty so we cannot identify the default values.
] 
[Make the old test code compile
Duncan Coutts <duncan@haskell.org>**20080428225729
 Still a lot of bit rot, many of the full tests fail due to changed paths
] 
[Fix license parsing
Duncan Coutts <duncan@haskell.org>**20080428192255
 Spotted by the testsuite which I'm trying to resurrect.
] 
[Fix fix for #224.
Thomas Schilling <nominolo@gmail.com>**20080426164537
 
 Changing from list of Dependencies to Maps resulted in the wrong Monoid 
 instance being used.  I'd still like to be able to run a test suite on 
 this but that'd require a lot more work to do properly...
] 
[When multiple specifying list fields in the same section combine them
Duncan Coutts <duncan@haskell.org>**20080423201519
 eg if you had:
 extensions: Foo
 extensions: Bar, Baz
 then previously we only ended up with [Bar, Baz]. Now we get them all.
 Only applies to list fields, for single fields the second value is taken
 and the first is silently discarded. This isn't good of course but the
 fix is harder since we're not in a context where we can report errors.
 Really we should just declare up front what kind of field it is and
 inherit the right behaviour automagically, either duplicates disallowed
 or allowed and combined with mappend.
] 
[Normalise file names in warning messages
Duncan Coutts <duncan@haskell.org>**20080423190457
 We already do this for error messages.
] 
[Fix the check for -XFooBar ghc-options flags to be more permissive
Duncan Coutts <duncan@haskell.org>**20080423190243
 Previously we rejected all such flags but that posed the problem that older
 versions of Cabal, like 1.1.6 did not understand new extensions so we
 could not actually follow the advice and use the extenion. So now we only
 warn about -X flags if they refer to old extensions that Cabal 1.1.6 knew
 about. If the .cabal file specifies cabal-version: >= 1.2 or similar
 (anything that excludes 1.1.6) then we warn about all -X flags.
] 
[Add checks for unknown OS Arch and Compiler names
Duncan Coutts <duncan@haskell.org>**20080423151410
 They're ok locally but for distribution they need to be known.
] 
[Package check now take a GenericPackageDescription
Duncan Coutts <duncan@haskell.org>**20080423150354
 Unfortunately in some cases we only have a already-configured
 PackageDescription to we have to expose a checkConfiguredPackage.
 We should refactor things so that we keep all the information
 even in a configured PackageDescription.
] 
[Make warning messages show the file name
Duncan Coutts <duncan@haskell.org>**20080422141909] 
[Update UTF8 code
Duncan Coutts <duncan@haskell.org>**20080422141539
 Some code and test cases taken from the utf8-string package.
 Updated copyright notice appropriately (I think).
] 
[fix import for nhc98
Malcolm.Wallace@cs.york.ac.uk**20080422133009] 
[Don't nub extra-libs in unionBuildInfo
Duncan Coutts <duncan@haskell.org>**20080420192312
 It's possible that we sometimes need to list the same library
 more than once if there are circular symbol references.
] 
[Fix unionBuildInfo
Duncan Coutts <duncan@haskell.org>**20080420180520
 Fix ticket #264 to use nub only on the fields which are treated as sets.
 Probably we should be using the right types and mappend for each field.
 Change to construct a new value from scratch rather than overriding one
 of the two args. This helps to make sure we're updating all the field
 as we get a warning if we miss any. Turns out we were missing the ghc
 profiling and shared libs options which meant they were getting dropped.
 That had the effect of ghc-prof-options: in .cabal files being ignored.
 Thanks to 'midfield' from #haskell for spotting this.
] 
[Add newtype FlagName and FlagAssignment type alias
Duncan Coutts <duncan@haskell.org>**20080415204854
 and use them in the appropriate places.
] 
[Add PackageIndex.insert and reverse merge/mappend
Duncan Coutts <duncan@haskell.org>**20080415203637
 Packages in the second argument to merge now mask those in the first.
] 
[Make finalizePackageDescription use CompilerId type
Duncan Coutts <duncan@haskell.org>**20080413224111
 Use the proper data type rather than a tuple (CompilerFlavor, Version)
] 
[Fix #224.  We do not yet warn if the user specified a dependency that
Thomas Schilling <nominolo@gmail.com>**20080413182659
 did not occur in the package (it is just silently ignored.)
] 
[Add 'readP_to_E' function that takes the longest parse.
Thomas Schilling <nominolo@gmail.com>**20080413182042] 
[Add simple test case for the dependency resolution case.  This should
Thomas Schilling <nominolo@gmail.com>**20080413132002
 go into the test suite one day.
] 
[Fix/Add documentation.
Thomas Schilling <nominolo@gmail.com>**20080413131839] 
[Change dependency resolution algorithm.
Thomas Schilling <nominolo@gmail.com>**20080413131807
 
 There were two reasons to do this.  Firstly, this formulation makes it
 easier to add the --constraint command line flag that adds additional
 constraints on the packages that should be used.
 
 Secondly, with the orgininal algorithm it was possible to satisfy the
 constraint "foo < 1, foo > 2" if we had two versions of package "foo"
 which each satisfy one constraint.  This patch fixes this by requiring
 the same package to satisfy both constraints (which of course is
 impossible in this case).
] 
[expose ghcOptions
jeanphilippe.bernardy@gmail.com**20080417211221
 This helps finding the options to pass to GHC API in various tools
] 
[expose tryGetConfigStateFile
jeanphilippe.bernardy@gmail.com**20080417180248
 This is needed by Yi to (try to) load an arbitrary
 project.
] 
[fix for #187 -- directory of Paths_packagename is included when looking for source files
Andres Loeh <mail@andres-loeh.de>**20080412204904] 
[Check for the required cabal version early in parsing
Duncan Coutts <duncan@haskell.org>**20080409154655
 Previously we only checked the "cabal-version" field after parsing
 and all other configure processing. If the package really needs a
 later Cabal version it is of course highly likely that parsing or
 configure are going to fail and the user is not going to get the
 helpful error message about the version of Cabal required. So now
 we do the check early during parsing. If a later version is
 required and parsing subsequently fails, we now report the version
 issue, not the subsequent parse error. If parsing succeeds we
 still issue a warning which should be a useful hint to the user if
 subsequent configure processing fails.
] 
[Use relative file paths in .cabal parse error messages
Duncan Coutts <duncan@haskell.org>**20080409154030
 Do this by normalising the file path in the error message
 and when looking for .cabal files, by looking in '.' rather
 than the absolute path of the current directory.
] 
[Remove unused import
Duncan Coutts <duncan@haskell.org>**20080409073352] 
[Fix for detecting ~/.cabal/ dir as a .cabal file
Duncan Coutts <duncan@haskell.org>**20080409073236
 Which happened if you use cabal configure in your home dir.
 Now produced the right error message, or if you actually put
 a cabal project in your home dir, it might actually work.
 Also, do the same fix for findHookedPackageDesc.
] 
[Fix spelling in error message
Duncan Coutts <duncan@haskell.org>**20080408134610] 
[Fix names of profiling libs
Duncan Coutts <duncan@haskell.org>**20080407013449
 I broke this recently when refactoring. Restore the original behaviour.
 Was generating "libHSfoo_p-1.0.a" when it should be "libHSfoo-1.0_p.a".
] 
[TAG 1.5.1
Duncan Coutts <duncan@haskell.org>**20080329181329] 
Patch bundle hash:
c349b3cb2413c999b8836bbe0520300e66e1a4f5

