
New patches:

[Zeroth support.
lemmih@gmail.com**20050704202406] {
hunk ./Distribution/PreProcess.hs 43
-                                ppCpp, ppCpp', ppGreenCard, ppC2hs, ppHsc2hs,
+                                ppZeroth, ppZeroth', ppCpp, ppCpp', ppGreenCard,
+                                ppGreenCard', ppC2hs, ppHsc2hs,
hunk ./Distribution/PreProcess.hs 54
+import Distribution.Package ( showPackageId, PackageIdentifier )
+
hunk ./Distribution/PreProcess.hs 59
+import Distribution.Extension ( extensionsToGHCFlag )
+
hunk ./Distribution/PreProcess.hs 64
-import Data.List (nub)
+import Data.List ( nub, intersperse )
hunk ./Distribution/PreProcess.hs 192
+ppZeroth :: BuildInfo -> LocalBuildInfo -> PreProcessor
+ppZeroth = ppZeroth' [] []
+
+ppZeroth' :: [PackageIdentifier] -> [String] -> BuildInfo -> LocalBuildInfo -> PreProcessor
+ppZeroth' extraPkgs inputArgs bi lbi
+    = maybe (ppNone "zeroth") pp (withZeroth lbi)
+    where pp zeroth inFile outFile verbose
+              = rawSystemVerbose verbose zeroth (["--ghc="++compilerPath (compiler lbi)
+                                                 ,"--output="++outFile,"--input="++ inFile
+                                                 ,"--ghc-args="++ghcArgs] ++ cpphsArg ++ inputArgs)
+          ghcArgs = "-i.:"++concat (intersperse ":" (hsSourceDirs bi)) ++ " " ++ unwords (snd (extensionsToGHCFlag (extensions bi)))
+                    -- unwords $ map (\pkg -> unwords ["-package",showPackageId pkg]) (packageDeps lbi ++ extraPkgs)
+          cpphsArg = case withCpphs lbi of
+                       Nothing -> []
+                       Just cpphs -> ["--cpphs="++cpphs]
+
hunk ./Distribution/PreProcess.hs 305
--- |Standard preprocessors: GreenCard, c2hs, hsc2hs, happy, alex and cpphs.
+-- |Standard preprocessors: zeroth, GreenCard, c2hs, hsc2hs, happy, alex and cpphs.
hunk ./Distribution/PreProcess.hs 308
-  [ ("gc",     ppGreenCard)
+  [ ("th",     ppZeroth)
+  , ("gc",     ppGreenCard)
hunk ./Distribution/Setup.hs 105
+        configZeroth   :: Maybe FilePath, -- ^Zeroth path
hunk ./Distribution/Setup.hs 128
+        configZeroth   = Nothing,
hunk ./Distribution/Setup.hs 139
-          | WithGreencard FilePath
+          | WithGreencard FilePath | WithZeroth FilePath
hunk ./Distribution/Setup.hs 264
+           Option "" ["with-zeroth"] (ReqArg WithZeroth "PATH")
+               "give the path to zeroth",
hunk ./Distribution/Setup.hs 297
+        updateCfg t WithZeroth path      = t { configZeroth   = Just path }
hunk ./Distribution/Simple/Configure.hs 150
+        zeroth    <- findProgram "zeroth"    (configZeroth cfg)
hunk ./Distribution/Simple/Configure.hs 164
+        reportProgram "zeroth"    zeroth
hunk ./Distribution/Simple/Configure.hs 178
+                              withZeroth=zeroth,
hunk ./Distribution/Simple/LocalBuildInfo.hs 71
+        withZeroth    :: Maybe FilePath, -- ^Might be the location of the Zeroth executable.
}

Context:

[added dist.compiler, from ross
ijones@syntaxpolice.org**20050628154025] 
[prof-options -> ghc-prof-options
ijones@syntaxpolice.org**20050628063036] 
[wibble 2
ijones@syntaxpolice.org**20050628060925] 
[wibble
ijones@syntaxpolice.org**20050628060756] 
[clean up conflicts, temp fix for test cases
ijones@syntaxpolice.org**20050628055527] 
[from ross, added language.haskell.extension
ijones@syntaxpolice.org**20050628052426] 
[lots of changes, mostly from ross
ijones@syntaxpolice.org**20050628051544
   documentation updates from ross paterson
   - more accurate specification of package names
   - hs-source-dir -> hs-source-dirs in examples
   - setup clean removes a bit more
   - rearrange description of fields
 
   Version.hs: allow more spaces in version constraints
 
   Install.hs: add the exe extension when installing executables (reported by Brian Smith)
  
   test directory: add explicit dependencies on base
 
   Misc:
   Prefix error messages and warnings with the program name, and send them
   to stderr.  (Also moved some stuff from Distribution.Simple.Utils to
   Distribution.Simple.Build to avoid circular dependencies.)
 
   refactoring only: split Compiler type from Distribution.Setup,
   to reduce dependencies.
 
   Exclude DefaultSetup.lhs from the GHC build
 
   add JHC to the Compiler type
 
   refactored argument processing
 
   setup sdist --snapshot: append YYYYMMDD to the version for the bundle
 
   improved error messages (from Brian Smith):
   
   * attach source locations to messages when available
   
   * change some remaining error's do die.
 
   refactor defaultMainWorker
 
   split Distribution.Extension between Language.Haskell.Extension (just
   the type, which will also be useful when haskell-src-exts is merged)
   and Distribution.Compiler (mappings to compiler options).
 
   add Language.Haskell.Extension
 
   Simon marlow:  update defaults for prefix/libdir/bindir
 
 
] 
[comments and small docs
ijones@syntaxpolice.org**20050604183800] 
[added the cabal-setup executable which is defaultMain
ijones@syntaxpolice.org**20050517060532] 
[s/rawSystemPath/rawSystemVerbose/ typo.
lemmih@gmail.com**20050609164509] 
[Make HUnit happy with the new profiling support.
lemmih@gmail.com**20050604191435] 
[Previous prof-libraries are removed before building the new one.
lemmih@gmail.com**20050530150253] 
[Fixed bug which caused Cabal to guess the wrong HC-PKG path.
lemmih@gmail.com**20050530121044] 
[Using 'reads' instead of 'read' in Simple.Configure.getPersistBuildConfig
lemmih@gmail.com**20050530120947] 
[Added --with-greencard.
lemmih@gmail.com**20050530120830] 
[Support for building libraries and executables with profiling enabled.
lemmih@gmail.com**20050527173144] 
[from Krasimir: -fhide-all-packages should be -hide-all-packages
ijones@syntaxpolice.org**20050516165147] 
[fixed bug: executable build location had changed
ijones@syntaxpolice.org**20050515074133
 Since we don't have hs-source-dir anymore, the location for building
 executables had changed.  However, install was still looking in the
 old location.  Fixed this.
 
 Fixed another bug where hs-source-dir for executables was [".","."]
 where this duplication caused a problem in locating the Main module.
 Not sure quite where this came from, but now for combining fields, we
 always nub, so this should be a robust fix.
 
 Fixed build failures in testing code.
] 
[hs-source-dirs, other-files
ijones@syntaxpolice.org**20050515061253
 Krasimir:
   added hs-source-dirs (ross added docs)
 
   Add other-files field to PackageDescription. This is a list files
   which belong to the package but aren't compiled. These files are
   copied and packaged from sdist command.
 
 Ross:
   fixes to buildHugs and sdist after hs-source-dirs changes.
   
   Also simplified smartCopySources a bit.
 
   document sdist and new other-files field.
 
] 
[adding -fhide-all-packages for ghc > 6.4
ijones@syntaxpolice.org**20050512043302] 
[updating changelog and release notes for release
ijones@syntaxpolice.org**20050512043237] 
[untabify cabal file
ijones@syntaxpolice.org**20050510051920] 
[resolved confligs with hackage version
ijones@syntaxpolice.org**20050510051615] 
[cabal version and test case for ghc 6.4 recursive mods
ijones@syntaxpolice.org**20050510045613] 
[Cabal-get is not using Distribution.GetOps anymore.
lemmih@gmail.com**20050421211447] 
[Various changed needed by hackage/cabal-get.
lemmih@gmail.com**20050421013739
 
 * Exporting Distribution.Compat.FilePath and Distribution.GetOpt.
   I'm using GetOpt from Cabal 'cause I fixed a bug in it which I haven't commited to CVS yet.
 In Distribution.Simple.Config:
 * Made 'getInstalledPackagesAux' and 'configCompilerAux' which aren't using ConfigFlags
   since cabal-get defines it own ConfigFlags.
 * Changed 'configCompilerVersion' to take a verbose argument instead of a ConfigFlags.
 * Exported those functions.
 
] 
[Now exporting getInstalledPackages from Distribution.Simple.Configure since it's needed by cabal-get.
lemmih@gmail.com**20050418173622] 
[CVS pull from Simon Marlow:
ijones@syntaxpolice.org**20050510043142
   getInstalledPackages: ignore lines beginning with "Creating", so that
   we can understand this ghc-pkg output from 6.4:
   
   Creating user package database in /home/simonmar/.ghc/i386-linux-6.4/package.conf
   /home/simonmar/fp/lib/i386-unknown-linux/ghc-6.4/package.conf:
       rts-1.0, base-1.0, haskell98-1.0, template-haskell-1.0, unix-1.0,
       Cabal-1.0, parsec-1.0, haskell-src-1.0, network-1.0,
       QuickCheck-1.0, HUnit-1.1, mtl-1.0, fgl-5.2, X11-1.1, HGL-3.1,
       OpenGL-2.0, GLUT-2.0, stm-1.0, readline-1.0, (lang-1.0),
       (concurrent-1.0), (posix-1.0), (util-1.0), (data-1.0), (text-1.0),
       (net-1.0), (hssource-1.0)
   /home/simonmar/.ghc/i386-linux-6.4/package.conf:
] 
[adding some haddock
ijones@syntaxpolice.org**20050508215248] 
[CVS pull from Ross
ijones@syntaxpolice.org**20050508212926
   add with-c2hs option to configure, pass cpp options to c2hs, plus a
   little refactoring.
   
   This involves interface changes: changed type of ppC2hs, extra fields
   in ConfigFlags and LocalBuildInfo.
] 
[renamed getInstalledPackages{,Aux}
ijones@syntaxpolice.org**20050503171755] 
[implemented ranlib execution during installation
ijones@syntaxpolice.org**20050502050154
 This is necessary in Mac OS X and on Solaris.
 
 It is possible that this might cause problems for systems that use
 setup copy to build and then use cp to install files, since the
 library modification time will change.  I think this is only the case
 on Mac OS X and Solaris.
 
] 
[working on changelogs; bumped version number
ijones@syntaxpolice.org**20050502042039] 
[tweaks to lemmih's patch to rename functions
ijones@syntaxpolice.org**20050502031647] 
[fixed bug in c2hs preprocessor
ijones@syntaxpolice.org**20050502024024] 
[formatting changes and untabify
ijones@syntaxpolice.org**20050418052517] 
[Added pattern guards as a language extension
Josef Svenningsson <josef.svenningsson@gmail.com>**20050416204612] 
[Changes needed by cabal-get.
lemmih@gmail.com**20050426230537
 
 [from Distribution.Simple.Configure]
  * Exporting getInstalledPackagesAux and configCompilerAux.
  * Refactored ConfigFlags out of configCompilerAux, findCompiler,
    configCompilerVersion and guessPkgToolFromHcPath.
  * Changed the verbosity of getInstalledPackages, findCompiler,
    configCompilerVersion and guessPkgToolFromHcPath.
 
] 
[cleanup from Ross. no change in behavior
ijones@syntaxpolice.org**20050416200553] 
[implemented handling of _stub.{c,h,o} files
ijones@syntaxpolice.org**20050416195824
 Including a test case from J�r�my Bobbio.
 
 Previously, we weren't linking in _stub.o files to the library, though
 they are produced by the build.  Now we link them in.  I assume that
 ghc --make does the right thing for executables, haven't tested this.
 
 Also implemented ./setup clean for getting rid of Foo_stub.{h,c} files
 for both executables and libraries.  These files aren't put into the
 dist/build directory (can they be?) so I had to add a bit of extra
 logic here.
 
] 
[./setup clean now removes dist/doc, which is produced by ./setup haddock
ijones@syntaxpolice.org**20050416013332] 
[export matchesDescFile at the request of Lemmih for Hackage
ijones@syntaxpolice.org**20050416013302] 
[added another missing source file
ijones@syntaxpolice.org**20050415180927] 
[another missing source file
ijones@syntaxpolice.org**20050415180630] 
[added missing source file
ijones@syntaxpolice.org**20050415180443] 
[added missing test case that was in my source tree
ijones@syntaxpolice.org**20050415180110] 
[first implementation of copy for hi-boot files (ghc 6.) could use more testing
ijones@syntaxpolice.org**20050415175000] 
[added test case for mutually recursive modules
ijones@syntaxpolice.org**20050415174432] 
[fail on test returning error code, add test cases
ijones@syntaxpolice.org**20050413000307] 
[added setup test command, not deeply tested
ijones@syntaxpolice.org**20050412235706] 
[haddock markup fixes
ijones@syntaxpolice.org**20050414145004] 
[cvs pull: added LICENSE file
ijones@syntaxpolice.org**20050414144905] 
[added strip flag. probably from CVS
ijones@syntaxpolice.org**20050414144841] 
[cvs patch from Wolfgang Thaller
ijones@syntaxpolice.org**20050414144748
   Fix handling of end-of-options markers (--).
   getOpt would correctly return the non-options after the marker, but it
   would return errors for things after the marker that looked like options.
 
] 
[Fixed bug in Distribution.GetOpt
lemmih@gmail.com**20050412015302
 The bug caused unknown long opts to get stripped of their argument (--test=arg => --test).
 
] 
[little HUnit test wibble to get out of way of instaled package
ijones@syntaxpolice.org**20050320231118] 
[fixed expected errors
ijones@syntaxpolice.org**20050320230707] 
[wibble last commit, only if genScript true
ijones@syntaxpolice.org**20050320230634] 
[fix bug in ghc > 6.3 where it wasn't reading from stdin :(
ijones@syntaxpolice.org**20050320213348] 
[fixes to parser from krasimir, fixes to sdist from ross
ijones@syntaxpolice.org**20050317180215
 
 Krasimir says:
   Small fixes in the parser/printer. When there is a package description with
   executables only then the old implementation of pretty printer was written
   to print empty "exposed-modules" field while there isn`t any library. After
   that the parser will generate PackageDescription with (Just emptyLibrary)
   instead of Nothing. Now exposed-modules field is printed only if
   library /= Nothing
 
 Ross says:
   In smartCopySources, don't try to strip the prefix if it was ".",
   because joinFileName "." x == x
   (fixes bug reported by Iavor Diatchki)
 
   Improve sdist a bit: copy files named in main-is, license-file and c-sources.
   Also supply a default Setup.hs if none is present.
   
   This will get it working for only the simplest of packages.  It omits
   header files, configure stuff and files named in the buildinfo file.
   To do it properly, we'd need a field in the package description listing
   extra files to copy into a source distribution.
 
] 
[Fixed bug in 'smartCopySources'
lemmih@gmail.com**20050317012645
 
 smartCopySources dropped the prefix of source paths with length+drop. This fails when the prefix is eg. ".".
 
] 
[added / fixed haddock code
ijones@syntaxpolice.org**20050315070527] 
[TAG 0.6
ijones@syntaxpolice.org**20050312213231] 
Patch bundle hash:
4e802e2515fae60ec20d169072ac2aa1cdd29c81
