Ticket #3410: ghc-rewrite-ParsePkgConf.dpatch

File ghc-rewrite-ParsePkgConf.dpatch, 34.0 KB (added by int-e, 5 years ago)

Alternative fix: Use Cabal's Read instance for InstalledPackageInfo_ for parsing package configurations in ghc as well. Upside: Less code. Downsides: The code is slower (I don't have hard numbers for that) and it breaks T1969 (but that's expected - the package.conf file there needs to be updated to reflect the new format)

Line 
1Sun Aug  2 17:00:03 CEST 2009  Bertram Felgenhauer <int-e@gmx.de>
2  * Parse package configurations using Cabal's read instance.
3  This gets rid of a fair amount of code in a home-grown parser.
4
5
6New patches:
7
8[Parse package configurations using Cabal's read instance.
9Bertram Felgenhauer <int-e@gmx.de>**20090802150003
10 Ignore-this: bf2f11fc0a1c8764a2c8deaab19dc656
11 This gets rid of a fair amount of code in a home-grown parser.
12] {
13hunk ./.darcs-boring 159
14 ^compiler/ghci/LibFFI.hs$
15 ^compiler/ghci/LibFFI_hsc.c$
16 ^compiler/main/Config.hs$
17-^compiler/main/ParsePkgConf.hs$
18 ^compiler/parser/Parser.y$
19 ^compiler/parser/Parser.hs$
20 ^compiler/parser/Lexer.hs$
21addfile ./compiler/main/ParsePkgConf.hs
22hunk ./compiler/main/ParsePkgConf.hs 1
23+module ParsePkgConf( loadPackageConfig ) where
24+
25+import PackageConfig (PackageConfig)
26+import Module (mkModuleName)
27+import DynFlags (DynFlags)
28+import Distribution.InstalledPackageInfo (InstalledPackageInfo_ (..))
29+
30+loadPackageConfig :: DynFlags -> FilePath -> IO [PackageConfig]
31+loadPackageConfig _ conf_filename = do
32+   conf <- readFile conf_filename
33+   return $! map convertPI (read conf)
34+
35+convertPI :: InstalledPackageInfo_ String -> PackageConfig
36+convertPI ip@(InstalledPackageInfo { exposedModules = e,
37+                                     hiddenModules = h }) =
38+   ip { exposedModules = map mkModuleName e,
39+        hiddenModules = map mkModuleName h }
40hunk ./compiler/main/ParsePkgConf.y 1
41-{
42-{-# OPTIONS -fno-warn-unused-binds -fno-warn-unused-matches -fno-warn-missing-signatures -fno-warn-incomplete-patterns -Wwarn #-}
43--- The above warning supression flag is a temporary kludge.
44--- While working on this module you are encouraged to remove it and fix
45--- any warnings in the module. See
46---     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
47--- for details
48-
49-module ParsePkgConf( loadPackageConfig ) where
50-
51-#include "HsVersions.h"
52-
53-import Distribution.Package hiding ( depends )
54-import PackageConfig
55-import Lexer
56-import Module
57-import DynFlags
58-import FastString
59-import StringBuffer
60-import ErrUtils  ( mkLocMessage )
61-import SrcLoc
62-import Outputable
63-import Panic
64-
65-}
66-
67-%expect 0
68-
69-%token
70- '{'           { L _ ITocurly }
71- '}'           { L _ ITccurly }
72- '['           { L _ ITobrack }
73- ']'           { L _ ITcbrack }
74- ','           { L _ ITcomma }
75- '='           { L _ ITequal }
76- VARID         { L _ (ITvarid    $$) }
77- CONID         { L _ (ITconid    $$) }
78- STRING                { L _ (ITstring   $$) }
79- INT           { L _ (ITinteger  $$) }
80-
81-%monad { P } { >>= } { return }
82-%lexer { lexer } { L _ ITeof }
83-%name parse
84-%tokentype { Located Token }
85-%%
86-
87-pkgconf :: { [ PackageConfig ] }
88-       : '[' ']'                       { [] }
89-       | '[' pkgs ']'                  { reverse $2 }
90-
91-pkgs   :: { [ PackageConfig ] }
92-       : pkg                           { [ $1 ] }
93-       | pkgs ',' pkg                  { $3 : $1 }
94-
95-pkg    :: { PackageConfig }
96-       : CONID '{' fields '}'          { $3 defaultPackageConfig }
97-
98-fields  :: { PackageConfig -> PackageConfig }
99-       : field                         { \p -> $1 p }
100-       | fields ',' field              { \p -> $1 ($3 p) }
101-
102-field  :: { PackageConfig -> PackageConfig }
103-       : VARID '=' pkgid
104-               {% case unpackFS $1 of
105-                       "package"     -> return (\p -> p{package = $3})
106-                       _             -> happyError
107-               }
108-
109-       | VARID '=' STRING              { id }
110-               -- we aren't interested in the string fields, they're all
111-               -- boring (copyright, maintainer etc.)
112-                       
113-        | VARID '=' CONID
114-               {% case unpackFS $1 of {
115-                       "exposed" ->
116-                          case unpackFS $3 of {
117-                               "True"  -> return (\p -> p{exposed=True});
118-                               "False" -> return (\p -> p{exposed=False});
119-                               _       -> happyError };
120-                       "license" -> return id; -- not interested
121-                       _         -> happyError }
122-               }
123-
124-       | VARID '=' CONID STRING        { id }
125-               -- another case of license
126-
127-       | VARID '=' strlist             
128-       {\p -> case unpackFS $1 of
129-               "exposedModules"    -> p{exposedModules    = map mkModuleNameFS $3}
130-               "hiddenModules"     -> p{hiddenModules     = map mkModuleNameFS $3}
131-               "importDirs"        -> p{importDirs        = map unpackFS $3}
132-               "libraryDirs"       -> p{libraryDirs       = map unpackFS $3}
133-               "hsLibraries"       -> p{hsLibraries       = map unpackFS $3}
134-               "extraLibraries"    -> p{extraLibraries    = map unpackFS $3}
135-               "extraGHCiLibraries"-> p{extraGHCiLibraries= map unpackFS $3}
136-               "includeDirs"       -> p{includeDirs       = map unpackFS $3}
137-               "includes"          -> p{includes          = map unpackFS $3}
138-               "hugsOptions"       -> p{hugsOptions       = map unpackFS $3}
139-               "ccOptions"         -> p{ccOptions         = map unpackFS $3}
140-               "ldOptions"         -> p{ldOptions         = map unpackFS $3}
141-               "frameworkDirs"     -> p{frameworkDirs     = map unpackFS $3}
142-               "frameworks"        -> p{frameworks        = map unpackFS $3}
143-               "haddockInterfaces" -> p{haddockInterfaces = map unpackFS $3}
144-               "haddockHTMLs"      -> p{haddockHTMLs      = map unpackFS $3}
145-               "depends"           -> p{depends = []}
146-                       -- empty list only, non-empty handled below
147-               _ -> p
148-       }
149-
150-       | VARID '=' pkgidlist
151-               {% case unpackFS $1 of
152-                       "depends"     -> return (\p -> p{depends = $3})
153-                       _             -> happyError
154-               }
155-
156-pkgid  :: { PackageIdentifier }
157-       : CONID '{' VARID '=' CONID STRING ',' VARID '=' version '}'
158-            {% case unpackFS $5 of
159-               "PackageName" ->
160-                   return $ PackageIdentifier {
161-                                pkgName = PackageName (unpackFS $6),
162-                                pkgVersion = $10
163-                            }
164-               _ -> happyError
165-            }
166-
167-version :: { Version }
168-       : CONID '{' VARID '=' intlist ',' VARID '=' strlist '}'
169-                       { Version{ versionBranch=$5,
170-                                   versionTags=map unpackFS $9 } }
171-
172-pkgidlist :: { [PackageIdentifier] }
173-       : '[' pkgids ']'                { $2 }
174-       -- empty list case is covered by strlist, to avoid conflicts
175-
176-pkgids :: { [PackageIdentifier] }
177-       : pkgid                         { [ $1 ] }
178-       | pkgid ',' pkgids              { $1 : $3 }
179-
180-intlist :: { [Int] }
181-        : '[' ']'                      { [] }
182-       | '[' ints ']'                  { $2 }
183-
184-ints   :: { [Int] }
185-       : INT                           { [ fromIntegral $1 ] }
186-       | INT ',' ints                  { fromIntegral $1 : $3 }
187-
188-strlist :: { [FastString] }
189-        : '[' ']'                      { [] }
190-       | '[' strs ']'                  { $2 }
191-
192-strs   :: { [FastString] }
193-       : STRING                        { [ $1 ] }
194-       | STRING ',' strs               { $1 : $3 }
195-
196-{
197-happyError :: P a
198-happyError = srcParseFail
199-
200-loadPackageConfig :: DynFlags -> FilePath -> IO [PackageConfig]
201-loadPackageConfig dflags conf_filename = do
202-   buf <- hGetStringBuffer conf_filename
203-   let loc  = mkSrcLoc (mkFastString conf_filename) 1 0
204-   case unP parse (mkPState buf loc dflags) of
205-       PFailed span err ->
206-           ghcError (InstallationError (showSDoc (mkLocMessage span err)))
207-
208-       POk _ pkg_details -> do
209-           return pkg_details
210-}
211rmfile ./compiler/main/ParsePkgConf.y
212}
213
214Context:
215
216[Add a publish-docs rule
217Ian Lynagh <igloo@earth.li>**20090801224155]
218[Add docs to bindists
219Ian Lynagh <igloo@earth.li>**20090801222551]
220[Fix "make show" in a bindist
221Ian Lynagh <igloo@earth.li>**20090801212604]
222[Make the new build system install the documentation
223Ian Lynagh <igloo@earth.li>**20090801204624]
224[whitespace tweaks in rules/docbook.mk
225Ian Lynagh <igloo@earth.li>**20090801195221]
226[Fix configure when alex/happy are installed to a directory containing spaces
227Ian Lynagh <igloo@earth.li>**20090801182817]
228[Allow more than 64k instructions in a BCO; fixes #789
229Ian Lynagh <igloo@earth.li>**20090801153203]
230[If ghci runs out of labels, panic
231Ian Lynagh <igloo@earth.li>**20090801132829]
232[Fix the 64k insns overflow check in ghci, and add more checks
233Ian Lynagh <igloo@earth.li>**20090801130014]
234[Fix cleaning the integer package
235Ian Lynagh <igloo@earth.li>**20090730143129]
236[Fix warnings when building with the HEAD
237Ian Lynagh <igloo@earth.li>**20090730143031]
238[Remove some redundant fromIntegral's
239Ian Lynagh <igloo@earth.li>**20090730105532]
240[Fix space problems in ghci
241Ian Lynagh <igloo@earth.li>**20090730105351
242 We were making arrays with range (0, n-1) which is bad if n == 0 now
243 that we are using Word types.
244]
245[Make the types we use when creating GHCi bytecode better match reality
246Ian Lynagh <igloo@earth.li>**20090729130911
247 We were keeping things as Int, and then converting them to Word16 at
248 the last minute, when really they ought to have been Word16 all along.
249]
250[Add an (Outputable Word16) instance
251Ian Lynagh <igloo@earth.li>**20090728134436]
252[Fix whitespace in ByteCodeAsm.lhs
253Ian Lynagh <igloo@earth.li>**20090728123444]
254[Add CHECK(p), like ASSERT(p) but works even when !defined(DEBUG)
255Simon Marlow <marlowsd@gmail.com>**20090729075433
256 Ignore-this: a723f456e4b1eaeaa617a675da276aa2
257 For inexpensive assertions
258]
259[enable the x86-specific versions of atomic_inc()/atomic_dec()
260Simon Marlow <marlowsd@gmail.com>**20090729075307
261 Ignore-this: a271b7ade5502ec4d8444aac19f4b4c3
262]
263[fix warning
264Simon Marlow <marlowsd@gmail.com>**20090728103855
265 Ignore-this: ee626aa5de0a2aed8f44ae1131cc341d
266]
267[fix warning
268Simon Marlow <marlowsd@gmail.com>**20090728102707
269 Ignore-this: ad4f07a163921d17d242a9452b4bb578
270]
271[fix a warning
272Simon Marlow <marlowsd@gmail.com>**20090728101731
273 Ignore-this: 73ead0a0004723757c0a51b56681c991
274]
275[Be a bit more sensible about choosing external OccNames
276Simon Marlow <marlowsd@gmail.com>**20090728100434
277 Ignore-this: 4adcd661e76440deb2b4ab498ebd2d1e
278 
279 Instead of chr_$wchr, we now just get $wchr.  In general, when an
280 OccName is system-generated, we leave it out of the final external
281 name, preferring to use the name of the exported parent instead (which
282 is necessarily a user-written name).
283 
284 Names should be no less deterministic, but should be shorter and more
285 readable.
286]
287[Remove old 'foreign import dotnet' code
288Simon Marlow <marlowsd@gmail.com>**20090727144524
289 Ignore-this: 821ebea2c3897415195318f107421472
290 It still lives in darcs, if anyone wants to revive it sometime.
291]
292[remove a couple of ToDos
293Simon Marlow <marlowsd@gmail.com>**20090727094719
294 Ignore-this: ef00fc481821dff4381ba9efcd792708
295]
296[buildinfo files need a $$(wildcard)
297Simon Marlow <marlowsd@gmail.com>**20090727091012
298 Ignore-this: b4c3201dfa81fef32ee254dd9c955b2d
299]
300[Slight tweak to avoid overflowing the command-line size in bindist
301Simon Marlow <marlowsd@gmail.com>**20090727090946
302 Ignore-this: 1e2ff207d03fed08576ac59f0b46c08c
303 Not a real fix: if this bites us again we'll have to rethink
304]
305[avoid (benign) error about overriding rules for binary-dist
306Simon Marlow <marlowsd@gmail.com>**20090727090903
307 Ignore-this: ffb7f7bf1290f2faf96ac177f76a1422
308]
309[Give a better error message for hidden packages when building Cabal package
310Ian Lynagh <igloo@earth.li>**20090726194915
311 Fixes #3168
312]
313[Add a -fbuilding-cabal-package flag
314Ian Lynagh <igloo@earth.li>**20090726181934
315 This means GHC knows whether it's building a Cabal package, or just
316 Haskell sources. For example, it may wish to give different error
317 messages when building a Cabal package.
318]
319[Add an extension to disable n+k patterns
320Ian Lynagh <igloo@earth.li>**20090725134703]
321[Fix a warning on Windows
322Ian Lynagh <igloo@earth.li>**20090724221244]
323[Remove GHC's haskell98 dependency
324Ian Lynagh <igloo@earth.li>**20090724210825]
325[add number of bytes to +RTS -DS leak reports
326Simon Marlow <marlowsd@gmail.com>**20090724150010
327 Ignore-this: 3a66585c8fd2b58ce96abab1e154fb6e
328]
329[free the gc_thread structures during shutdown
330Simon Marlow <marlowsd@gmail.com>**20090724145956
331 Ignore-this: 25efeb189cbfb549af4550d266604f0e
332]
333[Add atomic_inc()/atomic_dec(), and use them to replace gc_running_mutex
334Simon Marlow <marlowsd@gmail.com>**20090724142620
335 Ignore-this: d775eeaf85fd0f9064d87a0909134bc0
336 This also fixes a memory leak on Windows with -threaded, because we
337 were calling initMutex(&gc_running_mutex) for each GC, which allocates
338 memory.
339]
340[Rewrite the foreign import string parser using ReadP
341Simon Marlow <marlowsd@gmail.com>**20090723152138
342 Ignore-this: 1c7db770a29d48710b05e2a3d216b2a8
343 And kill the duplicate one in HsSyn.Convert
344]
345[point to the wiki
346Simon Marlow <marlowsd@gmail.com>**20090723132345
347 Ignore-this: c11300bac62ce2f56d7fc271aa26dbcd
348]
349[Remove note about avoiding use of #def in libraries
350Simon Marlow <marlowsd@gmail.com>**20090723111026
351 Ignore-this: 8a027ed37b2d10094f7a31548aee2535
352 It should be safe to use now that we aren't relying on C prototypes
353 for foreign functions in via-C code.
354]
355[refactorings
356Simon Marlow <marlowsd@gmail.com>**20090723091230
357 Ignore-this: 836feb0e819127603dd56623af6e48dc
358]
359[Fix Trac #3391: make generic to/from bindings only for newly-declared types
360simonpj@microsoft.com**20090723155803
361 Ignore-this: bb56c2ec054397d421dce13d5eb6c73f
362 
363 Before this patch we were bogusly making to/from bindings for all data types
364 in the TcGblEnv.  But that is wrong when we have multiple "chunks" of
365 bindings in Template Haskell.  We should start from the declarations
366 themselves.  Easy.
367 
368]
369[Print explicit braces and semicolons in do-notation
370simonpj@microsoft.com**20090723152411
371 Ignore-this: a97ddf19774d27d15a01d63787708b20
372 
373 By printing explicit braces we make it more likely that pretty-printed
374 code will be acceptable if fed back into GHC.
375 
376 See http://www.haskell.org/pipermail/glasgow-haskell-users/2009-July/017554.html
377 
378]
379[Documentation for stand-alone deriving (Trac #3012)
380simonpj@microsoft.com**20090723132558
381 Ignore-this: 54445c5984594eb7f82151b2ac118695
382]
383[Windows only: set the encoding on stdin to utf8
384Simon Marlow <marlowsd@gmail.com>**20090723121913
385 Ignore-this: d65115d9711b5fb68e77786565ef6de
386 Otherwise it defaults to latin1.
387]
388[Fix Trac #3012: allow more free-wheeling in standalone deriving
389simonpj@microsoft.com**20090723130145
390 Ignore-this: 357580b9388ccbe1da3c1da3ba90e456
391 
392 In standalone deriving, we now do *not* check side conditions.
393 We simply generate the code and typecheck it.  If there's a type
394 error, it's the programmer's problem.
395 
396 This means that you can do 'deriving instance Show (T a)', where
397 T is a GADT, for example, provided of course that the boilerplate
398 code does in fact typecheck.
399 
400 I put some work into getting a decent error message.  In particular
401 if there's a type error in a method, GHC will show the entire code
402 for that method (since, after all, the user did not write it).
403 Most of the changes are to achieve that goal.
404 
405 Still to come: changes in the documentation.
406 
407]
408[Use the ErrMsg record type
409simonpj@microsoft.com**20090723130108
410 Ignore-this: 7fb6dd78d3185da0c33901b8aac8d108
411]
412[Stop generating redundant parens in 'deriving' code
413simonpj@microsoft.com**20090723125903
414 Ignore-this: 6fc82df9648a82bcf7bf6fdfa9b4dad3
415 
416 This makes the code printed by -ddump-deriv look prettier
417 
418]
419[Wibble to printing tuple sections
420simonpj@microsoft.com**20090723125756
421 Ignore-this: af2a1b9784f6447fea0e11d454cf082f
422]
423[Fix Trac #3193: improve line number reporting for equality constraints
424simonpj@microsoft.com**20090723065504
425 Ignore-this: b45a68071bcaca48cad7855dccb9c9eb
426 
427 When reporting an error from a failed equality constraint, we were
428 setting the *context* but not the *line number* in TcTyFuns.eqInstMisMatch
429 As a result, the line number didn't match the context at all.  It's
430 trivial to fix.
431 
432 I'm 99% certain this fixes #3193, but it's too complicated to
433 reproduce, so I have not actually tested it.
434 
435]
436[Add fmapM_maybe :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b)
437simonpj@microsoft.com**20090723064932
438 Ignore-this: db5f6319b52a5e6b5f85d76985f2a7c9
439 
440 This function isn't used at the moment, but Max added it, and it
441 looks useful.
442 
443]
444[Add tuple sections as a new feature
445simonpj@microsoft.com**20090723063859
446 Ignore-this: d42a26fc1efff112b852b5c1135c1746
447 
448 This patch adds tuple sections, so that
449 
450        (x,,z)  means   \y -> (x,y,z)
451 
452 Thanks for Max Bolinbroke for doing the hard work.
453 
454 In the end, instead of using two constructors in HsSyn, I used
455 just one (still called ExplicitTuple) whose arguments can be
456        Present (LHsExpr id)
457 or     Missing PostTcType
458 
459 While I was at it, I did a bit of refactoring too.
460 
461]
462[NetBSD defines _REENTRANT in its header files, so compiling ghc gives
463Simon Marlow <marlowsd@gmail.com>**20090723075030
464 Ignore-this: 4722c4ff0541c6080de8f433e498684
465 redefinition warnings for all files that are including includes/Rts.h.
466 
467 Contributed by: Krister Walfridsson <krister.walfridsson@gmail.com>
468]
469[includes/TSO.h: kill trailing whitespace
470Samuel Bronson <naesten@gmail.com>**20090722170354
471 Ignore-this: 36d4afd1a21188d604ed6b432942dcdc
472]
473[Say what StgTSOBlockInfo is for, where to read about it.
474Samuel Bronson <naesten@gmail.com>**20090722163011
475 Ignore-this: 6c09e11f23594251cdc2db1bc642edc9
476]
477[Make the Integer library used directly configurable in GHC and base
478Ian Lynagh <igloo@earth.li>**20090722151048
479 Rather than indirecting through an integer package
480]
481[Fix cleaning with the new integer changes
482Ian Lynagh <igloo@earth.li>**20090722142545]
483[Add integer-simple as a build option
484Ian Lynagh <igloo@earth.li>**20090722013137]
485[Tweak whitespace
486Ian Lynagh <igloo@earth.li>**20090719221303]
487[thenIO, bindIO, returnIO moved to GHC.Base
488Simon Marlow <marlowsd@gmail.com>**20090722102219
489 Ignore-this: 5d6c5988e0abab2c5169540aa8ddedb9
490]
491[remove unused $(HscIfaceFileVersion)
492Simon Marlow <marlowsd@gmail.com>**20090720145053
493 Ignore-this: d725cbbde3c68673e2342b370460d87f
494]
495[Choose external names more predictably
496Simon Marlow <marlowsd@gmail.com>**20090720144751
497 Ignore-this: 17513bc93af646108f21bbed1c8f4a3a
498 
499 Now, for a compiler-generated binding "x", if "x" is referred to by
500 the exported "f", then it will be named "f_x" rather than something
501 like "x23".  This means that hopefully
502 
503   - compilation will more often product the same results given the
504     same input (the choice of names is not dependent on the
505     non-deterministic order of bindings within the compiler).
506 
507   - less recompilation will be necessary after making changes
508 
509   - navigating Core might be a bit easier.
510 
511 unfortunately, compilation with -O still does not consistently produce
512 the same ABI.  The simplifier sometimes does different things,
513 apparently.
514 
515 Names will be longer, but I can't see a way around that.
516]
517[Use stable ordering in the dependencies
518Simon Marlow <marlowsd@gmail.com>**20090717123449
519 Ignore-this: e20bac233cf6f834e69c027ff60b5b50
520 Fixes another cause of wobbly interface files and unnecessary recompilation.
521]
522[fall back on libffi for 'foreign import "wrapper"' if necessary
523Simon Marlow <marlowsd@gmail.com>**20090716134549
524 Ignore-this: e1073e1ad77e720326865a6d3c4f3790
525]
526[Take account of GADTs when reporting patterm-match overlap
527simonpj@microsoft.com**20090722050933
528 Ignore-this: 7dcbdcb91021e83e6e6208a2e68c50c9
529 
530 When matching against a GADT, some of the constructors may be impossible.
531 For example
532        data T a where
533           T1 :: T Int
534           T2 :: T Bool
535           T3 :: T a
536 
537         f :: T Int -> Int
538         f T1 = 3
539         f T3 = 4
540 
541 Here, does not have any missing cases, despite omittting T2, because
542 T2 :: T Bool.
543 
544 This patch teaches the overlap checker about GADTs, which happily
545 turned out to be rather easy even though the overlap checker needs
546 a serious rewrite.
547 
548]
549[Fix Trac #3382: desugaring of NPats
550simonpj@microsoft.com**20090720061226
551 Ignore-this: 4dccdaf2b7d6428141dcf174cb455a20
552 
553 Max spotted that the short-cut rules for desugaring NPats (where
554 we compare against a literal) were wrong now that we have overloaded
555 strings.
556 
557]
558[Add a -fwarn-dodgy-exports flag; fixes #1911
559Ian Lynagh <igloo@earth.li>**20090719200124
560 This is used to control warnings that were previously unconditional.
561]
562[Build terminfo if we /aren't/ on Windows, not if we /are/
563Ian Lynagh <igloo@earth.li>**20090719111709]
564[Change how PACKAGES is constructed, so that everything gets cleaned properly
565Ian Lynagh <igloo@earth.li>**20090718210058
566 If Windows wasn't defined properly then the Win32 package wasn't being
567 cleaned, as it wasn't added to PACKAGES. Now we always add everything to
568 PACKAGES when CLEANING=YES.
569]
570[temporarily turn off unused import warnings for the time library
571Ian Lynagh <igloo@earth.li>**20090718183445]
572[Follow the split directory rename in the GHC build system rules
573Ian Lynagh <igloo@earth.li>**20090718155618]
574[Add osuf to the name we use for the split dir
575Ian Lynagh <igloo@earth.li>**20090718145522
576 This avoids a collision between the directories we use when compiling
577 multiple ways, which in turn leads to a race condition in parallel
578 builds.
579]
580[Temporarily turn off unused-do-bind warnings for the time package
581Ian Lynagh <igloo@earth.li>**20090718134536]
582[Make ghc-cabal handle "Custom" Setup.hs files that have a configure script
583Ian Lynagh <igloo@earth.li>**20090718131555]
584[Add the time library, and support for libraries in tarballs
585Ian Lynagh <igloo@earth.li>**20090718121649]
586[Always serialise Int as 64bit values; fixes trac #3041
587Ian Lynagh <igloo@earth.li>**20090717224203
588 This means that, provided the values are small enough, files
589 serialized are portable between architectures. In particular,
590 .haddock files are portable.
591]
592[Remove some code that has always been commented out
593Ian Lynagh <igloo@earth.li>**20090717224100]
594[Fix Trac #3346: tcSimplify for LHS of RULES with type equalities
595simonpj@microsoft.com**20090717155722
596 Ignore-this: dfdd0f9a62d78d63276a4d558831099c
597]
598[Allow mixed case in the LINE pragma; patch from squadette; fixes #1817
599Ian Lynagh <igloo@earth.li>**20090717133522]
600[Comment only
601simonpj@microsoft.com**20090717120154
602 Ignore-this: f96b11e602fe4b311c1e466af9aa1908
603]
604[Add missing case for eq_note.
605t-peterj@microsoft.com**20090624134407]
606[Rename parameters to make debugging code compile.
607t-peterj@microsoft.com**20090626105440]
608[Comment fix: use the same variable names in the conclusion as in the premise.
609t-peterj@microsoft.com**20090618092235]
610[Typo fixes, from Alexey Mahotkin
611Ian Lynagh <igloo@earth.li>**20090717010817]
612[Use names like '$fOrdInt' for dfuns (and TF instances), rather than '$f21'
613Simon Marlow <marlowsd@gmail.com>**20090716125643
614 Ignore-this: d0b4632cf8ed9e05b67a19aa19ab3e19
615 
616 2 reasons for this:
617   - compilation is more predictable.  Adding or removing an instance
618     is less likely to force unnecessary recompilation due to
619     renumbering other dfun names.
620   - it makes it easier to read Core / C-- / asm
621 
622 The names aren't completely deterministic.  To do that, we'd have to
623 include package and module names, which would make the symbol names
624 long and reduce readability.  So the compromise is that if there's a
625 clash, we disambiguate by adding an integer suffix.  This is fairly
626 unlikely in practice unless you're using overlapping instances.
627 
628 Type family instances are handled in the same way, with the same
629 disambiguation strategy.
630]
631[Use a stable ordering for the export list in the interface
632Simon Marlow <marlowsd@gmail.com>**20090716122601
633 Ignore-this: 847dd7adc8b52e56f28d2478c78c925
634 The export list was ordered according to the whim of FastStrings,
635 which meant that interface fingerprints could change for no good
636 reason, causing spurious recompilation.
637]
638[Don't put all of $CFLAGS into $SRC_CC_OPTS
639Ian Lynagh <igloo@earth.li>**20090716131309
640 Instead, we just put the flags we need in there (e.g. -m64 on OS X 64).
641 This fixes a problem found by Simon M, where we were compiling
642 everything with -g, leading to a bloated RTS.
643]
644[Move showOpt into DynFlags
645Ian Lynagh <igloo@earth.li>**20090716005314]
646[Make the --info values printable with "ghc --print-foo"; trac #3122
647Ian Lynagh <igloo@earth.li>**20090716001718
648 Also, libdir is now part of the --info output, so this subsumes the old
649 --print-libdir flag.
650 The mode parsing was getting rather adhoc, so I've tidied it up a bit
651 in the process.
652]
653[whitespace only
654Simon Marlow <marlowsd@gmail.com>**20090716104217
655 Ignore-this: 38cff291d9ef15c30e3ed685ffc3c9f9
656]
657[refactor: use packageConfigId in place of mkPackageId . package
658Simon Marlow <marlowsd@gmail.com>**20090716104145
659 Ignore-this: f3d73e7bd1b307a67d26585c49f3d89f
660]
661[Fix a flag name in the docs
662Ian Lynagh <igloo@earth.li>**20090714165943]
663[Add the -fno-shared-implib flag
664Ian Lynagh <igloo@earth.li>**20090714165631
665 Patch from
666     Max Bolingbroke <batterseapower@hotmail.com>
667 Rerecorded to avoid conflicts.
668]
669[Derived Foldable instances should use Data.Foldable.foldr
670m.niloc@gmail.com**20090711130647
671 Ignore-this: e3eb841e9535a842a98bb1ae0532c6e8
672]
673[remove Solaris-specific hacks, now unnecessary
674Simon Marlow <marlowsd@gmail.com>**20090713083524
675 Ignore-this: 500077008e463532e0677ee82f5284bb
676]
677[Simplify timestamp restoration
678Matthias Kilian <kili@outback.escape.de>**20090711100244
679 Ignore-this: 7eaede224befa6b5368c91b92366211
680]
681[FIX #3272
682Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090714054559
683 Ignore-this: 225fe4d82d4eed02e9b1377687661bac
684]
685[Fix warnings
686Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090713092032
687 Ignore-this: 3631b87164fc54d82e3a02875dc08f7d
688]
689[Separate length from data in DPH arrays
690Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090713044212
691 Ignore-this: aa2cc3b5ae43bd2c493ce4b330c883cd
692]
693[Stop using -fno-warn-unused-do-bind when compiling the libraries
694Ian Lynagh <igloo@earth.li>**20090709160422
695 They're now fixed to not generate those warnings
696]
697[Remove maybePrefixMatch, using stripPrefix instead
698Ian Lynagh <igloo@earth.li>**20090709160412
699 We already require GHC 6.8 to build, and that included stripPrefix
700 in Data.List.
701]
702[TFs: FIX #2203 (second half)
703Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090710064834
704 Ignore-this: 46a46feaa73f74feb08524b9e7547414
705]
706[TFs: Fix should_compile/Simple8
707Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090710042728
708 Ignore-this: 471ab67e3df1c5245921be5286a45f93
709]
710[workaround new Cygwin bash CRLF behaviour
711Simon Marlow <marlowsd@gmail.com>**20090709132850
712 Ignore-this: 5cfa2cc9d776ebe315c0f6ad7ab56d98
713]
714[Use /usr/bin/test if it exists, and fix test syntax.
715Simon Marlow <marlowsd@gmail.com>**20090709124616
716 Ignore-this: 83a75ba7c3ce2a1d02bddb7bfe414bfe
717 Should fix Solaris build failures
718]
719[Allow mixed case pragmas; #1817. Patch from squadette
720Ian Lynagh <igloo@earth.li>**20090709153737
721 This patch allow you to use "Language CPP", or even "LaNgUaGe CPP",
722 if you wish, as the manual claims you can.
723]
724[don't create inplace/bin/ghc-<version>
725Simon Marlow <marlowsd@gmail.com>**20090706092031
726 Ignore-this: 2584d7bf56e77b27ca5b7b557c152c5e
727]
728[Fix ignored-monadic-result warnings
729Ian Lynagh <igloo@earth.li>**20090707181857]
730[Fix an unused import warning
731Ian Lynagh <igloo@earth.li>**20090707144706]
732[Fix unused import warnings
733Ian Lynagh <igloo@earth.li>**20090707143216]
734[Fix unused import warnings
735Ian Lynagh <igloo@earth.li>**20090707133537]
736[When exporting F(..), all the children of F are also exported
737Ian Lynagh <igloo@earth.li>**20090707133427
738 This fixes the unused imports warning when
739     Foo (F(x,y,z))
740 is imported and
741     Foo (F(..))
742 is exported.
743]
744[Remove unused imports
745Ian Lynagh <igloo@earth.li>**20090707121548]
746[Major patch to fix reporting of unused imports
747simonpj@microsoft.com**20090706112503
748 Ignore-this: 3b5ecdd880474493d73bdbdc0fa0b782
749 
750 This patch, joint work between and Ian and Simon, fixes Trac #1074
751 by reporting unused import declarations much more accuratly than
752 before.  The specification is described at
753 
754 http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/UnusedImports
755 
756 The implementation is both easier to understand than before, and shorter
757 too. 
758 
759 Also fixed are #1148, #2267
760 
761 Also fixed is -ddump-minimal imports, which now works properly, fixing
762 Trac #1792.
763 
764 
765]
766[Trim unused imports detected by new unused-import code
767simonpj@microsoft.com**20090706112201
768 Ignore-this: c6ca46d3a750c1cd1d58ea2c0de9f14f
769]
770[Avoid unnecessary recompilation after ./configure (helps #3228)
771Simon Marlow <marlowsd@gmail.com>**20090707085040
772 Ignore-this: f8b3e7a2a96bc23cd29505ab9c8dbd7d
773 We cache the old versions of files generated by configure, so that if
774 configure touches the file without changing it, we can detect that and
775 restore the timestamp.
776]
777[check for tabs in compiler/ghc.cabal.in (#3344)
778Simon Marlow <marlowsd@gmail.com>**20090707081845
779 Ignore-this: 6073db47eafd52e13e76c58ef738afcf
780]
781[remove tabs
782Simon Marlow <marlowsd@gmail.com>**20090707081823
783 Ignore-this: 3d65831fc019f76cefac03291904842a
784]
785[fix cleaning of libraries (now 'make clean' in libraries/* works again)
786Simon Marlow <marlowsd@gmail.com>**20090703114638
787 Ignore-this: b3af731d50ff5bfbd453f94aa40cb92c
788]
789[FIX #2677
790Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090707055442
791 Ignore-this: e224dd09d0d1c9ec4f3b46c7accb8d57
792]
793[Update driver/Makefile for the new build system
794Ian Lynagh <igloo@earth.li>**20090705204041]
795[Fix generational GC bug (#3348)
796Simon Marlow <marlowsd@gmail.com>**20090706112227
797 Ignore-this: 5938338efa0ad1550968c664a5a76f31
798]
799[Windows fixes to build system: use the 'find' and 'sort' found by configure
800simonpj@microsoft.com**20090706103413
801 Ignore-this: a96197917f388a637118bafefb427495
802 
803 The build system should use 'find' and 'sort' that are discovered by
804 configure, not the ones in your path.  On Windows the ones in your path
805 might well be the non-Unixy Windows versions.
806 
807 This patch fixes the ones I tripped over. There may be more.
808 
809]
810[Follow Cabal changes
811Ian Lynagh <igloo@earth.li>**20090705180414]
812[Update TODO list
813Ian Lynagh <igloo@earth.li>**20090705165009]
814[Make -fext-core a dynamic flag (it was a static flag)
815Ian Lynagh <igloo@earth.li>**20090705132420]
816[Update a few points about shared libs in other sections
817Duncan Coutts <duncan@well-typed.com>**20090704212212
818 And add links to the new shared libs section.
819]
820[Document -dynload flag. Also add it and -shared to the flags reference.
821Duncan Coutts <duncan@well-typed.com>**20090704212119]
822[Add new section on using shared libs
823Duncan Coutts <duncan@well-typed.com>**20090704212003]
824[Document foreign import prim in the user guide
825Duncan Coutts <duncan@well-typed.com>**20090704180547
826 Basically just stat that it exists and refer to the ghc dev wiki
827 for the details, because we don't really want people using it.
828]
829[For now, use -fno-warn-unused-do-bind when building the libraries
830Ian Lynagh <igloo@earth.li>**20090704210654]
831[Make changes to -fwarn-unused-do-bind and -fwarn-wrong-do-bind suggested by SPJ
832Max Bolingbroke <batterseapower@hotmail.com>**20090702150943
833 Ignore-this: 595368298d2e11623c0bd280ff89d8de
834]
835[Support for -fwarn-unused-do-bind and -fwarn-wrong-do-bind, as per #3263
836Max Bolingbroke <batterseapower@hotmail.com>**20090701200344
837 Ignore-this: 511117ffc10d4b656e530b751559b8b8
838]
839[Improved infrastructure for fast-rebuilding of parts of the tree
840Simon Marlow <marlowsd@gmail.com>**20090703074527
841 Ignore-this: ab348d0988d8bbc28c2b4babbd6bbfb8
842 
843 e.g.
844 
845   cd compiler
846   make FAST=YES stage1/build/HscTypes.o
847 
848 builds just the specified .o file, without rebuilding dependencies,
849 and omitting some of the makefile phases.  FAST=YES works anywhere, to
850 omit depenencies and phases.  'make fast' is shorthand for 'make
851 all FAST=YES'.
852]
853[Fix Trac #3342: missed zonking in TcHsSyn
854simonpj@microsoft.com**20090702124331
855 Ignore-this: 9b97b2142dfc665b503f59df7c55dd17
856 
857 The type in a ViewPat wasn't being zonked.  Easily fixed.
858 
859]
860[Type synonym families may be nullary
861Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090702084826
862 Ignore-this: bcfe6ed62c901206daf5a5088890bbea
863]
864[New syntax for GADT-style record declarations, and associated refactoring
865simonpj@microsoft.com**20090702094657
866 Ignore-this: bd9817230d3773b3b01fae3d7f04c57d
867 
868 The main purpose of this patch is to fix Trac #3306, by fleshing out the
869 syntax for GADT-style record declraations so that you have a context in
870 the type.  The new form is
871    data T a where
872      MkT :: forall a. Eq a => { x,y :: !a } -> T a
873 See discussion on the Trac ticket.
874 
875 The old form is still allowed, but give a deprecation warning.
876 
877 When we remove the old form we'll also get rid of the one reduce/reduce
878 error in the grammar. Hurrah!
879 
880 While I was at it, I failed as usual to resist the temptation to do lots of
881 refactoring.  The parsing of data/type declarations is now much simpler and
882 more uniform.  Less code, less chance of errors, and more functionality.
883 Took longer than I planned, though.
884 
885 ConDecl has record syntax, but it was not being used consistently, so I
886 pushed that through the compiler.
887 
888]
889[White space only
890simonpj@microsoft.com**20090702094627
891 Ignore-this: 19f654cbf371c8dcc6517fd4934855b4
892]
893[Comments only
894simonpj@microsoft.com**20090702094531
895 Ignore-this: 384fc2729c7c50a1680775a1f9ff89e4
896]
897[Look through Notes when matching
898simonpj@microsoft.com**20090702094444
899 Ignore-this: 7daea81e905ec6061d3e0fd588d7e61b
900]
901[FIX #3197
902Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090702070905
903 Ignore-this: ebf829f0ae025e82bccdfa4345828ffe
904]
905[Fix #2197 (properly this time)
906Simon Marlow <marlowsd@gmail.com>**20090701122354
907 Ignore-this: 39b6e4b0bcdd8c2f4660f976b7db768d
908 
909 $ ./inplace/bin/ghc-stage2 --interactive
910 GHCi, version 6.11.20090701: http://www.haskell.org/ghc/  :? for help
911 ghc-stage2: GHCi cannot be used when compiled with -prof
912 [1]    32473 exit 1     ./inplace/bin/ghc-stage2 --interactive
913]
914[make GhcProfiled work, and add a "prof" flavour to build.mk
915Simon Marlow <marlowsd@gmail.com>**20090701114211
916 Ignore-this: 386d347e4ad8b6c2bd40a2ba7da31ba6
917 
918 Building a profiled GHC is as simple as adding
919 
920 GhcLibWays += p
921 GhcProfiled = YES
922 
923 to your build.mk and saying 'make'.  Then you have a profiled
924 inplace/bin/ghc-stage2.
925]
926[remove unnecessary $(RM)s
927Simon Marlow <marlowsd@gmail.com>**20090701110609
928 Ignore-this: f326ec8931d0d484a66b67ce1270cc6e
929]
930['make html' in a library builds the Haddock docs
931Simon Marlow <marlowsd@gmail.com>**20090630111137
932 Ignore-this: 781bf10e2d4bca23b7f70c6f0465d120
933]
934[fix GC bug introduced with the C finalizer support
935Simon Marlow <marlowsd@gmail.com>**20090630080834
936 Ignore-this: 3567e3adb5ae4a5dcbce81733487f348
937]
938[Add a configure test for whether or not __mingw_vfprintf exists
939Ian Lynagh <igloo@earth.li>**20090627150501]
940[Fix #3319, and do various tidyups at the same time
941Simon Marlow <marlowsd@gmail.com>**20090626095421
942 Ignore-this: ea54175f6bd49e101d7b33392764f643
943  - converting a THSyn FFI declaration to HsDecl was broken; fixed
944  - pretty-printing of FFI declarations was variously bogus; fixed
945  - there was an unused "library" field in CImport; removed
946]
947[rename cache variable to keep recent autoconfs happy
948Ross Paterson <ross@soi.city.ac.uk>**20090626131410
949 Ignore-this: 187091bbe78f2b14402162acfb98180f
950]
951[TAG 2009-06-25
952Ian Lynagh <igloo@earth.li>**20090625155528]
953Patch bundle hash:
954cd02fec36f421d2da609b1d41ed48f4484d9f82a