Ticket #516: modularize-_installdirs_-we-no-longer-require-a-packageidentifier-to-get-absolute-installdirs.dpatch

File modularize-_installdirs_-we-no-longer-require-a-packageidentifier-to-get-absolute-installdirs.dpatch, 41.3 KB (added by Saizan, 3 years ago)

patch for Cabal

Line 
1Sat Jun  6 23:17:20 CEST 2009  Andrea Vezzosi <sanzhiyan@gmail.com>
2  * modularize .InstallDirs: we no longer require a PackageIdentifier to get absolute InstallDirs
3
4New patches:
5
6[modularize .InstallDirs: we no longer require a PackageIdentifier to get absolute InstallDirs
7Andrea Vezzosi <sanzhiyan@gmail.com>**20090606211720
8 Ignore-this: 11441facde58885f5838705b3cff9207
9] {
10hunk ./Distribution/Simple/InstallDirs.hs 57
11         defaultInstallDirs,
12         combineInstallDirs,
13         absoluteInstallDirs,
14+        absoluteInstallDirs',
15         CopyDest(..),
16         prefixRelativeInstallDirs,
17 
18hunk ./Distribution/Simple/InstallDirs.hs 67
19         fromPathTemplate,
20         substPathTemplate,
21         initialPathTemplateEnv,
22+        systemPathTemplateEnv,
23         fullPathTemplateEnv,
24hunk ./Distribution/Simple/InstallDirs.hs 69
25+       
26+        compilerToTemplateEnv,
27+        platformToTemplateEnv,
28+        packageIdToTemplateEnv,
29+        installDirsToTemplateEnv
30   ) where
31 
32 
33hunk ./Distribution/Simple/InstallDirs.hs 89
34 import Distribution.Package
35          ( PackageIdentifier, packageName, packageVersion )
36 import Distribution.System
37-         ( OS(..), buildOS, buildArch )
38+         ( OS(..), buildOS, Platform(..), buildPlatform )
39 import Distribution.Compiler
40          ( CompilerId, CompilerFlavor(..) )
41 import Distribution.Text
42hunk ./Distribution/Simple/InstallDirs.hs 277
43 -- 'PathTemplate's that still have the 'PrefixVar' in them. Doing this makes it
44 -- each to check which paths are relative to the $prefix.
45 --
46-substituteTemplates :: PackageIdentifier -> CompilerId
47+substituteTemplates :: [(PathTemplateVariable, PathTemplate)]
48                     -> InstallDirTemplates -> InstallDirTemplates
49hunk ./Distribution/Simple/InstallDirs.hs 279
50-substituteTemplates pkgId compilerId dirs = dirs'
51+substituteTemplates env dirs = dirs'
52   where
53     dirs' = InstallDirs {
54       -- So this specifies exactly which vars are allowed in each template
55hunk ./Distribution/Simple/InstallDirs.hs 299
56       haddockdir = subst haddockdir (prefixBinLibDataVars ++
57                                       [docdirVar, htmldirVar])
58     }
59-    -- The initial environment has all the static stuff but no paths
60-    env = initialPathTemplateEnv pkgId compilerId
61     subst dir env' = substPathTemplate (env'++env) (dir dirs)
62 
63     prefixVar        = (PrefixVar,     prefix     dirs')
64hunk ./Distribution/Simple/InstallDirs.hs 312
65     prefixBinLibVars = [prefixVar, bindirVar, libdirVar, libsubdirVar]
66     prefixBinLibDataVars = prefixBinLibVars ++ [datadirVar, datasubdirVar]
67 
68--- | Convert from abstract install directories to actual absolute ones by
69--- substituting for all the variables in the abstract paths, to get real
70--- absolute path.
71+-- | wrapper around @absolutInstallDirs'@:
72+-- | the env is created with @initialPathTemplateEnv@,
73+-- | the subdirs are appended, and it includes the CopyDest
74 absoluteInstallDirs :: PackageIdentifier -> CompilerId -> CopyDest
75hunk ./Distribution/Simple/InstallDirs.hs 316
76-                    -> InstallDirTemplates -> InstallDirs FilePath
77-absoluteInstallDirs pkgId compilerId copydest dirs =
78+                       -> InstallDirs PathTemplate
79+                       -> InstallDirs FilePath
80+absoluteInstallDirs pkgId compilerId copydest dirs = 
81     (case copydest of
82        CopyTo destdir -> fmap ((destdir </>) . dropDrive)
83        _              -> id)
84hunk ./Distribution/Simple/InstallDirs.hs 323
85   . appendSubdirs (</>)
86-  . fmap fromPathTemplate
87-  $ substituteTemplates pkgId compilerId dirs {
88+  . absoluteInstallDirs' (initialPathTemplateEnv pkgId compilerId)
89+  $ dirs {
90       prefix = case copydest of
91         -- possibly override the prefix
92         CopyPrefix p -> toPathTemplate p
93hunk ./Distribution/Simple/InstallDirs.hs 331
94         _            -> prefix dirs
95     }
96 
97+-- | Convert from abstract install directories to actual absolute ones by
98+-- substituting for all the variables in the abstract paths, to get real
99+-- absolute path.
100+absoluteInstallDirs' :: [(PathTemplateVariable, PathTemplate)] -- ^ initial environment
101+                     -> InstallDirTemplates -> InstallDirs FilePath
102+absoluteInstallDirs' env = fmap fromPathTemplate
103+                           . substituteTemplates env
104+
105 -- |The location prefix for the /copy/ command.
106 data CopyDest
107   = NoCopyDest
108hunk ./Distribution/Simple/InstallDirs.hs 361
109   $ -- substitute the path template into each other, except that we map
110     -- \$prefix back to $prefix. We're trying to end up with templates that
111     -- mention no vars except $prefix.
112-    substituteTemplates pkgId compilerId dirs {
113+    substituteTemplates (initialPathTemplateEnv pkgId compilerId) dirs {
114       prefix = PathTemplate [Variable PrefixVar]
115     }
116   where
117hunk ./Distribution/Simple/InstallDirs.hs 429
118                   Just (PathTemplate components) -> components
119                   Nothing                        -> [component]
120 
121+compilerToTemplateEnv :: CompilerId -> [(PathTemplateVariable, PathTemplate)]
122+compilerToTemplateEnv comp = map (\(v,s) -> (v, PathTemplate [Ordinary s]))
123+                    [(CompilerVar, display comp)]
124+
125+packageIdToTemplateEnv :: PackageIdentifier -> [(PathTemplateVariable, PathTemplate)]
126+packageIdToTemplateEnv pkgId = map (\(v,s) -> (v, PathTemplate [Ordinary s]))
127+                      [(PkgNameVar,  display (packageName pkgId))
128+                      ,(PkgVerVar,   display (packageVersion pkgId))
129+                      ,(PkgIdVar,    display pkgId)]
130+
131+platformToTemplateEnv :: Platform -> [(PathTemplateVariable, PathTemplate)]
132+platformToTemplateEnv (Platform arch os) =
133+    map (\(v,s) -> (v, PathTemplate [Ordinary s]))
134+            [(OSVar,       display os)   
135+            ,(ArchVar,     display arch)
136+            ]
137+
138+installDirsToTemplateEnv :: InstallDirs FilePath -> [(PathTemplateVariable, PathTemplate)]
139+installDirsToTemplateEnv dirs =
140+    [(PrefixVar,     toPathTemplate $ prefix     dirs),
141+     (BindirVar,     toPathTemplate $ bindir     dirs),
142+     (LibdirVar,     toPathTemplate $ libdir     dirs),
143+     -- This isn't defined in an InstallDirs FilePath
144+     -- as its value has already been appended to libdir:
145+     -- (LibsubdirVar,  toPathTemplate $ libsubdir  dirs),
146+     (DatadirVar,    toPathTemplate $ datadir    dirs),
147+     -- This isn't defined in an InstallDirs FilePath
148+     -- as its value has already been appended to datadir:
149+     -- (DatasubdirVar, toPathTemplate $ datasubdir dirs),
150+     (DocdirVar,     toPathTemplate $ docdir     dirs),
151+     (HtmldirVar,    toPathTemplate $ htmldir    dirs)]
152+
153+-- Convenience Wrappers
154+
155 -- | The initial environment has all the static stuff but no paths
156hunk ./Distribution/Simple/InstallDirs.hs 464
157-initialPathTemplateEnv :: PackageIdentifier -> CompilerId
158+initialPathTemplateEnv :: PackageIdentifier -> CompilerId
159                        -> [(PathTemplateVariable, PathTemplate)]
160hunk ./Distribution/Simple/InstallDirs.hs 466
161-initialPathTemplateEnv pkgId compilerId =
162-  map (\(v,s) -> (v, PathTemplate [Ordinary s]))
163-  [(PkgNameVar,  display (packageName pkgId))
164-  ,(PkgVerVar,   display (packageVersion pkgId))
165-  ,(PkgIdVar,    display pkgId)
166-  ,(CompilerVar, display compilerId)
167-  ,(OSVar,       display buildOS)    --these should be params if we want to be
168-  ,(ArchVar,     display buildArch)  --able to do cross-platform configuation
169-  ]
170+initialPathTemplateEnv pkgId compilerId =
171+    packageIdToTemplateEnv pkgId
172+    ++ compilerToTemplateEnv compilerId
173+    ++ platformToTemplateEnv buildPlatform -- this should be a param if we want to be
174+                                  -- able to do cross-platform configuation
175+
176+-- | The environment with all the package-independent stuff
177+systemPathTemplateEnv :: CompilerId -> InstallDirs FilePath
178+                      -> [(PathTemplateVariable, PathTemplate)]
179+systemPathTemplateEnv compilerId dirs =
180+    compilerToTemplateEnv compilerId
181+    ++ platformToTemplateEnv buildPlatform
182+    ++ installDirsToTemplateEnv dirs
183 
184 fullPathTemplateEnv :: PackageIdentifier -> CompilerId
185                     -> InstallDirs FilePath
186hunk ./Distribution/Simple/InstallDirs.hs 487
187     where -- The initial environment has all the static stuff but no paths
188           env = initialPathTemplateEnv pkgId compilerId
189           -- And here are all the paths
190-          dirEnv = [(PrefixVar,     toPathTemplate $ prefix     dirs),
191-                    (BindirVar,     toPathTemplate $ bindir     dirs),
192-                    (LibdirVar,     toPathTemplate $ libdir     dirs),
193-                    -- This isn't defined in an InstallDirs FilePath
194-                    -- as its value has already been appended to libdir:
195-                    -- (LibsubdirVar,  toPathTemplate $ libsubdir  dirs),
196-                    (DatadirVar,    toPathTemplate $ datadir    dirs),
197-                    -- This isn't defined in an InstallDirs FilePath
198-                    -- as its value has already been appended to datadir:
199-                    -- (DatasubdirVar, toPathTemplate $ datasubdir dirs),
200-                    (DocdirVar,     toPathTemplate $ docdir     dirs),
201-                    (HtmldirVar,    toPathTemplate $ htmldir    dirs)]
202+          dirEnv = installDirsToTemplateEnv dirs
203 
204 -- ---------------------------------------------------------------------------
205 -- Parsing and showing path templates:
206}
207
208Context:
209
210[Pass a verbosity flag to ghc-pkg
211Ian Lynagh <igloo@earth.li>**20090605143244]
212[When build calls register, pass the verbosity level too
213Ian Lynagh <igloo@earth.li>**20090605142718]
214[Fix unlit
215Ian Lynagh <igloo@earth.li>**20090605130801
216 The arguments to isPrefixOf were the wrong way round. We want to see if
217 the line starts "\\begin{code}", not if the line is a prefix of that string.
218]
219[Tweak a comment so that it doesn't confuse haddock
220Ian Lynagh <igloo@earth.li>**20090605130728]
221[Tweak new build system
222Ian Lynagh <igloo@earth.li>**20090404204426]
223[GHC new build system fixes
224Ian Lynagh <igloo@earth.li>**20090329153151]
225[Add ghc.mk for the new GHC build system
226Ian Lynagh <igloo@earth.li>**20090324211819]
227[Bump version due to recent changes
228Duncan Coutts <duncan@haskell.org>**20090603101833]
229[Ticket #89 final: Regression tests for new dependency behaviour.
230rubbernecking.trumpet.stephen@blacksapphire.com**20090601215651
231 Ignore-this: 52e04d50f1d045a14706096413c19a85
232]
233[Make message "refers to a library which is defined within the same.." more grammatical
234rubbernecking.trumpet.stephen@blacksapphire.com**20090601214918
235 Ignore-this: 3887c33ff39105f3483ca97a7f05f3eb
236]
237[Remove a couple unused imports.
238Duncan Coutts <duncan@haskell.org>**20090601192932]
239[Ban upwardly open version ranges in dependencies on base
240Duncan Coutts <duncan@haskell.org>**20090601191629
241 Fixes ticket #435. This is an approximation. It will ban most
242 but not all cases where a package specifies no upper bound.
243 There should be no false positives however, that is cases that
244 really are always bounded above that the check flags up.
245 Doing a fully precise test needs a little more work.
246]
247[Split requireProgram into two different functions
248Duncan Coutts <duncan@haskell.org>**20090601174846
249 Now requireProgram doesn't take a version range and does not check
250 the program version (indeed it doesn't need to have one). The new
251 function requireProgramVersion takes a required program version
252 range and returns the program version. Also update callers.
253 Also fixes the check that GHC has a version number.
254]
255[Ignore a byte order mark (BOM) when reading UTF8 text files
256Duncan Coutts <duncan@haskell.org>**20090531225008
257 Yes of course UTF8 text files should not use the BOM but
258 notepad.exe does anyway. Fixes ticket #533.
259]
260[executables can now depend on a library in the same package.
261Duncan Coutts <duncan@haskell.org>**20090531220720
262 Fixes ticket #89. The library gets registered into an inplace
263 package db file which is used when building the executables.
264 Based partly on an original patch by Stephen Blackheath.
265]
266[Always build ar files with indexes
267Duncan Coutts <duncan@haskell.org>**20090531193412
268 Since we have to be able to use these inplace we always need
269 the index it's not enough to just make the index on installing.
270 This particularly affects OSX.
271]
272[Make rendering the ghc package db stack more lenient
273Duncan Coutts <duncan@haskell.org>**20090531192545
274 Allow the user package db to appear after a specific one.
275 No reason not to and makes some things in cabal-install more convenient.
276]
277[Simplify version ranges in configure messages and errors
278Duncan Coutts <duncan@haskell.org>**20090531192426
279 Part of #369
280]
281[Add and export simplifyDependency
282Duncan Coutts <duncan@haskell.org>**20090531192332
283 Just uses simplifyVersionRange on the version range in the dep
284]
285[Use the PackageDbStack in the local build info and compiler modules
286Duncan Coutts <duncan@haskell.org>**20090531153124
287 This lets us pass a whole stack of package databases to the compiler.
288 This is more flexible than passing just one and working out what
289 other dbs that implies. This also lets us us more than one specific
290 package db, which we need for the inplace package db use case.
291]
292[Simplify version ranges before printing in configure error message
293Duncan Coutts <duncan@haskell.org>**20090530213922
294 Part of ticket #369. Now instead of:
295   setup: At least the following dependencies are missing:
296   base <3 && <4 && <3 && <3 && <4
297 we get:
298   setup: At least the following dependencies are missing:
299   base <3
300]
301[Bump version to 1.7.1 due to recent changes
302Duncan Coutts <duncan@haskell.org>**20090530211320]
303[Minor renaming
304Duncan Coutts <duncan@haskell.org>**20090530202312
305 Part of one of Stephen Blackheath's patches
306]
307[Improve an internal error message slightly
308Duncan Coutts <duncan@haskell.org>**20090530205540]
309[Detect intra-package build-depends
310Duncan Coutts <duncan@haskell.org>**20090530204447
311 Based on an original patch by Stephen Blackheath
312 With this change build-depends on a library within the same package
313 are detected. Such deps are not full handled yet so for the moment
314 they are explicitly banned, however this is another step towards
315 actually supporting such dependencies. In particular deps on
316 internal libs are resolved to the internal one in preference to any
317 existing external version of the same lib.
318]
319[Use accurate per-component package deps
320Duncan Coutts <duncan@haskell.org>**20090530202350
321 Based on an original patch by Stephen Blackheath
322 Previously each component got built using the union of all package
323 deps of all components in the entire package. Now we use exactly the
324 deps specified for that component. To prevent breaking old packages
325 that rely on the sloppy behaviour, package will only get the new
326 behaviour if they specify they need at least cabal-version: >= 1.7.1
327]
328[Add *LBI variants of withLib and withExe that give corresponding build info
329rubbernecking.trumpet.stephen@blacksapphire.com**20090528113232
330 Ignore-this: 6856385f1c210e33c352da4a0b6e876a
331]
332[Register XmlSyntax and RegularPatterns as known extensions in Language.Haskell.Extension
333Niklas Broberg <d00nibro@chalmers.se>**20090529102848
334 Ignore-this: 32aacd8aeef9402a1fdf3966a213db7d
335 
336 Concrete XML syntax is used in the Haskell Server Pages extension
337 language, and a description can be found in the paper "Haskell Server
338 Pages through Dynamic Loading" by Niklas Broberg, published in Haskell
339 Workshop '05.
340 
341 Regular expression pattern matching is described in the paper "Regular
342 Expression Patterns" by Niklas Broberg, Andreas Farre and Josef
343 Svenningsson, published in ICFP '04.
344]
345[Resolve merge conflict with dynlibPref patch
346Duncan Coutts <duncan@haskell.org>**20090528115249
347 The dynlibPref patch accidentally was only pushed to ghc's branch.
348]
349[Use dynlibdir = libdir for the moment
350Duncan Coutts <duncan@well-typed.com>**20090519134115
351 It will need more thought about how much control the user needs
352 and what the default shared libs management scheme should be.
353]
354[Use componentPackageDeps, remove packageDeps, add externalPackageDeps
355Duncan Coutts <duncan@haskell.org>**20090527225016
356 So now when building, we actually use per-component set of package deps.
357 There's no actual change in behaviour yet as we're still setting each of
358 the componentPackageDeps to the union of all the package deps.
359]
360[Pass ComponentLocalBuildInfo to the buildLib/Exe
361Duncan Coutts <duncan@haskell.org>**20090527210731
362 Not yet used
363]
364[Simplify writeInstalledConfig slightly
365Duncan Coutts <duncan@haskell.org>**20090527204755]
366[No need to drop dist/installed-pkg-config after every build
367Duncan Coutts <duncan@haskell.org>**20090527204500
368 We generate this file if necessary when registering.
369]
370[Make absoluteInstallDirs only take the package id
371Duncan Coutts <duncan@haskell.org>**20090527203112
372 It doesn't need the entire PackageDescription
373]
374[Rejig calls to per-compiler build functions
375Duncan Coutts <duncan@haskell.org>**20090527195146
376 So it's now a bit clearer what is going on in the generic build code
377 Also shift info calls up to generic code
378]
379[Split nhc and hugs's build action into buildLib and buildExe
380Duncan Coutts <duncan@haskell.org>**20090527194206]
381[Split JHC's build into buildLib and buildExe
382Duncan Coutts <duncan@haskell.org>**20090527192036]
383[Sync LHC module from GHC module
384Duncan Coutts <duncan@haskell.org>**20090527191615]
385[Give withLib and withExe sensible types
386Duncan Coutts <duncan@haskell.org>**20090527185634]
387[Fix types of libModules and exeModules
388Duncan Coutts <duncan@haskell.org>**20090527185108
389 Take a Library/Executable rather than a PackageDescription
390 Means we're more precise in using it, just passing the info we need.
391]
392[Split ghc's build action into buildLib and buildExe
393Duncan Coutts <duncan@haskell.org>**20090527183250]
394[Remove unused ghc-only executable wrapper feature
395Duncan Coutts <duncan@haskell.org>**20090527183245
396 Some kind of shell script wrapper feature might be useful,
397 but we should design it properly.
398]
399[Fixup .cabal file with the removed modules and files
400Duncan Coutts <duncan@haskell.org>**20090527182344]
401[Fix warnings about unused definitions and imports
402Duncan Coutts <duncan@haskell.org>**20090527175253]
403[Remove the makefile generation feature
404Duncan Coutts <duncan@haskell.org>**20090527175002
405 It was an ugly hack and ghc no longer uses it.
406]
407[Add new ComponentLocalBuildInfo
408Duncan Coutts <duncan@haskell.org>**20090527174418
409 We want to have each component have it's own dependencies,
410 rather than using the union of deps of the whole package.
411]
412[Ticket #89 part 2: Dependency-related test cases and a simple test harness
413rubbernecking.trumpet.stephen@blacksapphire.com**20090526133509
414 Ignore-this: 830dd56363c34d8edff65314cd8ccb2
415 The purpose of these tests is mostly to pin down some existing behaviour to
416 ensure it doesn't get broken by the ticket #89 changes.
417]
418[Ticket #89 part 1: add targetBuildDepends field to PackageDescription's target-specific BuildInfos
419rubbernecking.trumpet.stephen@blacksapphire.com**20090526133729
420 Ignore-this: 96572adfad12ef64a51dce2f7c5f738
421 This provides dependencies specifically for each library and executable target.
422 buildDepends is calculated as the union of the individual targetBuildDepends,
423 giving a result that's exactly equivalent to the old behaviour.
424]
425[LHC: register the external core files.
426Lemmih <lemmih@gmail.com>**20090521021511
427 Ignore-this: d4e484d7b8e541c3ec4cb35ba8aba4d0
428]
429[Update the support for LHC.
430Lemmih <lemmih@gmail.com>**20090515211659
431 Ignore-this: 2884d3eca0596a441e3b3c008e16fd6f
432]
433[Print a more helpful message when haddock's ghc version doesn't match
434Duncan Coutts <duncan@haskell.org>**20090422093240
435 Eg now says something like:
436 cabal: Haddock's internal GHC version must match the configured GHC version.
437 The GHC version is 6.8.2 but haddock is using GHC version 6.10.1
438]
439[Make die use an IOError that gets handled at the top level
440Duncan Coutts <duncan@haskell.org>**20090301195143
441 Rather than printing the error there and then and throwing an
442 exit exception. The top handler now catches IOErrors and
443 formats and prints them before throwing an exit exception.
444 Fixes ticket #512.
445]
446[use -D__HADDOCK__ only when preprocessing for haddock < 2
447Andrea Vezzosi <sanzhiyan@gmail.com>**20090302015137
448 Ignore-this: d186a5dbebe6d7fdc64e6414493c6271
449 haddock-2.x doesn't define any additional macros.
450]
451[Allow --with-ghc to be specified when running Cabal
452Ian Lynagh <igloo@earth.li>**20090225172249]
453[fix imports for non-GHC
454Ross Paterson <ross@soi.city.ac.uk>**20090221164939
455 Ignore-this: 12756e3863e312352d5f6c69bba63b92
456]
457[Fix user guide docs about --disable-library-vanilla
458Duncan Coutts <duncan@haskell.org>**20090219165539
459 It is not default. Looks like it was a copy and paste error.
460]
461[Specify a temp output file for the header/lib checks
462Duncan Coutts <duncan@haskell.org>**20090218233928
463 Otherwise we litter the current dir with a.out and *.o files.
464]
465[Final changelog updates for 1.6.0.2
466Duncan Coutts <duncan@haskell.org>**20090218222106]
467[Use more cc options when checking for header files and libs
468Duncan Coutts <duncan@haskell.org>**20090218110520
469 Use -I. to simulate the search path that gets used when we tell ghc
470 to -#include something. Also use the include dirs and cc options of
471 dependent packages. These two changes fix about 3 packages each.
472]
473[rewrite of Distribution.Simple.Haddock
474Andrea Vezzosi <sanzhiyan@gmail.com>**20090219153738
475 Ignore-this: 5b465b2b0f5ee001caa0cb19355d6fce
476 In addition to (hopefully) making clear what's going on
477 we now do the additional preprocessing for all the versions of haddock
478 (but not for hscolour) and we run cpp before moving the files.
479]
480[Validate the docbook xml before processing.
481Duncan Coutts <duncan@haskell.org>**20090213134136
482 Apparently xsltproc does not validate against the dtd.
483 This should stop errors creaping back in.
484]
485[Make documentation validate
486Samuel Bronson <naesten@gmail.com>**20090212235057]
487[Folly the directions for docbook-xsl
488Samuel Bronson <naesten@gmail.com>**20090213022615
489 As it says in http://docbook.sourceforge.net/release/xsl/current/README:
490 
491   - Use the base canonical URI in combination with one of the
492     pathnames below. For example, for "chunked" HTML, output:
493 
494     http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
495 
496]
497[Fix compat functions for setting file permissions on windows
498Duncan Coutts <duncan@haskell.org>**20090205224415
499 Spotted by Dominic Steinitz
500]
501[Only print message about ignoring -threaded if its actually present
502Duncan Coutts <duncan@haskell.org>**20090206174707]
503[Don't build ghci lib if we're not making vanilla libs
504Duncan Coutts <duncan@haskell.org>**20090206173914
505 As the .o files will not exist.
506]
507[Correct docdir -> mandir in InstallDirs
508Samuel Bronson <naesten@gmail.com>**20090203043338]
509[Fix message suggesting the --executables flag
510Samuel Bronson <naesten@gmail.com>**20090201010708]
511[Remove #ifdefery for windows, renameFile now works properly
512Duncan Coutts <duncan@haskell.org>**20090202004450
513 It's even atomic on windows so we don't need the workaround.
514]
515[Make withTempDirectory create a new secure temp dir
516Duncan Coutts <duncan@haskell.org>**20090201233318
517 Rather than taking a specific dir to create.
518 Update the one use of the function.
519]
520[Add createTempDirectory to Compat.TempFile module
521Duncan Coutts <duncan@haskell.org>**20090201233213
522 Also clean up imports
523]
524[Improve the error message for missing foreign libs and make it fatal
525Duncan Coutts <duncan@haskell.org>**20090131184813
526 The check should now be accurate enough that we can make it an
527 error rather than just a warning.
528]
529[Use the cc, cpp and ld options when checking foreign headers and libs
530Duncan Coutts <duncan@haskell.org>**20090131184016
531 In partiular this is needed for packages that use ./configure
532 scripts to write .buildinfo files since they typically do not
533 split the cpp/cc/ldoptions into the more specific fields.
534]
535[Do the check for foreign libs after running configure
536Duncan Coutts <duncan@haskell.org>**20090131182213
537 This lets us pick up build info discovered by the ./configure script
538]
539[move imports outside ifdef GHC
540Ross Paterson <ross@soi.city.ac.uk>**20090130153505]
541[Document most of the new file utility functions
542Duncan Coutts <duncan@haskell.org>**20090130151640]
543[#262 iterative tests for foreign dependencies
544Gleb Alexeyev <gleb.alexeev@gmail.com>**20090130120228
545 Optimize for succesful case. First try all libs and includes in one command,
546 proceed with further tests only if the first test fails. The same goes for libs
547 and headers: look for an offending one only when overall test fails.
548 
549]
550[Misc minor comment and help message changes
551Duncan Coutts <duncan@haskell.org>**20090129233455]
552[Deprecate smartCopySources and copyDirectoryRecursiveVerbose
553Duncan Coutts <duncan@haskell.org>**20090129233234
554 Also use simplified implementation in terms of recently added functions.
555]
556[Switch copyFileVerbose to use compat copyFile
557Duncan Coutts <duncan@haskell.org>**20090129233125
558 All remaining uses of it do not require copying permissions
559]
560[Let the setFileExecutable function work with hugs too
561Duncan Coutts <duncan@haskell.org>**20090129232948]
562[Switch hugs wrapper code to use setFileExecutable
563Duncan Coutts <duncan@haskell.org>**20090129232542
564 instead of get/setPermissions which don't really work properly.
565]
566[Switch last uses of copyFile to copyFileVerbose
567Duncan Coutts <duncan@haskell.org>**20090129232429]
568[Stop using smartCopySources or copyDirectoryRecursiveVerbose
569Duncan Coutts <duncan@haskell.org>**20090129231656
570 Instead if copyDirectoryRecursiveVerbose use installDirectoryContents
571 and for smartCopySources use findModuleFiles and installExecutableFiles
572 In both cases the point is so that we use functions for installing
573 files rather than functions to copy files.
574]
575[Use installOrdinaryFile and installExecutableFile in various places
576Duncan Coutts <duncan@haskell.org>**20090129231321
577 instead of copyFileVerbose
578]
579[Make the Compat.CopyFile module with with old and new ghc
580Duncan Coutts <duncan@haskell.org>**20090129225423]
581[Add a bunch of utility functions for installing files
582Duncan Coutts <duncan@haskell.org>**20090129180243
583 We want to separate the functions that do ordinary file copies
584 from the functions that install files because in the latter
585 case we have to do funky things with file permissions.
586]
587[Use setFileExecutable instead of copyPermissions
588Duncan Coutts <duncan@haskell.org>**20090129180130
589 This lets us get rid of the Compat.Permissions module
590]
591[Export setFileOrdinary and setFileExecutable from Compat.CopyFile
592Duncan Coutts <duncan@haskell.org>**20090129173413]
593[Warn if C dependencies not found (kind of fixes #262)
594gleb.alexeev@gmail.com**20090126185832
595 
596 This is just a basic check - generate a sample program and check if it compiles and links with relevant flags. Error messages (warning messages,
597 actually) could use some improvement.
598]
599[Pass include directories to LHC
600Samuel Bronson <naesten@gmail.com>**20090127220021]
601[Add Distribution.Compat.CopyFile module
602Duncan Coutts <duncan@haskell.org>**20090128181115
603 This is to work around the file permissions problems with the
604 standard System.Directory.copyFile function. When installing
605 files we do not want to copy permissions or attributes from the
606 source files. On unix we want to use specific permissions and
607 on windows we want to inherit default permissions. On unix:
608 copyOrdinaryFile   sets the permissions to -rw-r--r--
609 copyExecutableFile sets the permissions to -rwxr-xr-x
610]
611[Remove unused support for installing dynamic exe files
612Duncan Coutts <duncan@haskell.org>**20090128170421
613 No idea why this was ever added, they've never been built.
614]
615[Check for ghc-options: -threaded in libraries
616Duncan Coutts <duncan@haskell.org>**20090125161226
617 It's totally unnecessary and messes up profiling in older ghc versions.
618]
619[Filter ghc-options -threaded for libs too
620Duncan Coutts <duncan@haskell.org>**20090125145035]
621[New changelog entries for 1.7.x
622Duncan Coutts <duncan@haskell.org>**20090123175645]
623[Update changelog for 1.6.0.2
624Duncan Coutts <duncan@haskell.org>**20090123175629]
625[Fix openNewBinaryFile on Windows with ghc-6.6
626Duncan Coutts <duncan@haskell.org>**20090122172100
627 fdToHandle calls fdGetMode which does not work with ghc-6.6 on
628 windows, the workaround is not to call fdToHandle, but call
629 openFd directly. Bug reported by Alistair Bayley, ticket #473.
630]
631[filter -threaded when profiling is on
632Duncan Coutts <duncan@haskell.org>**20090122014425
633 Fixes #317. Based on a patch by gleb.alexeev@gmail.com
634]
635[Move installDataFiles out of line to match installIncludeFiles
636Duncan Coutts <duncan@haskell.org>**20090122005318]
637[Fix installIncludeFiles to create target directories properly
638Duncan Coutts <duncan@haskell.org>**20090122004836
639 Previously for 'install-includes: subdir/blah.h' we would not
640 create the subdir in the target location.
641]
642[Typo in docs for source-repository
643Joachim Breitner <mail@joachim-breitner.de>**20090121220747]
644[Make 'ghc-options: -O0' a warning rather than an error
645Duncan Coutts <duncan@haskell.org>**20090118141949]
646[Improve runE parse error message
647Duncan Coutts <duncan@haskell.org>**20090116133214
648 Only really used in parsing config files derived from command line flags.
649]
650[The Read instance for License and InstalledPackageInfo is authoritative
651Duncan Coutts <duncan@haskell.org>**20090113234229
652 It is ghc's optimised InstalledPackageInfo parser that needs updating.
653 
654 rolling back:
655 
656 Fri Dec 12 18:36:22 GMT 2008  Ian Lynagh <igloo@earth.li>
657   * Fix Show/Read for License
658   We were ending up with things like
659       InstalledPackageInfo {
660           ...
661           license = LGPL Nothing,
662           ...
663       }
664   i.e. "LGPL Nothing" rather than "LGPL", which we couldn't then read.
665 
666     M ./Distribution/License.hs -2 +14
667]
668[Swap the order of global usage messages
669Duncan Coutts <duncan@haskell.org>**20090113191810
670 Put the more important one first.
671]
672[Enable the global command usage to be set
673Duncan Coutts <duncan@haskell.org>**20090113181303
674 extend it rather than overriding it.
675 Also rearrange slightly the default global --help output.
676]
677[On Windows, if gcc isn't where we expect it then keep looking
678Ian Lynagh <igloo@earth.li>**20090109153507]
679[Ban ghc-options: --make
680Duncan Coutts <duncan@haskell.org>**20081223170621
681 I dunno, some people...
682]
683[Update changelog for 1.6.0.2 release
684Duncan Coutts <duncan@haskell.org>**20081211142202]
685[Make the compiler PackageDB stuff more flexible
686Duncan Coutts <duncan@haskell.org>**20081211141649
687 We support using multiple package dbs, however the method for
688 specifying them is very limited. We specify a single package db
689 and that implicitly specifies any other needed dbs. For example
690 the user or a specific db require the global db too. We now
691 represent that stack explicitly. The user interface still uses
692 the single value method and we convert internally.
693]
694[Fix Show/Read for License
695Ian Lynagh <igloo@earth.li>**20081212183622
696 We were ending up with things like
697     InstalledPackageInfo {
698         ...
699         license = LGPL Nothing,
700         ...
701     }
702 i.e. "LGPL Nothing" rather than "LGPL", which we couldn't then read.
703]
704[Un-deprecate Distribution.ModuleName.simple for now
705Ian Lynagh <igloo@earth.li>**20081212164540
706 Distribution/Simple/PreProcess.hs uses it, so this causes build failures
707 with -Werror.
708]
709[Use the first three lhc version digits
710Duncan Coutts <duncan@haskell.org>**20081211224048
711 Rather than two, and do it in a simpler way.
712]
713[Remove obsolete test code
714Duncan Coutts <duncan@haskell.org>**20081211142054]
715[Update the VersionInterval properties which now all pass
716Duncan Coutts <duncan@haskell.org>**20081210145653]
717[Eliminate NoLowerBound, Versions do have a lower bound of 0.
718Duncan Coutts <duncan@haskell.org>**20081210145433
719 This eliminates the duplicate representation of ">= 0" vs "-any"
720 and makes VersionIntervals properly canonical.
721]
722[Update and extend the Version quickcheck properties
723Duncan Coutts <duncan@haskell.org>**20081210143251
724 One property fails. The failure reveals that the VersionInterval type
725 is not quite a canonical representation of the VersionRange semantics.
726 This is because the lowest Version is [0] and not -infinity, so for
727 example the intervals (.., 0] and [0,0] are equivalent.
728]
729[Add documentation for VersionRange functions
730Duncan Coutts <duncan@haskell.org>**20081210140632
731 With properties.
732]
733[Export withinVersion and deprecate betweenVersionsInclusive
734Duncan Coutts <duncan@haskell.org>**20081210140411]
735[Add checking of Version validity to the VersionIntervals invariant
736Duncan Coutts <duncan@haskell.org>**20081210134100
737 Version numbers have to be a non-empty sequence of non-negataive ints.
738]
739[Fix implementation of withinIntervals
740Duncan Coutts <duncan@haskell.org>**20081210000141]
741[Fix configCompilerAux to consider user-supplied program flags
742Duncan Coutts <duncan@haskell.org>**20081209193320
743 This fixes a bug in cabal-install
744]
745[Add ModuleName.fromString and deprecate ModuleName.simple
746Duncan Coutts <duncan@haskell.org>**20081209151232
747 Also document the functions in the ModuleName module.
748]
749[Check for absolute, outside-of-tree and dist/ paths
750Duncan Coutts <duncan@haskell.org>**20081208234312]
751[Export more VersionIntervals operations
752Duncan Coutts <duncan@haskell.org>**20081208222420
753 and check internal invariants
754]
755[Check for use of cc-options: -O
756Duncan Coutts <duncan@haskell.org>**20081208182047]
757[Fake support for NamedFieldPuns in ghc-6.8
758Duncan Coutts <duncan@haskell.org>**20081208180018
759 Implement it in terms of the -XRecordPuns which was accidentally
760 added in ghc-6.8 and deprecates in 6.10 in favor of NamedFieldPuns
761 So this is for compatability so we can tell package authors always
762 to use NamedFieldPuns instead.
763]
764[Make getting ghc supported language extensions its own function
765Duncan Coutts <duncan@haskell.org>**20081208175815]
766[Check for use of deprecated extensions
767Duncan Coutts <duncan@haskell.org>**20081208175441]
768[Add a list of deprecated extenstions
769Duncan Coutts <duncan@haskell.org>**20081208175337
770 Along with possibly another extension that replaces it.
771]
772[Change the checking of new language extensions
773Duncan Coutts <duncan@haskell.org>**20081207202315
774 Check for new language extensions added in Cabal-1.2 and also 1.6.
775 Simplify the checking of -X ghc flags. Now always suggest using
776 the extensions field, as we separately warn about new extenssons.
777]
778[Tweak docs for VersionRange and VersionIntervals
779Duncan Coutts <duncan@haskell.org>**20081207184749]
780[Correct and simplify checkVersion
781Duncan Coutts <duncan@haskell.org>**20081205232845]
782[Make users of VersionIntervals use the new view function
783Duncan Coutts <duncan@haskell.org>**20081205232707]
784[Make VersionIntervals an abstract type
785Duncan Coutts <duncan@haskell.org>**20081205232041
786 Provide asVersionIntervals as the view function for a VersionRange
787 This will let us enforce the internal data invariant
788]
789[Slight clarity improvement in compiler language extension handling
790Duncan Coutts <duncan@haskell.org>**20081205210747]
791[Slightly simplify the maintenance burden of adding new language extensions
792Duncan Coutts <duncan@haskell.org>**20081205210543]
793[Distributing a package with no synopsis and no description is inexcusable
794Duncan Coutts <duncan@haskell.org>**20081205160719
795 Previously if one or the other or both were missing we only warned.
796 Now if neither are given it's an error. We still warn about either
797 missing.
798]
799[Add Test.Laws module for checking class laws
800Duncan Coutts <duncan@haskell.org>**20081204144238
801 For Functor, Monoid and Traversable.
802]
803[Add QC Arbitrary instances for Version and VersionRange
804Duncan Coutts <duncan@haskell.org>**20081204144204]
805[Remove accidentally added bianry file
806Duncan Coutts <duncan@haskell.org>**20081203000824]
807[Fix #396 and add let .Haddock find autogen modules
808Andrea Vezzosi <sanzhiyan@gmail.com>**20081201114853]
809[Add checks for new and unknown licenses
810Duncan Coutts <duncan@haskell.org>**20081202172742]
811[Add MIT and versioned GPL and LGPL licenses
812Duncan Coutts <duncan@haskell.org>**20081202171033
813 Since Cabal-1.4 we've been able to parse versioned licenses
814 and unknown licenses without the parser falling over.
815]
816[Don't nub lists of dependencies
817Duncan Coutts <duncan@haskell.org>**20081202162259
818 It's pretty meaningless since it's only a syntactic check.
819 The proper thing is to maintain a dependency set or to
820 simplify dependencies before printing them.
821]
822[Fix the date in the LICENSE file
823Duncan Coutts <duncan@haskell.org>**20081202161457]
824[Fix the version number in the makefile
825Duncan Coutts <duncan@haskell.org>**20081202161441]
826[Use VersionRange abstractly
827Duncan Coutts <duncan@haskell.org>**20081202160321]
828[Do the cabal version check properly.
829Duncan Coutts <duncan@haskell.org>**20081202155410
830 Instead of matching on the actual expression ">= x.y" we use the
831 sematic view of the version range so we can do it precisely.
832 Also use foldVersionRange to simplify a couple functions.
833]
834[Drop support for ghc-6.4 era OPTIONS pragmas
835Duncan Coutts <duncan@haskell.org>**20081202154744
836 It's still possible to build with ghc-6.4 but you have to pass
837 extra flags like "ghc --make -cpp -fffi Setup.hs" We could not
838 keep those OPTIONS pragmas and make it warning-free with ghc-6.10.
839 See http://hackage.haskell.org/trac/ghc/ticket/2800 for details.
840]
841[Almost make the VersionRange type abstract
842Duncan Coutts <duncan@haskell.org>**20081202154307
843 Export constructor functions and deprecate all the real constructors
844 We should not be pattern matching on this type because it's just
845 syntax. For meaningful questions we should be matching on the
846 VersionIntervals type which represents the semantics.
847]
848[Change isAnyVersion to be a semantic rather than syntactic test
849Duncan Coutts <duncan@haskell.org>**20081202142123
850 Also add simplify and isNoVersion.
851]
852[Add VersionIntervals, a view of VersionRange
853Duncan Coutts <duncan@haskell.org>**20081202141040
854 as a sequence of non-overlapping intervals. This provides a canonical
855 representation for the semantics of a VersionRange. This makes several
856 operations easier.
857]
858[Fix pretty-printing of version wildcards, was missing leading ==
859Duncan Coutts <duncan@haskell.org>**20081202135949]
860[Add a fold function for the VersionRange
861Duncan Coutts <duncan@haskell.org>**20081202135845
862 Use it to simplify the eval / withinRange function
863]
864[Improve the error on invalid file globs slightly
865Duncan Coutts <duncan@haskell.org>**20081202135335]
866[Use commaSep everywhere in the Check module
867Duncan Coutts <duncan@haskell.org>**20081202135208]
868[Fix message in the extra-source-files field check
869Duncan Coutts <duncan@haskell.org>**20081202135000]
870[Add checks for file glob syntax
871Duncan Coutts <duncan@haskell.org>**20081202133954
872 It requires cabal-version: >= 1.6 to be specified
873]
874[Add check for use of "build-depends: foo == 1.*" syntax
875Duncan Coutts <duncan@haskell.org>**20081202131459
876 It requires Cabal-1.6 or later.
877]
878[Distinguish version wild cards in the VersionRange AST
879Duncan Coutts <duncan@haskell.org>**20081128170513
880 Rather than encoding them in existing constructors.
881 This will enable us to check that uses of the new syntax
882 are flagged in .cabal files with cabal-version: >= 1.6
883]
884[Fix comment in LHC module
885Duncan Coutts <duncan@haskell.org>**20081123100710
886 Yes, LHC really does use ghc-pkg (with a different package.conf)
887]
888[Use the new bug-reports and source-repository info in the .cabal file
889Duncan Coutts <duncan@haskell.org>**20081123100041]
890[Simplify build-depends and base3/4 flags
891Duncan Coutts <duncan@haskell.org>**20081123100003]
892[Simplify default global libdir for LHC
893Duncan Coutts <duncan@haskell.org>**20081123095802
894 So it uses libdir=$prefix/lib rather than libdir=/usr/local/lib
895]
896[Simplify the compat exceptions stuff
897Duncan Coutts <duncan@haskell.org>**20081123095737]
898[Fix warnings in the LHC module
899Duncan Coutts <duncan@haskell.org>**20081122224011]
900[Distribution/Simple/GHC.hs: remove tabs for whitespace to eliminate warnings in cabal-install
901gwern0@gmail.com**20081122190011
902 Ignore-this: 2fd54090af86e67e25e51ade42992b53
903]
904[Warn about use of tabs
905Duncan Coutts <duncan@haskell.org>**20081122154134]
906[Bump Cabal HEAD version to 1.7.x development series
907Duncan Coutts <duncan@haskell.org>**20081122145817
908 Support for LHC is the first divergence between 1.7
909 and the stable 1.6.x series.
910]
911[Update changelog for 1.6.0.x fixes
912Duncan Coutts <duncan@haskell.org>**20081122145758]
913[LHC: Don't use --no-user-package-conf. It doesn't work with ghc-6.8.
914Lemmih <lemmih@gmail.com>**20081122012341
915 Ignore-this: 88a837b38cf3e897cc5ed4bb22046cee
916]
917[Semi-decent lhc support.
918Lemmih <lemmih@gmail.com>**20081121034138]
919[Make auto-generated *_paths.hs module warning-free.
920Thomas Schilling <nominolo@googlemail.com>**20081106142734
921 
922 On newer GHCs using {-# OPTIONS_GHC -fffi #-} gives a warning which
923 can lead to a compile failure when -Werror is activated.  We therefore
924 emit this option if we know that the LANGUAGE pragma is supported
925 (ghc >= 6.6.1).
926]
927[Escape ld-options with the -optl prefix when passing them to ghc
928Duncan Coutts <duncan@haskell.org>**20081103151931
929 Fixes ticket #389
930]
931[Simplify previous pkg-config fix
932Duncan Coutts <duncan@haskell.org>**20081101200309]
933[Fix bug where we'd try to configure an empty set of pkg-config packages
934Duncan Coutts <duncan@haskell.org>**20081101195512
935 This happened when the lib used pkg-config but the exe did not.
936 It cropped up in hsSqlite3-0.0.5.
937]
938[Add GHC 6.10.1's extensions to the list in Language.Haskell.Extension
939Ian Lynagh <igloo@earth.li>**20081019141408]
940[Ensure that the lib target directory is present when installing
941Duncan Coutts <duncan@haskell.org>**20081017004437
942 Variant on a patch from Bryan O'Sullivan
943]
944[Release kind is now rc
945Duncan Coutts <duncan@haskell.org>**20081011183201]
946[TAG 1.6.0.1
947Duncan Coutts <duncan@haskell.org>**20081011182516]
948Patch bundle hash:
949da1fc80d104f549bb872a17402a5d97e44dc2a38