Ticket #885: prevent-windows-dep-violations-caused-by-the-linker.dpatch

File prevent-windows-dep-violations-caused-by-the-linker.dpatch, 118.2 KB (added by briansmith, 8 years ago)
Line 
1
2New patches:
3
4[Prevent Windows DEP violations caused by the Linker
5brianlsmith@gmail.com**20061002224544] {
6hunk ./rts/Linker.c 1253
7-   int misalignment;
8hunk ./rts/Linker.c 1362
9-#ifdef darwin_HOST_OS
10+#  if defined(mingw32_HOST_OS)
11+   oc->image = VirtualAlloc(NULL, oc->fileSize, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
12+
13+#  elif defined(darwin_HOST_OS)
14hunk ./rts/Linker.c 1375
15-   misalignment = machoGetMisalignment(f);
16-   oc->misalignment = misalignment;
17-#else
18-   misalignment = 0;
19-#endif
20+   oc->misalignment = machoGetMisalignment(f);
21+   oc->image = stgMallocBytes(oc->fileSize + oc->misalignment, "loadObj");
22+   oc->image += oc->misalignment;
23+#  else
24+   oc->image = stgMallocBytes(oc->fileSize, "loadObj");
25+#  endif
26hunk ./rts/Linker.c 1382
27-   oc->image = stgMallocBytes(oc->fileSize + misalignment, "loadObj(image)");
28-   oc->image += misalignment;
29-   
30hunk ./rts/Linker.c 1396
31-#endif
32+#  endif
33hunk ./rts/Linker.c 1495
34-              any pointers from the heap into it: */
35-           /* stgFree(oc->image); */
36+              any pointers from the heap into it:
37+#       if defined(mingw32_HOST_OS)
38+               VirtualFree(oc->image, oc->fileSize, MEM_RELEASE);
39+#       elif defined(darwin_HOST_OS)
40+           stgFree(oc->image - oc->misalignment);
41+#       else
42+               stgFree(oc->image);
43+#       endif
44+           */
45hunk ./rts/Linker.c 2558
46+#   ifdef mingw32_HOST_OS
47+
48+       /* TODO: text sections only:
49+                VirtualProtect(oc->image, oc->fileSize, PAGE_EXECUTE, NULL);
50+                check error code*/
51+#   endif
52+
53}
54
55Context:
56
57[rejig library include/ files
58sof@galois.com**20060929225751]
59[add :edit to the release notes, and improve the docs a bit
60Simon Marlow <simonmar@microsoft.com>**20060929112108]
61[:edit runs notepad by default on Windows
62Simon Marlow <simonmar@microsoft.com>**20060929102739]
63[unbreak :edit patch on Windows
64Simon Marlow <simonmar@microsoft.com>**20060928155951]
65[Fix #906, and do #914 while I'm in here (it wasn't too hard)
66Simon Marlow <simonmar@microsoft.com>**20060928151705]
67[Add basic :edit support
68Simon Marlow <simonmar@microsoft.com>**20060928135156
69 Without jumping to line numbers or %-expansion, we could add that later.
70]
71[tiny fix in porting docs I just spotted
72Simon Marlow <simonmar@microsoft.com>**20060928105611]
73[only make stdin/stdout unbuffered in GHCi, not runghc or ghc -e.
74Simon Marlow <simonmar@microsoft.com>**20060928105403]
75[testsuite *is* boring
76Simon Marlow <simonmar@microsoft.com>**20060928105342]
77[Fix mulIntMayOflo on 64-bit arches; fixes trac #867
78Ian Lynagh <igloo@earth.li>**20060928004806
79 We were assuming we could multiply 2 32-bit numbers without overflowing
80 a 64-bit number, but we can't as the top bit is the sign bit.
81]
82[Handle clock_gettime failing
83Ian Lynagh <igloo@earth.li>**20060927234630]
84[fix typo in comment
85Andres Loeh <mail@andres-loeh.de>**20060914235648]
86[remove non-boring directories
87Norman Ramsey <nr@eecs.harvard.edu>**20060915234902]
88[Modify toArgs to parse quotes/escapes like /bin/sh
89rjmccall@gmail.com**20060917003641
90 Addresses ticket #197, which asks for escape sequences to be supported directly (i.e.
91 not only in dquoted strings) on :load commands in GHCI.  Fix modifies the toArgs
92 function to parse its input like /bin/sh does, i.e. recognizing escapes anywhere
93 and treating quoted strings as atomic chunks.  Thus:
94   :load a\ b c\"d e" "f
95 would parse with three arguments, namely 'a b', 'c"d', and 'e f'.
96 
97 toArgs is used to parse arguments for both :load and :main, but doesn't appear to
98 be used elsewhere.  I see no harm in modifying both to be consistent -- in fact,
99 the functionality is probably more useful for :main than for :load.
100]
101[Rename -no-recomp to -fforce-recomp, and document it
102Simon Marlow <simonmar@microsoft.com>**20060927132707]
103[Make printing of binding results optional in GHCi, and document it
104Simon Marlow <simonmar@microsoft.com>**20060927132550
105 You can say :set -fno-print-bind-result in GHCi to disable this behaviour.
106 Addresses #887
107]
108[Various documentation improvements suggested by Bulat Ziganshin
109Ian Lynagh <igloo@earth.li>**20060925231855]
110[Fix comment/code inconsistency spotted by Bulat Ziganshin
111Ian Lynagh <igloo@earth.li>**20060925195925
112 I'm not sure if this is the example that was intended, but it's at least
113 now consistent.
114]
115[Document -F in the flag reference
116Ian Lynagh <igloo@earth.li>**20060925134816]
117[Remove duplicate call to getDOpts
118simonpj@microsoft.com**20060922190350]
119[64bit fixes for the symbol lookup table
120sven.panne@aedion.de**20060923162408]
121[Fix Linker import when BREAKPOINT is off
122Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20060921210029]
123[Use --export-dynamic to ensure ghci works on newer openbsds
124Don Stewart <dons@cse.unsw.edu.au>**20060921010155
125 
126 Changes to the RTLD_DEFAULT semantics broke the trick we used to ensure
127 libc symbols were available to the ghci linker, in OpenBSD 4.0. We can
128 fix this by linking the ghc binary itself with --export-dynamic on this
129 system, removing the need for any magic Linker.c games.
130 
131 GHCi now works on OpenBSD 4.0
132 
133 Contributed by Eric Mertens <emertens at gmail.com>
134 
135]
136[Currently we don't build cabal-setup
137sven.panne@aedion.de**20060919081759]
138[Packages cleanup, and allow new packages to be loaded with :set again
139Simon Marlow <simonmar@microsoft.com>**20060919012448
140 
141 This cleans up the package subsystem a little.  There are some
142 changes to the GHC API as a result.
143 
144   - GHC.init and GHC.initFromArgs are no longer necessary.
145 
146   - GHC.newSession takes the root of the GHC tree as an argument
147     (previously passed to GHC.init).
148 
149   - You *must* do GHC.setSessionDynFlags after GHC.newSession,
150     this is what loads the package database.
151 
152   - Several global vars removed from SysTools
153 
154   - The :set command in GHCi can now cause new packages to be loaded,
155     or can hide/ignore existing packages.
156]
157[one more boring file
158Simon Marlow <simonmar@microsoft.com>**20060919011849]
159[fix one boring file
160Simon Marlow <simonmar@microsoft.com>**20060919011823]
161[unused imports
162Simon Marlow <simonmar@microsoft.com>**20060919011746]
163[add boring files from a build tree
164Simon Marlow <simonmar@microsoft.com>**20060919011722]
165[remove old comment
166Simon Marlow <simonmar@microsoft.com>**20060919010333]
167[unused import
168Simon Marlow <simonmar@microsoft.com>**20060919010303]
169[some updates
170Simon Marlow <simonmar@microsoft.com>**20060918232924]
171[use ghc-pkg --force-files, and update command-line syntax
172Simon Marlow <simonmar@microsoft.com>**20060918232903]
173[add --force-files, like --force but doesn't allow missing dependencies
174Simon Marlow <simonmar@microsoft.com>**20060918232834]
175[emit an error if the user ran autoconf instead of autoreconf
176Simon Marlow <simonmar@microsoft.com>**20060916084205]
177[Sanity check that all the core packages are present
178Simon Marlow <simonmar@microsoft.com>**20060916070529
179 To catch the case of not running darcs-all get.
180]
181[reformat import
182Simon Marlow <simonmar@microsoft.com>**20060913103512]
183[minor reformatting
184Simon Marlow <simonmar@microsoft.com>**20060913103427]
185[compiler/ isn't boring
186Simon Marlow <simonmar@microsoft.com>**20060913021300]
187[Added parsing rule for BangPattern in case expr
188Markus Lauer <markus.lauer@acm.org>**20060918161850]
189[Fix a bug in subsumption, and tweak error messages
190simonpj@microsoft.com**20060918005223
191 
192 This commit does two largely-unrelated things, but they hit the same code.
193 
194 First, I tweaked the error messages a bit, to give better errors
195 for impredicative polymorphism.  This added the mb_fun argument to
196 tc_sub.
197 
198 Second, I fixed a long-standing bug in tc_sub.  In the isBoxyTyVar case
199 of tc_sub (rule F2) I was not recursing to tc_sub as the rule suggests,
200 but rather calling u_tys.  This is plain wrong, because the first
201 arugment might have more foralls.   
202 
203 The solution is to recurse to tc_sub, but that in turn requires a parameter,
204 exp_ib, which says when we are inside a box.
205 
206 Test is tc210.
207 
208]
209[Comments
210simonpj@microsoft.com**20060918005142]
211[Ensure that only zonked poly_ids are passed to tcSpecPrag
212simonpj@microsoft.com**20060918004805
213 
214 This is a long-standing bug really (Trac #900).  The poly_id passed
215 to tcSpecPrag should be zonked, else it calls tcSubExp with a non-zonked
216 type; but that contradicts the latter's invariant.
217 
218 I ended up doing a bit of refactoring too.  The extra lines are
219 comments I think; the code line count is reduced.
220 
221 Test is tc212.hs
222 
223]
224[Comments only
225simonpj@microsoft.com**20060918004109]
226[Add a missing renamer dump (related to Template Haskell)
227simonpj@microsoft.com**20060917171707]
228[Instantiate data constructor type variables with the type constructor type variables in constraints for derived class instances. Fixes instance deriving for GADTs which declar H98 types, closing ticket #902.
229bringert@cs.chalmers.se**20060915233315]
230[Fixed error in user's manual, gadt section, part about deriving. Data constructor type was Maybe, should be Maybe1.
231bringert@cs.chalmers.se**20060915230517]
232[remove generated files in a 'finally' manner
233sof@galois.com**20060909144432]
234[Replace "&" with "and" as this also gets pulled into the docbook docs
235Ian Lynagh <igloo@earth.li>**20060912125617]
236[Another s/autrijus/audreyt/ in comments.
237audreyt@audreyt.org**20060912121323]
238[Take away XXXs in GADT records related code that are no longer TODOs.
239audreyt@audreyt.org**20060912120942]
240[Add postfix ops to the release notes
241simonpj@microsoft.com**20060912081104]
242[Document postfix operators
243simonpj@microsoft.com**20060911162843]
244[Fix ~2000 second profiling time wrapping bug
245Ian Lynagh <igloo@earth.li>**20060911223210]
246[move the "meat" into the wiki, this file just contains pointers now
247Simon Marlow <simonmar@microsoft.com>**20060911135037]
248[Simplify desugaring of left sections
249simonpj@microsoft.com**20060911083510
250 
251        MERGE TO 6.6 branch!
252 
253 Some while ago I made the type checker a tiny bit more lenient about
254 left sections, so that
255        (x !)
256 would typecheck iff
257        ((!) x)
258 typechecks. 
259 
260 Strictly, Haskell 98 requires that the section typechecks iff
261        (\y. (!) x y)
262 typechecks, and I should really have made the relaxation dependent on a
263 flag, but I didn't.
264 
265 Anyway, this commit fixes the *desugarer* so that it correctly desugars
266 the programs that the typechecker passes.
267 
268 
269]
270[Add comment
271simonpj@microsoft.com**20060911083440]
272[adapt stylesheet to example-contents class used by xsltproc
273Ross Paterson <ross@soi.city.ac.uk>**20060910143941]
274[Fix warnings traceBegin/traceEnd implicitly declared
275Ian Lynagh <igloo@earth.li>**20060910200611]
276[Fix linking to expf on Windows
277Ian Lynagh <igloo@earth.li>**20060910141506]
278[8 byte align data. Fixes SIBGUSs on HPPA/Linux.
279Ian Lynagh <igloo@earth.li>**20060909102445]
280[We now need alex >= 2.0.1
281Ian Lynagh <igloo@earth.li>**20060908191706]
282[Add source code links to Haddock docs
283Simon Marlow <simonmar@microsoft.com>**20060908112725
284 
285 Right now we can only manage to add a source code link for the module,
286 but that's better than nothing.
287 
288 I had to put the list of core packages in a Makefile variable,
289 $(CorePackages), so we'll have to be careful to keep this up to date.
290 (I could have slurped it out of libraries/core-packages with $(shell),
291 but that's ugly and really slow on Windows).
292 
293 There are a couple of new tweakables: CorePackageSourceURL and
294 ExtraPackageSourceURL in config.mk.in, set these to the appropriate
295 patterns for generating source links.
296 
297 (when we merge this patch onto the HEAD we'll have to tweak these
298 settings).
299 
300 Unfortunately it still doesn't work for all the modules, because
301 modules compiled without -cpp don't get any #line directives.  More
302 hackery required...
303]
304[Catch errors in pattern matching for unboxed tuples
305simonpj@microsoft.com**20060908095217
306 
307 When fiddling with pattern-matching for unboxed tuples, I'd messed up
308 the slightly-tricky tests for pattern matching on unboxed tuples, notably
309        case (# foo, bar #) of r -> ...r...
310 
311 The fix is in TcPat, and test are tcfail115, tcfail120, and tc209
312 
313]
314[Fixed typo in users guide section about lexically scoped type variables.
315bringert@cs.chalmers.se**20060907214626]
316[Typo, spotted by Bulat Ziganshin
317Ian Lynagh <igloo@earth.li>**20060908014947]
318[Release note tweaks suggested by Bulat Ziganshin
319Ian Lynagh <igloo@earth.li>**20060908014050]
320[Doc fix: generic classes are no longer broken
321Ian Lynagh <igloo@earth.li>**20060907205426
322 Spotted by Bulat Ziganshin.
323]
324[If we get an unknown or unimplemented opcode, say what it is
325Ian Lynagh <igloo@earth.li>**20060907171038]
326[remove __HUGS__ #if's (Hugs uses the standalone version)
327Ross Paterson <ross@soi.city.ac.uk>**20060907152930]
328[Fix the handling of names in declaration brackets
329simonpj@microsoft.com**20060907141845
330 
331 The handling of top-level names in declaration brackets is a bit tricky.
332 This commit fixes Trac #977;  test is TH_spliceD2.
333 
334 The changes are commented in RnExpr.rnBracket and RdrName.hideSomeUnquals
335 
336 
337]
338[Remove the -optP-P from .raw-hs generation
339Simon Marlow <simonmar@microsoft.com>**20060907151855
340 We need the #line directives left in, so that Haddock can figure out
341 what the name of the original source file was called, which is
342 necessary for generating source links.  You probably now need an
343 updated Haddock to generate HTML from the libraries, but a release
344 will be forthcoming shortly.
345 
346]
347[urk, the dependencies added in the last commit don't really work properly
348Simon Marlow <simonmar@microsoft.com>**20060907113702
349 first, I got the dependencies wrong (should be the .o file, not the
350 .hs), and secondly GHC's recompilation checker refuses to recompile
351 these files anyway.  I haven't done anything about the second problem
352 yet, except to comment it.
353 
354]
355[Add dependencies on .h files #included into Haskell source
356Simon Marlow <simonmar@microsoft.com>**20060907094751
357 Our .depend machinery doesn't automatically generate these, so we have
358 to add them manually.  (this fixes one instance of missing
359 dependencies in the GHC build tree, there are lots more...).
360]
361[Remove CONSTR_CHARLIKE and CONSTR_INTLIKE closure types
362Simon Marlow <simonmar@microsoft.com>**20060907093005
363 These closure types aren't used/needed, as far as I can tell.  The
364 commoning up of Chars/Ints happens by comparing info pointers, and
365 the info table for a dynamic C#/I# is CONSTR_0_1.  The RTS seemed
366 a little confused about whether CONSTR_CHARLIKE/CONSTR_INTLIKE were
367 supposed to be static or dynamic closures, too.
368]
369[Documentation for impredicative polymorphism
370simonpj@microsoft.com**20060907111540]
371[Comments only
372simonpj@microsoft.com**20060907105705]
373[Remove result type signatures from documentation
374simonpj@microsoft.com**20060907104301]
375[Fix bug in error message
376simonpj@microsoft.com**20060907103052]
377[Result type signatures are no longer supported (partial)
378simonpj@microsoft.com**20060907102718
379 
380 I had failed to remove the bit where result type signatures bind
381 lexical type variables.  And now we are planning to remove them entirely.
382 
383 This commit therefore does a partial removal (to avoid destablising 6.6).
384 It also arranges that
385        f :: sig = rhs
386 means a *pattern* binding (not a function binding with no arguments
387 and a result signature), which makes sense.
388 
389]
390[Remove trailing CRs with sed rather than relying on diff in nofib
391Ian Lynagh <igloo@earth.li>**20060907112027
392 Some diffs don't understand --strip-trailing-cr.
393]
394[document -V in the +RTS --help outpout
395Simon Marlow <simonmar@microsoft.com>**20060907084445]
396[Pattern-match warning police
397simonpj@microsoft.com**20060906220417]
398[Improve error reporting for SigTvs, and add comments
399simonpj@microsoft.com**20060906220309]
400[Check that top-level binders are unqualified names
401simonpj@microsoft.com**20060906220101
402 
403 Not having this check led to strange error messages.
404 See test rnfail046.
405 
406]
407[Documentation for lexically-scoped type variables
408simonpj@microsoft.com**20060906164103
409 
410 GHC's design for lexically scoped type variables has changed.
411 Here, belatedly, is the documentation.
412 
413]
414[Make record selection look cheap
415simonpj@microsoft.com**20060906115242
416 
417 exprIsCheap was already making record selection look cheap, esp for
418 dictionary selection; e.g.
419    (==) dEq
420 
421 The idea is to allow those record selections to migrate inside a
422 lambda, because on the whole it's more expensive to share than
423 repeat them.
424 
425 But sometimes dictionary selection is nested; e.g.
426    (==) ($p1Num dNum)
427 
428 This turned out to make a (fragile) rewrite rule fire a little
429 more robustly, but it seems like a good idea in any case.
430 
431 This patch makes nested record selections also look cheap.
432 
433]
434[Now in the wiki
435Simon Marlow <simonmar@microsoft.com>**20060906104022]
436[-threaded and -prof do not currently work together
437Simon Marlow <simonmar@microsoft.com>**20060906093158]
438[Don't fail on missing happy/alex if we don't need them
439Ian Lynagh <igloo@earth.li>**20060906195415]
440[Fix the Windows "VirtualAlloc MEM_COMMIT failed" bug
441Ian Lynagh <igloo@earth.li>**20060906112750
442 We had
443     base=01100000 size=1048576 size_delta=0 it->size=2097152
444     it->base=00F00000 base-it->base=00200000
445 in commitBlocks.
446 Esa Ilari Vuokko identified this inequality test as the cause.
447]
448[Tell the 6.6 branch where to find extralibs
449Ian Lynagh <igloo@earth.li>**20060906124640]
450[Correct the Cabal version number and remove features.
451Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060905232047
452 We're not going to include cabal-setup and cabal-install in this release.
453]
454[Strip trailing CRs when comparing output for nofib. Fixes #797.
455Ian Lynagh <igloo@earth.li>**20060905184910]
456[Fix dependency analysis (notably bindInstsOfLocalFuns) in TcBinds
457simonpj@microsoft.com**20060905105143
458 
459 GHC 6.5 does enhanced dependency analysis for recursive bindings, to
460 maximise polymorphism based on type signatures.  (See Mark Jones's
461 THIH paper.) 
462 
463 I didn't do the bindInstsOfLocalFuns part correctly though, and jhc
464 showed up the bug.  (It only matters when you have a recursive group
465 of two or more functions with a type signature, not at top level, which
466 is why it hasn't shown up till now.)
467 
468 Test is tc207.hs
469 
470 
471]
472[Add note about overlapping instances
473simonpj@microsoft.com**20060905092201]
474[Record that TH doesn't support pattern types signature
475simonpj@microsoft.com**20060905091834]
476[new RTS flag: -V to modify the resolution of the RTS timer
477Ian Lynagh <igloo@earth.li>**20060905141545
478 Fixed version of an old patch by Simon Marlow. His description read:
479  Also, now an arbitrarily short context switch interval may now be
480  specified, as we increase the RTS ticker's resolution to match the
481  requested context switch interval.  This also applies to +RTS -i (heap
482  profiling) and +RTS -I (the idle GC timer).  +RTS -V is actually only
483  required for increasing the resolution of the profile timer.
484]
485[Refactoring for derived Read
486simonpj@microsoft.com**20060904132212
487 
488 There are no functional changes in this commit.  But the code for
489 derived Read is refactored to make it tidier --- and also to make
490 it very easy if we want derived Read to parse the prefix form of
491 infix ocnstructors. 
492 
493 For example,
494        data T = Int `T1` Int
495 According to the H98 report, the derived Read instance will parse
496 infix uses of T1, but not prefix uses (T1 4 3).  It's arguable that it
497 should parse both -- and easy to implement, but it would cause a little bit
498 of code bloat.
499 
500 Similarly records.
501 
502 Anyway this commit doesn't implement the change; just makes it easy
503 to do so.
504 
505]
506[Improve pretty-printing for HsExpr
507simonpj@microsoft.com**20060904131334]
508[Fix typos.
509Ian Lynagh <igloo@earth.li>**20060904190958]
510[Enable bang-patterns only when the flag says so (had missed a case before)
511simonpj@microsoft.com**20060904131412]
512[Remove linear implicit parameters, and document in release notes
513simonpj@microsoft.com**20060904125105]
514[Release notes should mention better newtype-deriving
515simonpj@microsoft.com**20060904124458]
516[Documentation for bang patterns, and other improvements
517simonpj@microsoft.com**20060904123438]
518[Add a hint on tab completion
519Ian Lynagh <igloo@earth.li>**20060903224823]
520[Add :main docs to ghci commands page
521Ian Lynagh <igloo@earth.li>**20060903223107]
522[Ambiguities are now allowed in ghci command names
523Ian Lynagh <igloo@earth.li>**20060903222115]
524[More output updates
525Ian Lynagh <igloo@earth.li>**20060903221933]
526[Add docs for :main
527Ian Lynagh <igloo@earth.li>**20060903220130]
528[More doc output fixes
529Ian Lynagh <igloo@earth.li>**20060903215748]
530[Update ghci output in docs
531Ian Lynagh <igloo@earth.li>**20060903214128]
532[Fix typo
533Ian Lynagh <igloo@earth.li>**20060903212651]
534[Update ghci output in docs
535Ian Lynagh <igloo@earth.li>**20060903210805]
536[Remove a tab causing ghci's :? alignment to go wrong
537Ian Lynagh <igloo@earth.li>**20060903210349]
538[Change default repo root for the 6.6 branch
539Ian Lynagh <igloo@earth.li>**20060902174936]
540[Don't lose linked list tail
541Esa Ilari Vuokko <ei@vuokko.info>**20060831223315]
542[Fix Windows MBlock alloctor bookkeeping bug
543Esa Ilari Vuokko <ei@vuokko.info>**20060830185540]
544[-fglasgow-exts no longer implies -fbang-patterns
545simonpj@microsoft.com**20060901125714]
546[Fix error in release notes, spotted by Esa Ilari Vuokko
547Ian Lynagh <igloo@earth.li>**20060901125841]
548[Remove changes in packages we don't build
549Ian Lynagh <igloo@earth.li>**20060901125436]
550[Don't enable SMP if we are unregisterised
551Ian Lynagh <igloo@earth.li>**20060829123228]
552[Add a pointer to the fundeps paper
553simonpj@microsoft.com**20060831135511]
554[free the task *after* calling closeCond and closeMutex
555Simon Marlow <simonmar@microsoft.com>**20060831103648]
556[add missing ghc_ge_605
557Simon Marlow <simonmar@microsoft.com>**20060831101813]
558[don't closeMutex() the Capability lock
559Simon Marlow <simonmar@microsoft.com>**20060831085728
560 There might be threads in foreign calls that will attempt to return
561 via resumeThread() and grab this lock, so we can't safely destroy it.
562 
563 Fixes one cause of
564 
565    internal error: ASSERTION FAILED: file Capability.c, line 90
566 
567 although I haven't repeated that assertion failure in the wild, only
568 with a specially crafted test case, so I can't be sure I really got
569 it.
570]
571[fix Unix build
572Simon Marlow <simonmar@microsoft.com>**20060830141529]
573[add sysErrorBelch() for reporting system call errors
574Simon Marlow <simonmar@microsoft.com>**20060830140252]
575[call ShutdownIOManager() before closing handles
576Simon Marlow <simonmar@microsoft.com>**20060830123131
577 To avoid IO requests completing only to discover that the
578 completed_table_sema has been CloseHandle()'d.  This all looks a bit
579 wrong, though: we shouldn't really be waiting for these requests to
580 complete, they might take forever.
581]
582[Windows: make some soft failures into fatal errors
583Simon Marlow <simonmar@microsoft.com>**20060830091859
584 Some of the memory allocation calls were being checked for error, but
585 the RTS was printing a message and continuing.  These error cases
586 lead to crashes later, so better to just fail immediately.
587]
588[MAYBE_GC: initialise HpAlloc
589Simon Marlow <simonmar@microsoft.com>**20060830091529
590 HpAlloc was not being set when returning to the scheduler via MAYBE_GC(),
591 which at the least was just wrong (the scheduler might allocate a large
592 block more than once), and at worst could lead to crashes if HpAlloc contains
593 garbage.
594 
595 Fixes at least one threaded2 test on Windows.
596]
597[FILL_SLOP: don't fill slop for BLACKHOLE/CAF_BLACKHOLE
598Simon Marlow <simonmar@microsoft.com>**20060830083311
599 This affects -debug only, avoids crash with test conc012.
600]
601[oops, got the sense of the error case wrong
602Simon Marlow <simonmar@microsoft.com>**20060829151751]
603[fix some rerrors in the worker counting
604Simon Marlow <simonmar@microsoft.com>**20060829135150]
605[add missing case for BlockedOnDoProc
606Simon Marlow <simonmar@microsoft.com>**20060829113345]
607[omit HGL on Windows
608Simon Marlow <simonmar@microsoft.com>**20060829104921]
609[Don't trust "ln -sf" to do the right thing (it doesn't on Solaris)
610Simon Marlow <simonmar@microsoft.com>**20060829093735
611 Patch from: Roman Leshchinskiy
612]
613[don't include HaXml, Japi and monads in a GHC checkout
614Simon Marlow <simonmar@microsoft.com>**20060829085946
615 They aren't built as part of a GHC build anyway, it doesn't make much
616 sense to include them in checkouts or source tarballs.
617]
618[don't include .depend (attempt to fix Windows stage2 build failure)
619Simon Marlow <simonmar@microsoft.com>**20060829083842]
620[Add mipsel case to configure.ac
621Ian Lynagh <igloo@earth.li>**20060825193603]
622[incremented versions of arrows and X11
623Ross Paterson <ross@soi.city.ac.uk>**20060825162415]
624[omit Control.Sequential.STM
625Ross Paterson <ross@soi.city.ac.uk>**20060825161645
626 
627 It's an internal module used by non-GHC implementations only.
628]
629[various minor tweaks, and rearrange to put "important" changes near the top
630Simon Marlow <simonmar@microsoft.com>**20060825154955]
631[mention -fno-mono-pat-binds, since this is a diversion from Haskell 98
632Simon Marlow <simonmar@microsoft.com>**20060825152613]
633[Document SMP support
634Simon Marlow <simonmar@microsoft.com>**20060825151236]
635[Load the target of a dynamic foreign call into a temporary
636Simon Marlow <simonmar@microsoft.com>**20060825140906
637 Fixes ffi011(opt) on x86_64.  I don't know why this has only just
638 appeared today, it's apparently been broken for some time.
639]
640[Sparc supports SMP too
641Simon Marlow <simonmar@microsoft.com>**20060825133628]
642[Fix rewriting of Control.Exception.Assert; fixes 875
643Ian Lynagh <igloo@earth.li>**20060825010219]
644[Add the regex reshuffle to the release notes
645Ian Lynagh <igloo@earth.li>**20060825110520]
646[parsec is now a core library
647Ian Lynagh <igloo@earth.li>**20060825102418]
648[Add a default case to pprDynamicLinkerAsmLabel
649Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101846
650 
651 This is mainly for the benefit of Solaris. I'll fix this properly later.
652]
653[Reserve a register for REG_Base on the Sparc
654Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101820]
655[Add atomic SMP primitives for the Sparc
656Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101753]
657[Make sure GCC uses the Sparc V9 instruction set
658Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101646
659 
660 We only support Sparc V9 and better as V8 lacks an atomic CAS instruction
661 which we need for SMP. This means that we have to pass -mcpu=v9 to GCC when
662 compiling and assembling. Hardcoding the flag is hackish but seems to be
663 our best bet at the moment. It can still be overridden by the user as GCC
664 picks the best -mcpu flag regardless of the ordering.
665]
666[shutdownCapability(): don't bail out after 50 iterations
667Simon Marlow <simonmar@microsoft.com>**20060825100244
668 See comments for details.  Fixes assertion failures in stage 3 build
669 which appeared after recent closeMutex() addidion.  May fix other
670 shutdown issues.
671]
672[add dependency on regex-compat
673Simon Marlow <simonmar@microsoft.com>**20060825093226]
674[move parsec into $(GhcBootLibs); tidy up
675Simon Marlow <simonmar@microsoft.com>**20060825091013]
676[Mips registerised support
677Simon Marlow <simonmar@microsoft.com>**20060825085712
678 Contributed by: Thiemo Seufer <ths@networkno.de>
679]
680[parsec is required to be a core package, genprimopcode uses it
681Simon Marlow <simonmar@microsoft.com>**20060825084607]
682[Free Win32 Handles on shutdown
683Simon Marlow <simonmar@microsoft.com>**20060825084435
684 patch from #878
685]
686[Fix unregisterised builds, and building on non-x86/amd64/powerpc
687Ian Lynagh <igloo@earth.li>**20060825003945]
688[Release notes for GHC 6.6
689Ian Lynagh <igloo@earth.li>**20060824211646]
690[Update for changes to packages
691Simon Marlow <simonmar@microsoft.com>**20060824153500
692 Not much has changed really: just the removal of the overlap
693 restriction, and the re-instatement of the requirement that
694 -package-name must be used when compiling a package now.
695]
696[somehow I lost the unix subdir; recover it
697Simon Marlow <simonmar@microsoft.com>**20060824152529]
698[expand the section on getting the source.
699Simon Marlow <simonmar@microsoft.com>**20060824150647]
700[config in regex-posix too
701Simon Marlow <simonmar@microsoft.com>**20060824145717]
702[make all AC_CONFIG_SUBDIRS optional
703Simon Marlow <simonmar@microsoft.com>**20060824143016]
704[Add dynCompileExpr
705Esa Ilari Vuokko <ei@vuokko.info>**20060823221828]
706[Remove duplicate documentation of -package flag
707Ian Lynagh <igloo@earth.li>**20060824121806]
708[Remove a reference to -fglobalise-toplev-names that got left behind
709Ian Lynagh <igloo@earth.li>**20060824121442]
710[Add closeMutex and use it on clean up
711Esa Ilari Vuokko <ei@vuokko.info>**20060823194604]
712[Add shared Typeable support
713Esa Ilari Vuokko <ei@vuokko.info>**20060823003041]
714[Ignore sections generated from .ident
715Esa Ilari Vuokko <ei@vuokko.info>**20060823155023]
716[update with respect to darcs-all changes
717Simon Marlow <simonmar@microsoft.com>**20060824115535]
718[divide packages into "core" and "extra" packages
719Simon Marlow <simonmar@microsoft.com>**20060824114902
720 The following packages are now "core" packages:
721 
722   base, Cabal, haskell98, readline, regex-base, regex-compat
723   regex-posix, stm, template-haskell, unix, Win32
724 
725 Core packages are those packages required to bootstrap GHC, or are
726 closely tied to GHC (stm, template-haskell).  These are the packages
727 that will be provided in a source distribution from now on.
728 
729 All other packages are classified as "extra" packages.  As far as
730 binary distributions and nightly builds go, nothing will change -
731 we'll still build and include all these packages in the distributions.
732 
733 NOTE: 'sh darcs-all get' will now get the core packages only.  To get
734 the extra packages too, use 'sh darcs-all --extra get'.
735]
736[Sparc fix: work around gcc optimising away the reserved stack chunk
737Simon Marlow <simonmar@microsoft.com>**20060824113750
738 This bug causes crashse on Sparc when calling foreign functions with
739 more than 13 arguments.
740]
741[add new regex packages
742Simon Marlow <simonmar@microsoft.com>**20060824094443]
743[Clean up coding style
744Esa Ilari Vuokko <ei@vuokko.info>**20060823075822]
745[Use stgMallc and stgFree instead of malloc/free
746Esa Ilari Vuokko <ei@vuokko.info>**20060823002902]
747[Remove wrong VirtualAlloc MEM_DECOMMITs on cleanup
748Esa Ilari Vuokko <ei@vuokko.info>**20060821180332]
749[Remove few format-warnings by adding casts
750Esa Ilari Vuokko <ei@vuokko.info>**20060813111029]
751[Remove warning: Correct includes for mingw
752Esa Ilari Vuokko <ei@vuokko.info>**20060813002216]
753[Add few more guesses where to find bits of mingw-gcc
754Esa Ilari Vuokko <ei@vuokko.info>**20060812020901]
755[in the GHCi prompt, print ModuleNames not Modules
756Simon Marlow <simonmar@microsoft.com>**20060823095258]
757[In the Compiling/Skipping message, print ModuleNames not Modules
758Simon Marlow <simonmar@microsoft.com>**20060823095225
759 These modules are always home modules, by definition, so the package
760 name is redundant.
761 
762]
763[Fix typo
764Ian Lynagh <igloo@earth.li>**20060822163300]
765[Fix typo
766Ian Lynagh <igloo@earth.li>**20060822163212]
767[FastString and StringBuffer need -funbox-strict-fields too
768Simon Marlow <simonmar@microsoft.com>**20060822143337
769 For the benefit of old GHCs that don't understand {-# UNPACK #-}
770]
771[minor fix to the clashing export error message
772Simon Marlow <simonmar@microsoft.com>**20060822112518
773 The ordering of items in the parsed export list is now correct, so we
774 have to compensate to get the right output again.
775]
776[findModule: add a fallthrough error case
777Simon Marlow <simonmar@microsoft.com>**20060822112409]
778[notes about which versions of GHC can be used to bootstrap
779Simon Marlow <simonmar@microsoft.com>**20060822093554]
780[disable .ident generation on darwin_TARGET_OS
781Simon Marlow <simonmar@microsoft.com>**20060822090349]
782[fix typo
783Simon Marlow <simonmar@microsoft.com>**20060822073731]
784[fixes to PPC version of cas(), from David Kirkman <dkirkman@gmail.com>
785Simon Marlow <simonmar@microsoft.com>**20060821153136
786 
787 From David's email:
788 The problem is that the inline assembler code was placing the result
789 of an operation in a register that is used as input later in the code.
790 At the bottom of this message I've extracted a short short code
791 fragment that you can run through gcc (on a powerpc machine) to see
792 the generated assembly output.
793 
794 The changes to fix the problem are fairly simple.  The first adds an
795 ampersand to the output list of the assembly fragment ("=r" (result)
796 --> "=&r" (result)) The ampersand just tells gcc that result can not
797 be placed in a register used for any of the input parameters (o, n, or
798 p).  Otherwise, it feels free to place output parameters in the same
799 registers used by the inputs -- but because of the flow of control
800 here we need everything in a distinct register.  This change fixes the
801 TVar program above.
802 
803 The second change adds a clobber list (the :"cc", "memory").  This
804 tells gcc that the condition code (due to the compare) and memory (due
805 to the store) might be changed during the asm execution.  The lack of
806 a clobber list did not seem to be causing any trouble, but without it
807 gcc is free to assume that no state is changed during the execution.
808]
809[Always use -funbox-strict-fields for Binary
810Simon Marlow <simonmar@microsoft.com>**20060821152111
811 For some reason this was only enabled when $(bootstrapped)=YES.  This
812 would be one reason why the stage1 compiler is slow.  I guess we'll
813 find out if anything goes wrong.
814]
815[disable automagic building of GHCi in stage1
816Simon Marlow <simonmar@microsoft.com>**20060821151957]
817[remove ancient file with incorrect information
818Simon Marlow <simonmar@microsoft.com>**20060821141946]
819[new option -a (append) for hasktags
820Martin Grabmueller <magr@cs.tu-berlin.de>**20060816091427]
821[ugly hack to cause ghc_boot_platform.h to be built before primops.txt
822Simon Marlow <simonmar@microsoft.com>**20060821120630]
823[add libraries/cgi and libraries/xhtml
824Simon Marlow <simonmar@microsoft.com>**20060821102908]
825[(temp) #814 - More flexible memory allocation in Windows
826Esa Ilari Vuokko <ei@vuokko.info>**20060820150720]
827[fix export/import list parsing (allow (,)), and remove unnecessary reverses
828Simon Marlow <simonmar@microsoft.com>**20060821102633]
829[comply with Haskell 98 by not allowing extra commas in import/export lists
830Simon Marlow <simonmar@microsoft.com>**20060821095912]
831[Missing stage1's in hc-build
832Ian Lynagh <igloo@earth.li>**20060821092226
833 Add mising stage1/ directories to object files touched by hc-build, and
834 give stage=1 as an argument to make install.
835]
836[remove spurious commas in imports
837Ross Paterson <ross@soi.city.ac.uk>**20060819173423]
838[whitespace cleanup only
839Ross Paterson <ross@soi.city.ac.uk>**20060818224014]
840[remove gcj libs from bin dist
841sof@galois.com**20060818214155]
842[I don't thing we want to add a call-context here; it just clutters the output
843simonpj@microsoft.com**20060818160729]
844[Avoid duplicate "In type ..." in error messages
845simonpj@microsoft.com**20060818160611]
846[Better pretty-printing for TvSubst
847simonpj@microsoft.com**20060818160551]
848[Fall over more gracefully when there's a Template Haskell error
849simonpj@microsoft.com**20060818110702
850 
851 For a long time, Template Haskell has fallen over in a very un-graceful
852 way (i.e. panic) even when it encounters a programmer error.  In particular,
853 when DsMeta converts HsSyn to TH syntax, it may find Haskell code that
854 TH does not understand. This should be reported as a normal programmer
855 error, not with a compiler panic!
856 
857 Originally the desugarer was supposed to never generate error
858 messages, but this TH desugaring thing does make it do so.  And in
859 fact, for other reasons, the desugarer now uses the TcRnIf monad, the
860 common monad used by the renamer, typechecker, interface checker, and
861 desugarer. 
862 
863 This patch completes the job, by
864  - allowing the desugarer to generate errors
865  - re-plumbing the error handling to take account of this
866  - making DsMeta use the new facilities to report error gracefully
867 
868 Quite a few lines of code are touched, but nothing deep is going on.
869 
870 Fixes Trac# 760.
871 
872]
873[Fix typo (fst --> head) in docs on implicit parameters
874simonpj@microsoft.com**20060818075937]
875[One last hs-boot update
876simonpj@microsoft.com**20060817134216]
877[Missing import for stage 2
878simonpj@microsoft.com**20060817133247]
879[One more hs-boot file
880simonpj@microsoft.com**20060817133220]
881[Refactoring for valid rule checking
882simonpj@microsoft.com**20060817130141]
883[Do not CSE in INLINE and NOINLINE things
884simonpj@microsoft.com**20060817130005
885 
886 See extensive comments with Note [INLINE and NOINLINE] in this file.
887 
888]
889[Update lhs-boot files
890simonpj@microsoft.com**20060817132003
891 
892 A consequence of my recent meddling with hs-boot files is that GHC is
893 more picky about the correpondence between the hs-boot file and the hs file.
894 In particular, you must use the same type synonyms.
895 
896 This patche fixes up GHC's own hs-boot files to match the restriction.
897 
898]
899[Add ad-hoc typing checks for tagToEnum#
900simonpj@microsoft.com**20060816203156
901 
902 The problem with tagToEnum# is that it is not overloaded (in the
903 Haskell sense) but you are only supposed to apply it to a TyCon
904 that is an enumeration (isEnumerationTyCon).
905 
906 The Real Way to do this is to have some special kind of type constraint
907 for the purpose, but that is wild overkill. So this patch adds a small
908 rather ad-hoc check to TcExpr.instFun.  Crude, simple, but it works fine.
909 
910 Fixes Trac #786
911 Test is tcfail164
912 
913]
914[Get dead-ness right in knownCon
915simonpj@microsoft.com**20060816164216]
916[Tuning for argToPat
917simonpj@microsoft.com**20060816164103
918 
919 argToPat is a crucial function for SpecConstr, because it decides
920 what patterns are worth specialising.  I was being much too gung-ho about
921 constants.  This patch makes it much better.
922 
923]
924[Re-factor mkAtomicArgs and completeNonRecX
925simonpj@microsoft.com**20060816163645
926 
927 This refactoring ensures that when mkAtomicArgs adds new bindings,
928 it does so using completeNonRecX, which adds unfoldings etc.  More
929 modular, and saves passes too.
930 
931 (This was important when getting rules to work right.  We want tob
932 fire a rule as soon as possible, taking into account all inlinings,
933 else a less-good rule applies.  That's what I found when doing
934 stream fusion anyway.)
935 
936 Regardless, this is an improvement.
937 
938]
939[Another try at the continuation-swapping stuff
940simonpj@microsoft.com**20060816105042
941 
942 I have spent altogether too long on my attempt to avoid case-of-case
943 in situations where it is a Bad Thing.  All the action is in the
944 case for mkDupableAlt that handles cases with a single alternative.
945 
946 I've added rather extensive comments, and it finally seems to be working
947 more or less right.  If you compile (say) GHC/Real.o you'll see quite a
948 few case-of-cases remain (which didn't happen before), and they mostly look
949 pretty sensible to me.
950 
951]
952[Don't build unnecessary lets in knownCon
953simonpj@microsoft.com**20060816104831
954 
955 Faced with
956        case x of y { (a,b) -> rhs }
957 
958 where x is bound to (c,d), we were generating
959       
960        let y = (c,d) in rhs
961 
962 and thenn hoping to get rid of the y binding by CSE or some such.  It's
963 better simply not to build it in the first place, by generating
964 
965        let y = x in rhs
966 
967 This patch does the job.
968 
969]
970[Comments only
971simonpj@microsoft.com**20060816104817]
972[Refactoring, plus record recursive-function *components* as RecArg too
973simonpj@microsoft.com**20060816085809]
974[Record constructor arg occs correctly (bug-fix)
975simonpj@microsoft.com**20060816085628
976 
977 I was forgetting the non-pattern-matched type args of a constructor.
978 
979]
980[Disable form-checking for rule LHSs
981simonpj@microsoft.com**20060816085612
982 
983 Previously we checked the form of the arguments of a RULE lhs, to
984 ensure that they were simple applications. There was no good reason
985 for that, save to prevent you writing LHSs that were unlikely to match.
986 
987 And Don Stewart found he wanted to do something we didn't allow (a section,
988 I think).  So I have just disabled the check.
989 
990]
991[Allow class and instance decls in hs-boot files
992simonpj@microsoft.com**20060815123402
993 
994 For some reason, in 6.5 the manual said you could put a class decl in
995 an interface file, but not an instance decl; whereas the implementation
996 was exactly the othe way round.
997 
998 This patch makes it possible to put *both* class and instance decls
999 in an interface file.
1000 
1001 I also did a bit of re-factoring; comparing the declarations in the
1002 hs-boot and hs file is now done by converting to IfaceSyn, because we
1003 have good comparison operations for IfaceSyn already implemented.
1004 This fixed a bug that previously let through an inconsistent declaration
1005 of a data type.
1006 
1007 The remaining infelicity concerns "abstract" TyCons.  They are a bit
1008 of a hack anyway; and Classes are not handled in the same way.  Need
1009 to think about this, but I think it's probably ok as it stands.
1010 
1011 
1012]
1013[Reject derivable type classes with higher-rank methods
1014simonpj@microsoft.com**20060815075928
1015 
1016 Trac #864 suggested a derivable type class with a higher-rank method.
1017 
1018 In principle this is quite do-able, but in practice the mechanism works
1019 by generating source code and then doing type inference.  To make this work
1020 with higher-rank types would require impredicative polymorphism. And we
1021 do have that, so it could probably be made to work by generating (source-level)
1022 type annotations.  But it's real work, so I'm settling for generating a
1023 decent error message rather than crashing.
1024 
1025 
1026]
1027[SpecConstr now specialises on constants and lambdas
1028simonpj@microsoft.com**20060815162605
1029 
1030 Roman inspired me to beef up SpecConstr to deal with
1031 a) constant arguments
1032 b) lambda arguments
1033 
1034 This is described in elaborate comments in the file:
1035        Note [Specialising for constant parameters]
1036        Note [Specialising for lambda parameters]
1037 
1038 I also took the opportunity to fix the usage analysis done by
1039 SpecConstr, which was only handling the top-level correctly.
1040 Now it does nesting too.
1041 
1042 
1043]
1044[Fix two bugs in rule-matching
1045simonpj@microsoft.com**20060815162030
1046 
1047 These two typo-like bugs have been there for a long time!
1048 
1049   One concerns the selection of overlapping rules,
1050   which was back to front
1051 
1052   The other was name-lining-up bug in the Case case of matching
1053 
1054 This patch also arranges to export matchN.
1055   (Not a good name, but still!)
1056 
1057 
1058]
1059[Moving list-length code from one place in the file to another
1060simonpj@microsoft.com**20060815161947]
1061[Make UniqSM into a proper monad
1062simonpj@microsoft.com**20060815161829]
1063[Typo in patch that dealt with duplicating continuations in Simplify
1064simonpj@microsoft.com**20060815070246]
1065[Be more conservative about duplicating continuations
1066simonpj@microsoft.com**20060814165424
1067 
1068 Roman found that GHC was duplicating continuations that arose (essentially)
1069 from uses of 'seq', or strict constructors.  This fixes the problem;
1070 see the comments mkDupableCont (the Select case with a single alternative).
1071 
1072 I'm a little concerned that this may also miss useful case-of-case
1073 tranformations, so I'd like to know if anyone finds that this patch
1074 makes performance worse.
1075 
1076 To make it a bit more gung-ho, one could check for all the binders
1077 being dead, before choosing this new, conservative alternative.
1078 
1079 
1080]
1081[Inline into tail-called constructor args
1082simonpj@microsoft.com**20060814165127
1083 
1084 Consider
1085        x = case y of { True -> (p,q); ... }
1086 
1087 The occurrence analyser was marking p,q as 'Many', because they args
1088 of a constructor in an RhsCtxt.  But actually they aren't in a RhsCtxt,
1089 and in this case it's better to inline.
1090 
1091]
1092[Improve exprIsCheap
1093simonpj@microsoft.com**20060814165043
1094 
1095 exprIsCheap is meant to return True iff it's ok to push the expression
1096 inside a lambda.  But the previous version would return True of a nested
1097 construtor application like (1:2:3:[]), which isn't right.
1098 
1099 This patch re-factors the code somewhat, and fixes the bug.
1100 
1101]
1102[Added xhtml and cgi as default libraries.
1103bringert@cs.chalmers.se**20060814113242]
1104[Improve error message in TcHsType
1105simonpj@microsoft.com**20060814095617
1106 
1107 Fixes Trac #863.
1108 Test is tcfail162
1109 
1110]
1111[Warning police: Removed overlapped pattern warnings
1112sven.panne@aedion.de**20060811151353]
1113[Complete -fmono-pat-binds patch
1114simonpj@microsoft.com**20060811142842
1115 
1116 When adding the experimental -fmono-pat-binds, I forgot to check
1117 for type signatures of the now-monomorphic patterns.  This patch
1118 completes the job.
1119 
1120 I documented the design too:
1121    http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/MonomorphicPatternBindings
1122 
1123]
1124[Avoid warning about overlapped pattern for Linux target
1125sven.panne@aedion.de**20060811140512]
1126[Improve error message layouts
1127simonpj@microsoft.com**20060811133317]
1128[Add type signature
1129simonpj@microsoft.com**20060811133302]
1130[Improve the "could not find module" error message
1131Simon Marlow <simonmar@microsoft.com>**20060811132135
1132 In particular, if we're searching for the profiling version of a
1133 module in another package, then suggest that perhaps it might not have
1134 been installed.
1135]
1136[On FreeBSD, use -lthr instead of -pthread for now (see comments)
1137Simon Marlow <simonmar@microsoft.com>**20060811113453]
1138[Two more error message indendations
1139simonpj@microsoft.com**20060811110435]
1140[Go back to calling type veriables t
1141simonpj@microsoft.com**20060811110412]
1142[Indent an error message
1143simonpj@microsoft.com**20060811110347]
1144[Improve error message (imported from Prelude at Implicit import declaration)
1145simonpj@microsoft.com**20060811110301]
1146[don't qualify module name for importedSrcLoc
1147Simon Marlow <simonmar@microsoft.com>**20060811101327]
1148[use "Defined in" rather than "Imported from" when printing ImportedSrcLoc
1149Simon Marlow <simonmar@microsoft.com>**20060811101159]
1150[Now that we have an "html" package, put the Haddock docs somewhere else
1151sven.panne@aedion.de**20060811092609]
1152[Nuked hschooks.h in favour of cutils.h, which has the prototypes we need
1153sven.panne@aedion.de**20060810154225]
1154[Match format strings and arguments for printf-like functions
1155sven.panne@aedion.de**20060810153624]
1156[Warning police: Make prototype for LDV_recordDead_FILL_SLOP_DYNAMIC visible
1157sven.panne@aedion.de**20060810144837]
1158[Warning police: Make strlen and friends known
1159sven.panne@aedion.de**20060810144729]
1160[Tweak GCC's inlining parameters to get thread_obj inlined
1161sven.panne@aedion.de**20060810144505]
1162[Add an IAmDead case to postInlineUnconditionally, and comments
1163simonpj@microsoft.com**20060810142034]
1164[Do not repeatedly simplify an argument more than once
1165simonpj@microsoft.com**20060810141526
1166 
1167 A very important invariant of the simplifier is that we do not simplify
1168 an arbitrarily large expression more than once in a single pass. If this
1169 can happen, then we can get exponential behaviour, when the large expression
1170 itself has a large sub-expression which is simplified twice, and so on.
1171 
1172 GHC has a long-standing bug which allows this repeated simplification to
1173 happen.  It shows up when we have a function like this
1174 
1175        f d BIG
1176 where f's unfolding looks like
1177        \x -> case x of (a,b) -> a
1178 Of course this is v common for overloaded functions.
1179 
1180 Before this patch we simplified all the args (d and BIG) before
1181 deciding to unfold f.  Then we push back the simplified BIG onto the
1182 continuation stack, inline f, so now we have
1183        (case d of (a,b) -> a) BIG
1184 After we reduce the case a bit, we'll simplify BIG a second time.  And
1185 that's the problem.
1186 
1187 The quick-and-dirty solution is to keep a flag in the ApplyTo continuation
1188 to say whather the arg has already been simplified.  An alternative would
1189 be to simplify it when first encountered, but that's a bigger change.
1190 
1191 
1192]
1193[Do not call preInlineUnconditionally in simplNonRecX
1194simonpj@microsoft.com**20060810141340
1195 
1196 This looks to me like a long-standing bug. simplNonRecX was calling
1197 preInlineUnconditionally, even though it was given an already-simplified
1198 expression.  Exponential behaviour beckons.
1199 
1200]
1201[Make postInlineUnconditaionally more conservative
1202simonpj@microsoft.com**20060810141145
1203 
1204 I'm being more paranoid about repeatedly simplifying things (to avoid
1205 exponential behaviour.)  postInlineUnconditionally looks as if it
1206 could repeated simplify the same expression; this patch stops it doing
1207 so.
1208 
1209 The extra lines are all comments!
1210 
1211 
1212]
1213[Control.Exception.unblock wasn't unblocking exceptions
1214Simon Marlow <simonmar@microsoft.com>**20060810132307]
1215[remove out of date comment
1216Simon Marlow <simonmar@microsoft.com>**20060810130154]
1217[move html before network, for now
1218Simon Marlow <simonmar@microsoft.com>**20060810121930]
1219[add html package
1220Simon Marlow <simonmar@microsoft.com>**20060810113719]
1221[Egregious bug in tcLHsConResTy
1222simonpj@microsoft.com**20060810120828
1223 
1224 This terrible bug in tcLHsConTy is pretty much guaranteed to show up
1225 on an program involving a GADT with more than one type parameter.
1226 
1227 This bug isn't present in the STABLE branch.
1228 
1229 Manuel: it is *not* necesary to merge this patch into the FC branch;
1230 just ignore it.
1231 
1232]
1233[Comments about improvements to SpecConstr
1234simonpj@microsoft.com**20060810120759]
1235[Remove HasBounds-instance and implement MArray.getBounds instead
1236Esa Ilari Vuokko <ei@vuokko.info>**20060809163012]
1237[Fix Array imports
1238Esa Ilari Vuokko <ei@vuokko.info>**20060809161341]
1239[Where we use $(GhcHcOpts), also add $(GhcStage1HcOpts)
1240Simon Marlow <simonmar@microsoft.com>**20060809144845
1241 This fixes building the compiler with -prof in $(GhcStage1HcOpts)
1242]
1243[fixes to the stage2 build following removal of old FFI syntax
1244Simon Marlow <simonmar@microsoft.com>**20060809143153]
1245[fix bug in task freeing
1246Simon Marlow <simonmar@microsoft.com>**20060809141225]
1247[add some more options to stage 2
1248Simon Marlow <simonmar@microsoft.com>**20060809141058]
1249[remove debugging code accidentally left in
1250Simon Marlow <simonmar@microsoft.com>**20060809102936]
1251[remember that old FFI syntax has been dropped
1252Simon Marlow <simonmar@microsoft.com>**20060809101655]
1253[only define GHCI if $(GhcWithInterpreter)=YES, also add -threaded
1254Simon Marlow <simonmar@microsoft.com>**20060809101634]
1255[move altzone test to base package
1256Ross Paterson <ross@soi.city.ac.uk>**20060809124215]
1257[remove unused FPTOOLS_CHECK_HTYPE macro
1258Ross Paterson <ross@soi.city.ac.uk>**20060809124036]
1259[Remove the artifical cap on the number of workers
1260Simon Marlow <simonmar@microsoft.com>**20060809095908
1261 See #805.  This was here to catch bugs that resulted in an infinite
1262 number of worker threads being created.  However, we can't put a
1263 reasonable bound on the number of worker threads, because legitimate
1264 programs may need to create large numbers of (probably blocked) worker
1265 threads.  Furthermore, the OS probably has a bound on the number of
1266 threads that a process can create in any case.
1267 
1268 
1269 
1270]
1271[Remove old FFI syntax
1272Simon Marlow <simonmar@microsoft.com>**20060809095201
1273 See #815
1274]
1275[make exit() overridable, for use in DLLs
1276Simon Marlow <simonmar@microsoft.com>**20060809092439
1277 See #753
1278]
1279[More fixes to pre-matching and pre-subsumption
1280simonpj@microsoft.com**20060808224924
1281 
1282 Actually this patch fixes two errors. one was a trivial typo in
1283 tha last patch (b_ty should be b_tau), which led to an infinite loop
1284 when compiling Data.Generic.Twins. 
1285 
1286 Fixing that revealed a more serious error in the same function.
1287 I was sloppy about dealing robsutly with name-capture for nested
1288 quantifiers in pre-subsumption and pre-matching; and sure enough
1289 I got bitten.  Sigh.  I think it is right now.
1290 
1291]
1292[Group exports so that all length functions are together; no semantic change
1293simonpj@microsoft.com**20060808224808]
1294[Check that lazy patterns are for lifted types
1295simonpj@microsoft.com**20060808135910
1296 
1297 A lazy pattern match must be for a lifted type. This is illegal:
1298 
1299        f x = case g x of
1300                 ~(# x,y #) -> ...
1301 
1302 This commit fixes the problem.  Trac #845, test is tcfail159
1303 
1304]
1305[Spelling in a comment
1306simonpj@microsoft.com**20060808123514]
1307[Remove srcSpanStartLine/srcSpanEndLine crash
1308simonpj@microsoft.com**20060808123211
1309 
1310 srcSpanStartLine/srcSpanEndLine panic on UnhelpfulLoc. They should not
1311 really be exported by SrcLoc at all, but unfortunately they are used in
1312 Lexer.x, which knows enough to avoid the panic.
1313 
1314 However the call in RnEnv didn't know, and the panic was triggered
1315 by Template Haskell spliced code.  This patch fixes it by exporting
1316 the predicate RnEnv wanted, namely isOneLineSpan.
1317 
1318]
1319[Replace deprecated AC_TRY_COMPILE macro with the reccomended replcament
1320Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060706114902
1321 See: http://www.gnu.org/software/autoconf/manual/html_node/Obsolete-Macros.html
1322]
1323[Add ghc and version number in .ident directive in NCG
1324Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060706114712
1325 Just because we can and because every other compiler does,
1326 lets stick in an identifier directive: .ident "GHC x.y.z"
1327 into the assembly output of the NCG.
1328]
1329[Support the GNU non-exec stack annotation system
1330Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060706114331
1331 On recent GNU ELF systems one can mark an object file as not
1332 requiring an executable stack. If all objects- linked into a
1333 program have this note then the program will not use an executable
1334 stack, which is good for security (and some distros have it as a
1335 QA policy). GHC generated code does not need an executable stack
1336 so add the note to the assembly output of the native code
1337 generator (conditional on a configure test).
1338]
1339[Complain more loudly if any of the hsc2hs phases fail
1340Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060703234356
1341 previously hsc2hs just exits with a non-zero exit code, now if any of
1342 the compilation, linking or runing phases fail then we get a message
1343 saying so and the failing command is printed.
1344]
1345[Remember to free() memory on exit
1346Simon Marlow <simonmar@microsoft.com>**20060808103110
1347 Patch mostly from Lennart Augustsson in #803, with additions to
1348 Task.c by me.
1349]
1350[Fix pre-subsumption and pre-matching
1351simonpj@microsoft.com**20060808091108
1352 
1353 The pre-subsuption and pre-matching functions should NEVER make bogus
1354 bindings of type variables, although they are free to bale out and make
1355 too few bindings.
1356 
1357 I hadn't been thiking carefully enough about this, and there were two
1358 separate bugs. 
1359 
1360 - Firstly, in pre-subsumption we must ignore the 'theta'
1361   part of any overloaded type. 
1362 
1363 - Second, in pre-matching, we must return the empty subustition
1364   on a mis-match, rather than returning the substitution so far.
1365 
1366 This bug showed up when compiling Data.Generics.Schemes.hs, and is
1367 imortalised in test tc206
1368 
1369]
1370[Improve error message
1371simonpj@microsoft.com**20060808080255
1372 
1373 Improve a little-used error message.  Given
1374        f :: a -> a
1375        f x y = e
1376 the error says
1377 
1378        The equations for f have two arguments
1379        but its type `a -> a' has only one
1380 
1381 (Before, it said "its type `a' has only one" which is bogus.
1382 
1383]
1384[Pull out common removal code, and detect does-not-exist correctly
1385Ian Lynagh <igloo@earth.li>**20060710214308]
1386[Create our own directory in the temporary directory to avoid various races
1387Ian Lynagh <igloo@earth.li>**20060710204424]
1388[Merge SysTools import declarations
1389Ian Lynagh <igloo@earth.li>**20060709183850]
1390[Don't freeze the dynamic flags used for filename generation before the pipeline starts
1391Ian Lynagh <igloo@earth.li>**20060709145101]
1392[#807: Removed double fclose of prof_file
1393Ian Lynagh <igloo@earth.li>**20060708152424
1394 prof_file was being fclose'd in both gen_XML_logfile and hs_exit, leading
1395 to glibc complaining of a double free.
1396]
1397[Add -fextended-default-rules and -fmono-pat-binds
1398simonpj@microsoft.com**20060807112107
1399 
1400 Add -fextended-deafult-rules (in response to Don Stewart's message below),
1401 and document them.
1402 
1403 Also doucument -fmono-pat-binds/-fno-mono-pat-binds, which has been in
1404 GHC a few weeks now.
1405 
1406 (The two are in one patch because the diffs were so close together
1407 that Darcs combined them.)
1408 
1409 Simon
1410 
1411 
1412 From: Donald Bruce Stewart [mailto:dons@cse.unsw.edu.au]
1413 Sent: 07 August 2006 10:52
1414 
1415 While we're thinking about defaulting, I have a question..
1416 
1417 ghci uses an extended defaulting system, to allow things like:
1418         Prelude> reverse []
1419         []
1420 to work, and to have the right instance of Show found. The manual says:
1421 
1422     "..it is tiresome for the user to have to specify the type, so GHCi extends
1423     Haskell's type-defaulting rules (Section 4.3.4 of the Haskell 98 Report
1424     (Revised)) as follows. If the expression yields a set of type constraints
1425     that are all from standard classes (Num, Eq etc.), and at least one is
1426     either a numeric class or the Show, Eq, or Ord class, GHCi will try to use
1427     one of the default types, just as described in the Report. The standard
1428     defaulting rules require that one of the classes is numeric; the difference
1429     here is that defaulting is also triggered at least one is Show, Eq, or Ord."
1430 
1431 Currently, there is no way to get at this "extended" defaulting for compiled
1432 modules. However, I have a use case for in fact doing this.
1433 
1434 With runtime evaluated Haskell, embedding 'interpreters' (over hs-plugins) is
1435 easy. lambdabot, for example, implements a sandboxed haskell eval system. But
1436 it doesn't have access to the defaulting mechanism of ghci, so we have:
1437 
1438     dons:: > reverse []
1439     lambdabot:: Add a type signature
1440     dons:: > reverse [] :: [()]
1441     lambdabot:: []
1442 
1443 Which is annoying -- newbies wonder why they have to add these extra
1444 constraints to get a Show instance.
1445 
1446 I'm wondering, since the extended defaulting mechanisms are already
1447 implemented, could they be made available to compiled modules as well,
1448 perhaps using a flag, -fextended-defaulting?
1449 
1450]
1451[add a comment
1452Simon Marlow <simonmar@microsoft.com>**20060807143102]
1453[Do pre-subsumption in the main subsumption check
1454simonpj@microsoft.com**20060804214942
1455 
1456 This patch improves the subsumption check (in TcUnify.tc_sub) so that
1457 it does pre-subsumption first.  The key code is in the case with
1458 guard (isSigmaTy actual_ty); note the new call to preSubType.
1459 
1460 Shorn of details, the question is this.  Should this hold?
1461 
1462        forall a. a->a   <=   Int -> (forall b. Int)
1463 
1464 Really, it should; just instantiate 'a' to Int.  This is just what
1465 the pre-subsumption phase (which used in function applications),
1466 will do.
1467 
1468 I did a bit of refactoring to achieve this.
1469 
1470 Fixes Trac #821.  Test tc205 tests.
1471 
1472]
1473[Make unification robust to a boxy type variable meeting itself
1474simonpj@microsoft.com**20060801214302
1475 
1476 Previously, the implicit assumption in unification is that a boxy
1477 type variable could never occur on both sides of the unification,
1478 so that we'd never find
1479        bx5 :=: bx5
1480 
1481 But the pre-subsumption stuff really means that the same variable
1482 can occur on both sides.  Consider
1483        forall a. a->Int <= bx5->Int
1484 Then pre-subumption will find a->bx5; and the full subsumption step
1485 will find bx5:=bx5.
1486 
1487 However, I think there is still no possiblity of a full occurs-check
1488 failure; that is,
1489        bx5 :=: Tree bx5
1490 Although I can't quite see how to prove it!  So I've added a
1491 DEBUG test in uMetaVar to check for this case.
1492 
1493]
1494[Added cabal-setup
1495sven.panne@aedion.de**20060804142149]
1496[Don't include the package name in a cost centre's module name
1497Simon Marlow <simonmar@microsoft.com>**20060803093337
1498 This is mainly to restore the old behaviour, but also we shouldn't
1499 normally need the package name in a cost centre because only the
1500 "main" package normally has cost centres.
1501]
1502[Add a new section "Getting the Source" to both HACKING and README. But what about win32 users?
1503shae@ScannedInAvian.com**20060720152929]
1504[savingOldConfig: add Exception.block for extra paranoia
1505Simon Marlow <simonmar@microsoft.com>**20060801131027
1506 
1507]
1508[Refactor ghc-pkg
1509Ian Lynagh <igloo@earth.li>**20060729192946
1510 This patch fixes a couple of issues with the
1511     Be lazier in user config creation, and don't fail on missing configs.
1512 patch. It puts the createDirectoryIfMissing back in and removes assumptions
1513 that the package.conf file already exists.
1514]
1515[No functionality changes
1516Ian Lynagh <igloo@earth.li>**20060730105256
1517 Consistently used spaces rather than tabs.
1518 Removed trailing whitespace.
1519 Wrapped comments to fit in a standard terminal.
1520]
1521[Add notes about unsafeCoerce
1522simonpj@microsoft.com**20060731080922]
1523[.hi-boot-5 is obsolete; the earliest GHC we support uses .hi-boot-6
1524Simon Marlow <simonmar@microsoft.com>**20060728140809
1525 
1526 
1527]
1528[update to match .lhs-boot
1529Simon Marlow <simonmar@microsoft.com>**20060728140607]
1530[get ReadP from the right place.
1531Simon Marlow <simonmar@microsoft.com>**20060728140444
1532 
1533]
1534[Improve error message for deriving
1535simonpj@microsoft.com**20060727160832]
1536[Lazy patterns are like wild-cards for overlap warnings
1537simonpj@microsoft.com**20060727155009
1538 
1539        MERGE TO STABLE
1540 
1541 Fixes Trac #827
1542 Test is should_compiler/ds058
1543 
1544]
1545[fix some problems with wired-in packages
1546Simon Marlow <simonmar@microsoft.com>**20060727153802]
1547[oops, remove old packages when updating
1548Simon Marlow <simonmar@microsoft.com>**20060727150650]
1549[fix symbols for GHC.PrimopWrappers
1550Simon Marlow <simonmar@microsoft.com>**20060727134755]
1551[a couple more symbols need package names
1552Simon Marlow <simonmar@microsoft.com>**20060727102129]
1553[Add missing import
1554simonpj@microsoft.com**20060727085605]
1555[Make -fcontext-stack into a dynamic flag
1556simonpj@microsoft.com**20060727080422
1557 
1558   This allows you to put -fcontext-stack into an options pragma,
1559   as requested by Trac #829
1560   
1561   While I was at it, I added OptIntPrefix to the forms allowed
1562   in CmdLineParser.
1563 
1564]
1565[Deal correctly with infix type constructors in GADT decls
1566simonpj@microsoft.com**20060726225304]
1567[Improve pretty printing of ConDecl
1568simonpj@microsoft.com**20060726225223]
1569[fix parse error (merge-o, I think)
1570Simon Marlow <simonmar@microsoft.com>**20060726103526]
1571[fix DEBUG build
1572Simon Marlow <simonmar@microsoft.com>**20060726103433]
1573[missed one symbol that needs a package name
1574Simon Marlow <simonmar@microsoft.com>**20060726085844]
1575[change wired-in Haskell symbols to include the package name
1576Simon Marlow <simonmar@microsoft.com>**20060726084659]
1577[Unbox the Unique stored in a Name
1578Simon Marlow <simonmar@microsoft.com>**20060725141747
1579 I measured that this makes the comiler allocate a bit more, but it
1580 might also make it faster and reduce residency.  The extra allocation
1581 is probably just because we're not inlining enough somewhere, so I
1582 think this change is a step in the right direction.
1583]
1584[optimisations to newUnique
1585Simon Marlow <simonmar@microsoft.com>**20060725140816
1586 
1587 It turned out that newUnique was wasting one node of the splittable
1588 uniq supply per invocation: it took the current supply, split it, used
1589 the unique from one half and stored the other half in the monad.  In
1590 other words, the unique in the supply stored in the monad was never
1591 used. 
1592 
1593 This optimisation fixes that and adds a bit of strictness, which
1594 together lead to small reduction in allocations by the compiler, and
1595 possibly an improvement in residency (hard to tell for sure when GCs
1596 move around).
1597]
1598[tiny bit of extra strictness
1599Simon Marlow <simonmar@microsoft.com>**20060725131201]
1600[Make a SplitUniqSupply contain an Int# rather than an Int
1601Simon Marlow <simonmar@microsoft.com>**20060725120252
1602 The I# constructor is always removed when we make a unique later
1603 anyway, so this just saves a bit of time and allocation.
1604]
1605[Use -package-name rather than -ignore-package
1606Simon Marlow <simonmar@microsoft.com>**20060725130913]
1607[Remove most of the conflict checking and auto-hiding
1608Simon Marlow <simonmar@microsoft.com>**20060725130850
1609 Now that the module restriction has been lifted, the auto-hiding is
1610 mostly not required.  GHC itself automatically hides old versions of a
1611 package.
1612]
1613[Generalise Package Support
1614Simon Marlow <simonmar@microsoft.com>**20060725130154
1615 
1616 This patch pushes through one fundamental change: a module is now
1617 identified by the pair of its package and module name, whereas
1618 previously it was identified by its module name alone.  This means
1619 that now a program can contain multiple modules with the same name, as
1620 long as they belong to different packages.
1621 
1622 This is a language change - the Haskell report says nothing about
1623 packages, but it is now necessary to understand packages in order to
1624 understand GHC's module system.  For example, a type T from module M
1625 in package P is different from a type T from module M in package Q.
1626 Previously this wasn't an issue because there could only be a single
1627 module M in the program.
1628 
1629 The "module restriction" on combining packages has therefore been
1630 lifted, and a program can contain multiple versions of the same
1631 package.
1632 
1633 Note that none of the proposed syntax changes have yet been
1634 implemented, but the architecture is geared towards supporting import
1635 declarations qualified by package name, and that is probably the next
1636 step.
1637 
1638 It is now necessary to specify the package name when compiling a
1639 package, using the -package-name flag (which has been un-deprecated).
1640 Fortunately Cabal still uses -package-name.
1641 
1642 Certain packages are "wired in".  Currently the wired-in packages are:
1643 base, haskell98, template-haskell and rts, and are always referred to
1644 by these versionless names.  Other packages are referred to with full
1645 package IDs (eg. "network-1.0").  This is because the compiler needs
1646 to refer to entities in the wired-in packages, and we didn't want to
1647 bake the version of these packages into the comiler.  It's conceivable
1648 that someone might want to upgrade the base package independently of
1649 GHC.
1650 
1651 Internal changes:
1652 
1653   - There are two module-related types:
1654 
1655         ModuleName      just a FastString, the name of a module
1656         Module          a pair of a PackageId and ModuleName
1657 
1658     A mapping from ModuleName can be a UniqFM, but a mapping from Module
1659     must be a FiniteMap (we provide it as ModuleEnv).
1660 
1661   - The "HomeModules" type that was passed around the compiler is now
1662     gone, replaced in most cases by the current package name which is
1663     contained in DynFlags.  We can tell whether a Module comes from the
1664     current package by comparing its package name against the current
1665     package.
1666 
1667   - While I was here, I changed PrintUnqual to be a little more useful:
1668     it now returns the ModuleName that the identifier should be qualified
1669     with according to the current scope, rather than its original
1670     module.  Also, PrintUnqual tells whether to qualify module names with
1671     package names (currently unused).
1672 
1673 Docs to follow.
1674]
1675[comment formatting
1676Simon Marlow <simonmar@microsoft.com>**20060725110519
1677 
1678]
1679[unused import
1680Simon Marlow <simonmar@microsoft.com>**20060706141349]
1681[unused import
1682Simon Marlow <simonmar@microsoft.com>**20060706141205]
1683[remove more Addr bits
1684Simon Marlow <simonmar@microsoft.com>**20060704151217]
1685[unused import
1686Simon Marlow <simonmar@microsoft.com>**20060704141319]
1687[add default cases
1688Simon Marlow <simonmar@microsoft.com>**20060704135444]
1689[redundant import
1690Simon Marlow <simonmar@microsoft.com>**20060704135435]
1691[unused imports
1692Simon Marlow <simonmar@microsoft.com>**20060704135117]
1693[unused import
1694Simon Marlow <simonmar@microsoft.com>**20060704134557]
1695[remove unused bits, mostly to do with the Addr type
1696Simon Marlow <simonmar@microsoft.com>**20060704124912]
1697[In interface files, store FastStrings rather than OccNames where possible
1698Simon Marlow <simonmar@microsoft.com>**20060724154826
1699 In all cases the namespace is known from the context, so this saves 1
1700 byte per variable binding/occurrence (a few percent per iface file).
1701]
1702[Add -fmono-pat-binds, and make it the default
1703simonpj@microsoft.com**20060722102245
1704 
1705 In Haskell 98, pattern bindings are generalised.  Thus in
1706        (f,g) = (\x->x, \y->y)
1707 both f and g will get polymorphic types.  I have become convinced
1708 that generalisation for pattern-bound variables is just a bridge
1709 toof far. It is (I claim) almost never needed, and it adds significant
1710 complication.  (All the more so if we add bang patterns.)
1711 
1712 So the flag -fmono-pat-binds switches off generalisation for pattern
1713 bindings.  (A single variable is treated as a degnerate funtction
1714 binding.) 
1715 
1716 Furthremore, as an experiment, I'm making it the default.  I want
1717 to see how many progarms fail with monomorphic pattern bindings.
1718 
1719 You can recover the standard behaviour with -fno-mono-pa-binds.
1720 
1721]
1722[Fix RULES lossage
1723simonpj@microsoft.com**20060722101756
1724 
1725 Don Stewart and Duncan Coutts encountered the following situation.
1726        f = <rhs>
1727        {-# RULES f ... #-}
1728 where f is not exported, but appears in the inlinings of other
1729 functions that are exported.  Then what happened was that the desugarer
1730 produced this:
1731        M.f = f
1732        f = <rhs>
1733 where the rules get attached to the M.f. But since M.f's RHS is trivial
1734 (just f) it was unconditionally inlinined at all its call sites,
1735 thereby losing the RULES attached to it.
1736 
1737 This *is* a fragile aspect of rules. However this fix solves the
1738 problem by instead generating
1739        f = M.f
1740        M.f = <rhs>
1741 
1742 A pretty small chanage to the desugarer does the job.  It still feels
1743 a little fragile, bt it's certainly more robust than before.
1744 
1745]
1746[Fix broken regex
1747Simon Marlow <simonmar@microsoft.com>**20060721111144
1748 Don't know how I managed to use this before... maybe a different regex
1749 library.
1750]
1751[fix bug in sample code
1752Simon Marlow <simonmar@microsoft.com>**20060721083200]
1753[fix eran error message by reordering a couple of tests
1754simonmar@microsoft.com**20060719111638]
1755[Use a recursive error handler in case the exception causes more exceptions.
1756Lemmih <lemmih@gmail.com>**20060717232553]
1757[Check for overlap-flag differences in hi files
1758simonpj@microsoft.com**20060714163843
1759 
1760        MERGE TO STABLE
1761 
1762 I'd forgotten to compare the per-instance overlap flag when
1763 comparing interface files, and that meant that consequential
1764 recompilations weren't being triggered when the only change
1765 was to add -fallow-overlapping-instances
1766 
1767 Fixes Trac bug #824
1768 
1769 
1770]
1771[Add a clarification about overlapping instances in the manual
1772simonpj@microsoft.com**20060714143220]
1773[Comments and import trimming
1774simonpj@microsoft.com**20060712153306]
1775[Experimental flag -fdicts-cheap
1776simonpj@microsoft.com**20060712153204
1777 
1778 This experimental flag, -fdicts-cheap, makes a let-binding that bind a
1779 value of dictionary type look cheap.  That in turn leads to more
1780 eta expansion.  Instead of
1781        f = /\a. \(d1:Ord a). let d2:Ord [a] = dfOrd a d1 in
1782                  \(x:a). <stuff>
1783 which has arity 1, you get
1784        f = /\a. \(d1:Ord a). \(x:a).
1785                 let d2:Ord [a] = dfOrd a d1 in <stuff>
1786 Now f has arity 2.
1787 
1788 This can cretainly waste dictionary-construction work, if f is
1789 partially applied to its dictionary argument.  However it has knock-on
1790 effects.  Because f has arity 2, we won't float (f Int d) out of
1791        \x. h (f Int d)
1792 Floating f out of this lambda makes it impossible for an h/f fusion
1793 rule to fire; and this unexpected loss of RULE application was the
1794 immediate reason for implementing this flag. (Roman Leshchinskiy came
1795 across this when working on array fusion.)
1796 
1797 
1798 I've implemented the change only in CoreUtils.arityType, which
1799 only affects eta expansion.  I thought of putting the change in
1800 exprIsCheap, which is a more systematic place (the former calls
1801 the latter) but
1802 
1803        a) I wanted this under flag control, and the flags
1804        are not readily available to all callers of exprIsCheap
1805 
1806        b) I'm not 100% convinced that this change is a good
1807        idea, so it's reasonable to do the narrowest change
1808        that solves the immediate problem.
1809]
1810[document that -fglasgow-exts is needed for RULES to work
1811Malcolm.Wallace@cs.york.ac.uk**20060712093907]
1812[do a better job of ignoring unrecognised pragmas
1813Simon Marlow <simonmar@microsoft.com>**20060712083550]
1814[Don't z-encode module names in external-core output
1815Jan Rochel <jan.rochel@stud.uka.de>**20060706131109]
1816[re-add -fvia-C
1817Simon Marlow <simonmar@microsoft.com>**20060710081522
1818 There are still some fixes required to get the threaded RTS compilable
1819 with the NCG, and apparently there are problems on 32-bit archs too.
1820 
1821]
1822[Be lazier in user config creation, and don't fail on missing configs.
1823Ian Lynagh <igloo@earth.li>**20060624230800]
1824[Z-Encode external-core output
1825Jan Rochel <jan.rochel@stud.uka.de>**20060702214438
1826 
1827 HEAD doesn't z-encode external-core output (unlike 6.4). I suppose, that
1828 this is unwanted behaviour. It probably results from this patch:
1829 
1830 ========================================================================
1831 Fri Jan  6 17:30:19 CET 2006  simonmar
1832   * [project @ 2006-01-06 16:30:17 by simonmar]
1833   Add support for UTF-8 source files
1834 
1835 [...]   
1836 
1837 Z-encoding has been moved right to the back end.  Previously we
1838 used to Z-encode every identifier on the way in for simplicity,
1839 and only decode when we needed to show something to the user.
1840 Instead, we now keep every string in its UTF-8 encoding, and
1841 Z-encode right before printing it out.
1842 
1843 [...]
1844 ========================================================================
1845 
1846 Greetings
1847 Jan
1848]
1849[Add %local-tag to external core output
1850Jan Rochel <jan.rochel@stud.uka.de>**20060702204559
1851 
1852 Hello, this is my first patch contributed to GHC. If there are any
1853 inadequacies about it (maybe like this introductory disclaimer), please
1854 let me know about it.
1855 
1856 So, the need for this patch arose, while I was involved with processing
1857 hcr files (external core output) and I noticed, that the output didn't
1858 fully conform to the specification [1].
1859 No %local-tags were used, which turned out to be a real nuisance as it
1860 was not possible to determine which VDEFs can be erased in a further
1861 optimization process and which ones are exported by the module.
1862 
1863 Since the specification does not define the meaning of the %local-tag, I
1864 assume, it makes sense, that it tags all functions, that are not
1865 exported by the module.
1866 
1867 The patch does not fully comply to the specification, as in my
1868 implementation a local tag may appear before a VDEF but not before a
1869 VDEFG.
1870 
1871 [1] An External Representation for the GHC Core Language
1872     (DRAFT for GHC5.02), page 3, line 1
1873 
1874 Greetings
1875 Jan
1876]
1877[Remove bashisms from darcs-all
1878Alec Berryman <alec@thened.net>**20060703012911
1879 
1880 darcs-all may now be run with any POSIX-compatible /bin/sh.
1881]
1882[Fix for warning message (bug #812)
1883Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060704163413
1884 say "{-# SOURCE #-}" rather than "{- SOURCE -}" in warning message.
1885 Fixes http://hackage.haskell.org/trac/ghc/ticket/812
1886]
1887[The dict-bindings in an IPBinds need not be in dependency order
1888simonpj@microsoft.com**20060703151517
1889 
1890 This appears to be a long-standing bug, discovered by BlueSpec
1891 (ravi@bluespec.com), Trac bug #795
1892 
1893 The problem was that in an IP binding group, the dict bindings
1894 aren't necessarily in dependency order; and if they aren't
1895 we get a core-lint error.
1896 
1897 Test tc203 checks this case.  (Though whether it shows up at
1898 all depends a bit on accidental factors of binding ordering.)
1899 
1900]
1901[x86 needs -fno-unit-at-a-time too
1902Simon Marlow <simonmar@microsoft.com>**20060704083308
1903 Fixes #809
1904]
1905[x86-64: fix a problem exposed by negative offsets in vector tables
1906Simon Marlow <simonmar@microsoft.com>**20060629140608
1907 static relative offsets (eg .long l1-l2) are restricted to 32 bits on
1908 x86-64 due to lack of support in the linker.  The codegen, NCG and
1909 runtime work around this, using 32-bit offsets instead of 64.
1910 However, we were missing a workaround for vector tables, and it
1911 happened to work by accident because the offsets were always positive
1912 and resolved by the assembler.  The bug was exposed by using the NCG
1913 to compile the RTS, where the offsets became negative, again by
1914 accident.
1915]
1916[No longer force -fvia-C for the RTS, it can now be compiled with the NCG
1917Simon Marlow <simonmar@microsoft.com>**20060629135836]
1918[Replace inline C functions with C-- macros in .cmm code
1919Simon Marlow <simonmar@microsoft.com>**20060629134726
1920 So that we can build the RTS with the NCG.
1921]
1922[remove conditionals from definition of StgRegTable
1923Simon Marlow <simonmar@microsoft.com>**20060629134405
1924 so that we can calculate deterministic offsets to some of the fields
1925 of Capability.
1926]
1927[mpz_foo() functions are really called __gmpz_foo() in GMP
1928Simon Marlow <simonmar@microsoft.com>**20060629122217
1929 gmp.h #defines mpz_foo to __gmpz_foo, so the real ABI is __gmpz_foo,
1930 so that is what we must invoke in order to be portable here.
1931 Similarly for mpn --> __gmpn.
1932]
1933[use the new "prim %write_barrier()" in .cmm instead of calls to wb()
1934Simon Marlow <simonmar@microsoft.com>**20060629120526]
1935[fix some problems with the fixup block code
1936Simon Marlow <simonmar@microsoft.com>**20060629120210
1937 We weren't handling InBoth properly.  InBoth needs to be expanded to
1938 appropriate InReg/InMem locations *before* building the interference
1939 graph, otherwise an InBoth will not be seen to conflict with other
1940 InReg/InMem locations.
1941]
1942[small optimisation: eliminate more register-to-register moves
1943Simon Marlow <simonmar@microsoft.com>**20060629120029]
1944[new syntax: "prim %OP (args)"  for using CallishMachOps in .cmm
1945Simon Marlow <simonmar@microsoft.com>**20060629115949
1946 
1947 
1948]
1949[add MO_WriteBarrier to CallishMachOps
1950Simon Marlow <simonmar@microsoft.com>**20060629115837
1951 This will let us express write barriers in C--
1952]
1953[Use -fno-strict-aliasing for *all* C files in the runtime
1954Simon Marlow <simonmar@microsoft.com>**20060629082902
1955 as a precautionary measure.  It is definitely required for GC.c,
1956 but it may well become necessary for other files in the future due to
1957 our (mis-)use of the C "type system".
1958]
1959[the unlifted kind
1960Simon Marlow <simonmar@microsoft.com>**20060623152626]
1961[fix a lint-o
1962Simon Marlow <simonmar@microsoft.com>**20060620151901]
1963[fix sloppy conditionals
1964Simon Marlow <simonmar@microsoft.com>**20060620151758]
1965[fix sloppy conditionals
1966Simon Marlow <simonmar@microsoft.com>**20060620151039]
1967[fix a few sloppy conditionals caught by new test in CmmLint
1968Simon Marlow <simonmar@microsoft.com>**20060620150618]
1969[flattenCgStmts: fix a case of empty code blocks being generated
1970Simon Marlow <simonmar@microsoft.com>**20060620150520]
1971[improve a panic message
1972Simon Marlow <simonmar@microsoft.com>**20060620141219]
1973[check that the argument to CmmCondBranch is really a conditional
1974Simon Marlow <simonmar@microsoft.com>**20060620141204]
1975[Generate a new unique for each label
1976Simon Marlow <simonmar@microsoft.com>**20060620140106]
1977[Remove long-redundant FieldLabel.lhs
1978simonpj@microsoft.com**20060629105321]
1979[Add comments to SpecConstr
1980simonpj@microsoft.com**20060627161520]
1981[fix up slop-overwriting for THUNK_SELECTORS in DEBUG mode
1982Simon Marlow <simonmar@microsoft.com>**20060627123951]
1983[Make SpecConstr work better for nested functions
1984simonpj@microsoft.com**20060627094742
1985 
1986 In SpecConstr.scBind, we should pass the optimised body (body') to
1987 specialise, not the un-optimised one. In this way we'll benefit from
1988 specialising any nested functions inside body.
1989 
1990 Discovered by Roman.
1991 
1992]
1993[More SpecConstr tuning
1994simonpj@microsoft.com**20060626201709
1995 
1996 For some reason, SpecConstr wasn't taking account of let-bound constructors:
1997        let v = Just 4
1998        in ...(f v)...
1999 
2000 Now it does.  An easy fix fortunately.
2001 
2002]
2003[Improve consistency checking for derived instances
2004simonpj@microsoft.com**20060626100034
2005 
2006 This patch arranges that derived instances use the same instance-decl
2007 checking code as user-defined instances.  That gives greater consistency
2008 in error messages.
2009 
2010 Furthermore, the error description if this consistency check fails is now
2011 much more explicit.  For example, drvfail003 now says
2012      Variable occurs more often in a constraint than in the instance head
2013        in the constraint: Show (v (v a))
2014      (Use -fallow-undecidable-instances to permit this)
2015      In the derived instance
2016        instance (Show (v (v a))) => Show (Square_ v w a)
2017 
2018]
2019[Slight improvement in TH error reporting
2020simonpj@microsoft.com**20060626095952]
2021[Improve location info when typechecking interface fiels
2022simonpj@microsoft.com**20060614114813]
2023[Fix a bug in the pretty printing of class declarations
2024davve@dtek.chalmers.se**20060625160826]
2025[Improve RULE matching a bit more
2026simonpj@microsoft.com**20060624160421
2027 
2028 Consider this example (provided by Roman)
2029 
2030        foo :: Int -> Maybe Int -> Int
2031        foo 0 (Just n) = n
2032        foo m (Just n) = foo (m-n) (Just n)
2033 
2034 SpecConstr sees this fragment:
2035 
2036        case w_smT of wild_Xf [Just A] {
2037          Data.Maybe.Nothing -> lvl_smf;
2038          Data.Maybe.Just n_acT [Just S(L)] ->
2039            case n_acT of wild1_ams [Just A] { GHC.Base.I# y_amr [Just L] ->
2040            $wfoo_smW (GHC.Prim.-# ds_Xmb y_amr) wild_Xf
2041            }};
2042 
2043 and correctly generates the rule
2044 
2045        RULES: "SC:$wfoo1" [0] __forall {y_amr [Just L] :: GHC.Prim.Int#
2046                                          sc_snn :: GHC.Prim.Int#}
2047          $wfoo_smW sc_snn (Data.Maybe.Just @ GHC.Base.Int (GHC.Base.I# y_amr))
2048          = $s$wfoo_sno y_amr sc_snn ;]
2049 
2050 BUT we must ensure that this rule matches in the original function!
2051 Note that the call to $wfoo is
2052            $wfoo_smW (GHC.Prim.-# ds_Xmb y_amr) wild_Xf
2053 
2054 During matching we expand wild_Xf to (Just n_acT).  But then we must also
2055 expand n_acT to (I# y_amr).  And we can only do that if we look up n_acT
2056 in the in-scope set, because in wild_Xf's unfolding it won't have an unfolding
2057 at all.
2058 
2059 Happily, fixing the bug is easy: add a call to 'lookupRnInScope' in the
2060 (Var v2) case of 'match'.
2061 
2062]
2063[--enable-src-tree-haddock and friends are no longer required
2064Simon Marlow <simonmar@microsoft.com>**20060623113303
2065 Happy, Alex and Haddock are built separately using Cabal now.
2066]
2067[fix a couple of bugs in markSparkQueue (#799)
2068Simon Marlow <simonmar@microsoft.com>**20060623092044]
2069[pull in STABLE(!) tweaks
2070sof@galois.com**20060622202734]
2071[fix for when path to GHC contains spaces, from #695
2072Simon Marlow <simonmar@microsoft.com>**20060622131700]
2073[Comment only
2074simonpj@microsoft.com**20060621223940]
2075[Transfer INLINE to specialised functions
2076simonpj@microsoft.com**20060621223637
2077 
2078 When the Specialise pass generates a specialised copy of a function,
2079 it should transfer the INLINE information to the specialised function.
2080 Otherwise, whether or not the INLNE happens can depend on whether
2081 specialisation happens, which seems wrong.  See Note [Inline specialisation]
2082 in Specialise.lhs
2083 
2084 Here's the example Roman reported
2085 
2086     primWriteMU :: UAE e => MUArr e s -> Int -> e -> ST s ()
2087     {-# INLINE primWriteMU #-}
2088     primWriteMU = writeMBU . unMUAPrim
2089     ------
2090     
2091     The problem is that primWriteMU doesn't get inlined *sometimes*, which
2092     results in code like
2093     
2094     case Data.Array.Parallel.Unlifted.Flat.UArr.$sprimWriteMU
2095            @ s11_X1nJ
2096            marr_s25s
2097            (GHC.Base.I# sc_s27F)
2098            GHC.Base.False
2099            new_s_a1Db
2100            of wild3_a1Dd { (# new_s1_X1F9, r_a1Dc #) -> ...
2101 
2102 Note the fact that we have a call to the *specialised* $sprimWriteMU.
2103 
2104]
2105[Arity and eta-expansion tuning
2106simonpj@microsoft.com**20060621205855
2107 
2108 Roman found that
2109     loop :: STRef s a -> Int -> ST s Int
2110     loop ref n = case n of
2111                    0 -> return n
2112                    n -> loop ref (n-1)
2113 wasn't eta-expanding nicely, despite the 'state hack'
2114 (see Id.isStateHackType).  The reason was two-fold:
2115 
2116   a) a bug in CoreUtils.arityType (the Var case)
2117 
2118   b) the arity of a recursive function was not being
2119        exposed in its RHS (see commments with
2120        SimplEnv.addLetIdInfo
2121 
2122 The commit fixes both. 
2123 
2124]
2125[documentation for TH w/ profiling
2126Simon Marlow <simonmar@microsoft.com>**20060621112523]
2127[Allow Template Haskell to be used with -prof
2128Simon Marlow <simonmar@microsoft.com>**20060621110436
2129 
2130 In order for this to work, you need to build the program first in the
2131 normal way (without -prof), and then again with -prof and a suitable
2132 -osuf (eg. -osuf p_o).  The compiler will pick up the object files
2133 from the normal way for running TH expressions, when it sees -prof
2134 together with -osuf.  If you omit the -osuf, you get an error message:
2135 
2136 TH_genEx.hs:12:2:
2137     Dynamic linking required, but this is a non-standard build (eg. prof).
2138     You need to build the program twice: once the normal way, and then
2139     in the desired way using -osuf to set the object file suffix.
2140 
2141 If you use -osuf, but haven't built the program the normal way first,
2142 then you see:
2143 
2144 TH_genEx.hs:12:2:
2145     cannot find normal object file `TH_genExLib.o'
2146     while linking an interpreted expression
2147 
2148 Documentation to follow.
2149 
2150 Fixes: #651
2151]
2152[add decl for stg_block_throwto_ret
2153Simon Marlow <simonmar@microsoft.com>**20060620083410]
2154[comment out a non-true assertion
2155Simon Marlow <simonmar@microsoft.com>**20060616140750]
2156[make compilation a little less noisy
2157Simon Marlow <simonmar@microsoft.com>**20060616140652]
2158[allow the max number of workers to scale with +RTS -N
2159Simon Marlow <simonmar@microsoft.com>**20060616140633]
2160[fix one-character error in stack check
2161Simon Marlow <simonmar@microsoft.com>**20060616135621]
2162[add STM support to the new throwTo mechanism
2163Simon Marlow <simonmar@microsoft.com>**20060616111937]
2164[remove duplicate way names (-debug -debug didn't work)
2165Simon Marlow <simonmar@microsoft.com>**20060616110258]
2166[Asynchronous exception support for SMP
2167Simon Marlow <simonmar@microsoft.com>**20060616103342
2168 
2169 This patch makes throwTo work with -threaded, and also refactors large
2170 parts of the concurrency support in the RTS to clean things up.  We
2171 have some new files:
2172 
2173   RaiseAsync.{c,h}     asynchronous exception support
2174   Threads.{c,h}         general threading-related utils
2175 
2176 Some of the contents of these new files used to be in Schedule.c,
2177 which is smaller and cleaner as a result of the split.
2178 
2179 Asynchronous exception support in the presence of multiple running
2180 Haskell threads is rather tricky.  In fact, to my annoyance there are
2181 still one or two bugs to track down, but the majority of the tests run
2182 now.
2183]
2184[make rmp_tmp_w an StgWord instead of StgInt
2185Simon Marlow <simonmar@microsoft.com>**20060616102311]
2186[__compat_long_path_size(): have proto and defn agree on return type
2187sof@galois.com**20060614164650]
2188[call wakeUpRts() in the correct place
2189Simon Marlow <simonmar@microsoft.com>**20060614134728]
2190[readerProc: split up text output using host's line termination convention
2191sof@galois.com**20060613232605]
2192[Improve pretty-printing for bags
2193simonpj@microsoft.com**20060612114020]
2194[Make scoped type variables work for default methods
2195simonpj@microsoft.com**20060612113855
2196 
2197 Consider
2198   class C a where
2199     op :: forall b. a -> b -> b
2200     op = <rhs>
2201 
2202 Then 'b' should be in scope in <rhs>.  I had omitted this case.
2203 This patch fixes it.
2204 
2205]
2206[And move 'Chasing ...' messages into verbosity 2 as well
2207Don Stewart <dons@cse.unsw.edu.au>**20060612084656]
2208[Emit 'linking not required' messages only with -v 2 or above.
2209Don Stewart <dons@cse.unsw.edu.au>**20060611071041
2210 
2211 Similar in philosophy to the 'Skipping' patch, this is another case of
2212 printing noisy messages when no work is being done. This patch makes the
2213 building-when-nothing-to-do case smoother.
2214 
2215]
2216[Don't emit 'Skipping' messages unless -v2 or higher is on
2217Don Stewart <dons@cse.unsw.edu.au>**20060610145713
2218 
2219 Following GNU make, this patch makes GHC not emit messages about modules
2220 its skipping. This makes builds much quieter, and its a lot easier to
2221 work out what effects a change had on the code.
2222 
2223 The current behaviour can be recovered with -v2
2224 
2225]
2226[fix the stage3 build
2227Simon Marlow <simonmar@microsoft.com>**20060612084114]
2228[oops, undo accidental commit of version number
2229Simon Marlow <simonmar@microsoft.com>**20060612083520]
2230[Move readline configuration into the readline package
2231Simon Marlow <simonmar@microsoft.com>**20060609135840]
2232[fix possible ^C problems
2233Simon Marlow <simonmar@microsoft.com>**20060608144457
2234 Calling prodAllCapabilities() from interruptStgRts() was wrong, for
2235 the same reasons that we stopped doing it in handle_tick().  We now
2236 use the same mechanism (send a byte down the pipe to the IO manager
2237 thread), but abstract it in a wakeUpRts() function in the scheduler.
2238]
2239[New tracing interface
2240Simon Marlow <simonmar@microsoft.com>**20060608144210
2241 A simple interface for generating trace messages with timestamps and
2242 thread IDs attached to them.  Most debugging output goes through this
2243 interface now, so it is straightforward to get timestamped debugging
2244 traces with +RTS -vt.  Also, we plan to use this to generate
2245 parallelism profiles from the trace output.
2246]
2247[fix warnings
2248Simon Marlow <simonmar@microsoft.com>**20060608143635]
2249[fix warnings
2250Simon Marlow <simonmar@microsoft.com>**20060608143520]
2251[Make it so that StgWord/StgInt are longs
2252Simon Marlow <simonmar@microsoft.com>**20060608143438
2253 This means we can use a %ld format specifier for StgWord/StgInt with
2254 printf and not get shouted at by gcc.
2255]
2256[more warning fixage
2257Simon Marlow <simonmar@microsoft.com>**20060608142844]
2258[fix a warning
2259Simon Marlow <simonmar@microsoft.com>**20060608141903]
2260[fix some warnings
2261Simon Marlow <simonmar@microsoft.com>**20060608140201]
2262[Add new RTS flags for tracing:
2263Simon Marlow <simonmar@microsoft.com>**20060608130101
2264 
2265   -vs       Trace scheduler events (see also -Ds with -debug)
2266   -vt       Time-stamp trace messages
2267 
2268 the intention is that we will pipe the -vs output into a
2269 profile-generating tool.  This commit includes the flags only,
2270 functionality to follow.
2271]
2272[codegen debug flag (+RTS -Dc) was unused; remove it
2273Simon Marlow <simonmar@microsoft.com>**20060607145848]
2274[add 'const' modifiers to types where appropriate
2275Simon Marlow <simonmar@microsoft.com>**20060607145800]
2276[rearrange casts to avoid gcc warnings
2277Simon Marlow <simonmar@microsoft.com>**20060607145626]
2278[warning fix
2279Simon Marlow <simonmar@microsoft.com>**20060607141013]
2280[remove //@ stuff
2281Simon Marlow <simonmar@microsoft.com>**20060607134553]
2282[Gather timing stats for a Task when it completes.
2283Simon Marlow <simonmar@microsoft.com>**20060607124407
2284 Previously we did this just for workers, now we do it for the main
2285 thread and for forkOS threads too.
2286]
2287[Remove unnecessary SCHED_INTERRUPTED scheduler state
2288Simon Marlow <simonmar@microsoft.com>**20060607115105
2289 
2290]
2291[fix a warning
2292Simon Marlow <simonmar@microsoft.com>**20060427130048]
2293[re-enable time package on Windows
2294simonmar@microsoft.com**20060606124656]
2295[fix a case of "naughty I386 byte reg"
2296Simon Marlow <simonmar@microsoft.com>**20060606112357
2297 The fix is a little hacky, because we don't have support for register
2298 classes in general, but it's an improvement.
2299]
2300[A better icon for GHCi
2301Neil Mitchell <http://www.cs.york.ac.uk/~ndm/>**20060602145913]
2302[markSignalHandlers(): implementation was unnecessary, and had a bug
2303simonmar@microsoft.com**20060606085805
2304 
2305 There's no need to mark the signal handler here, because it is stored
2306 in a StablePtr and hence is a root anyway.  Furthermore, the call to
2307 evac() was passing the address of a local variable, which turned out
2308 to be harmless for copying GC, but fatal for compacting GC: compacting
2309 GC assumes that the addresses of the roots are the same each time.
2310 
2311 Fixes: possibly #783, possibly #776, definitely #787
2312]
2313[disable time package on mingw to unblock builds.
2314sof@galois.com**20060605165125]
2315[Remove one more IfaceInlineCall
2316simonpj@microsoft.com**20060605154305]
2317[Remove InlinePlease and add inline function and RULE
2318simonpj@microsoft.com**20060605114900
2319 
2320 For a long time GHC has had some internal mechanism designed to support
2321 a call-site inline directive, thus
2322        inline f xs
2323 makes f be inlined at the call site even if f is big.
2324 
2325 However, the surface syntax seems to have gone, and in any case it
2326 can be done more neatly using a RULE.
2327 
2328 This commit:
2329   * Removes the InlineCall constructor for Note
2330     and InlinePlease for SimplCont
2331 
2332   * Adds a new known-key Id called 'inline', whose definition in
2333     GHC.Base is just the identity function
2334 
2335   * Adds a built-in RULE in PrelRules that rewrites (inline f) to
2336     the body of f, if possible
2337 
2338   * Adds documentation
2339 
2340 NOTE: I have not tested this (aeroplane work).  Give it a try!
2341 
2342]
2343[Fix typo
2344simonpj@microsoft.com**20060605114719]
2345[fix type of allocateExec
2346Simon Marlow <simonmar@microsoft.com>**20060601125406]
2347[stgMallocBytesRWX --> allocateExec
2348Simon Marlow <simonmar@microsoft.com>**20060601123314]
2349[fix non-Windows build
2350Simon Marlow <simonmar@microsoft.com>**20060601121435]
2351[Win32: set up the console code pages
2352simonmar@microsoft.com**20060601115423
2353 This may help with entering non-ASCII characters at the GHCi prompt,
2354 but as usual with Unicode there's no simple solution that just works.
2355 See commentary in InteractiveUI.hs for more details.
2356]
2357[add a type signature
2358simonmar@microsoft.com**20060601115335]
2359[improvements to lexical error reporting
2360simonmar@microsoft.com**20060601115306]
2361[commented-out debugging code
2362simonmar@microsoft.com**20060601115247]
2363[understand Latin-1 symbols
2364simonmar@microsoft.com**20060601115149]
2365[stgMallocBytesRWX --> allocateExec
2366Simon Marlow <simonmar@microsoft.com>**20060531091202
2367 Not sure how I left this out of the previous patch, oh well.
2368]
2369['time' depends on 'Win32' when Windows=YES; mirror that
2370sof@galois.com**20060530223009
2371 when setting up SUBDIRS.
2372]
2373[Win32: add _imp__tzname
2374simonmar@microsoft.com**20060530101452]
2375[fix Win32 build
2376simonmar@microsoft.com**20060530101418]
2377[replace stgMallocBytesRWX() with our own allocator
2378Simon Marlow <simonmar@microsoft.com>**20060530100211
2379 
2380 See bug #738
2381 
2382 Allocating executable memory is getting more difficult these days.  In
2383 particular, the default SELinux policy on Fedora Core 5 disallows
2384 making the heap (i.e. malloc()'d memory) executable, although it does
2385 apparently allow mmap()'ing anonymous executable memory by default.
2386 
2387 Previously, stgMallocBytesRWX() used malloc() underneath, and then
2388 tried to make the page holding the memory executable.  This was rather
2389 hacky and fails with Fedora Core 5. 
2390 
2391 This patch adds a mini-allocator for executable memory, based on the
2392 block allocator.  We grab page-sized blocks and make them executable,
2393 then allocate small objects from the page.  There's a simple free
2394 function, that will free whole pages back to the system when they are
2395 empty.
2396 
2397]
2398[add time subdir
2399Simon Marlow <simonmar@microsoft.com>**20060530070721]
2400[Make rule-matching robust to lets
2401simonpj@microsoft.com**20060525154447
2402 
2403 Consider a RULE like
2404        forall arr. splitD (joinD arr) = arr
2405 
2406 Until now, this rule would not match code of form
2407        splitD (let { d = ... } in joinD (...d...))
2408 because the 'let' got in the way.
2409 
2410 This patch makes the rule-matcher robust to lets.  See comments with
2411 the Let case of Rules.match.
2412 
2413 This improvement is highly desirable in the fusion rules for NDP
2414 stuff that Roman is working on, where we are doing fusion of *overloaded*
2415 functions (which may look lazy).  The let expression that Roman tripped
2416 up on was a dictioary binding.
2417 
2418]
2419[Improve error reporting in interface typechecking
2420simonpj@microsoft.com**20060525094545]
2421[Fix egregious and long-standing tidying bug
2422simonpj@microsoft.com**20060525094300
2423 
2424 A typo in tidyAlt meant that we could get shadowing of occurrence names
2425 in the output of tidying.  (Specifically, of existentially bound type
2426 variables.)  That in turn meant that an IfaceExpr could have shadowing, so
2427 when the IfaceExpr was read in, it meant something different.
2428 That in turn led to an obscure crash like:
2429        Panic: tcIfaceTyVar
2430 
2431 Anyway, this fixes it.  MERGE into 6.4.3.
2432 
2433 
2434]
2435[Prune imports
2436simonpj@microsoft.com**20060525094251]
2437[performGC_(): don't use the existing Task, always grab a new one
2438Simon Marlow <simonmar@microsoft.com>**20060525090035]
2439[Better control of the IO manager thread; improvements to deadlock checking
2440Simon Marlow <simonmar@microsoft.com>**20060524122839
2441     
2442 In the threaded RTS on *nix platforms:
2443     
2444  - we now start the IO manager thread eagerly at startup time
2445    (previously was started on demand).
2446 
2447  - we now ask the IO manager thread to stop at shutdown
2448     
2449  - In Timer.c:handle_tick, if it looks like we might be in a
2450    deadlock, instead of calling prodOneCapability() which was known to be
2451    wrong, we now send a byte down the IO manager's pipe to wake it up.
2452   
2453 This also avoids a case of double-acquisition of a mutex, which
2454 happened if prodOneCapability() was called while the current thread
2455 was holding a mutex.
2456]
2457[TARGET_OS ==> HOST_OS
2458Simon Marlow <simonmar@microsoft.com>**20060524122103]
2459[fix a _TARGET_ARCH that should be _HOST_ARCH
2460Simon Marlow <simonmar@microsoft.com>**20060524122022]
2461[we don't need OutOfHeapHook(), and the version in the RTS has a better message
2462Simon Marlow <simonmar@microsoft.com>**20060524112007]
2463[Bug-fix to patch "Run simplifier before SpecConstr"
2464simonpj@microsoft.com**20060523130022]
2465[Run simplifier before SpecConstr
2466simonpj@microsoft.com**20060523085546
2467 
2468 Arrange to run the simplifier before SpecConstr, to (almost entirely)
2469 eliminate shadowing.
2470 
2471 Reason: otherwise SpecConstr can generate a RULE that never
2472 files; and LiberateCase specifically *does* generate lots of shadowing.
2473 
2474 See Note [Shadowing] in SpecConstr.lhs
2475 
2476 
2477]
2478[Prune imports
2479simonpj@microsoft.com**20060522192532]
2480[Add deShadowBinds
2481simonpj@microsoft.com**20060522192404
2482 
2483 Add CoreSubst.deShadowBinds, which removes shadowing from
2484 a Core term.  I thought we wanted it for SpecConstr, but in
2485 fact decided not to use it. Nevertheless, it's a useful sort
2486 of function to have around, and it has a particularly simple
2487 definition!
2488 
2489]
2490[Inline in a call argument if the caller has RULES
2491simonpj@microsoft.com**20060522163255
2492 
2493 This is an experimental change suggested by Roman.  Consider
2494       
2495        {-# INLINE f #-}
2496        f x y = ...
2497 
2498        ....(g (f a b))...
2499 
2500 where g has RULES.  Then we'd like to inline f, even though the context of
2501 the call is otherwise 100% boring -- g is lazy and we know nothing about
2502 x and y.
2503 
2504 This patch just records in the continuation that f has rules.  And does so
2505 somewhat recursively...e.g.
2506 
2507        ...(g (h (f a b)))...
2508 
2509 where g has rules. 
2510 
2511 
2512]
2513[Add idHasRules
2514simonpj@microsoft.com**20060522163109
2515 
2516 Add Id.idHasRules :: Id -> Bool, with the obvious semantics.
2517 This patch makes sense by itself, but it's just a tidy-up.
2518 
2519 
2520]
2521[Transmit inline pragmas faithfully
2522simonpj@microsoft.com**20060522110256
2523 
2524 *** WARNING: you will need to recompile your libraries
2525 ***         when you pull this patch (make clean; make)
2526 
2527 The inline pragma on wrapper-functions was being lost; this patch
2528 makes it be transmitted faithfully.
2529 
2530 The reason is that we don't write the full inlining for a wrapper into
2531 an interface file, because it's generated algorithmically from its strictness
2532 info.  But previously the inline pragma as being written out only when we
2533 wrote out an unfolding, and hence it was lost for a wrapper.
2534 
2535 This makes a particular difference when a function has a NOINLINE[k] pragma.
2536 Then it may be w/w'd, and we must retain the pragma.  It's the only consistent
2537 thing to do really.
2538 
2539 The change does change the binary format of interface files, slightly.
2540 So you need to recompile all your libraries.
2541 
2542]
2543[Improved RULE lhs typechecking; less dictionary sharing
2544simonpj@microsoft.com**20060519103433
2545 
2546 See long comment with Simplify.tcSimplifyRuleLhs.
2547 
2548 Here's the key example:
2549 
2550   RULE "g"  forall x y z. g (x == y) (y == z) = ...
2551 
2552 Here, the two dictionaries are *identical*, but we do NOT WANT to
2553 generate the rule
2554 
2555 RULE   forall x::a, y::a, z::a, d1::Eq a
2556          f ((==) d1 x y) ((>) d1 y z) = ...
2557 
2558 Instead we want
2559 
2560 RULE   forall x::a, y::a, z::a, d1::Eq a, d2:Eq a
2561          f ((==) d1 x y) ((>) d2 y z) = ...
2562 
2563]
2564[Bug-fix for infix function definitions (parse/rename)
2565simonpj@microsoft.com**20060519095022
2566   
2567 Fix a crash provoked by
2568 
2569        x `op` y = x
2570        op       = True
2571 
2572 The trouble was that there is currently a single 'infix' flag for the
2573 whole group; and RnTypes.checkPrecMatch was therefore expecting the
2574 second eqn to have two args.
2575 
2576 This fixes the crash, and also or-s the infix flags for the various
2577 eqns together; previously it was just taken from the first eqn, which
2578 was wrong.
2579 
2580 
2581]
2582[Remove misleading comments
2583simonpj@microsoft.com**20060519094936]
2584[Fix a nasty continuation-duplication bug
2585simonpj@microsoft.com**20060518163617
2586 
2587 For a long-time mkDupableCont has had a bug that allows it to duplicate
2588 an arbitrary continuation, which it should not do, of course.
2589 
2590 The bug was that in the Select case of mkDupableCont we were calling
2591 prepareCaseCont, which did not duplicate the continuation if there is
2592 but a single alternative.  This is quite right in the case of the call
2593 in rebuildCase, but quite wrong in mkDupableCont.
2594 
2595 The bug manifest as follows. In the expression
2596        f (case ... of { ..several alts.. })
2597 (when f is strict), we should transform to
2598        f (...transformed arg...)
2599 The application of f should not be pushed down (see notes with the
2600 ArgOf case of mkDupableCont.  But that was not happening in an example
2601 like this (see how the call to f is pushed inwards).
2602 
2603 f (a `div` abs (b::Int))
2604        --->
2605     case b_afT of wild_aHa { GHC.Base.I# x_aHc ->
2606     let {
2607       $j_sIe :: GHC.Prim.Int# -> GHC.Base.Int
2608       []
2609       $j_sIe =
2610        \ (ds1_aHr [Nothing OneShot] :: GHC.Prim.Int#) ->
2611          Foo7.f
2612            (case ds1_aHr of ds2_aHq {
2613               __DEFAULT ->
2614                 case a_afS of wild1_aHM { GHC.Base.I# x_aHO ->
2615                 GHC.Base.I# (GHC.Base.divInt# x_aHO ds2_aHq)
2616                 };
2617               0 -> GHC.Err.divZeroError @ GHC.Base.Int
2618             })
2619     } in
2620       case GHC.Prim.>=# x_aHc 0 of wild1_aHe [Dead Nothing] {
2621        GHC.Base.False ->
2622          let {
2623            ds1_aHr :: GHC.Prim.Int#
2624            []
2625            ds1_aHr = GHC.Prim.negateInt# x_aHc
2626          } in  $j_sIe ds1_aHr;
2627        GHC.Base.True -> $j_sIe x_aHc
2628       }
2629     }
2630 
2631 
2632]
2633[Make simplifier report which phase it is doing in -ddump output
2634simonpj@microsoft.com**20060518163448]
2635[Comments only
2636simonpj@microsoft.com**20060518163425]
2637[take parsec out of $(GhcBootLibs)
2638Simon Marlow <simonmar@microsoft.com>**20060518131506]
2639[Improve documentation of INLINE pragmas
2640simonpj@microsoft.com**20060518113212]
2641[a couple of additions
2642Simon Marlow <simonmar@microsoft.com>**20060518104025]
2643[#define _REENTRANT 1   (needed to get the right errno on some OSs)
2644Simon Marlow <simonmar@microsoft.com>**20060518103715
2645 Partial fix for hanging problems on Solaris and possibly *BSD.
2646 A similar fix is also required to libraries/base/includes/HsBase.h.
2647]
2648[Declare this file to be POSIX
2649Simon Marlow <simonmar@microsoft.com>**20060518102858
2650 This is simpler than using _POSIX_THREAD_SEMANTICS on Solaris to get
2651 the right version of ctime_r().
2652]
2653[somewhere to keep track of release notes for 6.6
2654Simon Marlow <simonmar@microsoft.com>**20060518074415]
2655[Newtype data constructors get a compulsory unfolding
2656simonpj@microsoft.com**20060517155009
2657 
2658 With this change, newtype data constructors get a "compulsory" unfolding,
2659 which means that they *must* be inlined, and no top-level definition of
2660 the constructor is provided at all.  Since these constructors are no-ops,
2661 I'm not sure why this wasn't the case all along.
2662 
2663]
2664[White space only
2665simonpj@microsoft.com**20060517154936]
2666[Retain InlinePragInfo on wrappers
2667simonpj@microsoft.com**20060517154725
2668 
2669 For some reason, when doing the worker/wrapper split, we transferred the
2670 InlinePragInfo from the original function, but expunging it from the wrapper.
2671 This meant, for example, that a NOINLINE function would have its wrapper
2672 inlined, which isn't sensible.
2673 
2674 For a change, fixing a bug involves only deleting code!
2675 
2676]
2677[Spelling correction
2678simonpj@microsoft.com**20060517154710]
2679[Retain INLINE pragma information during indirection-shorting
2680simonpj@microsoft.com**20060517154449
2681 
2682 During indirection-shorting, we were dropping the InlinePragInfo,
2683 although were were carefully retaining strictness info etc. 
2684 I think this is a long-standing bug.
2685 
2686]
2687[Improve pretty-printing
2688simonpj@microsoft.com**20060517154349]
2689[Comments only
2690simonpj@microsoft.com**20060517154304]
2691[Improve pretty-printing slightly
2692simonpj@microsoft.com**20060517154204]
2693[Let GHCi work with with Sparc32+/V8+ .o files
2694Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060516090430
2695 Currently the GHCi linker looks exclusively for V7 ABI .o files.
2696 
2697 You can generate V8+ ABI .o files using flags to gcc such as:
2698  -optc-mcpu=ultrasparc -opta-mcpu=ultrasparc
2699 
2700 Note that this allows gcc to generate hardware integer division and
2701 hardware floating point instructions rather than using software emulation.
2702 All recent sparc hardware is V8+ or later. Perhaps we should check for the
2703 cpu generation in configure and use the later ABI if possible.
2704 
2705 Tested briefly on a SunBlade 100 (TI UltraSparc IIe) sparc-unknown-linux
2706]
2707[match up more closely with compiler/main/DynFlags.hs:machdepCCOpts
2708Simon Marlow <simonmar@microsoft.com>**20060515090031
2709 In particular, add -fno-builtin to x86 and x86_64, which was missing.
2710]
2711[set $(GhcVersion) and $(GhcPatchLevel) correctly when $(UseStage1)==YES
2712Simon Marlow <simonmar@microsoft.com>**20060510124621]
2713[.raw_s and .s live in $(odir), not the source dir
2714Simon Marlow <simonmar@microsoft.com>**20060510121524]
2715[additions from Reilly Hayes
2716Simon Marlow <simonmar@microsoft.com>**20060510120000]
2717[some tweaks to the HC bootstrapping instructions
2718Simon Marlow <simonmar@microsoft.com>**20060510115236]
2719[Ignore unboxed values in breakpoints.
2720Lemmih <lemmih@gmail.com>**20060510072722]
2721[Don't read ~/.ghci on breakpoints.
2722Lemmih <lemmih@gmail.com>**20060509223455]
2723[make it possible to define an alias for :quit
2724Simon Marlow <simonmar@microsoft.com>**20060509083124]
2725[Do not put wired-in things in interface files
2726simonpj@microsoft.com**20060508142946
2727 
2728 There is no need for wired-in things to go into interface files; the compiler
2729 knows about them anyway.  Worse, it turns ou that if they are in an interface
2730 file, they may get read in with not-quite-right type info (e.g. GHC.Err.error),
2731 and the not-quite-right thing gets into the type envt.  Than it gets used
2732 instead of the wired in thing.
2733 
2734 Best all round never to put them into interface files.  This is the way
2735 it used to be, but it looks as if it rotted away some time ago.
2736 
2737 (I noticed this when fixing unsafePerformIO stuff, becuase 'lazy' was getting
2738 an unfolding when it shouldn't.)
2739 
2740]
2741[Remove NOINLINE strictness hack
2742simonpj@microsoft.com**20060508142834
2743 
2744 The stricteness analyser used to have a HACK which ensured that NOINLNE things
2745 were not strictness-analysed.  The reason was unsafePerformIO. Left to itself,
2746 the strictness analyser would discover this strictness for unsafePerformIO:
2747        unsafePerformIO:  C(U(AV))
2748 But then consider this sub-expression
2749        unsafePerformIO (\s -> let r = f x in
2750                               case writeIORef v r s of (# s1, _ #) ->
2751                               (# s1, r #)
2752 The strictness analyser will now find that r is sure to be eval'd,
2753 and may then hoist it out.  This makes tests/lib/should_run/memo002
2754 deadlock.
2755 
2756 Solving this by making all NOINLINE things have no strictness info is overkill.
2757 In particular, it's overkill for runST, which is perfectly respectable.
2758 Consider
2759        f x = runST (return x)
2760 This should be strict in x.
2761 
2762 So the new plan is to define unsafePerformIO using the 'lazy' combinator:
2763 
2764        unsafePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r)
2765 
2766 Remember, 'lazy' is a wired-in identity-function Id, of type a->a, which is
2767 magically NON-STRICT, and is inlined after strictness analysis.  So
2768 unsafePerformIO will look non-strict, and that's what we want.
2769 
2770 Now we don't need the hack in the strictness analyser.
2771 
2772]
2773[Trim imports
2774simonpj@microsoft.com**20060508141804]
2775[Trim imports
2776simonpj@microsoft.com**20060508141713]
2777[GHC_MANGLER-->MANGLER
2778Simon Marlow <simonmar@microsoft.com>**20060508111206]
2779[Fix bug #763: Breakpoint mechanism crashes when there's a type error.
2780Lemmih <lemmih@gmail.com>**20060505232158]
2781[breakpointCond
2782Lemmih <lemmih@gmail.com>**20060502174340]
2783[Preserve type variable names during type inference
2784simonpj@microsoft.com**20060505153753
2785 
2786 During unification we attempt to preserve the print-names of type variables,
2787 so that type error messages tend to mention type variables using the
2788 programmer's vocabulary. 
2789 
2790 This had bit-rotted a bit when I added impredicative polymorphism; especially
2791 when unBoxing a boxy type variable we should not gratuitously lose its name.
2792 
2793]
2794[Trim imports
2795simonpj@microsoft.com**20060505150506]
2796[fixup for new source tree layout
2797Simon Marlow <simonmar@microsoft.com>**20060505114100]
2798[FPTOOLS_TOP-->GHC_TOP, and remove some references to "fptools"
2799Simon Marlow <simonmar@microsoft.com>**20060505110520]
2800[$(FPTOOLS_TOP) is now known as $(GHC_TOP)
2801Simon Marlow <simonmar@microsoft.com>**20060505110127
2802 I kept $(FPTOOLS_TOP) as an alias for $(GHC_TOP) while we switch
2803]
2804[update the build system documentation
2805Simon Marlow <simonmar@microsoft.com>**20060505105843]
2806[update for new source tree layout
2807Simon Marlow <simonmar@microsoft.com>**20060505102903]
2808[partial update for new source tree layout
2809Simon Marlow <simonmar@microsoft.com>**20060505030218]
2810[update for new source tree layout (untested)
2811Simon Marlow <simonmar@microsoft.com>**20060505081549]
2812[Print a more helpful error for find_thing
2813simonpj@microsoft.com**20060504153337]
2814[Fix a bug in rule matching
2815simonpj@microsoft.com**20060504112430
2816 
2817 The rule matcher uses a "rough-match" pre-filter, which was being too
2818 aggressive.  The case looked like this:
2819 
2820        rule:   f True
2821        expr:   case e of x { True -> f x }
2822 
2823 Jues because x doesn't immediately look like True, we shouldn't say
2824 "can't match", but that is exactly what ruleCantMatch was doing.
2825 
2826 
2827]
2828[Fix constructor-specialisation bug
2829simonpj@microsoft.com**20060504112131
2830 
2831 The constructor-specialisation optimisation was not dealing with the case
2832 of
2833        (letrec ... in f) a1 a2
2834 
2835 We need to apply constructor specialisation in the letrec; previously
2836 we were leaving it untouched on the grounds that the function part of
2837 an application is almost always a variable.
2838 
2839 But in fact, float-in immediately precedes SpecConstr, so we can get
2840 these odd-looking applications.
2841 
2842 
2843]
2844[Fix precedence for records in derived Read
2845simonpj@microsoft.com**20060504111804
2846 
2847 The derived instance for Read of records wasn't quite right.
2848 Consider
2849        data T = T1 T | T2 { x::Int }
2850 
2851 The string "T1 T2 { x=2 }" should parse correctly as
2852        T1 (T2 {x=2})
2853 because of Haskell's odd precedence rules (record construction binds
2854 even more tightly than application), but the derived Read didn't take
2855 account of that.
2856 
2857 drvrun020 is the regression test
2858 
2859 
2860]
2861[Make rules available in RHS
2862simonpj@microsoft.com**20060504111500
2863 
2864 After some earlier re-factoring, the code that was carefully trying
2865 to make RULES available in a function's own RHS was plain wrong.
2866 
2867 This commit fixes it.  Some programs should go faster!
2868 
2869]
2870[Pretty printing instance for Unfolding
2871simonpj@microsoft.com**20060504111429]
2872[small clarification
2873Simon Marlow <simonmar@microsoft.com>**20060504103414]
2874[small fix to booting instructions from #762
2875Simon Marlow <simonmar@microsoft.com>**20060504083104]
2876[$(ProjectNameShort) => ghc
2877Simon Marlow <simonmar@microsoft.com>**20060503102419]
2878[only pass -fno-unit-at-a-time to gcc if it is supported
2879Simon Marlow <simonmar@microsoft.com>**20060503093614]
2880[Arrange that -fth is no longer implied by -fglasgow-exts
2881simonpj@microsoft.com**20060426182114
2882 
2883 Messages involving Template Haskell are deeply puzzling
2884 if you don't know about TH, so it seems better to make
2885 -fth an explicit flag.  It is no longer switched on
2886 by -fglasgow-exts.
2887 
2888]
2889[remove code not required in the new source tree layout
2890Simon Marlow <simonmar@microsoft.com>**20060502114235]
2891[move "compat" earlier in the build for .hc bootstrapping
2892Simon Marlow <simonmar@microsoft.com>**20060502112001]
2893[fix ctime_r problem on Solaris (I hope)
2894Simon Marlow <simonmar@microsoft.com>**20060502111231]
2895[fix whitespace problem that shows up on Solaris (x86)
2896Simon Marlow <simonmar@microsoft.com>**20060502110001]
2897[libraries/time is boring
2898Simon Marlow <simonmar@microsoft.com>**20060502105524]
2899[add time package to libraries Makefile
2900Ashley Yakeley <ashley@semantic.org>**20060501092241]
2901[add time package to default-packages
2902Ashley Yakeley <ashley@semantic.org>**20060426070445]
2903[Fix stage2 segfault on openbsd.
2904dons@cse.unsw.edu.au**20060428074811
2905 
2906 Somewhere along the 6.5 branch, gcc started compiling the rts such that
2907 it triggers the stack smash handler, causing stage2 to by kill'd
2908 immediately. This turns off the stack protector, which will do for now.
2909 
2910]
2911[fix quoting around ${FPTOOLS_TOP_ABS} (fixes #749)
2912Simon Marlow <simonmar@microsoft.com>**20060428085252]
2913[Fix bug shown in the mod77 test.
2914Lemmih <lemmih@gmail.com>**20060427113313]
2915[Don't init root pointers if they aren't gonna be used.
2916Lemmih <lemmih@gmail.com>**20060426111143]
2917[Fix recompilation checking.
2918Simon Marlow <simonmar@microsoft.com>**20060425140932
2919 One-shot compilation was throwing away the old iface read by
2920 checkOldIface, with the result that version numbers were never being
2921 incremented.  Fixes the recomp001 test too.
2922]
2923[Solaris needs -lrt for the threaded RTS
2924Simon Marlow <simonmar@microsoft.com>**20060425082823]
2925[fix problem with binary-dist docs
2926Simon Marlow <simonmar@microsoft.com>**20060424090159]
2927[Enable breakpoint support.
2928Lemmih <lemmih@gmail.com>**20060421113112]
2929[Fixing some lexer errors with extcore
2930Josef Svenningsson <josef.svenningsson@gmail.com>**20060420222625]
2931[Extcore can now handle data types without constructors
2932Josef Svenningsson <josef.svenningsson@gmail.com>**20060420213622]
2933[Comments only
2934Josef Svenningsson <josef.svenningsson@gmail.com>**20060420213555]
2935[Resurrect ProjectName
2936sven.panne@aedion.de**20060421085125]
2937[Remove the section on platform support, link to the wiki page
2938Simon Marlow <simonmar@microsoft.com>**20060420125555
2939 The section in the building guide was becoming out of date, a wiki
2940 page is much more likely to be kept fresh.
2941]
2942[Fix workaround for a GHC 6.4 bug
2943rl@cse.unsw.edu.au**20060420044223]
2944[hslibs is dead, Jim...
2945sven.panne@aedion.de**20060419144609]
2946[Synched .spec file with reality
2947sven.panne@aedion.de**20060419143138]
2948[Add .spec file to source distribution
2949sven.panne@aedion.de**20060419103725]
2950[remove paragraph about mutable objects that doesn't apply now
2951Simon Marlow <simonmar@microsoft.com>**20060419082038]
2952[HsBool should be HsInt, not StgBool
2953Simon Marlow <simonmar@microsoft.com>**20060418144214
2954 StgBool is mapped to C's int type.  GHC doesn't currently know the
2955 size of a C int on the target arch, it's easier to use StgInt instead.
2956 I guess nobody ever uses Bool arguments to foreign imports/exports.
2957]
2958[handle Bool arg to foreign import "wrapper"
2959Simon Marlow <simonmar@microsoft.com>**20060418143936
2960 Fixes #746
2961]
2962[update commentry for foreign import "wrapper" handling
2963Simon Marlow <simonmar@microsoft.com>**20060418143714]
2964[remove vestiges of ByteArray and MutableByteArray, which are no more
2965Simon Marlow <simonmar@microsoft.com>**20060418143641]
2966[Comment only
2967simonpj@microsoft.com**20060418125624]
2968[Fix rank-validity testing
2969simonpj@microsoft.com**20060418125350
2970 
2971 GHC does not now do "hoisting" as it used to.  Instead, it allows
2972 foralls to the right of fuction arrows, as well as to the left.
2973 
2974 But the type-validity tester hadn't caught up.  This commit fixes
2975 it. The test is tc203.
2976 
2977 Incidentally, GHC still doesn't let you write
2978        forall a. Eq a => forall b. b -> b
2979 because we get a zillion reduce/reduce errors if we allow that.  I'm
2980 sure it's fixable.  But meanwhile you have to use an auxiliary type
2981 synonym, which is a bit stupid.
2982 
2983 
2984]
2985[Make the initial rdr and type scope available in the ghc-api.
2986Lemmih <lemmih@gmail.com>**20060418023606]
2987[Fix minor bug in Linker.withExtendedLinkEnv
2988Lemmih <lemmih@gmail.com>**20060418023518]
2989[Export 'insertSymbol' and 'insertStableSymbol'.
2990Lemmih <lemmih@gmail.com>**20060418021806
2991 
2992 'insertStableSymbol' is used for exporting closures that are affected by the GC.
2993 
2994]
2995[Allow $x, as well as $(x), at top level in TH
2996simonpj@microsoft.com**20060414121907
2997 
2998 Bulat pointed out that in Template Haskell
2999    $x
3000 is allowed instead of
3001    $(x)
3002 in expressions, but not at the top level of modules.
3003 
3004 This commit fixes the omission.  Now you can say
3005 
3006        f x = x
3007        $h
3008        data T = T
3009 
3010 and the $h will run Template Haskell just as you'd expect.
3011 
3012]
3013[Fix TH erorr recovery (test is TH_recover)
3014simonpj@microsoft.com**20060414120411]
3015[Comments only
3016simonpj@microsoft.com**20060414120359]
3017[Recover gracefully from a Template Haskell programmers error
3018simonpj@microsoft.com**20060414115831
3019 
3020 If a TH programmer uses a type constructor as a data constructor,
3021 GHC simply crashed.  This commit makes it report the error in a
3022 graceful way.
3023 
3024]
3025[Document newtype-unwrapping for IO in FFI
3026simonpj@microsoft.com**20060414105212]
3027[Cosmetics in SpecConstr
3028simonpj@microsoft.com**20060412152721
3029 
3030 SpecConstr currently uses substExpr for tiresome reasons to do with
3031 GADTs.  Unfortunately the substExpr generates some WARNINGS (when DEBUG)
3032 is on, because we aren't adding all the in-scope Ids to the in-scope
3033 set of the substitution.
3034 
3035 When we move to FC these substExprs will go away, so I'm not going to
3036 worry about this now.
3037 
3038]
3039[Improve pruning of case alternatives to account for GADTs
3040simonpj@microsoft.com**20060412152327
3041 
3042 Consider
3043 
3044   data T a where
3045     T1 :: T Int
3046     T2 :: T Bool
3047     T3 :: T Char
3048 
3049   f :: T Bool -> Int
3050   f x = case x of
3051          DEFAULT -> ...
3052          T2 -> 3
3053 
3054 Here the DEFAULT case covers multiple constructors (T1,T3), but none
3055 of them can match a scrutinee of type (T Bool).  So we can prune away
3056 the default case altogether.
3057 
3058 In implementing this, I re-factored this bit of the simplifier, elminiating
3059 prepareAlts from SimplUtils, and putting all the work into simplAlts in
3060 Simplify
3061 
3062 The proximate cause was a program written by Manuel using PArrays
3063 
3064]
3065[Fix a bug in optimising division to shift right
3066Simon Marlow <simonmar@microsoft.com>**20060412144247
3067 Division by an integral log2 can't be directly optimised to a shift
3068 right, because shift right behaves like a division that rounds to
3069 negative infinity, whereas we want one that rounds to zero.  Fix this
3070 by adding (divisor-1) to the dividend when it is negative before
3071 shifting.  We do this without jumps, generating very slightly worse
3072 code than gcc, which uses conditional moves on CPUs that support it.
3073]
3074[Omit lndir on Windows, as it used to be
3075simonpj@microsoft.com**20060411135334]
3076[remove a trace
3077Simon Marlow <simonmar@microsoft.com>**20060411131531]
3078[Allow IO to be wrapped in a newtype in foreign import/export
3079simonpj@microsoft.com**20060411120441
3080 
3081 Up to now, the silent unwrapping of newtypes in foreign import/export
3082 has been limited to data values.  But it's useful for the IO monad
3083 itself:
3084 
3085        newtype MyIO a = MIO (IO a)
3086 
3087        foreign import foo :: Int -> MyIO Int
3088 
3089 This patch allows the IO monad to be
3090 wrapped too. This applies to foreign import "dynamic" and "wrapper",
3091 thus
3092    foreign import "wrapper" foo :: MyIO () -> HisIO (FunPtr (MyIO ()))
3093 
3094 Warning: I did on the plane, and I'm no longer sure if its 100%
3095 complete, so needs more testing.  In particular the wrapper/dynamic bit.
3096 
3097]
3098[Improve newtype deriving
3099simonpj@microsoft.com**20060402215911
3100 
3101 Ross Paterson pointed out a useful generalisation of GHC's
3102 newtype-deriving mechanism.  This implements it.  The idea
3103 is to allow
3104        newtype Wrap m a = Wrap (m a) deriving (Monad, Eq)
3105 where the representation type doesn't start with a type
3106 constructor.
3107 
3108 Actually GHC already *did* implement this, but the eta-ok
3109 check in TcDeriv missed a case, so there was a lurking bug.
3110 
3111 This patches fixes the documentation too.  drvrun019 tests.
3112 
3113 
3114]
3115[add take to the list of functions deforestable
3116Simon Marlow <simonmar@microsoft.com>**20060411090131]
3117[avoid versionitis in Numeric.showHex (should fix tcrun007)
3118Simon Marlow <simonmar@microsoft.com>**20060411085009]
3119[add a note about full-laziness
3120Simon Marlow <simonmar@microsoft.com>**20060410093824]
3121[robustify the test for the top of the tree a little
3122Simon Marlow <simonmar@microsoft.com>**20060410082224]
3123[Make darcs-all work without a ghc toplevel directory
3124Josef Svenningsson <josef.svenningsson@gmail.com>**20060407161738]
3125[Fix typo in darcsall warning
3126Josef Svenningsson <josef.svenningsson@gmail.com>**20060407161335]
3127[fix source dists
3128Simon Marlow <simonmar@microsoft.com>**20060407150045]
3129[add a README for binary dists
3130Simon Marlow <simonmar@microsoft.com>**20060407143832]
3131[fix binary dists
3132Simon Marlow <simonmar@microsoft.com>**20060407143822]
3133[remove the last bits of the ghc/ subdir
3134Simon Marlow <simonmar@microsoft.com>**20060407085219]
3135[TAG 07.04.06
3136Lemmih <lemmih@gmail.com>**20060407130411]
3137Patch bundle hash:
313894d3b2e87a89c9eda3754947a071ee5c4d79add5