Ticket #711: rts.dpatch

File rts.dpatch, 197.3 KB (added by thoughtpolice, 9 years ago)

patch to fix bug on unix

1Fri Mar 20 07:49:57 CDT 2009  Austin Seipp <mad.one@gmail.com>
2  * FIX #711 implement osFreeAllMBlocks for unix
4New patches:
6[FIX #711 implement osFreeAllMBlocks for unix
7Austin Seipp <mad.one@gmail.com>**20090320124957
8 Ignore-this: ab5bf7b84bc4a81c3492bd913931332a
9] {
10hunk ./rts/posix/OSMem.c 15
11 #include "Rts.h"
12 #include "OSMem.h"
13 #include "RtsFlags.h"
14+#include "RtsUtils.h"
16 #ifdef HAVE_UNISTD_H
17 #include <unistd.h>
18hunk ./rts/posix/OSMem.c 40
19 #include <mach/vm_map.h>
20 #endif
22+/* keep track of maps returned by my_mmap */
23+typedef struct _map_rec {
24+    char* base;              /* base addr */
25+    int size;                /* map size */
26+    struct _map_rec* next; /* next pointer */
27+} map_rec;
30 static caddr_t next_request = 0;
31hunk ./rts/posix/OSMem.c 49
32+static map_rec* mmap_rec = NULL;
34 void osMemInit(void)
35 {
36hunk ./rts/posix/OSMem.c 190
37 {
38   caddr_t ret;
39   lnat size = MBLOCK_SIZE * (lnat)n;
41+  map_rec* rec;
43   if (next_request == 0) {
44       // use gen_map_mblocks the first time.
45       ret = gen_map_mblocks(size);
46hunk ./rts/posix/OSMem.c 212
47          ret = gen_map_mblocks(size);
48       }
49   }
51+  rec = (map_rec*)stgMallocBytes(sizeof(map_rec),"OSMem: osGetMBlocks");
52+  rec->size = size;
53+  rec->base = ret;
54+  rec->next = mmap_rec;
55+  mmap_rec = rec;
56   // Next time, we'll try to allocate right after the block we just got.
57   // ToDo: check that we haven't already grabbed the memory at next_request
58   next_request = ret + size;
59hunk ./rts/posix/OSMem.c 226
61 void osFreeAllMBlocks(void)
62 {
63-    /* XXX Do something here (bug #711) */
64+    map_rec* tmp  = mmap_rec;
65+    map_rec* next = NULL;
67+    for(; tmp!=NULL;) {
68+        if(munmap(tmp->base,tmp->size))
69+            barf("osFreeAllMBlocks: munmap failed!");
71+        next = tmp->next;
72+        stgFree(tmp);
73+        tmp = next;
74+    }
75 }
77 lnat getPageSize (void)
82[check for ThreadRelocated in checkBlackHoles()
83Simon Marlow <marlowsd@gmail.com>**20090326140343
84 Ignore-this: 5d63f26567030cf0ccfa33da82702f86
86[syb no longer needs to be wired in
87Ian Lynagh <igloo@earth.li>**20090326130517]
88[Template Haskell: added bang patterns
89Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090326100208
90 Ignore-this: f15890cd7ee7fee664af342796780443
92[Template Haskell: support for kind annotations
93Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090326085520
94 Ignore-this: 722c23eac614089d24a8e8373a13de3b
96[update list of C math functions
97Bertram Felgenhauer <int-e@gmx.de>**20090323183630
98 Ignore-this: af5fa15d957d853d27a0c4b465c2419e
99 Fix via C compilation of modules that import, say, log1p from math.h (#3117)
101 The list is based on preprocessing Stg.h with glibc 2.6.1 headers, and
102 cross-checked with the ISO C 99 standard (draft).
104[Template Haskell: make reify aware of type families
105Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090325033447
106 Ignore-this: 4b9c2d626e7c506a74331bb91d0fcff7
107 - Reifying a type family returns a TH family declaration
108 - Reifying a data constructor from a data instance attributes that
109   constructor to the family (not the representation tycon)
110 - Ideally, we should have facilities to reify all type/data instances of a
111   given family (and the same for instances of a class).  I haven't added that
112   here as it involves some API design.
114[Template Haskell: support for INLINE and SPECIALISE pragmas
115Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090324232940
116 Ignore-this: 1f6c2e0de01842da7c9384d3ccafcb63
118[fix an fprintf that should be fputs (quiets gcc)
119Simon Marlow <marlowsd@gmail.com>**20090322195441]
120[check return value of write (quiets gcc)
121Simon Marlow <marlowsd@gmail.com>**20090322195319]
122[Fix locking in evacuate_large() (FIX openfile008(threaded2))
123Simon Marlow <marlowsd@gmail.com>**20090323092953
124 Ignore-this: 2c6c2790676c3bcd40f0a0b6030d31dc
126[Work around Solaris's grep not supporting -q
127Ian Lynagh <igloo@earth.li>**20090319171501]
128[Some wording wibbles from Thorkil
129Ian Lynagh <igloo@earth.li>**20090319165916]
130[Please the -Wall police by moving a variable declaration; really FIX getNumberOfProcessors() for MacOS X
131Austin Seipp <mad.one@gmail.com>**20090320124846
132 Ignore-this: fcd0015e0923855df814f55d88770db2
134[wibble in setExecutable
135Austin Seipp <mad.one@gmail.com>**20090320120043
136 Ignore-this: 968aa9856a5494e4e58ca8a20106298f
138[Fix bug in setThreadAffinity() (Linux)
139Simon Marlow <marlowsd@gmail.com>**20090320100446
140 Ignore-this: 6e8b430fe03959f7e7f8c641d5a589f6
142[Implement setThreadAffinity for Mac OS X (from 10.5)
143Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090320071347
144 Ignore-this: d5e2104b4a011fc98500527741c5e7a7
146[Fix warnings with older versions of gcc (3.4.5)
147Simon Marlow <marlowsd@gmail.com>**20090319124932]
148[wibble for getNumberOfProcessors
149Simon Marlow <marlowsd@gmail.com>**20090318165936
150 Ignore-this: 60a776b8250590f72e45c941b810f14a
152[Set thread affinity with +RTS -qa (only on Linux so far)
153Simon Marlow <marlowsd@gmail.com>**20090318154719
154 Ignore-this: a799d276f29dd24c655e1f423eb6743e
156[Template Haskell support for equality constraints
157Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090319132347
158 Ignore-this: 2a0150d9466b0552c5094cdcdc08dbe5
160[add missing case in ENTER() (fixes readwrite002(profasm) crash)
161Simon Marlow <marlowsd@gmail.com>**20090319102126
162 Ignore-this: 5599d4df888e830a8865e57e6745e094
164[FIX unregisterised build
165Simon Marlow <marlowsd@gmail.com>**20090319100954
166 Ignore-this: 97f15b77b030f1f26b0827e6335a8251
168[Template Haskell: support for type family declarations
169Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090319084306
170 Ignore-this: b9f5f5af61a5da53dc4326f380fdb72e
172[Comment explaining use of seq in DFMonad
174[FIX unregisterised target by #ifdefing targetPlatform stuff
175Simon Marlow <marlowsd@gmail.com>**20090318151255
176 Ignore-this: 916b3929d0edcd18951591a35e0cc99
177 I'm not sure if this is the correct fix.  If targetPlatform is really
178 NCG-specific, then maybe we should call it asmTargetPlatform or
179 something.
181[Removed a trace
183[Calling convention bug and cleanup
185 - yet another wrong calling convention; this one was a special case for returning one
186   value.
188[Inconsistent type and arguments in safe foreign calls...
190 - The function argument was stripped from the argument list but not from the type.
191   Now they're both stripped.
193[stack overflows and out of memory's
195 1. Stack overflow fixed by making dataflow monad strict in the state.
196 2. Out of memory fixed by "forgetting" lastoutfacts in the dataflow monad
197    where we should. We were creating an unnecessarily long list that grew
198    exponentially...
200[Add the notion of "constructor-like" Ids for rule-matching
202 Ignore-this: 9249b00a2292563e68d5d715376b216c
204 This patch adds an optional CONLIKE modifier to INLINE/NOINLINE pragmas,
205    {-# NOINLINE CONLIKE [1] f #-}
206 The effect is to allow applications of 'f' to be expanded in a potential
207 rule match.  Example
208   {-# RULE "r/f" forall v. r (f v) = f (v+1) #-}
210 Consider the term
211      let x = f v in ..x...x...(r x)...
212 Normally the (r x) would not match the rule, because GHC would be scared
213 about duplicating the redex (f v). However the CONLIKE modifier says to
214 treat 'f' like a constructor in this situation, and "look through" the
215 unfolding for x.  So (r x) fires, yielding (f (v+1)).
217 The main changes are:
218   - Syntax
220   - The inlinePragInfo field of an IdInfo has a RuleMatchInfo
221     component, which records whether or not the Id is CONLIKE.
222     Of course, this needs to be serialised in interface files too.
224   - The occurrence analyser (OccAnal) and simplifier (Simplify) treat
225     CONLIKE thing like constructors, by ANF-ing them
227   - New function coreUtils.exprIsExpandable is like exprIsCheap, but
228     additionally spots applications of CONLIKE functions
230   - A CoreUnfolding has a field that caches exprIsExpandable
232   - The rule matcher consults this field.  See
233     Note [Expanding variables] in Rules.lhs.
235 On the way I fixed a lurking variable bug in the way variables are
236 expanded.  See Note [Do not expand locally-bound variables] in
237 Rule.lhs.  I also did a bit of reformatting and refactoring in
238 Rules.lhs, so the module has more lines changed than are really
239 different.
242[Fixes to "Retract Hp *before* checking for HpLim==0"
243Simon Marlow <marlowsd@gmail.com>**20090318111847
244 Ignore-this: 154a41eeb18a775465db29c818d1ec3a
246[Add fast event logging
247Simon Marlow <marlowsd@gmail.com>**20090317164214
248 Ignore-this: c470164a5e66dca06fddc2fe172025de
250 Generate binary log files from the RTS containing a log of runtime
251 events with timestamps.  The log file can be visualised in various
252 ways, for investigating runtime behaviour and debugging performance
253 problems.  See for example the forthcoming ThreadScope viewer.
255 New GHC option:
257   -eventlog   (link-time option) Enables event logging.
259   +RTS -l     (runtime option) Generates <prog>.eventlog with
260               the binary event information.
262 This replaces some of the tracing machinery we already had in the RTS:
263 e.g. +RTS -vg  for GC tracing (we should do this using the new event
264 logging instead).
266 Event logging has almost no runtime cost when it isn't enabled, though
267 in the future we might add more fine-grained events and this might
268 change; hence having a link-time option and compiling a separate
269 version of the RTS for event logging.  There's a small runtime cost
270 for enabling event-logging, for most programs it shouldn't make much
271 difference.
273 (Todo: docs)
275[FIX getNumberOfProcessors() on MacOS X
276Austin Seipp <mad.one@gmail.com>**20090318023127
277 Ignore-this: 8df07f3353a8e12be9becf4b855d5fdf
279 This checks if darwin_HOST_OS is defined and, if so, we call
280 sysctlbyname() on the "hw.ncpu" property to get the processor count.
282[FIX biographical profiling (#3039, probably #2297)
283Simon Marlow <marlowsd@gmail.com>**20090317144939
284 Ignore-this: 3b1d53fdf0f99c04e7d0055534baf52f
285 Since we introduced pointer tagging, we no longer always enter a
286 closure to evaluate it.  However, the biographical profiler relies on
287 closures being entered in order to mark them as "used", so we were
288 getting spurious amounts of data attributed to VOID.  It turns out
289 there are various places that need to be fixed, and I think at least
290 one of them was also wrong before pointer tagging (CgCon.cgReturnDataCon).
292[Add getNumberOfProcessors(), FIX MacOS X build problem (hopefully)
293Simon Marlow <marlowsd@gmail.com>**20090317093309
294 Ignore-this: 3de51351864f7276f3f887cca5385294
295 Somebody needs to implement getNumberOfProcessors() for MacOS X,
296 currently it will return 1.
298[FIX #3093: stub filenames when using -osuf
299Simon Marlow <marlowsd@gmail.com>**20090316203437
300 Ignore-this: 999de35952804c760462ae32cfdd04d5
301 Also remove some unused cruft
303[Don't call processHeapClosureForDead on pinned blocks
304Simon Marlow <marlowsd@gmail.com>**20090316160534
305 Ignore-this: 33a60e4ce78db6cc5bab399ec673ad0a
306 Fixes heapprof001(prof_hp) after fix for #2917
308[Retract Hp *before* checking for HpLim==0
309Simon Marlow <marlowsd@gmail.com>**20090316160500
310 Ignore-this: f8fdb26c724f766cfae016321be101c4
311 Fixes heapprof001(prof_hp) following the recent HpLim patch, which
312 depended on the lack of slop in the heap.
314[eliminate some not-quite-duplicate code
315Simon Marlow <marlowsd@gmail.com>**20090313155619
316 Ignore-this: 2edadf2f966bf37868b355da1faa211c
318[start finalizers on the current Capability rather than last_free_capability
319Simon Marlow <marlowsd@gmail.com>**20090313155602
320 Ignore-this: b3e7bc2a7966cd5778e55a0e5dc83553
322[cope with ThreadRelocated on the sleeping_queue
323Simon Marlow <marlowsd@gmail.com>**20090217132757
324 Ignore-this: 6b73d2b2e4142d7db4e7db4570f644ff
326[Fix Trac #3095, and make RdrHsSyn warning-clean
328 Ignore-this: db47522307c92d93e0037143dee74375
330[Layout only
332 Ignore-this: af7c9018e873b1618bfe4a2f3102a0c7
334[Reject foralls in constructor args in 'deriving', except for Functor etc
336 Ignore-this: 2538aee2634fb587d74a8dc1a064cb5b
338[Fix Trac #3092
340 Ignore-this: 9502fdd84b7b1849f6c37afe12d46d64
342 We were't checking that a 'data/type instance' was extending a family
343 type constructor.
345 Merge to 6.10 if we ever release 6.10.3 (or do it for 6.10.2).
349[Ensure the orientation of var-var equalities is correct for instatiation
350Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090315065709
351 Ignore-this: 95cf805dde74e0b9ff36a7fe7556ed1a
352 - During fianlisation we use to occasionally swivel variable-variable equalities
353 - Now, normalisation ensures that they are always oriented as appropriate for
354   instantation.
355 - Also fixed #1899 properly; the previous fix fixed a symptom, not the cause.
357[Use work-stealing for load-balancing in the GC
358Simon Marlow <marlowsd@gmail.com>**20090313135116
359 Ignore-this: d05027217c516de3d75f4d1844c860fd
361 New flag: "+RTS -qb" disables load-balancing in the parallel GC
362 (though this is subject to change, I think we will probably want to do
363 something more automatic before releasing this).
365 To get the "PARGC3" configuration described in the "Runtime support
366 for Multicore Haskell" paper, use "+RTS -qg0 -qb -RTS".
368 The main advantage of this is that it allows us to easily disable
369 load-balancing altogether, which turns out to be important in parallel
370 programs.  Maintaining locality is sometimes more important that
371 spreading the work out in parallel GC.  There is a side benefit in
372 that the parallel GC should have improved locality even when
373 load-balancing, because each processor prefers to take work from its
374 own queue before stealing from others.
376[Fix Trac #3087: derived Data now defines dataCast1/2
378 Ignore-this: df43405a2ef5adef20f9eb3675e7411f
380 This patch generates code in deriving(Data) for dataCast1 or 2 as
381 appropriate.
383 While I was there I did some refactoring (of course), pulling out
384 the TcDeriv.inferConstraints as a separate function.
386 I don't think it's worth merging this to 6.10.2, even though it's a bugfix,
387 because it modifies code that I added in the HEAD only (for deriving Functor)
388 so the merge will be sligtly awkward.  And there's an easy workaround.
391[Adjust error message slightly to make it clearer
393 Ignore-this: 46b0abb88c1fe11cd4ff059955b81561
395[just comment formatting
396Simon Marlow <marlowsd@gmail.com>**20090313132339
397 Ignore-this: f53b0dca0896134dd704fc3aca3ea93f
399[Add "+RTS -N" to determine the -N value automatically (see #1741)
400Simon Marlow <marlowsd@gmail.com>**20090313114646
401 Ignore-this: b5dd21278e02f4a161093466ca97dce
403[tidy up "missing symbol" error message
404Simon Marlow <marlowsd@gmail.com>**20090313101334]
405[Fix sanity checking after fix to #2917
406Simon Marlow <marlowsd@gmail.com>**20090312093855]
407[Instead of a separate context-switch flag, set HpLim to zero
408Simon Marlow <marlowsd@gmail.com>**20090313104516
409 Ignore-this: 6c5bbe1ce2c5ef551efe98f288483b0
410 This reduces the latency between a context-switch being triggered and
411 the thread returning to the scheduler, which in turn should reduce the
412 cost of the GC barrier when there are many cores.
414 We still retain the old context_switch flag which is checked at the
415 end of each block of allocation.  The idea is that setting HpLim may
416 fail if the the target thread is modifying HpLim at the same time; the
417 context_switch flag is a fallback.  It also allows us to "context
418 switch soon" without forcing an immediate switch, which can be costly.
420[TAG 2009-03-13
421Ian Lynagh <igloo@earth.li>**20090313021251]
422[FIX #3079, dodgy parsing of LANGUAGE pragmas
423Simon Marlow <marlowsd@gmail.com>**20090312141103
424 Ignore-this: f490bd047421c8aff6c493e79178594e
425 I ended up rewriting this horrible bit of code, using (yikes) lazy I/O
426 to slurp in the source file a chunk at a time.  The old code tried to
427 read the file a chunk at a time, but failed with LANGUAGE pragmas
428 because the parser for LANGUAGE has state and the state wasn't being
429 saved between chunks.  We're still closing the Handle eagerly, so
430 there shouldn't be any problems here.
432[avoid a crash: don't return unless the run queue has some threads in it
433Simon Marlow <marlowsd@gmail.com>**20090311154559]
434[Allocate the right number of words in new*PinnedByteArrayzh_fast
435Ian Lynagh <igloo@earth.li>**20090311160615]
436[FIX #2816 (correct unicode output for :type/:kind)
437Simon Marlow <marlowsd@gmail.com>**20090311112311
438 Ignore-this: 7f6a7ac6e2fe4f4242df586ef2391506
439 This is just a hack, since we don't have correct unicode output for
440 Handles in general, I just fixed a couple of places where we were not
441 converting to UTF-8 for output.
443[Fix #2992: don't create a named event
444Simon Marlow <marlowsd@gmail.com>**20090311094208
445 Evidently I misread the docs for CreateEvent: if you pass a name to
446 CreateEvent, then it creates a single shared system-wide Event with
447 that name.  So all Haskell processes on the machine were sharing the
448 same Event object.  duh.
450[FIX #2832: Setting SplitObjs=NO doesn't disable -split-objs in GHC
451Simon Marlow <marlowsd@gmail.com>**20090311110058
452 Ignore-this: d5f55ecea5803c1ae745a03d051cfa3f
453 Now ghc --info reports whether-split-objs is supported, rather than
454 whether the libraries were built using -split-objs.
456[FIX #2976: fix buggy implementation of shadowing in GHC.getBindings
457Simon Marlow <marlowsd@gmail.com>**20090311102007
458 Ignore-this: b8320d35defa11b29632bd402a3eef4e
460[Don't put a trailing / on the mingw include path
461Ian Lynagh <igloo@earth.li>**20090310172242]
462[Fix a bug which sometimes caused extra major GCs to be performed
463Simon Marlow <marlowsd@gmail.com>**20090309140004
464 Ignore-this: 5127ff02153781823abb21fbb6f233f5
465 A long-running GC would cause the timer signal to declare the system
466 to be idle, which would cause a major GC immediately following the
467 current GC.  This only happened with +RTS -N2 or greater.
469[Redesign 64-bit HEAP_ALLOCED (FIX #2934 at the same time)
470Simon Marlow <marlowsd@gmail.com>**20090309121300
471 Ignore-this: 4018145c528e52995d1feb7636e34384
473 After much experimentation, I've found a formulation for HEAP_ALLOCED
474 that (a) improves performance, and (b) doesn't have any race
475 conditions when used concurrently.  GC performance on x86_64 should be
476 improved slightly.  See extensive comments in MBlock.h for the
477 details.
479[Partial fix for #2917
480Simon Marlow <marlowsd@gmail.com>**20090306100018
481 Ignore-this: d62309f9a2b682cc2b5ef0bb4376ea54
483  - add newAlignedPinnedByteArray# for allocating pinned BAs with
484    arbitrary alignment
486  - the old newPinnedByteArray# now aligns to 16 bytes
488 Foreign.alloca will use newAlignedPinnedByteArray#, and so might end
489 up wasting less space than before (we used to align to 8 by default).
490 Foreign.allocaBytes and Foreign.mallocForeignPtrBytes will get 16-byte
491 aligned memory, which is enough to avoid problems with SSE
492 instructions on x86, for example.
494 There was a bug in the old newPinnedByteArray#: it aligned to 8 bytes,
495 but would have failed if the header was not a multiple of 8
496 (fortunately it always was, even with profiling).  Also we
497 occasionally wasted some space unnecessarily due to alignment in
498 allocatePinned().
500 I haven't done anything about Foreign.malloc/mallocBytes, which will
501 give you the same alignment guarantees as malloc() (8 bytes on
502 Linux/x86 here).
504[Don't force HSCOLOUR_SRCS = YES when validating
505Ian Lynagh <igloo@earth.li>**20090308171633
506 This removes a burden from developers, and I can't remember an
507 occasion where it would have caught a regression.
509[Add CONTRACT to the pragmas that we recognise.
510Ian Lynagh <igloo@earth.li>**20090306194826
511 It's used by ESC/Haskell.
513[Generate lots of __inline_me during vectorisation
514Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090307135652]
515[Special-case desugaring of simple parallel array comprehensions
516Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090307134049]
517[Make LDV_FILL_SLOP use a forwards loop rather than a backwards loop
518Ian Lynagh <igloo@earth.li>**20090306155124]
519[Fix warning
520Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090306123645]
521[Try not to avoid vectorising purely scalar functions
522Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090306115508]
523[Package dph needs to be cleaned in stage=1, too
524Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090306031628
525 Ignore-this: b67f993abfbbe47c6bd417049955b9be
527[Add --version to runghc. Trac #2757.
528Ian Lynagh <igloo@earth.li>**20090305162045
529 We use the GHC version number, as the old runghc one doesn't seem very
530 useful.
532[add final newlines
533Simon Marlow <marlowsd@gmail.com>**20090305140014
534 My Windows build has started complaining about lacking final newlines,
535 I'm not entirely sure why.
537[remove foo.exe.manifest when --embed-manifest is on
538Simon Marlow <marlowsd@gmail.com>**20090305112726]
539[add --with-ld=c:/mingw/bin/ld
540Simon Marlow <marlowsd@gmail.com>**20090305112618]
541[Document -fwarn-unrecognised-pragmas; fixes trac #3031
542Ian Lynagh <igloo@earth.li>**20090305143128]
543[On OS X/x86, tell gcc to generate instructions for i686. Fixes trac #2983.
544Ian Lynagh <igloo@earth.li>**20090305142050
545 By default, gcc on OS X will generate SSE instructions, which need
546 things 16-byte aligned, but we don't 16-byte align things. Thus drop
547 back to generic i686 compatibility.
549[By default, only HsColour the docs if we find HsColour. Fixes trac #3004.
550Ian Lynagh <igloo@earth.li>**20090305132723
551 If you manually set HSCOLOUR_SRCS=YES then the build will fail if
552 HsColour wasn't found.
554[Make -fdicts-cheap cope with implication constraints
556 Ignore-this: 5fe66cc26e4dc6f233c73350cef7a110
558 See the Note [Dictionary-like types] in TcType for the full story here
559 Should only affect programs that use -fdicts-cheap, for
560 which you'll get better arities
563[Finally fix Trac #3066
565 Ignore-this: 8734c1799f854d9da6be76a9c134335e
567 This is a fix to
568   Tue Mar  3 17:42:58 GMT 2009  simonpj@microsoft.com
569     * Fix Trac #3066: checking argument types in foreign calls
570 which I embarassingly got wrong.
572 Have to be careful when expanding recursive newtypes.
574 Pls merge.
577[Fix a broken link. Spotted by Norman Ramsey in trac #3068.
578Ian Lynagh <igloo@earth.li>**20090304165351]
579[Fix spelling (Trac#3069)
581 Ignore-this: fee0f1d060c6c1c7a875943fe543c4fa
583[Layout only
585 Ignore-this: 4410b2b26227263b24fd5aa7d2144ea0
587[Fix a long-standing latent bug (and the build): check res_ty not sig_ty
589 Ignore-this: 3494ed3f342b63840eef791a5200695
591[Fix #3067: GHCi panics with 'initTc:LIE' while :stepping on code with funny types
592pepe iborra <mnislaih@gmail.com>**20090303193706
594 The problem is that calls to boxyUnify would panic if the types involved
595 contained type functions.
596 It looks like one should wrap these calls with getLIE, although I don't
597 really know what I am doing here
601[Fix Trac #3066: checking argument types in foreign calls
603 Ignore-this: c07b0df24b9965b190dc0e0797401c51
605 When checking argument types in a foreign call we were stupidly
606 looking through foralls.  The fix is easy.
608 Merge to 6.10.2
611[Fix Trac #3057 in deriving Functor
613 Ignore-this: 7d7783868e4684930f75c3b35c18c586
615 The universal type variables of a data constructor are not necessarily
616 identical to those of its parent type constructor, especially if the
617 data type is imported.
619 While I was at it, I did a significant refactoring to make all this
620 traversal of types more comprehensible, by adding the data type
621 FFoldType.
624[fix assertion failure with -debug non-threaded RTS (by deleting code!)
625Simon Marlow <marlowsd@gmail.com>**20090303143942
626 Ignore-this: 352f3c57979529f44ea92edbf1acbf07
628[improvements: generate LaTeX tables for more than one run
629Simon Marlow <marlowsd@gmail.com>**20090303141346
630 Ignore-this: 47588f0c4d046f2b5ff0dc7be38777c0
632[A few bug fixes; some improvements spurred by paper writing
634 Among others:
635 - Fixed Stg->C-- translation of let-no-escapes -- it's important to use the
636   right continuation...
637 - Fixed infinite recursion in X86 backend (shortcutJump mishandled infinite loops)
638 - Fixed yet another wrong calling convention -- primops take args only in vanilla regs,
639   but they may return results on the stack!
640 - Removed StackInfo from LGraph and Block -- now in LastCall and CmmZ
641 - Updated avail-variable and liveness code
644[Comments only
646 Ignore-this: 5c2a7c2a8116fb05e0e035baea9566fa
648[Filter out carriage returns in doc strings
649David Waern <david.waern@gmail.com>**20090228145351
651 We want the internal format to contain LFs only. This makes it easier to work
652 with the doc strings for clients of the GHC API.
654[z-encode digits at the start of a symbol name; fixes trac #2997
655Ian Lynagh <igloo@earth.li>**20090227180029
656 Digits already have a couple of meanings in z-encoding (Z3T is a tuple,
657 and z123U is a unicode character), so we encode digits as unicode
658 characters to avoid trying to squeeze in another meaning.
660 Also removed a little GHC < 6.2 compatibility hack.
662[Whitespace only
663Ian Lynagh <igloo@earth.li>**20090227163435]
664[Improve documentation of bang patterns
666 Ignore-this: fa7bf72db82a612d16d44a93f1537351
668[Use 'nonIOok' instead of 'True'; cosmetics only
670 Ignore-this: 80200cf3aec5abb95c6b23ef37fb590a
672[Tweak +RTS --info docs
673Ian Lynagh <igloo@earth.li>**20090227020758]
674[In +RTS --info output, use YES rather than Yes
675Ian Lynagh <igloo@earth.li>**20090227010230]
676[FIX #1891 (describe +RTS --info output in GHC user guide)
677Andrew Coppin <andrewcoppin@btinternet.com>**20090214150234]
678[If we are given -Werror, then pass -Werror to cpp
679Ian Lynagh <igloo@earth.li>**20090226001606]
680[Strip tag bits from closure pointers before trying to deference them.
682[SPARC NCG: Split out sanity checking into its own module
684[SPARC NCG: Add jumps to end of blocks when working out condition codes
686[SPARC NCG: Enforce the invariant that each block ends with a jump.
689  - If each basic block doesn't end with a jump then the register
690    liveness determinator will get the cross-block liveness info
691    wrong, resulting in a bad allocation.
693[Add targets clean.library.dph and remake.library.dph
694Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090224112037
695 Ignore-this: bc561099d9e32b6c7416bd60e5516733
696 - Package dph ist a meta package that contains a number of subpackages inside.
697 - This patch adds two targets to clean and remake all subpackages with a
698   single command.
700[:steplocal and :stepmodule should not polute trace history
701Peter Hercek <phercek@gmail.com>**20090222201002]
702[Do not print anything to stdout when stopping at a breakpoint with custom code attached
703Peter Hercek <phercek@gmail.com>**20090222195551
706[newPinnedByteArray#: align the result to 16-bytes (part of #2917)
707Simon Marlow <marlowsd@gmail.com>*-20090219103245
708 Ignore-this: 1aa4cd40aef9690760b3bf65e284efcb
710[Only use STAGE3_PACKAGE_CONF for building GHC itself
711Ian Lynagh <igloo@earth.li>**20090221151530
712 In particular, when building dph with the stage2 compiler, we want to
713 register it in the main package.conf.
715[Export blockUserSignals and unblockUserSignals (needed for #2870)
716Simon Marlow <marlowsd@gmail.com>**20090219113418
717 Ignore-this: b7c26c801e515c6848f1f8fca024198f
719[#2860: remove redundant unblocking of signals
720Simon Marlow <marlowsd@gmail.com>**20090219103258
721 Ignore-this: c603e23fbdc7f7f7de7fcd9a7aa28f0b
723[newPinnedByteArray#: align the result to 16-bytes (part of #2917)
724Simon Marlow <marlowsd@gmail.com>**20090219103245
725 Ignore-this: 1aa4cd40aef9690760b3bf65e284efcb
727[Rewrite of signal-handling (ghc patch; see also base and unix patches)
728Simon Marlow <marlowsd@gmail.com>**20090219103142
729 Ignore-this: aca7c3e258224fadc6f0f2fee86b2971
731 The API is the same (for now).  The new implementation has the
732 capability to define signal handlers that have access to the siginfo
733 of the signal (#592), but this functionality is not exposed in this
734 patch.
736 #2451 is the ticket for the new API.
738 The main purpose of bringing this in now is to fix race conditions in
739 the old signal handling code (#2858).  Later we can enable the new
740 API in the HEAD.
742 Implementation differences:
744  - More of the signal-handling is moved into Haskell.  We store the
745    table of signal handlers in an MVar, rather than having a table of
746    StablePtrs in the RTS.
748  - In the threaded RTS, the siginfo of the signal is passed down the
749    pipe to the IO manager thread, which manages the business of
750    starting up new signal handler threads.  In the non-threaded RTS,
751    the siginfo of caught signals is stored in the RTS, and the
752    scheduler starts new signal handler threads.
754[Fix an off-by-one; fixes the second bug in trac #3001
755Ian Lynagh <igloo@earth.li>**20090218235620]
756[Install libHSffi_p.a
757Ian Lynagh <igloo@earth.li>**20090218165913]
758[Fix ghc and ghci wrappers on Windows
759Ian Lynagh <igloo@earth.li>**20090218005034]
760[Make versioned ghc and ghci programs on Windows; fixes trac #2827
761Ian Lynagh <igloo@earth.li>**20090217215048]
762[SPARC NCG: Unsigned comparisons are unsigned
764[SPARC NCG: Fix word size conversions
766[SPARC NCG: Split up into chunks, and fix warnings.
768[SPARC NCG: Reorganise Reg and RegInfo
770[NCG: Cleanup old file
772[NCG: validate fixes for ppc-darwin
774[NCG: validate fixes for ghc-6.6
776[NCG: validate fixes for i386-darwin
778[NCG: validate fixes for x86_64-linux
780 Ignore-this: 1b81b402e6f7ef0c76656a15c3a9f139
782[NCG: Haddock validate fix
784[NCG: Validate fixes for x86-linux
786[SPARC NCG: Don't release top half of f6 and f8
788[NCG: Split up the native code generator into arch specific modules
791   - nativeGen/Instruction defines a type class for a generic
792     instruction set. Each of the instruction sets we have,
793     X86, PPC and SPARC are instances of it.
795   - The register alloctors use this type class when they need
796     info about a certain register or instruction, such as
797     regUsage, mkSpillInstr, mkJumpInstr, patchRegs..
799   - nativeGen/Platform defines some data types enumerating
800     the architectures and operating systems supported by the
801     native code generator.
803   - DynFlags now keeps track of the current build platform, and
804     the PositionIndependentCode module uses this to decide what
805     to do instead of relying of #ifdefs.
807   - It's not totally retargetable yet. Some info info about the
808     build target is still hardwired, but I've tried to contain
809     most of it to a single module, TargetRegs.
811   - Moved the SPILL and RELOAD instructions into LiveInstr.
813   - Reg and RegClass now have their own modules, and are shared
814     across all architectures.
816[SPARC NCG: Make linear allocator use info in SPARC.Regs again
818[SPARC NCG: Enumerate freeRegs / globalRegMaybe instead of using #ifdefery
820[NCG: Split PprMach into arch specific modules
822   - There are still some #ifdefs for choosing between i386, x86_64,
823       linux, darwin and other OS's.
824   - Also reformat SPARC.RegInfo to remove some of the visual noise.
826[Put RelaxedPolyRec in the cabal file rather than a pragma
827Ian Lynagh <igloo@earth.li>**20090213185635
828 This should fix the build with GHC 6.6
830[update Sparc store/load barrier (#3019), and fix comments
831Simon Marlow <marlowsd@gmail.com>**20090212092340
832 Ignore-this: 9d993cb743a0c015f0fc974000a7c7d7
834[comment wibbles
835Simon Marlow <marlowsd@gmail.com>**20090211152844
836 Ignore-this: b95f30df3aa53295a6dc8fd011cdfdaa
838[NCG: Use sync instead of msync for a memory barrier for powerpc
840   Darwin 9.6.0 + GCC 4.0.1 doesn't understand "msync".
841   I think "sync" means the same thing.
843[NCG: Split block reorder thing in linear allocator into separate fn
845[NCG: Validate fixes for powerpc
847[NCG: Add missing ops to powerpc isJumpish
849[Only pass --with-hscolour to cabal-bin once
850Ian Lynagh <igloo@earth.li>**20090212141023]
851[Quote some more arguments to cabal-bin
852Ian Lynagh <igloo@earth.li>**20090212141120]
853[Add more targets to the list that we need to include all libraries for
854Ian Lynagh <igloo@earth.li>**20090211173333]
855[Fix Trac #3017: ensure that we quantify over enough type variables when equalities are involved
857 Ignore-this: 92838c0a556240a8fb7744e3f29aa0f9
859 The function FunDeps.grow was not doing the right thing when type equality
860 constraints were involved.  That wasn't really its fault: its input was
861 being filtered by fdPredsOfInsts.
863 To fix this I did a bit of refactoring, so that the (revolting) fdPredsOfInsts
864 is now less important (maybe we can get rid of it in due course).  The 'grow'
865 function moves from FunDeps to
866         Inst.growInstsTyVars
867         TcMTType.growThetaTyVars
868         TcMType.growTyVars
870 The main comments are with the first of these, in
871 Note [Growing the tau-tvs using constraints] in Inst.
873 Push to the branch if conflict free.
877[general tidy up
878Simon Marlow <marlowsd@gmail.com>**20090211152429
879 Ignore-this: 9b6bbb08749b372bdd387a25405570f4
881[one more bugfix: a load/load memory barrier is required in stealWSDeque_()
882Simon Marlow <marlowsd@gmail.com>**20090211152421
883 Ignore-this: d89fff02d6b8c63272c9171e64d3510b
885[Fix trac #3001: Biographical profiling segfaults
886Ian Lynagh <igloo@earth.li>**20090211153457
887 We were zeroing the wrong memory
889[Tweak the mangler; fixes trac #2871
890Ian Lynagh <igloo@earth.li>**20090211150340
891 It was getting confused by lines like:
892  # 9 "C:\Temp\/ghc620_0/ghc620_0.hc" 1
894[On sparc, pass -mcpu=v9 when assembling with object splitting enabled
895Ian Lynagh <igloo@earth.li>**20090211141600
896 Fixes trac #2872.
898[Turn another ASSERT into a WARN (temproraily)
900 Ignore-this: 8982802501f7966ce482ef360aac6ec0
902 Fix Trac #3011 by temporarily making it only a WARN if we assign twice
903 to the same unification variable.
907[Improve documentation for LANGUAGE pragma (esp wrt cpp)
909 Ignore-this: 2c690e39766bb9c49c0e7bf8faecad47
911[Don't use the absolute path to the bindist tarball
912Ian Lynagh <igloo@earth.li>**20090210215215
913 On Windows, we end up doing something like
914     rsync c:/build/ghc-6.10.1-unknown-mingw32.tar.bz2 haskell.org:dist
915 and it thinks that it is meant to get the file from the host called "c".
916 Now we just do
917     rsync ghc-6.10.1-unknown-mingw32.tar.bz2 haskell.org:dist
918 so rsync understand what we mean.
920[Fix cleaning and installing the libraries
921Ian Lynagh <igloo@earth.li>**20090210225538
922 When cleaning or installing, we need to ignore what $stage is, and
923 just clean/install all the libraries.
925[scheduleYield(): check the wakeup queue before yielding
926Simon Marlow <marlowsd@gmail.com>**20090209112536
927 Ignore-this: d4aaf83d79ad8ca3ac2d904234eef599
929[Improvements to the "can't find module" error message (#2980)
930Simon Marlow <marlowsd@gmail.com>**20090206165743
931 Ignore-this: 2de565e20f68ebdc3865df7391c81437
932 If the module was found in multiple hidden packages, we list them all.
934 Could not find module `Data.Generics':
935   it is a member of the hidden package `base-'
936   it is a member of the hidden package `syb'
937   Use -v to see a list of the files searched for.
939[build fix: add -I../rts/parallel
940Simon Marlow <marlowsd@gmail.com>**20090206145921
941 Ignore-this: b4ab2760dd111b790421cf451289681f
943[crucial bugfix: add a store/load memory barrier to popWSDeque()
944Simon Marlow <marlowsd@gmail.com>**20090206130804
945 Ignore-this: 57d044afb7c635af2948d24d9c43a23f
947[bugfix: an unsigned comparison should be signed
948Simon Marlow <marlowsd@gmail.com>**20090206130745
949 Ignore-this: 981510f94dcb81e5896703f610b933e5
951[tiny cleanup
952Simon Marlow <marlowsd@gmail.com>**20090206130715
953 Ignore-this: 9497f8f6fbce2d0c23fd1d0eee4cdeda
955[add debugging code and comments
956Simon Marlow <marlowsd@gmail.com>**20090206130609
957 Ignore-this: 5f0e1e3fa0148da079f13eb07430c09b
959[add an assertion
960Simon Marlow <marlowsd@gmail.com>**20090206130338
961 Ignore-this: f4c0f539142c0dfdc57c70d1c6136f10
963[add a single-threaded version of cas()
964Simon Marlow <marlowsd@gmail.com>**20090206130130
965 Ignore-this: 80d5e7a3c35182d7d87e95c5c4096821
967[add a store/load memory barrier
968Simon Marlow <marlowsd@gmail.com>**20090206130115
969 Ignore-this: e0bc8f61877868ec8c2ccd9dee8f956d
971[Refactor the spark queue implementation into a generic work-stealing deque
972Simon Marlow <marlowsd@gmail.com>**20090205124648
973 Ignore-this: 1a7ee74388f30301d154d050d853a7a9
974 So we can use this abstraction elsewhere in the RTS
976[Handle the case where setitimer(ITIMER_VIRTUAL) is not always available
977Ian Lynagh <igloo@earth.li>**20090208191431
978 Patch from sthibaul. Fixes trac #2883.
980[Correct an IsFunction that should be IsData
981Ian Lynagh <igloo@earth.li>**20090207005834]
982[Fix calling maths functions when compiling via C
983Ian Lynagh <igloo@earth.li>**20090206223119]
984[Add a panic to fix the build on amd64/Linux; to be fixed properly later
985Ian Lynagh <igloo@earth.li>**20090206153135]
986[Fix the build on OS X: only understands .space, not .skip
987Ian Lynagh <igloo@earth.li>**20090206151203]
988[Fix building with GHC 6.8
989Ian Lynagh <igloo@earth.li>**20090206143432]
990[Fix the build on amd64/Linux
991Ian Lynagh <igloo@earth.li>**20090206143420]
992[When generating C, don't pretend functions are data
993Ian Lynagh <igloo@earth.li>**20090206140249
994 We used to generated things like:
995     extern StgWordArray (newCAF) __attribute__((aligned (8)));
996     ((void (*)(void *))(W_)&newCAF)((void *)R1.w);
997 (which is to say, pretend that newCAF is some data, then cast it to a
998 function and call it).
999 This goes wrong on at least IA64, where:
1000     A function pointer on the ia64 does not point to the first byte of
1001     code. Intsead, it points to a structure that describes the function.
1002     The first quadword in the structure is the address of the first byte
1003     of code
1004 so we end up dereferencing function pointers one time too many, and
1005 segfaulting.
1007[NCG: Validate fixes
1009[NCG: Split RegAllocInfo into arch specific modules
1011[NCG: Move RegLiveness -> RegAlloc.Liveness
1013[NCG: Rename MachRegs, MachInstrs -> Regs, Instrs to reflect arch specific naming
1015[NCG: Split MachRegs.hs into arch specific modules
1017[NCG: Fix validate
1019[SPARC NCG: Fix some haddock problems.
1021[SPARC NCG: Add Pwr callish mach op
1023[NCG: Split MachInstrs into arch specific modules
1025[NCG: Move the graph allocator into its own dir
1027[SPARC NCG: Update cabal file
1029[SPARC NCG: Give regs o0-o5 back to the allocator
1031[NCG: Split out joinToTargets from linear alloctor into its own module.
1034  * Also fix a nasty bug when creating fixup code that has a cyclic
1035    register movement graph.
1037[NCG: Split linear allocator into separate modules.
1039[SPARC NCG: Keep track of destinations when doing a tabled jump
1041[SPARC NCG: Do general 64 bit addition and conversion
1043[SPARC NCG: Don't need a write barrier for store synchronisation on SPARC under TSO.
1045[SPARC NCG: Use .skip instead of .space in assembler
1048  - In the GNU assembler they mean the same thing
1049  - The Solaris assembler only has .skip
1052[Check -XGADTs in (a) type family decls (b) pattern matches
1054 Ignore-this: 19a6268814440493eea436c48daa8414
1056 Following Trac #2905, we now require -XGADTs for *pattern matches* on
1057 GADTs, not just on *definitions*.
1059 Also I found that -XGADTs wasn't being checked when declaring type families,
1060 so I fixed that too.
1063[Improve error reports for kind checking (Trac #2994)
1065 Ignore-this: 402fe9f025abf8e2a3088383c23a89f6
1067 I followed the suggestion in Trac #2994, which took longer than I
1068 expected.  As usual I did a bit of tidying up at the same time,
1069 and improved a few other error reports.
1072[Further wibbles to 'deriving' for functor-like things
1074 Ignore-this: 1a69dfc25f741148b5b817aa66803d5c
1076[leave out rts/ from include-dirs in the inplace rts package
1077Simon Marlow <marlowsd@gmail.com>**20090204104748
1078 Ignore-this: 3a5c7e53121421600aa21a53b57cc9fb
1079 it shouldn't be there, and might hide bugs
1081[Fix Trac #2999: change an ASSERT to a WARN
1083 Ignore-this: db6fdc200a06ba5f067d567ea64f89e1
1085 A bug in the constraint simplifier means that an equality can be solved
1086 twice.  It's harmless, and will go away with the new constraint simplifier.
1087 Hence warning, to avoid unnecessary outright failure on eg Trac #2999.
1090[Improve transferPolyIdInfo for value-arg abstraction
1092 Ignore-this: 687def702522c3516050de1e14e5219f
1094 If we float a binding out of a *value* lambda, the fixing-up of IdInfo
1095 is a bit more complicated than before.  Since in principle FloatOut
1096 can do this (and thus can do full lambda lifting), it's imporrtant
1097 that transferPolyIdInfo does the Right Thing.
1099 This doensn't matter unless you use FloatOut's abilty to lambda-lift,
1100 which GHC mostly doesn't, yet.  But Max used it and tripped over this bug.
1103[Two small improvements to LiberateCase
1105 Ignore-this: ca41d8d9ef1b409b32761b1a69bd1400
1107 Max Bolingbroke suggested these two small improvements to LiberateCase
1108 (most of the size increase is comments :-)):
1110 a) Do LiberateCase on small functions even if they are mutually recursive
1111    See Note [Small enough]
1113 b) Don't do LiberateCase on functions for which it'd be fruitless,
1114    namely when a free varible is scrutinised *outside* the function
1115    See Note [Avoiding fruitless liberate-case]
1117 There is virtually no effect on nofib, but Max tripped over cases
1118 where it mattered slightly.
1122[Robustify lookupFamInstEnv, plus some refactoring
1124 Ignore-this: 493fdbd370a714bf9677b16d2ba533d7
1126 This patch deals with the following remark
1128      Suppose we have
1129             type family T a :: * -> *
1130             type instance T Int = []
1132      and now we encounter the type (T Int Bool).  If we call
1133      lookupFamInstEnv on (T Int Bool) we'll fail, because T has arity 1.
1134      Indeed, I *think* it's a precondition of lookupFamInstEnv that the
1135      supplied types exactly match the arity of the type function.  But
1136      that precondition is neither stated, nor is there an assertion to
1137      check it.
1139 With this patch, lookupFamInstEnv can take "extra" type arguments in
1140 the over-saturated case, and does the Right Thing.
1142 There was a nearly-identical function lookupFamInstEnvUnify, which
1143 required the precisely analogous change, so I took the opportunity
1144 to combine the two into one function, so that bugs can be fixed in one
1145 place.  This was a bit harder than I expected, but I think the result
1146 is ok.  The conflict-decision function moves from FamInst to FamInstEnv.
1147 Net lines code decreases, although there are more comments.
1152[Robustify lookupFamInstEnv
1154 Ignore-this: ee312b2b59155102d88397a33c591ad2
1156 Suppose we have
1157         type family T a :: * -> *
1158         type instance T Int = []
1160 and now we encounter the type (T Int Bool).  That is perfectly
1161 fine, even though T is over-saturated here.
1163 This patch makes lookupFamInstEnv robust to such over-saturation.
1164 Previously one caller (TcTyFuns.tcUnfoldSynFamInst) dealt with
1165 the over-saturation case, but the others did not. It's better
1166 to desl with the issue at the root, in lookupFamInstEnv itself.
1169[Improve trace message
1171 Ignore-this: 2276ebc89246553cbb6a1a4cd7c76fd9
1173[Build dph with the stage2 compiler
1174Ian Lynagh <igloo@earth.li>**20090203213613
1175 It will use TH, so needs to be built with stage2.
1177[Optimise writing out the .s file
1178Simon Marlow <marlowsd@gmail.com>**20090202145013
1179 I noticed while working on the new IO library that GHC was writing out
1180 the .s file in lots of little chunks.  It turns out that this is a
1181 result of using multiple printDocs to avoid space leaks in the NCG,
1182 where each printDoc is finishing up with an hFlush. 
1184 What's worse, is that this makes poor use of the optimisation inside
1185 printDoc that uses its own buffering to avoid hitting the Handle all
1186 the time.
1188 So I hacked around this by making the buffering optimisation inside
1189 Pretty visible from the outside, for use in the NCG.  The changes are
1190 quite small.
1192[better error message for missing package-qualified modules in ghc -M
1193Simon Marlow <marlowsd@gmail.com>**20090123142001]
1194[add wiki commentary links
1195Simon Marlow <marlowsd@gmail.com>**20090130110844
1196 Ignore-this: 3f27b426bc5ad54157edc06a421e28bf
1198[Force the result of user-defined commands
1199Simon Marlow <marlowsd@gmail.com>**20090130091919
1200 Ignore-this: f756d00cc062072e1945d63cfbbeb98
1201 so that exceptions are reported with "*** Exception" instead of as a panic.
1203[Improve error reporting for precedence errors
1205 Ignore-this: 493643a40c119ba6ad54d0f220dc4606
1207 Adopt the suggestion of Trac #2993, and tidy up the reporting of
1208 precedence parsing errors somewhat.
1211[Add the ability to derive instances of Functor, Foldable, Traversable
1213 Ignore-this: f3013fefdd65f75fb5060ef0e002f40e
1215 This patch is a straightforward extension of the 'deriving' mechanism.
1216 The ability to derive classes Functor, Foldable, Traverable is controlled
1217 by a single flag  -XDeriveFunctor.  (Maybe that's a poor name.)
1219 Still to come: documentation
1221 Thanks to twanvl for developing the patch
1225[Comments about injecting implicit bindings
1227 Ignore-this: 7aa1a69f5a16811272bed0683234aca3
1229[Warn in configure if it looks like make 3.80 is about to be used
1230Ian Lynagh <igloo@earth.li>**20090201203505
1231 We get caught by
1232     http://savannah.gnu.org/bugs/index.php?1516
1233     $(eval ...) inside conditionals causes errors
1234 with make 3.80, so warn the user if it looks like they're about to
1235 try to use it.
1237[Fix Trac #2985: generating superclasses and recursive dictionaries
1239 Ignore-this: 921ab14e850085ddbe545b078e02120b
1241 The Note [Recursive instances and superclases] explains the subtle
1242 issues to do with generating the bindings for superclasses when
1243 we compile an instance declaration, at least if we want to do the
1244 clever "recursive superclass" idea from the SYB3 paper.
1246 The old implementation of tcSimplifySuperClasses stumbled when
1247 type equalities entered the picture (details in the Note); this
1248 patch fixes the problem using a slightly hacky trick.  When we
1249 re-engineer the constraint solver we'll want to keep an eye on
1250 this.
1252 Probably worth merging to the 6.10 branch.
1256[White space only
1258 Ignore-this: fdc9c862fa91a57bdb81b7370eb482bd
1260[Two more wibbles to CorePrep (fixes HTTP package and DPH)
1262 Ignore-this: ee42b5f5a73a5277b5fd0e8c679e8fbe
1264 Ensuring that
1265   a) lambdas show up only on the RHSs of binding after CorePrep
1266   b) the arity of a binding exactly matches the maifest lambdas
1267 is surprisingly tricky.
1269 I got it wrong (again) in my recent CorePrep shuffling, which broke
1270 packages HTTP and DPH.  This patch fixes both.
1273[Remove the doc/ contents from the GMP tarball
1274Ian Lynagh <igloo@earth.li>**20090128200749
1275 They are GFDLed, which causes problems for Debian
1277[#2973: we should virtualise the CWD inside the GHC API, not in the client
1278Simon Marlow <marlowsd@gmail.com>**20090127121648
1279 Ignore-this: 5d57181d25a0661ad20fa48154f4a80
1280 The problem is that we install the client's CWD before calling
1281 runStmt, but runStmt has to load modules before running the code.  We
1282 need to install the CWD just before running the code instead, which
1283 means it has to be done inside runStmt (and resume).
1285[Fix detection of i386 vs. x86_64 for -pc-solaris
1286Simon Marlow <marlowsd@gmail.com>**20090127095343
1287 Ignore-this: b415138105477e7edab96994babbe6d2
1288 From #2951
1290[Implement #2191 (traceCcs# -- prints CCS of a value when available -- take 3)
1291Samuel Bronson <naesten@gmail.com>**20090127084825
1292 Ignore-this: ede3f18c70cfb7979ef21d7e8077dad6
1293 In this version, I untag R1 before using it, and even enter R2 at the
1294 end rather than simply returning it (which didn't work right when R2
1295 was a thunk).
1297[add comment for ASSERT_LOCK_HELD()
1298Simon Marlow <marlowsd@gmail.com>**20090126140030
1299 Ignore-this: c3ce1e8df9d94eb92a17f4f58c496a41
1301[Fix #2961: we lost some of the generated code for stack args in genCCall
1302Simon Marlow <marlowsd@gmail.com>**20090126150209
1303 Ignore-this: 77de911bfc98ecca566f1744dfe75a7b
1304 A real bug in the x86_64 native code gen: nice!
1306 This bug would have been caught by -Wall, and I would have gone though
1307 and Walled this file but I know Ben is hacking on this file quite
1308 heavily and I don't want to create undue conflicts.  Ben: it would be
1309 nice to enable -Wall here when you have time.
1311[Make the libffi patch files portable
1312Ian Lynagh <igloo@earth.li>**20090123180015
1313 Solaris's patch can't apply them if the lines beginning "---" aren't
1314 preceeded by a "diff -ur foo bar" line.
1316[SPARC NCG: Also do misaligned reads (this time for sure!)
1318[SPARC NCG: Also do misaligned reads
1320[When converting TH syntax to GHC syntax, need to put sections in parentheses
1321Ian Lynagh <igloo@earth.li>**20090121141706
1322 Fixes trac #2956
1324[SPARC NCG: Add a SPARC version of rts_mkInt64 that handles misaligned closure payloads.
1326[SPARC NCG: Reenable out of line 32 bit float ops
1328[SPARC NCG: Clean up formatting and add comments in genCCall
1330[SPARC NCG: Fix format problem when converting float to int
1332[SPARC NCG: fill branch delay slot after tabled jump (doh!)
1334[SPARC NCG: Add tabled switch
1336[SPARC NCG: Fix 64bit integers returned from ccalls
1338[#2875: Correct SYB's representation of Char
1339'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20090119112321]
1340[Fix #2759: add ability to serialize Rational
1341'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081209125551]
1342[SPARC NCG: Fix warnings
1344[SPARC NCG: Remove a comment that was confusing haddock
1346[SPARC NCG: ppr 64 bit store sizes
1348[SPARC NCG: Fix generation of 64 bit ops on 32 bit sparc
1350[SPARC NCG: Add support for hardware divide
1352[SPARC NCG: Redo code for integer sign extension
1354[SPARC NCG: Fix signed/unsigned operand format bug
1356[More fixes to the SPARC native code generator
1359  * Fix loading of 64bit floats
1360  * Put SRT and other read only static data in the .text segment
1362[Start fixing the SPARC native code generator
1365   * Use BlockIds in branch instructions instead of Imms.
1366   * Assign FP values returned from C calls to the right regs
1367   * Fix loading of F32s
1368   * Add a SPARC version of the FreeRegs map to the linear allcator.
1370[Fix some holes in the SPARC native code generator.
1373 This makes about half the tests in codeGen/should_run work.
1375[Untag closure pointers before trying to print them.
1378 In RTS tracing code, need to untag the pointer before trying
1379 to load the info table in printClosure()
1381[Add missing documention of -Da DEBUG: apply flag to RTS help.
1383[Better panic message in RegAllocLinear
1385[Make the SPARC NCG compile again - it's still broken though.
1387[Enable the native code generator for SPARC
1389[Always use PTHREAD_MUTEX_ERRORCHECK to create mutexes when -DDEBUG
1390Ian Lynagh <igloo@earth.li>**20090118193328
1392 anyway, so there's no need to special-case it.
1394[Use error-checking mutexes on all platforms when DEBUG is on
1395Ian Lynagh <igloo@earth.li>**20090117215931
1396 Otherwise ASSERT_LOCK_HELD will cause deadlocks
1398[Reinstate: Always check the result of pthread_mutex_lock() and pthread_mutex_unlock().
1399Ian Lynagh <igloo@earth.li>**20090117200955
1400 Sun Jan  4 19:24:43 GMT 2009  Matthias Kilian <kili@outback.escape.de>
1401     Don't check pthread_mutex_*lock() only on Linux and/or only if DEBUG
1402     is defined. The return values of those functions are well defined
1403     and should be supported on all operation systems with pthreads. The
1404     checks are cheap enough to do them even in the default build (without
1405     -DDEBUG).
1407     While here, recycle an unused macro ASSERT_LOCK_NOTHELD, and let
1408     the debugBelch part enabled with -DLOCK_DEBUG work independently
1409     of -DDEBUG.
1411[Initialise and deinitialise the file_lock_mutex
1412Ian Lynagh <igloo@earth.li>**20090117023947]
1413[Create package.conf when installing a bindist
1414Ian Lynagh <igloo@earth.li>**20090118110654]
1415[validate fix on 32-bit
1416Simon Marlow <marlowsd@gmail.com>**20090114162834]
1417[fix validate on Windows
1418Simon Marlow <marlowsd@gmail.com>**20090114155842]
1419[UNDO: Always check the result of pthread_mutex_lock() and pthread_mutex_unlock().
1420Simon Marlow <marlowsd@gmail.com>**20090116114339
1421 Ignore-this: 6cc82d384582097785d78fba46ca29d2
1422 This patch caused problems on Mac OS X, undoing until we can do it better.
1424 rolling back:
1426 Sun Jan  4 19:24:43 GMT 2009  Matthias Kilian <kili@outback.escape.de>
1427   * Always check the result of pthread_mutex_lock() and pthread_mutex_unlock().
1429   Don't check pthread_mutex_*lock() only on Linux and/or only if DEBUG
1430   is defined. The return values of those functions are well defined
1431   and should be supported on all operation systems with pthreads. The
1432   checks are cheap enough to do them even in the default build (without
1433   -DDEBUG).
1435   While here, recycle an unused macro ASSERT_LOCK_NOTHELD, and let
1436   the debugBelch part enabled with -DLOCK_DEBUG work independently
1437   of -DDEBUG.
1440     M ./includes/OSThreads.h -30 +10
1442[Update config.guess, config.sub and install.sh from automake-1.10.2
1443Simon Marlow <marlowsd@gmail.com>**20090116095311
1444 Ignore-this: cdc19dd28053a6a71283776ecb802c62
1445 In particular, config.guess should now know about x86_64-pc-solaris2
1447[More useful error message when a package .hi file cannot be found:
1448Simon Marlow <marlowsd@gmail.com>**20090115122524
1449 Ignore-this: b595e2fac5d9b5214340f83a7d7dd730
1451 > import System.Process
1452 Could not find module `System.Process':
1453   There are files missing in the process- package,
1454   try running 'ghc-pkg check'.
1455   Use -v to see a list of the files searched for.
1457[soup-up "ghc-pkg check"
1458Simon Marlow <marlowsd@gmail.com>**20090115122143
1459 Ignore-this: 6d29af258eb31d417d01fed167cd5d47
1461 We now look for missing files (including .hi files), and report all
1462 the packages that are transitively broken.
1464 $ ghc-pkg check
1465 There are problems in package syb-
1466   dependency foo- doesn't exist
1467 There are problems in package process-
1468   file System/Process.hi is missing
1470 The following packages are broken, either because they have a problem
1471 listed above, or because they depend on a broken package.
1472 syb-
1473 process-
1474 base-
1475 Cabal-1.7.0
1476 haskell98-
1477 haddock-2.4.2
1478 ghc-6.11
1480[document -feager-blackholing
1481Simon Marlow <marlowsd@gmail.com>**20090115093922
1482 Ignore-this: 5958a16c7148cb5df0f4b3f1e1dee6d6
1484[External Core: re-add code I removed mistakenly in last commit
1485Tim Chevalier <chevalier@alum.wellesley.edu>**20090115002612]
1486[External Core lib: lots of cleanup
1487Tim Chevalier <chevalier@alum.wellesley.edu>**20090114224428
1489 - Factor out code for applying newtypes from Check into CoreUtils
1490 - Use this code in Prep, which allowed for some simplification
1491 - Change Merge and ElimDeadCode to not flatten top-level binds
1492 - Add a flag for elimDeadCode to tell it whether to keep
1493 exported bindings or not.
1494 - Other things.
1496[External Core: print out more precise dependency info
1497Tim Chevalier <chevalier@alum.wellesley.edu>**20090114221734
1499 Print out the same recursive/non-recursive binding groups
1500 that existed in internal Core in an External Core file,
1501 rather than dumping everything into one big recursive group.
1503[Fix "make install": Put "[]" in the install package.conf
1504Ian Lynagh <igloo@earth.li>**20090114205945]
1505[Remove redundant import; spotted by Thorkil Naur
1506Ian Lynagh <igloo@earth.li>**20090114181937]
1507[Remove a redundant import
1508Ian Lynagh <igloo@earth.li>**20090114181212]
1509[Detect when a C finalizer calls back to Haskell
1510Simon Marlow <marlowsd@gmail.com>**20090114121526
1511 Ignore-this: e361d7278e2478da2f300625076cc0ae
1512 This is illegal now, after the fix for #1364, but it turns out that
1513 the existing check for dodgy callbacks doesn't catch finalizers
1514 calling back, so we need another test.  This will be particularly
1515 important for 6.10.2, because the behaviour has changed.
1517[Fix Trac #2931
1519 Ignore-this: 6ff0207627165f3f7bd145171e59b533
1521 Fix the lexical analyser when it encounters 'x<EOF> and Template
1522 Haskell is on.
1525[Rewrite CorePrep and improve eta expansion
1527 Ignore-this: 910d1d613592c116714c324618b1e45c
1529 This patch does two main things
1531 a) Rewrite most of CorePrep to be much easier to understand (I hope!).
1532    The invariants established by CorePrep are now written out, and
1533    the code is more perspicuous.  It is surpringly hard to get right,
1534    and the old code had become quite incomprehensible.
1536 b) Rewrite the eta-expander so that it does a bit of simplifying
1537    on-the-fly, and thereby guarantees to maintain the CorePrep
1538    invariants.  This make it much easier to use from CorePrep, and
1539    is a generally good thing anyway.
1541 A couple of pieces of re-structuring:
1543 *  I moved the eta-expander and arity analysis stuff into a new
1544    module coreSyn/CoreArity.
1546    Max will find that the type CoreArity.EtaInfo looks strangely
1547    familiar.
1549 *  I moved a bunch of comments from Simplify to OccurAnal; that's
1550    why it looks as though there's a lot of lines changed in those
1551    modules.
1553 On the way I fixed various things
1555   - Function arguments are eta expanded
1556        f (map g)  ===>  let s = \x. map g x in f s
1558   - Trac #2368
1560 The result is a modest performance gain, I think mainly due
1561 to the first of these changes:
1563 --------------------------------------------------------------------------------
1564         Program           Size    Allocs   Runtime   Elapsed
1565 --------------------------------------------------------------------------------
1566             Min          -1.0%    -17.4%    -19.1%    -46.4%
1567             Max          +0.3%     +0.5%     +5.4%    +53.8%
1568  Geometric Mean          -0.1%     -0.3%     -7.0%    -10.2%
1573[Rename isIdentityCoercion to isIdentityCoI; add Coercion.isIdentityCoercion
1575 Ignore-this: ac05f38a092959c08972c768fe427e06
1577[Spelling in comment only
1579 Ignore-this: 2eb6372f996b9133683918aecad1a5aa
1581[Make the ASSERT more informative
1583 Ignore-this: 4059e33cf594403e03c0eb4169dc300f
1585[Export mapOL from OrdList
1587 Ignore-this: 3debd81ae00d3745ec248197b97d312f
1589[Improve error messages slightly
1591 Ignore-this: 89090ec03d8ea201f64105c0dbb8d5f9
1593[Do not do SpecConstr on functions that unconditionally diverge
1595 Ignore-this: cb0c210b936941b241c312c72545bfe2
1597 There is no point in specialising a function that is guaranteed to
1598 diverge, and doing so screwed up arity stuff. 
1600 See Note [Do not specialise diverging functions].
1604[Make -XTypeFamilies imply -XRelaxedPolyRec (Trac #2944)
1606 Ignore-this: 8ab21566045c8bc8050ed7dda04e2df
1608[Fix Trac #2937: deserialising assoicated type definitions
1610 Ignore-this: 7d7852a70a34fc22773757709735cc24
1612 The deserialiser (TcIface) for associated type definitions wasn't
1613 taking into account that the class decl brings into scope some
1614 type variables that scope over the data/type family declaration.
1616 Easy to fix: the new function is TcIface.bindIfaceTyVars_AT
1619[Always check the result of pthread_mutex_lock() and pthread_mutex_unlock().
1620Matthias Kilian <kili@outback.escape.de>**20090104192443
1622 Don't check pthread_mutex_*lock() only on Linux and/or only if DEBUG
1623 is defined. The return values of those functions are well defined
1624 and should be supported on all operation systems with pthreads. The
1625 checks are cheap enough to do them even in the default build (without
1626 -DDEBUG).
1628 While here, recycle an unused macro ASSERT_LOCK_NOTHELD, and let
1629 the debugBelch part enabled with -DLOCK_DEBUG work independently
1630 of -DDEBUG.
1633[sanity checking fixes
1634Simon Marlow <marlowsd@gmail.com>**20090112121042]
1635[Keep the remembered sets local to each thread during parallel GC
1636Simon Marlow <marlowsd@gmail.com>**20090112121024
1637 This turns out to be quite vital for parallel programs:
1639   - The way we discover which threads to traverse is by finding
1640     dirty threads via the remembered sets (aka mutable lists).
1642   - A dirty thread will be on the remembered set of the capability
1643     that was running it, and we really want to traverse that thread's
1644     stack using the GC thread for the capability, because it is in
1645     that CPU's cache.  If we get this wrong, we get penalised badly by
1646     the memory system.
1648 Previously we had per-capability mutable lists but they were
1649 aggregated before GC and traversed by just one of the GC threads.
1650 This resulted in very poor performance particularly for parallel
1651 programs with deep stacks.
1653 Now we keep per-capability remembered sets throughout GC, which also
1654 removes a lock (recordMutableGen_sync).
1656[indicate which TSOs are dirty in the printAllThreads() output
1657Simon Marlow <marlowsd@gmail.com>**20090107151449]
1658[Fix Trac #2584: Pretty printing of types with HsDocTy
1659David Waern <david.waern@gmail.com>**20090109191713
1661 The pretty printing clause for HsDocTy was wrong, causing brackets to be left
1662 out. We now print Haddock comments on types as if they were postfix type
1663 operators.
1665[Add "Word size" to the +RTS --info output
1666Ian Lynagh <igloo@earth.li>**20090109160454]
1667[Check that make supports eval
1668Ian Lynagh <igloo@earth.li>**20090109151006]
1669[Add some more fields to +RTS --info
1670Ian Lynagh <igloo@earth.li>**20090108131101]
1671[FIX BUILD on Windows (fix for #2873 broke it)
1672Simon Marlow <marlowsd@gmail.com>**20090109090658]
1673[when calling mmap() with MAP_ANON, the fd argument should be -1
1674Simon Marlow <marlowsd@gmail.com>**20090108155341
1675 might fix #2925
1677[Fix Trac #2914: record wild cards and assoicated types
1679[Fix #2873: should fail if a package DB desn't exist
1680Simon Marlow <marlowsd@gmail.com>**20090108095628
1681 We allowed non-existence before because the user DB is allowed to not
1682 exist, so now we have an explicit exception for that case.
1684[Close the races between throwTo and thread completion
1685Simon Marlow <marlowsd@gmail.com>**20090107140507
1686 Any threads we missed were being caught by the GC (possibly the idle
1687 GC if the system was otherwise inactive), but that's not ideal.  The
1688 fix (from Bertram Felgenhauer) is to use lockTSO to synchronise,
1689 imposing an unconditional lockTSO on thread exit.  I couldn't measure
1690 any performance overhead from doing this, so it seems reasonable.
1692[add comment
1693Simon Marlow <marlowsd@gmail.com>**20090107121142]
1694[Fix two more locking issues in throwTo()
1695Bertram Felgenhauer <int-e@gmx.de>**20090107120808]
1696[maybePerformBlockedException() should handle ThreadComplete/ThreadKilled
1697Simon Marlow <marlowsd@gmail.com>**20090107120734
1698 Part of the fix for #2910
1700[fix a race where the timer signal could remain turned off, leading to deadlock
1701Simon Marlow <marlowsd@gmail.com>**20090107120652]
1702[putMVar and takeMVar: add write_barrier() to fix race with throwTo
1703Simon Marlow <marlowsd@gmail.com>**20090107112026]
1704[cruft removal
1705Simon Marlow <marlowsd@gmail.com>**20090106154408]
1706[wake up the blocked exception queue on ThreadFinished; fixes #2910
1707Simon Marlow <marlowsd@gmail.com>**20090106153254]
1708[bump GHC's max stack size to 512M
1709Simon Marlow <marlowsd@gmail.com>**20081219112211
1710 To accomodate compiling very long static lists (#2002)
1712[ext-core: change .cabal file so we can build with either GHC 6.8 or 6.10
1713Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192757]
1714[ext-core: fix some Prep bugs
1715Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192734]
1716[ext-core: use shorter names when combining modules
1717Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192645]
1718[ext-core: twiddle primitive things
1719Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192434]
1720[Don't pin a register for gc_thread on SPARC.
1723 This makes the build work again.
1725[Require HsColour by default
1726Ian Lynagh <igloo@earth.li>**20090104214647
1727 This should stop us ending up without HsColour'ed sources on some
1728 platforms.
1730 We also now tell Cabal where to find HsColour, rather than it finding
1731 it itself.
1733[Fix build
1734Ian Lynagh <igloo@earth.li>**20090104211810]
1735[Add GHCi completions to :set and :show
1736Ori Avtalion <ori@avtalion.name>**20081209194210]
1737[Fix sync-all: Check for --complete/partial before --<anything>
1738Ian Lynagh <igloo@earth.li>**20090104184652
1739 Patch from megacz in trac #2857
1741[Remove time from extralibs at request of maintainer
1742Ian Lynagh <igloo@earth.li>**20090104115509]
1743[validate fix: InteractiveEval no longer needs to import  IdInfo
1744Ian Lynagh <igloo@earth.li>**20090103154754]
1745[Fix validate: strs is no longer used in IfaceSyn
1746Ian Lynagh <igloo@earth.li>**20090103153624]
1747[Remove trailing whitespace from HaddockUtils
1748Ian Lynagh <igloo@earth.li>**20081229191727]
1749[Fix warnings in HaddockUtils
1750Ian Lynagh <igloo@earth.li>**20081229191657]
1751[Remove dead code from HaddockUtils
1752Ian Lynagh <igloo@earth.li>**20081229191430]
1753[Make record selectors into ordinary functions
1756 This biggish patch addresses Trac #2670.  The main effect is to make
1757 record selectors into ordinary functions, whose unfoldings appear in
1758 interface files, in contrast to their previous existence as magic
1759 "implicit Ids".  This means that the usual machinery of optimisation,
1760 analysis, and inlining applies to them, which was failing before when
1761 the selector was somewhat complicated.  (Which it can be when
1762 strictness annotations, unboxing annotations, and GADTs are involved.)
1764 The change involves the following points
1766 * Changes in Var.lhs to the representation of Var.  Now a LocalId can
1767   have an IdDetails as well as a GlobalId.  In particular, the
1768   information that an Id is a record selector is kept in the
1769   IdDetails.  While compiling the current module, the record selector
1770   *must* be a LocalId, so that it participates properly in compilation
1771   (free variables etc).
1773   This led me to change the (hidden) representation of Var, so that there
1774   is now only one constructor for Id, not two.
1776 * The IdDetails is persisted into interface files, so that an
1777   importing module can see which Ids are records selectors.
1779 * In TcTyClDecls, we generate the record-selector bindings in renamed,
1780   but not typechecked form.  In this way, we can get the typechecker
1781   to add all the types and so on, which is jolly helpful especially
1782   when GADTs or type families are involved.  Just like derived
1783   instance declarations.
1785   This is the big new chunk of 180 lines of code (much of which is
1786   commentary).  A call to the same function, mkAuxBinds, is needed in
1787   TcInstDcls for associated types.
1789 * The typechecker therefore has to pin the correct IdDetails on to
1790   the record selector, when it typechecks it.  There was a neat way
1791   to do this, by adding a new sort of signature to HsBinds.Sig, namely
1792   IdSig.  This contains an Id (with the correct Name, Type, and IdDetails);
1793   the type checker uses it as the binder for the final binding.  This
1794   worked out rather easily.
1796 * Record selectors are no longer "implicit ids", which entails changes to
1797      IfaceSyn.ifaceDeclSubBndrs
1798      HscTypes.implicitTyThings
1799      TidyPgm.getImplicitBinds
1800   (These three functions must agree.)
1802 * MkId.mkRecordSelectorId is deleted entirely, some 300+ lines (incl
1803   comments) of very error prone code.  Happy days.
1805 * A TyCon no longer contains the list of record selectors:
1806   algTcSelIds is gone
1808 The renamer is unaffected, including the way that import and export of
1809 record selectors is handled.
1811 Other small things
1813 * IfaceSyn.ifaceDeclSubBndrs had a fragile test for whether a data
1814   constructor had a wrapper.  I've replaced that with an explicit flag
1815   in the interface file. More robust I hope.
1817 * I renamed isIdVar to isId, which touched a few otherwise-unrelated files.
1821[Fix Trac #2721: reject newtype deriving if the class has associated types
1823[-XImpredicativeTypes implies -XRankNTypes, and improve error msg in TcMType
1826 If you are going for impredicative types you almost certainly want RankN
1827 too. The change to TcMType improves the error when you say
1828      T (forall a. blah)
1829 where T is a type synonym.  This doesn't necessarily need impredicativity,
1830 if you have LiberalTypeSynonyms.
1833[Fix Trac #2856: make deriving work for type families
1836 Darn, but TcDeriv is complicated, when type families get in on
1837 the act!  This patch makes GeneralisedNewtypeDeriving work
1838 properly for type families.  I think.
1840 In order to do so, I found that GeneralisedNewtypeDeriving can
1841 work for recursive newtypes too -- and since families are conservatively
1842 marked recursive, that's a crucial part of the fix, and useful too.
1843 See Note [Recursive newtypes] in TcDeriv.
1846[White space and spelling in comments
1848[Remove -XImpredicativeTypes from -fglasgow-exts
1851 See Trac #2846: impredicative types are far from stable, so
1852 -fglasgow-exts should not imply them.  Maybe we should merge
1853 this into 6.10?
1856[Improve error reporting for 'deriving'
1859 a) Improve the extra suggested fix when there's a "no instance"
1860    error in a deriving clause.
1862 b) Improve error location recording in tcInstDecl2
1864 Many of the changes in tcInstDecl2 are simple reformatting.
1868[Improve error message in deriving (fix Trac #2851)
1870[Avoid nasty name clash with associated data types (fixes Trac #2888)
1873 The main bug was in TcHsType; see Note [Avoid name clashes for
1874 associated data types].  However I did a bit of re-factoring while
1875 I was abouut it.
1877 I'm still a but unhappy with the use of TyCon.setTyConArgPoss; it'd
1878 be better to construct the TyCon correctly in the first place.  But
1879 that means passing an extra parameter to tcTyDecl1... maybe we should
1880 do this.
1884[Refactor RnEnv to fix Trac #2901
1887 This tidy-up fixes Trac #2901, and eliminates 20 lines of code.
1888 Mainly this is done by making a version of lookupGlobalOccRn that
1889 returns (Maybe Name); this replaces lookupSrcOccRn but does more.
1892[Add quotes to error message
1894[Tidy up treatment of big lambda (fixes Trac #2898)
1897 There was a leftover big lambda in the CorePrep'd code, which confused
1898 the bytecode generator.  Actually big lambdas are harmless.  This patch
1899 refactors ByteCodeGen so that it systemantically used 'bcView' to eliminate
1900 junk.  I did a little clean up in CorePrep too.
1902 See comments in Trac #2898.
1905[Fix warnings in ByteCodeAsm
1906Ian Lynagh <igloo@earth.li>**20081229174726]
1907[Fix warnings in ByteCodeInstr
1908Ian Lynagh <igloo@earth.li>**20081229173331]
1909[Fix warnings in Rules
1910Ian Lynagh <igloo@earth.li>**20081229171832]
1911[Fix warnings in StgCmmForeign
1912Ian Lynagh <igloo@earth.li>**20081229165957]
1913[Fix warnings in CgCallConv
1914Ian Lynagh <igloo@earth.li>**20081229165402]
1915[Fix warnings in SMRep
1916Ian Lynagh <igloo@earth.li>**20081229164959]
1917[Fix warnings in ClosureInfo
1918Ian Lynagh <igloo@earth.li>**20081229164618]
1919[Fix warnings in CgTicky
1920Ian Lynagh <igloo@earth.li>**20081229153416]
1921[Fix warnings in CgCon
1922Ian Lynagh <igloo@earth.li>**20081229151733]
1923[Fix warnings in WorkWrap
1924Ian Lynagh <igloo@earth.li>**20081229150406]
1925[Fix warnings in NCGMonad
1926Ian Lynagh <igloo@earth.li>**20081229145627]
1927[Fix warnings in CmmInfo
1928Ian Lynagh <igloo@earth.li>**20081229145307]
1929[Fix warnings in CmmCPSGen
1930Ian Lynagh <igloo@earth.li>**20081229145119]
1931[Fix warnings in CmmProcPoint
1932Ian Lynagh <igloo@earth.li>**20081229144214]
1933[Fix warnings in CmmCallConv
1934Ian Lynagh <igloo@earth.li>**20081229141924]
1935[Fix warnings in CmmLive
1936Ian Lynagh <igloo@earth.li>**20081229141035]
1937[Fix warnings in CmmCPS
1938Ian Lynagh <igloo@earth.li>**20081229133158]
1939[Fix warnings in CmmUtils
1940Ian Lynagh <igloo@earth.li>**20081229132637]
1941[Comment out dead function breakProc
1942Ian Lynagh <igloo@earth.li>**20081229115647]
1943[Fix warnings in CmmBrokenBlock
1944Ian Lynagh <igloo@earth.li>**20081229115527]
1945[Comments only.  Haddockify parts of TcRnTypes.
1946Thomas Schilling <nominolo@googlemail.com>**20081211154657]
1947[Comments only.  Fix typo.
1948Thomas Schilling <nominolo@googlemail.com>**20081211153104]
1949[Include PprTyThings in tags file.
1950Thomas Schilling <nominolo@googlemail.com>**20081211153005]
1951[Use DynFlags to work out if we are doing ticky ticky profiling
1952Ian Lynagh <igloo@earth.li>**20081218161928
1953 We used to use StaticFlags
1955[Fix warnings in CgExpr
1956Ian Lynagh <igloo@earth.li>**20081217201152]
1957[Fix warnings in CgBindery
1958Ian Lynagh <igloo@earth.li>**20081217194607]
1959[Fix warnings in CgStackery
1960Ian Lynagh <igloo@earth.li>**20081217191713]
1961[Fix warnings in CgCase
1962Ian Lynagh <igloo@earth.li>**20081217190848]
1963[Remove some dead code from CgCase
1964Ian Lynagh <igloo@earth.li>**20081217184755]
1965[Fix warnings in StgCmmProf
1966Ian Lynagh <igloo@earth.li>**20081217182236]
1967[Fix warnings in CgProf
1968Ian Lynagh <igloo@earth.li>**20081217181711]
1969[Fix warnings in CgInfoTbls
1970Ian Lynagh <igloo@earth.li>**20081217180144]
1971[Remove dead function srtLabelAndLength from CgInfoTbls
1972Ian Lynagh <igloo@earth.li>**20081217180044]
1973[Fix warnings in CgHeapery
1974Ian Lynagh <igloo@earth.li>**20081217175726]
1975[Fix warnings in CgTailCall
1976Ian Lynagh <igloo@earth.li>**20081217175040]
1977[Remove a little dead code from CgTailCall
1978Ian Lynagh <igloo@earth.li>**20081217174947]
1979[Fix warnings in CodeGen
1980Ian Lynagh <igloo@earth.li>**20081217165904]
1981[Fix warnings in StgCmmTicky
1982Ian Lynagh <igloo@earth.li>**20081217165433]
1983[Remove dead code from CgUtils
1984Ian Lynagh <igloo@earth.li>**20081217163920]
1985[Fix warnings in CgPrimOp
1986Ian Lynagh <igloo@earth.li>**20081217163912]
1987[Fix warnings in CgMonad
1988Ian Lynagh <igloo@earth.li>**20081217163903]
1989[Fix warnings in CgClosure
1990Ian Lynagh <igloo@earth.li>**20081217163850]
1991[Fix warnings in CgForeignCall
1992Ian Lynagh <igloo@earth.li>**20081215222515]
1993[Remove some redundant code
1994Ian Lynagh <igloo@earth.li>**20081215194047
1995 We were looking at opt_DoTickyProfiling, and if it was set claling ifTicky
1996 which looks at opt_DoTickyProfiling itself.
1998[Fix warnings in CgLetNoEscape
1999Ian Lynagh <igloo@earth.li>**20081215173752]
2000[Workaround for #2262, from Barney Stratford
2001Simon Marlow <marlowsd@gmail.com>**20081216124706
2002 See http://www.haskell.org/pipermail/glasgow-haskell-users/2008-December/016333.html
2004[UNDO: Add -fpass-case-bndr-to-join-points
2005Simon Marlow <marlowsd@gmail.com>**20081216114235
2007 rolling back:
2009 Fri Dec  5 10:51:59 GMT 2008  simonpj@microsoft.com
2010   * Add -fpass-case-bndr-to-join-points
2012   See Note [Passing the case binder to join points] in Simplify.lhs
2013   The default now is *not* to pass the case binder.  There are some
2014   nofib results with the above note; the effect is almost always
2015   negligible.
2017   I don't expect this flag to be used by users (hence no docs). It's just
2018   there to let me try the performance effects of switching on and off.
2021     M ./compiler/main/StaticFlagParser.hs +1
2022     M ./compiler/main/StaticFlags.hs +4
2023     M ./compiler/simplCore/Simplify.lhs -14 +73
2025[Rollback INLINE patches
2026Simon Marlow <marlowsd@gmail.com>**20081216103556
2028 rolling back:
2030 Fri Dec  5 16:54:00 GMT 2008  simonpj@microsoft.com
2031   * Completely new treatment of INLINE pragmas (big patch)
2033   This is a major patch, which changes the way INLINE pragmas work.
2034   Although lots of files are touched, the net is only +21 lines of
2035   code -- and I bet that most of those are comments!
2037   HEADS UP: interface file format has changed, so you'll need to
2038   recompile everything.
2040   There is not much effect on overall performance for nofib,
2041   probably because those programs don't make heavy use of INLINE pragmas.
2043           Program           Size    Allocs   Runtime   Elapsed
2044               Min         -11.3%     -6.9%     -9.2%     -8.2%
2045               Max          -0.1%     +4.6%     +7.5%     +8.9%
2046    Geometric Mean          -2.2%     -0.2%     -1.0%     -0.8%
2048   (The +4.6% for on allocs is cichelli; see other patch relating to
2049   -fpass-case-bndr-to-join-points.)
2051   The old INLINE system
2052   ~~~~~~~~~~~~~~~~~~~~~
2053   The old system worked like this. A function with an INLINE pragam
2054   got a right-hand side which looked like
2055        f = __inline_me__ (\xy. e)
2056   The __inline_me__ part was an InlineNote, and was treated specially
2057   in various ways.  Notably, the simplifier didn't inline inside an
2058   __inline_me__ note. 
2060   As a result, the code for f itself was pretty crappy. That matters
2061   if you say (map f xs), because then you execute the code for f,
2062   rather than inlining a copy at the call site.
2064   The new story: InlineRules
2065   ~~~~~~~~~~~~~~~~~~~~~~~~~~
2066   The new system removes the InlineMe Note altogether.  Instead there
2067   is a new constructor InlineRule in CoreSyn.Unfolding.  This is a
2068   bit like a RULE, in that it remembers the template to be inlined inside
2069   the InlineRule.  No simplification or inlining is done on an InlineRule,
2070   just like RULEs. 
2072   An Id can have an InlineRule *or* a CoreUnfolding (since these are two
2073   constructors from Unfolding). The simplifier treats them differently:
2075     - An InlineRule is has the substitution applied (like RULES) but
2076       is otherwise left undisturbed.
2078     - A CoreUnfolding is updated with the new RHS of the definition,
2079       on each iteration of the simplifier.
2081   An InlineRule fires regardless of size, but *only* when the function
2082   is applied to enough arguments.  The "arity" of the rule is specified
2083   (by the programmer) as the number of args on the LHS of the "=".  So
2084   it makes a difference whether you say
2085        {-# INLINE f #-}
2086        f x = \y -> e     or     f x y = e
2087   This is one of the big new features that InlineRule gives us, and it
2088   is one that Roman really wanted.
2090   In contrast, a CoreUnfolding can fire when it is applied to fewer
2091   args than than the function has lambdas, provided the result is small
2092   enough.
2095   Consequential stuff
2096   ~~~~~~~~~~~~~~~~~~~
2097   * A 'wrapper' no longer has a WrapperInfo in the IdInfo.  Instead,
2098     the InlineRule has a field identifying wrappers.
2100   * Of course, IfaceSyn and interface serialisation changes appropriately.
2102   * Making implication constraints inline nicely was a bit fiddly. In
2103     the end I added a var_inline field to HsBInd.VarBind, which is why
2104     this patch affects the type checker slightly
2106   * I made some changes to the way in which eta expansion happens in
2107     CorePrep, mainly to ensure that *arguments* that become let-bound
2108     are also eta-expanded.  I'm still not too happy with the clarity
2109     and robustness fo the result.
2111   * We now complain if the programmer gives an INLINE pragma for
2112     a recursive function (prevsiously we just ignored it).  Reason for
2113     change: we don't want an InlineRule on a LoopBreaker, because then
2114     we'd have to check for loop-breaker-hood at occurrence sites (which
2115     isn't currenlty done).  Some tests need changing as a result.
2117   This patch has been in my tree for quite a while, so there are
2118   probably some other minor changes.
2121     M ./compiler/basicTypes/Id.lhs -11
2122     M ./compiler/basicTypes/IdInfo.lhs -82
2123     M ./compiler/basicTypes/MkId.lhs -2 +2
2124     M ./compiler/coreSyn/CoreFVs.lhs -2 +25
2125     M ./compiler/coreSyn/CoreLint.lhs -5 +1
2126     M ./compiler/coreSyn/CorePrep.lhs -59 +53
2127     M ./compiler/coreSyn/CoreSubst.lhs -22 +31
2128     M ./compiler/coreSyn/CoreSyn.lhs -66 +92
2129     M ./compiler/coreSyn/CoreUnfold.lhs -112 +112
2130     M ./compiler/coreSyn/CoreUtils.lhs -185 +184
2131     M ./compiler/coreSyn/MkExternalCore.lhs -1
2132     M ./compiler/coreSyn/PprCore.lhs -4 +40
2133     M ./compiler/deSugar/DsBinds.lhs -70 +118
2134     M ./compiler/deSugar/DsForeign.lhs -2 +4
2135     M ./compiler/deSugar/DsMeta.hs -4 +3
2136     M ./compiler/hsSyn/HsBinds.lhs -3 +3
2137     M ./compiler/hsSyn/HsUtils.lhs -2 +7
2138     M ./compiler/iface/BinIface.hs -11 +25
2139     M ./compiler/iface/IfaceSyn.lhs -13 +21
2140     M ./compiler/iface/MkIface.lhs -24 +19
2141     M ./compiler/iface/TcIface.lhs -29 +23
2142     M ./compiler/main/TidyPgm.lhs -55 +49
2143     M ./compiler/parser/ParserCore.y -5 +6
2144     M ./compiler/simplCore/CSE.lhs -2 +1
2145     M ./compiler/simplCore/FloatIn.lhs -6 +1
2146     M ./compiler/simplCore/FloatOut.lhs -23
2147     M ./compiler/simplCore/OccurAnal.lhs -36 +5
2148     M ./compiler/simplCore/SetLevels.lhs -59 +54
2149     M ./compiler/simplCore/SimplCore.lhs -48 +52
2150     M ./compiler/simplCore/SimplEnv.lhs -26 +22
2151     M ./compiler/simplCore/SimplUtils.lhs -28 +4
2152     M ./compiler/simplCore/Simplify.lhs -91 +109
2153     M ./compiler/specialise/Specialise.lhs -15 +18
2154     M ./compiler/stranal/WorkWrap.lhs -14 +11
2155     M ./compiler/stranal/WwLib.lhs -2 +2
2156     M ./compiler/typecheck/Inst.lhs -1 +3
2157     M ./compiler/typecheck/TcBinds.lhs -17 +27
2158     M ./compiler/typecheck/TcClassDcl.lhs -1 +2
2159     M ./compiler/typecheck/TcExpr.lhs -4 +6
2160     M ./compiler/typecheck/TcForeign.lhs -1 +1
2161     M ./compiler/typecheck/TcGenDeriv.lhs -14 +13
2162     M ./compiler/typecheck/TcHsSyn.lhs -3 +2
2163     M ./compiler/typecheck/TcInstDcls.lhs -5 +4
2164     M ./compiler/typecheck/TcRnDriver.lhs -2 +11
2165     M ./compiler/typecheck/TcSimplify.lhs -10 +17
2166     M ./compiler/vectorise/VectType.hs +7
2168 Mon Dec  8 12:43:10 GMT 2008  simonpj@microsoft.com
2169   * White space only
2171     M ./compiler/simplCore/Simplify.lhs -2
2173 Mon Dec  8 12:48:40 GMT 2008  simonpj@microsoft.com
2174   * Move simpleOptExpr from CoreUnfold to CoreSubst
2176     M ./compiler/coreSyn/CoreSubst.lhs -1 +87
2177     M ./compiler/coreSyn/CoreUnfold.lhs -72 +1
2179 Mon Dec  8 17:30:18 GMT 2008  simonpj@microsoft.com
2180   * Use CoreSubst.simpleOptExpr in place of the ad-hoc simpleSubst (reduces code too)
2182     M ./compiler/deSugar/DsBinds.lhs -50 +16
2184 Tue Dec  9 17:03:02 GMT 2008  simonpj@microsoft.com
2185   * Fix Trac #2861: bogus eta expansion
2187   Urghlhl!  I "tided up" the treatment of the "state hack" in CoreUtils, but
2188   missed an unexpected interaction with the way that a bottoming function
2189   simply swallows excess arguments.  There's a long
2190        Note [State hack and bottoming functions]
2191   to explain (which accounts for most of the new lines of code).
2194     M ./compiler/coreSyn/CoreUtils.lhs -16 +53
2196 Mon Dec 15 10:02:21 GMT 2008  Simon Marlow <marlowsd@gmail.com>
2197   * Revert CorePrep part of "Completely new treatment of INLINE pragmas..."
2199   The original patch said:
2201   * I made some changes to the way in which eta expansion happens in
2202     CorePrep, mainly to ensure that *arguments* that become let-bound
2203     are also eta-expanded.  I'm still not too happy with the clarity
2204     and robustness fo the result.
2206   Unfortunately this change apparently broke some invariants that were
2207   relied on elsewhere, and in particular lead to panics when compiling
2208   with profiling on.
2210   Will re-investigate in the new year.
2212     M ./compiler/coreSyn/CorePrep.lhs -53 +58
2213     M ./configure.ac -1 +1
2215 Mon Dec 15 12:28:51 GMT 2008  Simon Marlow <marlowsd@gmail.com>
2216   * revert accidental change to configure.ac
2218     M ./configure.ac -1 +1
2220[revert accidental change to configure.ac
2221Simon Marlow <marlowsd@gmail.com>**20081215122851]
2222[Revert CorePrep part of "Completely new treatment of INLINE pragmas..."
2223Simon Marlow <marlowsd@gmail.com>**20081215100221
2225 The original patch said:
2227 * I made some changes to the way in which eta expansion happens in
2228   CorePrep, mainly to ensure that *arguments* that become let-bound
2229   are also eta-expanded.  I'm still not too happy with the clarity
2230   and robustness fo the result.
2232 Unfortunately this change apparently broke some invariants that were
2233 relied on elsewhere, and in particular lead to panics when compiling
2234 with profiling on.
2236 Will re-investigate in the new year.
2238[wake up other Capabilities even when there is only one spark (see #2868)
2239Simon Marlow <marlowsd@gmail.com>**20081210164644]
2240[Document new GC options -q1 and -qg<n>
2241Simon Marlow <marlowsd@gmail.com>**20081210164557]
2242[SysTools no longer needs -fno-cse
2243Ian Lynagh <igloo@earth.li>**20081211182327]
2244[Make the lists of files and directories to be cleaned-up non-global
2245Ian Lynagh <igloo@earth.li>**20081211180739
2246 They still need to be stored in IORefs, as the exception handler needs
2247 to know what they all are.
2249[The default cleanup handler should /always/ delete the temp files
2250Ian Lynagh <igloo@earth.li>**20081211170006
2251 Not only if there has been an exception. It worked for GHC anyway,
2252 as it was getting an ExitSuccess exception, but GHC API clients
2253 shouldn't be required to do that.
2255[Fix user guide typesetting
2256Ian Lynagh <igloo@earth.li>**20081210165434]
2257[FIX #1364: added support for C finalizers that run as soon as the value is not longer reachable.
2258Simon Marlow <marlowsd@gmail.com>**20081210150425
2260 Patch originally by Ivan Tomac <tomac@pacific.net.au>, amended by
2261 Simon Marlow:
2263   - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv#
2264   - GC parameters to ALLOC_PRIM fixed
2266[On FreeBSD, try MAP_FIXED if ordinary mmap() fails to give us suitable memory
2267Simon Marlow <marlowsd@gmail.com>**20081210115751
2268 This appears to be necessary on FreeBSD.  It might be necessary on
2269 other OSs too, but I'm being cautious because using MAP_FIXED can lead
2270 to crashes by overwriting existing mappings, and we have no (easy) way
2271 to prevent that.
2273[Document hs_init() infelicity (#2863)
2274Simon Marlow <marlowsd@gmail.com>**20081209164322]
2275[Improve documentation for data family instances (cf Trac #1968)
2278 The HEAD allows GADT syntax for data/newtype family instances.
2279 (GHC 6.10 does not seem to.)
2282[Make some profiling flags dynamic
2283Ian Lynagh <igloo@earth.li>**20081209230157
2284 In particular:
2285     -fauto-sccs-on-all-toplevs          -auto-all   -no-auto-all
2286     -fauto-sccs-on-exported-toplevs     -auto       -no-auto
2287     -fauto-sccs-on-individual-cafs      -caf-all    -no-caf-all
2289[Fix warnings in StgCmmGran
2290Ian Lynagh <igloo@earth.li>**20081209222413]
2291[Add OPTIONS_CATCH,DERIVE,YHC to those that GHC knows about; trac #2847
2292Ian Lynagh <igloo@earth.li>**20081209191724]
2293[Fix warnings in CgHpc
2294Ian Lynagh <igloo@earth.li>**20081209191713]
2295[Parse pragma names better; trac #2847
2296Ian Lynagh <igloo@earth.li>**20081209190318
2297 We require that pragma names are not followed by pragma character,
2298 defined as
2299     isAlphaNum c || c == '_'
2301[Fix warnings in CgParallel
2302Ian Lynagh <igloo@earth.li>**20081209184402]
2303[Fix warnings in StgCmmHpc
2304Ian Lynagh <igloo@earth.li>**20081209184004]
2305[Remove an unnecessary -w flag
2306Ian Lynagh <igloo@earth.li>**20081209183812]
2307[Fix Trac #2861: bogus eta expansion
2310 Urghlhl!  I "tided up" the treatment of the "state hack" in CoreUtils, but
2311 missed an unexpected interaction with the way that a bottoming function
2312 simply swallows excess arguments.  There's a long
2313      Note [State hack and bottoming functions]
2314 to explain (which accounts for most of the new lines of code).
2317[Fix #2592: do an orderly shutdown when the heap is exhausted
2318Simon Marlow <marlowsd@gmail.com>**20081209105919
2319 Really we should be raising an exception in this case, but that's
2320 tricky (see comments).  At least now we shut down the runtime
2321 correctly rather than just exiting.
2323[Fix #2848: avoid overflow during time calculation
2324Simon Marlow <marlowsd@gmail.com>**20081209105600]
2325[Fix #2838: we should narrow a CmmInt before converting to ImmInteger
2326Simon Marlow <marlowsd@gmail.com>**20081209105515]
2327[fix an assertion failure in prof/threaded/debug mode
2328Simon Marlow <marlowsd@gmail.com>**20081204101201]
2329[Inject implicit bindings after CoreTidy, not before Simplify
2332 Originally I inject the "implicit bindings" (record selectors, class
2333 method selectors, data con wrappers...) after CoreTidy.  However, in a
2334 misguided attempt to fix Trac #2070, I moved the injection point to
2335 before the Simplifier, so that record selectors would be optimised by
2336 the simplifier.
2338 This was misguided because record selectors (indeed all implicit bindings)
2339 are GlobalIds, whose IdInfo is meant to be frozen.  But the Simplifier,
2340 and other Core-to-Core optimisations, merrily change the IdInfo.  That
2341 ultimately made Trac #2844 happen, where a record selector got arity 2,
2342 but the GlobalId (which importing scopes re-construct from the class decl
2343 rather than reading from the interface file) has arity 1.
2345 So this patch moves the injection back to CoreTidy. Happily #2070 should
2346 still be OK because we now use CoreSubst.simpleOptExpr on the unfoldings
2347 for implict things, which gets rid of the most gratuitous infelicities.
2349 Still, there's a strong case for stoppping record selectors from being
2350 GlobalIds, and treating them much more like dict-funs.  I'm thinking
2351 about that.  Meanwhile, #2844 is ok now.
2354[Add assertion for arity match (checks Trac #2844)
2357 The exported arity of a function must match the arity for the
2358 STG function.  Trac #2844 was a pretty obscure manifestation of
2359 the failure of this invariant. This patch doesn't cure the bug;
2360 rather it adds an assertion to CoreToStg to check the invariant
2361 so we should get an earlier and less obscure warning if this
2362 fails in future.
2365[Use CoreSubst.simpleOptExpr in place of the ad-hoc simpleSubst (reduces code too)
2367[Move simpleOptExpr from CoreUnfold to CoreSubst
2369[White space only
2371[Comments only
2373[Completely new treatment of INLINE pragmas (big patch)
2376 This is a major patch, which changes the way INLINE pragmas work.
2377 Although lots of files are touched, the net is only +21 lines of
2378 code -- and I bet that most of those are comments!
2380 HEADS UP: interface file format has changed, so you'll need to
2381 recompile everything.
2383 There is not much effect on overall performance for nofib,
2384 probably because those programs don't make heavy use of INLINE pragmas.
2386         Program           Size    Allocs   Runtime   Elapsed
2387             Min         -11.3%     -6.9%     -9.2%     -8.2%
2388             Max          -0.1%     +4.6%     +7.5%     +8.9%
2389  Geometric Mean          -2.2%     -0.2%     -1.0%     -0.8%
2391 (The +4.6% for on allocs is cichelli; see other patch relating to
2392 -fpass-case-bndr-to-join-points.)
2394 The old INLINE system
2395 ~~~~~~~~~~~~~~~~~~~~~
2396 The old system worked like this. A function with an INLINE pragam
2397 got a right-hand side which looked like
2398      f = __inline_me__ (\xy. e)
2399 The __inline_me__ part was an InlineNote, and was treated specially
2400 in various ways.  Notably, the simplifier didn't inline inside an
2401 __inline_me__ note. 
2403 As a result, the code for f itself was pretty crappy. That matters
2404 if you say (map f xs), because then you execute the code for f,
2405 rather than inlining a copy at the call site.
2407 The new story: InlineRules
2408 ~~~~~~~~~~~~~~~~~~~~~~~~~~
2409 The new system removes the InlineMe Note altogether.  Instead there
2410 is a new constructor InlineRule in CoreSyn.Unfolding.  This is a
2411 bit like a RULE, in that it remembers the template to be inlined inside
2412 the InlineRule.  No simplification or inlining is done on an InlineRule,
2413 just like RULEs. 
2415 An Id can have an InlineRule *or* a CoreUnfolding (since these are two
2416 constructors from Unfolding). The simplifier treats them differently:
2418   - An InlineRule is has the substitution applied (like RULES) but
2419     is otherwise left undisturbed.
2421   - A CoreUnfolding is updated with the new RHS of the definition,
2422     on each iteration of the simplifier.
2424 An InlineRule fires regardless of size, but *only* when the function
2425 is applied to enough arguments.  The "arity" of the rule is specified
2426 (by the programmer) as the number of args on the LHS of the "=".  So
2427 it makes a difference whether you say
2428        {-# INLINE f #-}
2429        f x = \y -> e     or     f x y = e
2430 This is one of the big new features that InlineRule gives us, and it
2431 is one that Roman really wanted.
2433 In contrast, a CoreUnfolding can fire when it is applied to fewer
2434 args than than the function has lambdas, provided the result is small
2435 enough.
2438 Consequential stuff
2439 ~~~~~~~~~~~~~~~~~~~
2440 * A 'wrapper' no longer has a WrapperInfo in the IdInfo.  Instead,
2441   the InlineRule has a field identifying wrappers.
2443 * Of course, IfaceSyn and interface serialisation changes appropriately.
2445 * Making implication constraints inline nicely was a bit fiddly. In
2446   the end I added a var_inline field to HsBInd.VarBind, which is why
2447   this patch affects the type checker slightly
2449 * I made some changes to the way in which eta expansion happens in
2450   CorePrep, mainly to ensure that *arguments* that become let-bound
2451   are also eta-expanded.  I'm still not too happy with the clarity
2452   and robustness fo the result.
2454 * We now complain if the programmer gives an INLINE pragma for
2455   a recursive function (prevsiously we just ignored it).  Reason for
2456   change: we don't want an InlineRule on a LoopBreaker, because then
2457   we'd have to check for loop-breaker-hood at occurrence sites (which
2458   isn't currenlty done).  Some tests need changing as a result.
2460 This patch has been in my tree for quite a while, so there are
2461 probably some other minor changes.
2464[Add -fpass-case-bndr-to-join-points
2467 See Note [Passing the case binder to join points] in Simplify.lhs
2468 The default now is *not* to pass the case binder.  There are some
2469 nofib results with the above note; the effect is almost always
2470 negligible.
2472 I don't expect this flag to be used by users (hence no docs). It's just
2473 there to let me try the performance effects of switching on and off.
2476[Add static flag -fsimple-list-literals
2479 The new static flag -fsimple-list-literals makes ExplicitList literals
2480 be desugared in the straightforward way, rather than using 'build' as
2481 now.  See SLPJ comments with Note [Desugaring explicit lists].
2483 I don't expect this flag to be used by users (hence no docs). It's just
2484 there to let me try the performance effects of switching on and off.
2487[Comments only in OccurAnal
2489[Comments only
2491[Layout only
2493[Comments only (Note [Entering error thunks])
2495[Make CoreToStg a little more robust to eta expansion
2497[Add no-op case for addIdSpecialisations (very minor optimisation)
2499[Trim redundant import
2501[Make CoreTidy retain deadness info (better -ddump-simpl)
2504 GHC now retains more robust information about dead variables; but
2505 CoreTidy was throwing it away.  This patch makes CoreTidy retain it,
2506 which gives better output for -ddump-simpl.
2508 New opportunity: shrink interface files by using wildcards for dead variables.
2512[Remove INLINE pragmas on recursive functions
2515 INLINE pragmas on recursive functions are ignored; and this
2516 is checked in my upcoming patch for inlinings.
2519[Comments only (on Activation)
2521[We need to tell cabal-bin which version of Cabal to use
2522Ian Lynagh <igloo@earth.li>**20081203123208
2523 Otherwise, if the bootstrapping compiler has a newer version, we get
2524 a mismatch between the version used to compile ghc-prim's Setup.hs and
2525 the version that installPackage uses.
2527[Document 'loadModule'.
2528Thomas Schilling <nominolo@googlemail.com>**20081202154800]
2529[Add 'needsTemplateHaskell' utility function and document why one might
2530Thomas Schilling <nominolo@googlemail.com>**20081202152358
2531 want to use it.
2533[Documentation only.
2534Thomas Schilling <nominolo@googlemail.com>**20081202150158]
2535[Export 'succeeded' and 'failed' helper functions.
2536Thomas Schilling <nominolo@googlemail.com>**20081202144451]
2537[Put full ImportDecls in ModSummary instead of just ModuleNames
2538Simon Marlow <marlowsd@gmail.com>**20081202133736
2539 ... and use it to make ghc -M generate correct cross-package
2540 dependencies when using package-qualified imports (needed for the new
2541 build system).  Since we're already parsing the ImportDecl from the
2542 source file, there seems no good reason not to keep it in the
2543 ModSummary, it might be useful for other things too.
2545[ghc -M: need to add a dep on Prelude unless -fno-implicit-prelude is on
2546Simon Marlow <marlowsd@gmail.com>**20081128165707]
2547[make -include-pkg-deps work (not sure when this got lost)
2548Simon Marlow <marlowsd@gmail.com>**20081128135746]
2549[Fix more problems caused by padding in the Capability structure
2550Simon Marlow <marlowsd@gmail.com>**20081202120735
2551 Fixes crashes on Windows and Sparc
2553[add missing case to Ord GlobalReg (EagerBlackhole == EagerBlackhole)
2554Simon Marlow <marlowsd@gmail.com>**20081128130106]
2555[Better error message for fundep conflict
2557[Fix typo in quasi-quote documentation's sample.
2558shelarcy <shelarcy@gmail.com>**20081129024344]
2559[Remove the v_Split_info global variable and use a field of dflags instead
2560Ian Lynagh <igloo@earth.li>**20081130152403]
2561[Document the --machine-readable RTS flag
2562Ian Lynagh <igloo@earth.li>**20081130152311]
2563[Let 'loadModule' generate proper code depending on the 'hscTarget'.
2564Thomas Schilling <nominolo@googlemail.com>**20081128164412
2566 With this change it should be possible to perform something similar to
2567 'load' by traversing the module graph in dependency order and calling
2568 '{parse,typecheck,load}Module' on each.  Of course, if you want smart
2569 recompilation checking you should still use 'load'.
2571[Expose a separate 'hscBackend' phase for 'HsCompiler' and change
2572Thomas Schilling <nominolo@googlemail.com>**20081128163746
2573 parameter to 'InteractiveStatus' to a 'Maybe'.
2575[Whoops, *don't* reset the complete session in 'withLocalCallbacks'.
2576Thomas Schilling <nominolo@googlemail.com>**20081128150727]
2577[Use a record instead of a typeclass for 'HsCompiler'.  This is mostly
2578Thomas Schilling <nominolo@googlemail.com>**20081128121947
2579 equivalent to a typeclass implementation that uses a functional
2580 dependency from the target mode to the result type.
2582[Remove dead code
2583Ian Lynagh <igloo@earth.li>**20081128193831]
2584[Update docs not to talk about deprecated -optdep-* flags; fixes trac #2773
2585Ian Lynagh <igloo@earth.li>**20081128193633]
2586[Use relative URLs in the GHC API haddock docs; fixes #2755
2587Ian Lynagh <igloo@earth.li>**20081128184511]
2588[Teach runghc about --help; fixes trac #2757
2589Ian Lynagh <igloo@earth.li>**20081128191706]
2590[Use a per-session data structure for callbacks.  Make 'WarnErrLogger'
2591Thomas Schilling <nominolo@googlemail.com>**20081128103628
2592 part of it.
2594 Part of the GHC API essentially represents a compilation framework.
2595 The difference of a *framework* as opposed to a *library* is that the
2596 overall structure of the functionality is pre-defined but certain
2597 details can be customised via callbacks.  (Also known as the Hollywood
2598 Principle: "Don't call us, we'll call you.")
2600 This patch introduces a per-session data structure that contains all
2601 the callbacks instead of adding lots of small function arguments
2602 whenever we want to give the user more control over certain parts of
2603 the API.  This should also help with future changes: Adding a new
2604 callback doesn't break old code since code that doesn't know about the
2605 new callback will use the (hopefully sane) default implementation.
2607 Overall, however, we should try and keep the number of callbacks small
2608 and well-defined (and provide useful defaults) and use simple library
2609 routines for the rest.
2611[Improve error message for #2739 (but no fix).
2612Thomas Schilling <nominolo@googlemail.com>**20081127135725
2614 This patch changes 'loadModule' to define a fake linkable.  The
2615 previous implementation of providing no linkable at all violated a
2616 pre-condition in the ByteCode linker.  This doesn't fix #2739, but it
2617 improves the error message a bit.
2619[Remove the packing I added recently to the Capability structure
2620Simon Marlow <marlowsd@gmail.com>**20081128105046
2621 The problem is that the packing caused some unaligned loads, which
2622 lead to bus errors on Sparc (and reduced performance elsewhere,
2623 presumably).
2625[don't emit CmmComments for now
2626Simon Marlow <marlowsd@gmail.com>**20081127090145
2627   - if the string contains */, we need to fix it (demonstrated by
2628     building Cabal with -fvia-C)
2629   - the strings can get quite large, so we probably only want to
2630     inject comments when some debugging option is on.
2632[Collect instead of print warnings in 'warnUnnecessarySourceImports'.
2633Thomas Schilling <nominolo@googlemail.com>**20081127102534]
2634[Force recompilation of BCOs when they were compiled in HscNothing mode.
2635Thomas Schilling <nominolo@googlemail.com>**20081126183402
2637 Previously, loading a set of modules in HscNothing mode and then
2638 switching to HscInterpreted could lead to crashes since modules
2639 compiled with HscNothing were thought to be valid bytecode objects.
2641 This patch forces recompilation in these cases, hence switching between
2642 HscNothing and HscInterpreted should be safe now.
2644[Documentation only: Add module description for HscMain.
2645Thomas Schilling <nominolo@googlemail.com>**20081126134344]
2646[Include GHCi files in ctags/etags.
2647Thomas Schilling <nominolo@googlemail.com>**20081126122801]
2648[drop some debugging traces and use only one flag for new codegen
2650[one more missing patch from new codegen path
2652[Fix Trac #2817 (TH syntax -> HsSyn conversion)
2654[Fix Trac #2756: CorePrep strictness bug
2656[Format output for :t more nicely
2658[Fix Trac #2766: printing operator type variables
2660[Fix build following codegen patch
2662[Removed warnings, made Haddock happy, added examples in documentation
2664 The interesting examples talk about our story with heap checks in
2665 case alternatives and our story with the case scrutinee as a Boolean.
2667[Fixed linear regalloc bug, dropped some tracing code
2669 o The linear-scan register allocator sometimes allocated a block
2670   before allocating one of its predecessors, which could lead
2671   to inconsistent allocations. Now, we allocate a block only
2672   if a predecessor has set the "incoming" assignments for the block
2673   (or if it's the procedure's entry block).
2674 o Also commented out some tracing code on the new codegen path.
2676[Keep update frames live even in functions that never return
2678 An unusual case, but without it:
2679 (a) we had an assertion failure
2680 (b) we can overwrite the caller's infotable, which might cause
2681     the garbage collector to collect live data.
2682 Better to keep the update frame live at all call sites,
2683 not just at returns.
2685[Removed space and time inefficiency in procpoint splitting
2687 I was adding extra jumps to every procpoint, even when the split-off graph
2688 referred to only some of the procpoints. No effect on correctness,
2689 but a big effect on space/time efficiency when there are lots of procpoints...
2691[Clarify the SRT building process
2693 Before: building a closure that would build an SRT given the top-level
2694 SRT. It was somewhat difficult to understand the control flow, and it
2695 may have had held onto some data structures long after they should be dead.
2696 Now, I just bundle the info we need about CAFs along with the procedure
2697 and directly call a new top-level function to build the SRTs later.
2699[Don't adjust hp up when the case scrutinee won't allocate
2702 If the case scrutinee can't allocate, we don't need to do a heap
2703 check in the case alternatives. (A previous patch got that right.)
2704 In that case, we had better not adjust the heap pointer to recover
2705 unused stack space before evaluating the scrutinee -- because we
2706 aren't going to reallocate for the case alternative.
2708[Floating infotables were reversed in C back end
2710[forgot a few files
2712[Big collection of patches for the new codegen branch.
2714 o Fixed bug that emitted the copy-in code for closure entry
2715   in the wrong place -- at the initialization of the closure.
2716 o Refactored some of the closure entry code.
2717 o Added code to check that no LocalRegs are live-in to a procedure
2718    -- trip up some buggy programs earlier
2719 o Fixed environment bindings for thunks
2720    -- we weren't (re)binding the free variables in a thunk
2721 o Fixed a bug in proc-point splitting that dropped some updates
2722   to the entry block in a procedure.
2723 o Fixed improper calls to code that generates CmmLit's for strings
2724 o New invariant on cg_loc in CgIdInfo: the expression is always tagged
2725 o Code to load free vars on entry to a thunk was (wrongly) placed before
2726   the heap check.
2727 o Some of the StgCmm code was redundantly passing around Id's
2728   along with CgIdInfo's; no more.
2729 o Initialize the LocalReg's that point to a closure before allocating and
2730   initializing the closure itself -- otherwise, we have problems with
2731   recursive closure bindings
2732 o BlockEnv and BlockSet types are now abstract.
2733 o Update frames:
2734   - push arguments in Old call area
2735   - keep track of the return sp in the FCode monad
2736   - keep the return sp in every call, tail call, and return
2737       (because it might be different at different call sites,
2738        e.g. tail calls to the gc after a heap check are performed
2739             before pushing the update frame)
2740   - set the sp appropriately on returns and tail calls
2741 o Reduce call, tail call, and return to a single LastCall node
2742 o Added slow entry code, using different calling conventions on entry and tail call
2743 o More fixes to the calling convention code.
2744   The tricky stuff is all about the closure environment: it must be passed in R1,
2745   but in non-closures, there is no such argument, so we can't treat all arguments
2746   the same way: the closure environment is special. Maybe the right step forward
2747   would be to define a different calling convention for closure arguments.
2748 o Let-no-escapes need to be emitted out-of-line -- otherwise, we drop code.
2749 o Respect RTS requirement of word alignment for pointers
2750   My stack allocation can pack sub-word values into a single word on the stack,
2751   but it wasn't requiring word-alignment for pointers. It does now,
2752   by word-aligning both pointer registers and call areas.
2753 o CmmLint was over-aggresively ruling out non-word-aligned memory references,
2754   which may be kosher now that we can spill small values into a single word.
2755 o Wrong label order on a conditional branch when compiling switches.
2756 o void args weren't dropped in many cases.
2757   To help prevent this kind of mistake, I defined a NonVoid wrapper,
2758   which I'm applying only to Id's for now, although there are probably
2759   other good candidates.
2760 o A little code refactoring: separate modules for procpoint analysis splitting,
2761   stack layout, and building infotables.
2762 o Stack limit check: insert along with the heap limit check, using a symbolic
2763   constant (a special CmmLit), then replace it when the stack layout is known.
2764 o Removed last node: MidAddToContext
2765 o Adding block id as a literal: means that the lowering of the calling conventions
2766   no longer has to produce labels early, which was inhibiting common-block elimination.
2767   Will also make it easier for the non-procpoint-splitting path.
2768 o Info tables: don't try to describe the update frame!
2769 o Over aggressive use of NonVoid!!!!
2770   Don't drop the non-void args before setting the type of the closure!!!
2771 o Sanity checking:
2772   Added a pass to stub dead dead slots on the stack
2773   (only ~10 lines with the dataflow framework)
2774 o More sanity checking:
2775   Check that incoming pointer arguments are non-stubbed.
2776   Note: these checks are still subject to dead-code removal, but they should
2777   still be quite helpful.
2778 o Better sanity checking: why stop at function arguments?
2779   Instead, in mkAssign, check that _any_ assignment to a pointer type is non-null
2780   -- the sooner the crash, the easier it is to debug.
2781   Still need to add the debugging flag to turn these checks on explicitly.
2782 o Fixed yet another calling convention bug.
2783   This time, the calls to the GC were wrong. I've added a new convention
2784   for GC calls and invoked it where appropriate.
2785   We should really straighten out the calling convention stuff:
2786     some of the code (and documentation) is spread across the compiler,
2787     and there's some magical use of the node register that should really
2788     be handled (not avoided) by calling conventions.
2789 o Switch bug: the arms in mkCmmLitSwitch weren't returning to a single join point.
2790 o Environment shadowing problem in Stg->Cmm:
2791   When a closure f is bound at the top-level, we should not bind f to the
2792   node register on entry to the closure.
2793   Why? Because if the body of f contains a let-bound closure g that refers
2794   to f, we want to make sure that it refers to the static closure for f.
2795   Normally, this would all be fine, because when we compile a closure,
2796   we rebind free variables in the environment. But f doesn't look like
2797   a free variable because it's a static value. So, the binding for f
2798   remains in the environment when we compile g, inconveniently referring
2799   to the wrong thing.
2800   Now, I bind the variable in the local environment only if the closure is not
2801   bound at the top level. It's still okay to make assumptions about the
2802   node holding the closure environment; we just won't find the binding
2803   in the environment, so code that names the closure will now directly
2804   get the label of the static closure, not the node register holding a
2805   pointer to the static closure.
2806 o Don't generate bogus Cmm code containing SRTs during the STG -> Cmm pass!
2807   The tables made reference to some labels that don't exist when we compute and
2808   generate the tables in the back end.
2809 o Safe foreign calls need some special treatment (at least until we have the integrated
2810   codegen). In particular:
2811   o they need info tables
2812   o they are not procpoints -- the successor had better be in the same procedure
2813   o we cannot (yet) implement the calling conventions early, which means we have
2814     to carry the calling-conv info all the way to the end
2815 o We weren't following the old convention when registering a module.
2816   Now, we use update frames to push any new modules that have to be registered
2817   and enter the youngest one on the stack.
2818   We also use the update frame machinery to specify that the return should pop
2819   the return address off the stack.
2820 o At each safe foreign call, an infotable must be at the bottom of the stack,
2821   and the TSO->sp must point to it.
2822 o More problems with void args in a direct call to a function:
2823   We were checking the args (minus voids) to check whether the call was saturated,
2824   which caused problems when the function really wasn't saturated because it
2825   took an extra void argument.
2826 o Forgot to distinguish integer != from floating != during Stg->Cmm
2827 o Updating slotEnv and areaMap to include safe foreign calls
2828   The dataflow analyses that produce the slotEnv and areaMap give
2829   results for each basic block, but we also need the results for
2830   a safe foreign call, which is a middle node.
2831   After running the dataflow analysis, we have another pass that
2832   updates the results to includ any safe foreign calls.
2833 o Added a static flag for the debugging technique that inserts
2834   instructions to stub dead slots on the stack and crashes when
2835   a stubbed value is loaded into a pointer-typed LocalReg.
2836 o C back end expects to see return continuations before their call sites.
2837   Sorted the flowgraphs appropriately after splitting.
2838 o PrimOp calling conventions are special -- unlimited registers, no stack
2839   Yet another calling convention...
2840 o More void value problems: if the RHS of a case arm is a void-typed variable,
2841   don't try to return it.
2842 o When calling some primOp, they may allocate memory; if so, we need to
2843   do a heap check when we return from the call.
2846[Merging in the new codegen branch
2848 This merge does not turn on the new codegen (which only compiles
2849 a select few programs at this point),
2850 but it does introduce some changes to the old code generator.
2852 The high bits:
2853 1. The Rep Swamp patch is finally here.
2854    The highlight is that the representation of types at the
2855    machine level has changed.
2856    Consequently, this patch contains updates across several back ends.
2857 2. The new Stg -> Cmm path is here, although it appears to have a
2858    fair number of bugs lurking.
2859 3. Many improvements along the CmmCPSZ path, including:
2860    o stack layout
2861    o some code for infotables, half of which is right and half wrong
2862    o proc-point splitting
2864[Major clean-up of HscMain.
2865Thomas Schilling <nominolo@googlemail.com>**20081125153201
2867 This patch entails a major restructuring of HscMain and a small bugfix
2868 to MkIface (which required the restructuring in HscMain).
2870 In MkIface:
2872   - mkIface* no longer outputs orphan warnings directly and also no
2873     longer quits GHC when -Werror is set.  Instead, errors are
2874     reported using the common IO (Messages, Maybe result) scheme.
2876 In HscMain:
2878   - Get rid of the 'Comp' monad.  This monad was mostly GhcMonad + two
2879     reader arguments, a ModSummary for the currently compiled module
2880     and a possible old interface.  The latter actually lead to a small
2881     space-leak since only its hash was needed (to check whether the
2882     newly-generated interface file was the same as the original one).
2884     Functions originally of type 'Comp' now only take the arguments
2885     that they actually need.  This leads to slighly longer argument
2886     lists in some places, however, it is now much easier to see what
2887     is actually going on.
2889   - Get rid of 'myParseModule'.  Rename 'parseFile' to 'hscParse'.
2891   - Join 'deSugarModule' and 'hscDesugar' (keeping the latter).
2893   - Rename 'typecheck{Rename}Module{'}' to 'hscTypecheck{Rename}'.
2894     One variant keeps the renamed syntax, the other doesn't.
2896   - Parameterise 'HscStatus', so that 'InteractiveStatus' is just a
2897     different parameterisation of 'HscStatus'.
2899   - 'hscCompile{OneShot,Batch,Nothing,Interactive}' are now
2900     implemented using a (local) typeclass called 'HsCompiler'.  The
2901     idea is to make the common structure more obvious.  Using this
2902     typeclass we now have two functions 'genericHscCompile' (original
2903     'hscCompiler') and 'genericHscRecompile' (original 'genComp')
2904     describing the default pipeline.  The methods of the typeclass
2905     describe a sort of "hook" interface (in OO-terms this would be
2906     called the "template method" pattern).
2908     One problem with this approach is that we parameterise over the
2909     /result/ type which, in fact, is not actually different for
2910     "nothing" and "batch" mode.  To avoid functional dependencies or
2911     associated types, we use type tags to make them artificially
2912     different and parameterise the type class over the result type.
2913     A perhaps better approach might be to use records instead.
2915   - Drop some redundant 'HscEnv' arguments.  These were likely
2916     different from what 'getSession' would return because during
2917     compilation we temporarily set the module's DynFlags as well as a
2918     few other fields.  We now use the 'withTempSession' combinator to
2919     temporarily change the 'HscEnv' and automatically restore the
2920     original session after the enclosed action has returned (even in
2921     case of exceptions).
2923   - Rename 'hscCompile' to 'hscGenHardCode' (since that is what it
2924     does).
2926 Calls in 'GHC' and 'DriverPipeline' accordingly needed small
2927 adaptions.
2929[Fix Trac #2799: TcType.isOverloadedTy
2932 A missing case (for equality predicates) in isOverloadedTy make
2933 bindInstsOfLocalFuns/Pats do the wrong thing.  Core Lint nailed it.
2935 Merge to 6.10 branch.
2938[Fix #2740: we were missing the free variables on some expressions
2939Simon Marlow <marlowsd@gmail.com>**20081125103113
2940 Particularly boolean expresions: the conditional of an 'if', and
2941 guards, were missing their free variables.
2943[Fix symbol macro names in Linker.c
2944Thorkil Naur <naur@post11.tele.dk>**20081121160149]
2945[Add a --machine-readable RTS flag
2946Ian Lynagh <igloo@earth.li>**20081123152127
2947 Currently it only affects the -t flag output
2949[Return errors instead of dying in myParseModule.
2950Thomas Schilling <nominolo@googlemail.com>**20081122154151]
2951[Comments/Haddockification only.
2952Thomas Schilling <nominolo@googlemail.com>**20081122143018]
2953[Report source span instead of just source location for unused names.
2954Thomas Schilling <nominolo@googlemail.com>**20081122142641]
2955[Change 'handleFlagWarnings' to throw exceptions instead of dying.
2956Thomas Schilling <nominolo@googlemail.com>**20081122130658
2958 It now uses the standard warning log and error reporting mechanism.
2960[Document exported functions in main/HeaderInfo.
2961Thomas Schilling <nominolo@googlemail.com>**20081121145307]
2962[Remove warning supression klugde in main/HeaderInfo
2963Thomas Schilling <nominolo@googlemail.com>**20081121144155]
2964[Use mutator threads to do GC, instead of having a separate pool of GC threads
2965Simon Marlow <marlowsd@gmail.com>**20081121151233
2967 Previously, the GC had its own pool of threads to use as workers when
2968 doing parallel GC.  There was a "leader", which was the mutator thread
2969 that initiated the GC, and the other threads were taken from the pool.
2971 This was simple and worked fine for sequential programs, where we did
2972 most of the benchmarking for the parallel GC, but falls down for
2973 parallel programs.  When we have N mutator threads and N cores, at GC
2974 time we would have to stop N-1 mutator threads and start up N-1 GC
2975 threads, and hope that the OS schedules them all onto separate cores.
2976 It practice it doesn't, as you might expect.
2978 Now we use the mutator threads to do GC.  This works quite nicely,
2979 particularly for parallel programs, where each mutator thread scans
2980 its own spark pool, which is probably in its cache anyway.
2982 There are some flag changes:
2984   -g<n> is removed (-g1 is still accepted for backwards compat).
2985   There's no way to have a different number of GC threads than mutator
2986   threads now.
2988   -q1       Use one OS thread for GC (turns off parallel GC)
2989   -qg<n>    Use parallel GC for generations >= <n> (default: 1)
2991 Using parallel GC only for generations >=1 works well for sequential
2992 programs.  Compiling an ordinary sequential program with -threaded and
2993 running it with -N2 or more should help if you do a lot of GC.  I've
2994 found that adding -qg0 (do parallel GC for generation 0 too) speeds up
2995 some parallel programs, but slows down some sequential programs.
2996 Being conservative, I left the threshold at 1.
2998 ToDo: document the new options.
3001[we shouldn't update topBound in discardSparks()
3002Simon Marlow <marlowsd@gmail.com>**20081121113539]
3003[Throw SourceErrors instead of ProgramErrors in main/HeaderInfo.
3004Thomas Schilling <nominolo@googlemail.com>**20081121141339
3006 Parse errors during dependency analysis or options parsing really
3007 shouldn't kill GHC; this is particularly annoying for GHC API clients.
3009[fix the build when !USE_MMAP
3010Simon Marlow <marlowsd@gmail.com>**20081121085418]
3011[round the size up to a page in mmapForLinker() instead of in the caller
3012Simon Marlow <marlowsd@gmail.com>**20081120154014]
3013[Fix a race in the deadlock-detection code
3014Simon Marlow <marlowsd@gmail.com>**20081120112438
3015 After a deadlock it was possible for the timer signal to remain off,
3016 which meant that the next deadlock would not be detected, and the
3017 system would hang.  Spotted by conc047(threaded2).
3019[error message wibble
3020Simon Marlow <marlowsd@gmail.com>**20081120084901]
3021[Fix flag name -XDisambiguateRecordFields
3023[Fix regTableToCapability() if gcc introduces padding
3024Simon Marlow <marlowsd@gmail.com>**20081119162910
3025 Also avoid padding if possible using __attribute__((packed))
3026 Fixes the Windows build
3028[Fix 32-bit breakage
3029Simon Marlow <marlowsd@gmail.com>**20081119145429]
3030[Small refactoring, and add comments
3031Simon Marlow <marlowsd@gmail.com>**20081119143702
3032 I discovered a new invariant while experimenting (blackholing is not
3033 optional when using parallel GC), so documented it.
3035[Fix some unsigned comparisions that should be signed
3036Simon Marlow <marlowsd@gmail.com>**20081119143205
3037 Fixes crashes when using reclaimSpark() (not used currently, but may
3038 be in the future).
3040[Remove incorrect assertions in steal()
3041Simon Marlow <marlowsd@gmail.com>**20081119143043]
3042[don't run sparks if there are other threads on this Capability
3043Simon Marlow <marlowsd@gmail.com>**20081114121022]
3044[Fix typo (HAVE_LIBGMP => HAVE_LIB_GMP); omit local gmp includes if HAVE_LIB_GMP
3045Simon Marlow <marlowsd@gmail.com>**20081119131056
3046 If we're using the system's installed GMP, we don't want to be picking
3047 up the local gmp.h header file.
3049 Fixes 2469(ghci) for me, because it turns out the system's GMP is more
3050 up-to-date than GHC's version and has a fix for more recent versions
3051 of gcc.  We also need to pull in a more recent GMP, but that's a
3052 separte issue.
3054[Fix some more shutdown races
3055Simon Marlow <marlowsd@gmail.com>**20081119124848
3056 There were races between workerTaskStop() and freeTaskManager(): we
3057 need to be sure that all Tasks have exited properly before we start
3058 tearing things down.  This isn't completely straighforward, see
3059 comments for details.
3061[Add help messages about --with-editline-(includes,libraries) to the ghc configure script.
3062Judah Jacobson <judah.jacobson@gmail.com>**20081114183334]
3063[Add optional eager black-holing, with new flag -feager-blackholing
3064Simon Marlow <marlowsd@gmail.com>**20081118142442
3066 Eager blackholing can improve parallel performance by reducing the
3067 chances that two threads perform the same computation.  However, it
3068 has a cost: one extra memory write per thunk entry. 
3070 To get the best results, any code which may be executed in parallel
3071 should be compiled with eager blackholing turned on.  But since
3072 there's a cost for sequential code, we make it optional and turn it on
3073 for the parallel package only.  It might be a good idea to compile
3074 applications (or modules) with parallel code in with
3075 -feager-blackholing.
3077 ToDo: document -feager-blackholing.
3079[Fix #2783: detect black-hole loops properly
3080Simon Marlow <marlowsd@gmail.com>**20081117144515
3081 At some point we regressed on detecting simple black-hole loops.  This
3082 happened due to the introduction of duplicate-work detection for
3083 parallelism: a black-hole loop looks very much like duplicate work,
3084 except it's duplicate work being performed by the very same thread.
3085 So we have to detect and handle this case.
3087[Fix warning on Windows (use deleteThread() not deleteThread_())
3088Simon Marlow <marlowsd@gmail.com>**20081117143047]
3089[fix compile breakage on Windows
3090Simon Marlow <marlowsd@gmail.com>**20081117142831]
3091[Attempt to fix #2512 and #2063;  add +RTS -xm<address> -RTS option
3092Simon Marlow <marlowsd@gmail.com>**20081117120556
3093 On x86_64, the RTS needs to allocate memory in the low 2Gb of the
3094 address space.  On Linux we can do this with MAP_32BIT, but sometimes
3095 this doesn't work (#2512) and other OSs don't support it at all
3096 (#2063).  So to work around this:
3098   - Try MAP_32BIT first, if available.
3100   - Otherwise, try allocating memory from a fixed address (by default
3101     1Gb)
3103   - We now provide an option to configure the address to allocate
3104     from.  This allows a workaround on machines where the default
3105     breaks, and also provides a way for people to test workarounds
3106     that we can incorporate in future releases.
3108[Another shutdown fix
3109Simon Marlow <marlowsd@gmail.com>**20081117094350
3110 If we encounter a runnable thread during shutdown, just kill it.  All
3111 the threads are supposed to be dead at this stage, but this catches
3112 threads that might have just returned from a foreign call, or were
3113 finalizers created by the GC.
3115 Fixes memo002(threaded1)
3117[Correct an example in the users guide
3118Ian Lynagh <igloo@earth.li>**20081116174938]
3119[Fix gen_contents_index when not run inplace; trac #2764
3120Ian Lynagh <igloo@earth.li>**20081116174122
3121 Based on a patch from juhpetersen.
3123[close the temporary Handle before removing the file
3124Simon Marlow <marlowsd@gmail.com>**20081114130958]
3125[refactor: move unlockClosure() into SMPClosureOps() where it should be
3126Simon Marlow <marlowsd@gmail.com>**20081114095817]
3127[Omit definitions of cas() and xchg() in .hc code
3128Simon Marlow <marlowsd@gmail.com>**20081114095738
3129 They cause compilation errors (correctly) with newer gccs
3130 Shows up compiling the RTS via C, which happens on Windows
3132[Don't put stdin into non-blocking mode (#2778, #2777)
3133Simon Marlow <marlowsd@gmail.com>**20081114130546
3134 This used to be necessary when our I/O library needed all FDs in
3135 O_NONBLOCK mode, and readline used to put stdin back into blocking
3136 mode.  Nowadays the I/O library can cope with FDs in blocking mode,
3137 and #2778/#2777 show why this is important.
3139[Rmoeve --enable-dotnet
3140Simon Marlow <marlowsd@gmail.com>**20081114124929]
3141[#2751: disourage --enable-shared in ./configure --help
3142Simon Marlow <marlowsd@gmail.com>**20081114124748]
3143[add a warning that --enable-shared is experimental
3144Simon Marlow <marlowsd@gmail.com>**20081114104034]
3145[lookupSymbol: revert to looking up both with and without the @N suffix
3146Simon Marlow <marlowsd@gmail.com>**20081113122927]
3147[#2768: fix compatibility problem with newer version of mingw
3148Simon Marlow <marlowsd@gmail.com>**20081113114626]
3149[notice ^C exceptions when waiting for I/O
3150Simon Marlow <marlowsd@gmail.com>**20081113114342]
3151[Fix a bug in the recompilation checking logic.
3152Thomas Schilling <nominolo@googlemail.com>**20081113162653
3154 Previously, using target HscNothing resulted in unnessesary
3155 recompilation because 'upsweep_mod' treated HscInterface specially.
3156 This patch changes relaxes this.
3158 When running GHC with debug level 5, 'upsweep_mod' will now also be
3159 more verbose about what it is doing.
3161 There is (at least) one possible remaining problem, though: When using
3162 target 'HscNothing' we generate a fake linkable to signal that we have
3163 processed a module.  When switching to 'HscInterpreted' this may cause
3164 objects to not be recompiled.  Switching from HscNothing to
3165 HscInterpreted is therefore only safe if we unload everything first.
3167[Fix another subtle shutdown deadlock
3168Simon Marlow <marlowsd@gmail.com>**20081113160005
3169 The problem occurred when a thread tries to GC during shutdown.  In
3170 order to GC it has to acquire all the Capabilities in the system, but
3171 during shutdown, some of the Capabilities have already been closed and
3172 can never be acquired.
3174[Fix an extremely subtle deadlock bug on x86_64
3175Simon Marlow <marlowsd@gmail.com>**20081113155730
3176 The recent_activity flag was an unsigned int, but we sometimes do a
3177 64-bit xchg() on it, which overwrites the next word in memory.  This
3178 happened to contain the sched_state flag, which is used to control the
3179 orderly shutdown of the system.  If the xchg() happened during
3180 shutdown, the scheduler would get confused and deadlock.  Don't you
3181 just love C?
3183[move an assertion
3184Simon Marlow <marlowsd@gmail.com>**20081113154542]
3185[Always zap the trailing @N from symbols when looking up in a DLL
3186Simon Marlow <marlowsd@gmail.com>**20081112111518
3188 Fixes win32002(ghci)
3190 Previously we only did this for references from object files, but we
3191 should do it for all symbols, including those that GHCi looks up due
3192 to FFI calls from bytecode.
3194[Only allocate a mark stack if we're actually doing marking
3195Simon Marlow <marlowsd@gmail.com>**20081112112144
3196 saves a bit of memory in major GCs
3198[Fix parse error with older gccs (#2752)
3199Simon Marlow <marlowsd@gmail.com>**20081111135344]
3200[Fix to i386_insert_ffrees (#2724, #1944)
3201Simon Marlow <marlowsd@gmail.com>**20081111125619
3202 The i386 native code generator has to arrange that the FPU stack is
3203 clear on exit from any function that uses the FPU.  Unfortunately it
3204 was getting this wrong (and has been ever since this code was written,
3205 I think): it was looking for basic blocks that used the FPU and adding
3206 the code to clear the FPU stack on any non-local exit from the block.
3207 In fact it should be doing this on a whole-function basis, rather than
3208 individual basic blocks.
3210[Fix bootstrap with 6.10.1 on Windows
3211Simon Marlow <marlowsd@gmail.com>**20081110134318
3212 ghc-pkg doesn't understand the old syntax any more, so 'ghc-pkg -l' fails
3214[Perform case-insensitive matching of path components in getBaseDir on Windows (Fixes bug 2743)
3215Neil Mitchell <ndmitchell@gmail.com>**20081105134315]
3216[Documentation only.  Clarify that 'load*' may indeed throw SourceErrors.
3217Thomas Schilling <nominolo@googlemail.com>**20081110175614
3219 I don't think errors during dependency analysis should be passed to
3220 the logger.
3222[Fix documentation (to say the opposite).
3223Thomas Schilling <nominolo@googlemail.com>**20081110153819]
3224[Fix line numbers in TAGS files.
3225Thomas Schilling <nominolo@googlemail.com>**20081110153621]
3226[Documentation only.
3227Thomas Schilling <nominolo@googlemail.com>**20081110153456]
3228[Add 'packageDbModules' function to GHC API.
3229Thomas Schilling <nominolo@googlemail.com>**20081110143510
3231 This function returns a list of all modules available through the
3232 package DB.
3234 MERGE TO 6.10
3236[We now require GHC 6.6, so we always have Applicative
3237Ian Lynagh <igloo@earth.li>**20081108144723]
3238[Remove a CPP test that's always true (__GLASGOW_HASKELL__ >= 605)
3239Ian Lynagh <igloo@earth.li>**20081108144544]
3240[Remove some dead code now that __GLASGOW_HASKELL__ >= 606
3241Ian Lynagh <igloo@earth.li>**20081108144459]
3242[Remove some flag duplication from a Makefile
3243Ian Lynagh <igloo@earth.li>**20081108144412]
3244[ghc_ge_605 is now always YES
3245Ian Lynagh <igloo@earth.li>**20081108144328]
3246[Remove the GHC 6.4 unicode compat stuff; we can now just use Data.Char
3247Ian Lynagh <igloo@earth.li>**20081108143423]
3248[Fix libffi bindist
3249Clemens Fruhwirth <clemens@endorphin.org>**20081108094725]
3250[Replace couple of fromJust with expectJust
3251Clemens Fruhwirth <clemens@endorphin.org>**20081107160735]
3252[Bugfix for patch "Do not filter the rts from linked libraries..." (#2745)
3253Simon Marlow <marlowsd@gmail.com>**20081107092925
3254 The sense of the #ifdef was wrong
3256[fix via-C compilation: import ghczmprim_GHCziBool_False_closure
3257Simon Marlow <marlowsd@gmail.com>**20081107090432]
3258[disable instance MonadPlus CoreM for GHC <= 6.6
3259Simon Marlow <marlowsd@gmail.com>**20081107085250]
3260[re-instate counting of sparks converted
3261Simon Marlow <marlowsd@gmail.com>**20081106160810
3262 lost in patch "Run sparks in batches"
3264[fix ASSERT_SPARK_POOL_INVARIANTS(): top>bottom is valid
3265Simon Marlow <marlowsd@gmail.com>**20081106155826]
3266[pruneSparkQueue(): fix bug when top>bottom
3267Simon Marlow <marlowsd@gmail.com>**20081106155648]
3268[don't yield if the system is shutting down
3269Simon Marlow <marlowsd@gmail.com>**20081106155356]
3270[leave out ATTRIBUTE_ALIGNED on Windows, it gives a warning
3271Simon Marlow <marlowsd@gmail.com>**20081106132105]
3272[Cope with ThreadRelocated when traversing the blocked_queue
3273Simon Marlow <marlowsd@gmail.com>**20081106114045
3274 Fixes "invalid what_next field" in ioref001 on Windows, and perhaps others
3276[Remove dead code.
3277Thomas Schilling <nominolo@googlemail.com>**20081031162036]
3278[Run sparks in batches, instead of creating a new thread for each one
3279Simon Marlow <marlowsd@gmail.com>**20081106113639
3280 Signficantly reduces the overhead for par, which means that we can
3281 make use of paralellism at a much finer granularity.
3283[allocateInGen(): increase alloc_blocks (#2747)
3284Simon Marlow <marlowsd@gmail.com>**20081106113714]
3285[disable MonadPlus instance that doesn't compile with 6.6
3286Simon Marlow <marlowsd@gmail.com>**20081106100411]
3287[don't yield the Capability if blackholes_need_checking
3288Simon Marlow <marlowsd@gmail.com>**20081105154928]
3289[deadlock fix: reset the flag *after* checking the blackhole queue
3290Simon Marlow <marlowsd@gmail.com>**20081105150542]
3291[retreat the top/bottom fields of the spark pool in pruneSparkPool()
3292Simon Marlow <marlowsd@gmail.com>**20081105150359]
3293[fix the :help docs for :set stop (#2737)
3294Simon Marlow <marlowsd@gmail.com>**20081104092929]
3295[bugfix: don't ingore the return value from rts_evalIO()
3296Simon Marlow <marlowsd@gmail.com>**20081104142147]
3297[Document the new SPARKS statistic, and xref from the parallelism section
3298Simon Marlow <marlowsd@gmail.com>**20081024120236]
3299[Move the freeing of Capabilities later in the shutdown sequence
3300Simon Marlow <marlowsd@gmail.com>**20081024104301
3301 Fixes a bug whereby the Capability has been freed but other
3302 Capabilities are still trying to steal sparks from its pool.
3304[Pad Capabilities and Tasks to 64 bytes
3305Simon Marlow <marlowsd@gmail.com>**20081023080749
3306 This is just good practice to avoid placing two structures heavily
3307 accessed by different CPUs on the same cache line
3309[Fix desugaring of record update (fixes Trac #2735)
3311[Refuse to register packages with unversioned dependencies; trac #1837
3312Ian Lynagh <igloo@earth.li>**20081031181746]
3313[We now require GHC 6.6 to build the HEAD (and thus 6.12)
3314Ian Lynagh <igloo@earth.li>**20081031171506]
3315[:set prompt now understand Haskell String syntax; trace #2652
3316Ian Lynagh <igloo@earth.li>**20081031145227]
3317[Comments only
3319[Quickfix for warning.
3320Thomas Schilling <nominolo@googlemail.com>**20081031113125]
3321[Export typeclasses for accessing compiler results.
3322Thomas Schilling <nominolo@googlemail.com>**20081028182310
3324 MERGE TO 6.10.
3326[Minor refactoring.
3327Thomas Schilling <nominolo@googlemail.com>**20081028182202]
3328[Include record fields in tags.
3329Thomas Schilling <nominolo@googlemail.com>**20081028180538]
3330[Fix imports
3332[Improve error reporting for non-rigid GADT matches
3335 Following suggestions from users, this patch improves the error message
3336 when a GADT match needs a rigid type:
3338  tcfail172.hs:19:10:
3339      GADT pattern match in non-rigid context for `Nil'
3340 -      Solution: add a type signature
3341 +      Probable solution: add a type signature for `is_normal'
3342      In the pattern: Nil
3343      In the definition of `is_normal': is_normal Nil = True
3345 Now GHC tries to tell you what to give a type signature *for*.
3346 Thanks to Daniel Gorin and others for the suggestions.
3349[Add (a) CoreM monad, (b) new Annotations feature
3352 This patch, written by Max Bolingbroke,  does two things
3354 1.  It adds a new CoreM monad (defined in simplCore/CoreMonad),
3355     which is used as the top-level monad for all the Core-to-Core
3356     transformations (starting at SimplCore).  It supports
3357        * I/O (for debug printing)
3358        * Unique supply
3359        * Statistics gathering
3360        * Access to the HscEnv, RuleBase, Annotations, Module
3361     The patch therefore refactors the top "skin" of every Core-to-Core
3362     pass, but does not change their functionality.
3364 2.  It adds a completely new facility to GHC: Core "annotations".
3365     The idea is that you can say
3366        {#- ANN foo (Just "Hello") #-}
3367     which adds the annotation (Just "Hello") to the top level function
3368     foo.  These annotations can be looked up in any Core-to-Core pass,
3369     and are persisted into interface files.  (Hence a Core-to-Core pass
3370     can also query the annotations of imported things.)  Furthermore,
3371     a Core-to-Core pass can add new annotations (eg strictness info)
3372     of its own, which can be queried by importing modules.
3374 The design of the annotation system is somewhat in flux.  It's
3375 designed to work with the (upcoming) dynamic plug-ins mechanism,
3376 but is meanwhile independently useful.
3378 Do not merge to 6.10! 
3381[Fix Trac #2674: in TH reject empty case expressions and function definitions
3383[Change naming conventions for compiler-generated dictionaries and type functions
3386 Up to now, the data constructor dictionary for class C as been called
3387 ":DC". But there is no reason for the colon to be at the front; indeed
3388 it confuses the (simple-minded) pretty-printer for types.  So this
3389 patch changes it to be "D:C".  This makes Core a lot easier to read.
3390 Having a colon in the middle ensures that it can't clash with a user-written
3391 data type.
3393 Similarly I changed
3395   T:C     Data type corresponding a class dictionary (was :TC)
3396   D:C     Data constructor for class dictionary (was :DC)
3398   NTCo:T   Coercion mapping from a newtype T to its representation type
3399                (was :CoT)
3401   TFCo:R   Coercion mapping from a data family to its respresentation type R
3402                (was :CoFR)
3404   Rn:T     The n'th respresentation data type for a data type T
3405                (was :RnT)
3408 Do not merge to 6.10.
3410 HEADS-UP: you'll need to recompile libraries from scratch. 
3412 ROMAN: you could do the same for OccName.mkVectTyConOcc etc, if you wanted.
3416[Fix tcrun031: yet more tidying up in TcDeriv
3418[Add Outputable instance for CoercionI
3420[Fix Trac #2720: inlining and casts
3423 The issue here is what happens when we have
3425        (f |> co) x
3427 where f is itself marked INLINE.  We want callSiteInline to "see"
3428 the fact that the function is applied, and hence have some incentive
3429 to inline.  I've done this by extending CoreUnfold.CallCtxt with
3430 ValAppCtxt.  I think that should catch this case without messing up
3431 any of the others.
3434[Clarify documentatoin
3436[Update library version numbers in the release notes
3437Ian Lynagh <igloo@earth.li>**20081023144018]
3438[various updates to the release notes
3439Simon Marlow <marlowsd@gmail.com>**20081007151647]
3440[Add library release notes
3441Ian Lynagh <igloo@earth.li>**20080920155722]
3442[Add release notes for the compiler
3443Ian Lynagh <igloo@earth.li>**20080920114857]
3444[Doc fix
3445Ian Lynagh <igloo@earth.li>**20081028150534]
3446[Rename some variables in docs
3447Ian Lynagh <igloo@earth.li>**20081028150447]
3448[Fix typos
3449Ian Lynagh <igloo@earth.li>**20081028144655]
3450[Mostly-fix Trac #2595: updates for existentials
3453 Ganesh wanted to update records that involve existentials.  That
3454 seems reasonable to me, and this patch covers existentials, GADTs,
3455 and data type families.
3457 The restriction is that
3458   The types of the updated fields may mention only the
3459   universally-quantified type variables of the data constructor
3461 This doesn't allow everything in #2595 (it allows 'g' but not 'f' in
3462 the ticket), but it gets a lot closer.
3464 Lots of the new lines are comments!
3467[Fix Trac #2723: keep track of record field names in the renamer
3470 The idea here is that with -XNamedFieldPuns and -XRecordWildCards we don't
3471 want to report shadowing errors for
3472        let fld = <blah> in C { .. }
3473 But to suppress such shadowing errors, the renamer needs to know that
3474 'fld' *is* a record selector.  Hence the new NameSet in
3475 TcRnFypes.RecFieldEnv
3478[Remove dead code
3480[Fix Trac #2713: refactor and tidy up renaming of fixity decls
3483 In fixing #2713, this patch also eliminates two almost-unused
3484 functions from RnEnv (lookupBndr and lookupBndr_maybe).  The
3485 net lines of code is prety much unchanged, but more of them
3486 are comments!
3489[Fix Trac #2701: make deriving check better for unlifted args
3492 Getting the automatic deriving mechanism to work really smoothly
3493 is surprisingly hard.  I keep finding myself in TcDeriv!
3495 Anyway, this is a nice clean fix to Trac #2701.
3498[Use pdflatex rather than latex for building
3499Ian Lynagh <igloo@earth.li>**20081024112400
3500 The Windows builder is having problems running ps2pdf, so this works
3501 aroudn the problem.
3503[Remove an unmatched } in core.tex
3504Ian Lynagh <igloo@earth.li>**20081024111750]
3505[Add a usepackage{url}
3506Ian Lynagh <igloo@earth.li>**20081024111458]
3507[Update ANNOUNCE
3508Ian Lynagh <igloo@earth.li>**20081022164423]
3509[Fix a bug in the new scheduler
3510Simon Marlow <marlowsd@gmail.com>**20081023155017
3511 If the current thread blocks, we should yield the Capability
3512 immediately, because the thread and hence possibly the current Task
3513 are now owned by someone else.  This worked in the old scheduler, but
3514 we moved where the yield happens in the new scheduler which broke it.
3516[add an assertion
3517Simon Marlow <marlowsd@gmail.com>**20081023154551]
3518[fix a warning
3519Simon Marlow <marlowsd@gmail.com>**20081023082213]
3520[traverse the spark pools only once during GC rather than twice
3521Simon Marlow <marlowsd@gmail.com>**20081022115233]
3522[Refactoring and reorganisation of the scheduler
3523Simon Marlow <marlowsd@gmail.com>**20081022092744
3525 Change the way we look for work in the scheduler.  Previously,
3526 checking to see whether there was anything to do was a
3527 non-side-effecting operation, but this has changed now that we do
3528 work-stealing.  This lead to a refactoring of the inner loop of the
3529 scheduler.
3531 Also, lots of cleanup in the new work-stealing code, but no functional
3532 changes.
3534 One new statistic is added to the +RTS -s output:
3536   SPARKS: 1430 (2 converted, 1427 pruned)
3538 lets you know something about the use of `par` in the program.
3540[Work stealing for sparks
3543    Spark stealing support for PARALLEL_HASKELL and THREADED_RTS versions of the RTS.
3545   Spark pools are per capability, separately allocated and held in the Capability
3546   structure. The implementation uses Double-Ended Queues (deque) and cas-protected
3547   access.
3549   The write end of the queue (position bottom) can only be used with
3550   mutual exclusion, i.e. by exactly one caller at a time.
3551   Multiple readers can steal()/findSpark() from the read end
3552   (position top), and are synchronised without a lock, based on a cas
3553   of the top position. One reader wins, the others return NULL for a
3554   failure.
3556   Work stealing is called when Capabilities find no other work (inside yieldCapability),
3557   and tries all capabilities 0..n-1 twice, unless a theft succeeds.
3559   Inside schedulePushWork, all considered cap.s (those which were idle and could
3560   be grabbed) are woken up. Future versions should wake up capabilities immediately when
3561   putting a new spark in the local pool, from newSpark().
3563 Patch has been re-recorded due to conflicting bugfixes in the sparks.c, also fixing a
3564 (strange) conflict in the scheduler.
3567[include an elapsed time table
3568Simon Marlow <marlowsd@gmail.com>**20081023080648]
3569[generate a valid summary for older GHC versions too
3570Simon Marlow <marlowsd@gmail.com>**20081023080629]
3571[Fix Trac #2714 (a minor wibble)
3574 In boxy_match (which is a pure function used by preSubType) we can
3575 encounter TyVars not just TcTyVars; this patch takes account of that.
3578[Reject programs with superclass equalities for now
3579Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021131721
3580 - The current implementation of type families cannot properly deal
3581   with superclass equalities.  Instead of making a half-hearted attempt at
3582   supporting them, which mostly ends in cryptic error message, rejecting
3583   right away with an appropriate message.
3585   MERGE TO 6.10
3587[Fix doc syntax
3588Ian Lynagh <igloo@earth.li>**20081021183317]
3589[Don't put the README file in the Windows installer; fixes trac #2698
3590Ian Lynagh <igloo@earth.li>**20081021162543
3591 The README file talks about getting and building the sources, which
3592 doesn't make sense for the installer.
3594[Comments and parens only
3596[Do proper cloning in worker/wrapper splitting
3599 See Note [Freshen type variables] in WwLib.  We need to clone type
3600 variables when building a worker/wrapper split, else we simply get
3601 bogus code, admittedly in rather obscure situations.  I can't quite
3602 remember what program showed this up, unfortunately, but there
3603 definitely *was* one!  (You get a Lint error.)
3606[Don't float an expression wrapped in a cast
3609 There is no point in floating out an expression wrapped in a coercion;
3610 If we do we'll transform 
3611        lvl = e |> co [_$_]
3612 to     
3613        lvl' = e; lvl = lvl' |> co
3614 and then inline lvl.  Better just to float out the payload (e).
3617[Fix Trac #2668, and refactor TcDeriv
3620 TcDeriv deals with both standalone and ordinary 'deriving';
3621 and with both data types and 'newtype deriving'.  The result
3622 is really rather compilcated and ad hoc.  Ryan discovered
3623 #2668; this patch fixes that bug, and makes the internal interfces
3624 #more uniform.  Specifically, the business of knocking off
3625 type arguments from the instance type until it matches the kind of the
3626 class, is now done by derivTyData, not mkNewTypeEqn, because the
3627 latter is shared with standalone derriving, whree the trimmed
3628 type application is what the user wrote.
3631[Spelling error in comment
3633[White space only
3635[Comments to explain strict overlap checking for type family instances
3637[Allow type families to use GADT syntax (and be GADTs)
3640 We've always intended to allow you to use GADT syntax for
3641 data families:
3642        data instance T [a] where
3643          T1 :: a -> T [a]
3644 and indeed to allow data instances to *be* GADTs
3645        data intsance T [a] where
3646          T1 :: Int -> T [Int]
3647          T2 :: a -> b -> T [(a,b)]
3649 This patch fixes the renamer and type checker to allow this.
3652[Improve crash message from applyTys and applyTypeToArgs
3654[Wibble to ungrammatical error message
3656[Comments only: replace ":=:" by "~" (notation for equality predicates)
3658[FIX #2693
3659Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021120107
3660 - As long as the first reduceContext in tcSimplifyRestricted potentially
3661   performs improvement, we need to zonk again before the second reduceContext.
3662   It would be better to prevent the improvement in the first place, but given
3663   the current situation zonking is definitely the right thing to do.
3665   MERGE TO 6.10
3667[Restore the terminal attributes even if ghci does not exit normally.
3668Judah Jacobson <judah.jacobson@gmail.com>**20081020164109]
3669[FIX #2688
3670Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021044213
3671 - Change in TcSimplify.reduceContext:
3673      We do *not* go around for new extra_eqs.  Morally, we should,
3674      but we can't without risking non-termination (see #2688).  By
3675      not going around, we miss some legal programs mixing FDs and
3676      TFs, but we never claimed to support such programs in the
3677      current implementation anyway.
3679   MERGE TO 6.10
3681[Move documentation within 80 column boundary.
3682Thomas Schilling <nominolo@googlemail.com>**20081014134016]
3683[Improve haddock documentation for 'GHC.topSortModuleGraph'.
3684Thomas Schilling <nominolo@googlemail.com>**20081014133833]
3685[Improve haddock documentation for HsExpr module.
3686Thomas Schilling <nominolo@googlemail.com>**20081014133740]
3687[Improve Haddock-markup for HsDecls module.
3688Thomas Schilling <nominolo@googlemail.com>**20081014133556]
3689[Run Haddock with compacting GC and show RTS statistics.
3690Thomas Schilling <nominolo@googlemail.com>**20081020111410]
3691[FIX (partially) #2703: bug in stack overflow handling when inside block
3692Simon Marlow <marlowsd@gmail.com>**20081020121103
3693 As a result of a previous ticket (#767) we disabled the generation of
3694 StackOverflow exceptions when inside a Control.Exception.block, on the
3695 grounds that StackOverflow is like an asynchronous exception.  Instead
3696 we just increase the stack size.  However, the stack size calculation
3697 was wrong, and ended up not increasing the size of the stack, with the
3698 result that the runtime just kept re-allocating the stack and filling
3699 up memory.
3701[Re-export Located(..) and related functions
3702Simon Marlow <marlowsd@gmail.com>**20081020102422
3703 So that clients don't need to import SrcLoc
3705[whitespace fix
3706Simon Marlow <marlowsd@gmail.com>**20081020101241]
3707[FIX #2691: Manually reset the terminal to its initial settings; works around a bug in libedit.
3708Judah Jacobson <judah.jacobson@gmail.com>**20081016024838]
3709[Eliminate duplicate flags in the tab completion of ghci's :set command.
3710Judah Jacobson <judah.jacobson@gmail.com>**20081016015721]
3711[Add dph haddock docs to the doc index
3712Ian Lynagh <igloo@earth.li>**20081019133208]
3713[Clean the bootstrapping extensible-exceptions package
3714Ian Lynagh <igloo@earth.li>**20081017195942]
3715[Fix trac #2687
3716Ian Lynagh <igloo@earth.li>**20081015163412
3717 OtherPunctuation, ConnectorPunctuation and DashPunctuation are now
3718 treated as symbols, rather than merely graphic characters.
3720[Fix trac #2680; avoid quadratic behaviour from (++)
3721Ian Lynagh <igloo@earth.li>**20081015163235]
3722[Fix the build when the bootstrapping compiler has a newer Cabal than us
3723Ian Lynagh <igloo@earth.li>**20081015144023
3724 We need to forcibly use the in-tree Cabal, or we get version mismatch errors
3726[Fix the name of prologue.txt when making bindists
3727Ian Lynagh <igloo@earth.li>**20081014114714]
3728[Comments only
3730[Fix Trac #2497; two separate typos in Lexer.x
3733 The patch to switch on lexing of 'forall' inside a RULES pragma
3734 wasn't working.  This fixes it so that it does.
3737[Update manual: tidy up instances, say more about type families in instance decls
3739[Make tags work on Unices, too.
3740Thomas Schilling <nominolo@googlemail.com>**20081014211236]
3741[Undefine __PIC__ before defining it to work around "multiple definitions of __PIC__" warnings
3742Clemens Fruhwirth <clemens@endorphin.org>**20081014143206]
3743[Add "dyn" to GhcRTSWays when compiling --enable-shared
3744Clemens Fruhwirth <clemens@endorphin.org>**20081014125123]
3745[Fill out the ghc package's cabal file
3746Ian Lynagh <igloo@earth.li>**20081013235817]
3747[Patching libffi so it can be built as DLL
3748Clemens Fruhwirth <clemens@endorphin.org>**20081014103459
3750 libffi-dllize-3.0.6.patch should be pushed upstream
3752[Add 'etags' makefile target.
3753Thomas Schilling <nominolo@googlemail.com>**20081013170927
3755 This only works with stage2 since `ghctags' is built against stage1
3756 but not against the bootstrapping compiler.  Also note that all of GHC
3757 must typecheck for this target to succeed.  Perhaps we should not
3758 overwrite the old TAGS file by default then.
3760[Use cabal information to get GHC's flags to `ghctags'.
3761Thomas Schilling <nominolo@googlemail.com>**20081013170658
3763 By giving the dist-directory to ghctags we can get all the GHC API
3764 flags we need in order to load the required modules.  The flag name
3765 could perhaps be improved, but apart from that it seems to work well.
3767[Version bump for libffi to 3.0.6
3768Clemens Fruhwirth <clemens@endorphin.org>**20081014081300]
3769[Encode shared/static configuration into stamps to do the right thing when rebuilding
3770Clemens Fruhwirth <clemens@endorphin.org>**20081013221530]
3771[Add a link to the GHC API docs from the library haddock index
3772Ian Lynagh <igloo@earth.li>**20081013195943]
3773[Link to the GHC API documentation from the main doc page
3774Ian Lynagh <igloo@earth.li>**20081013200927]
3775[Whitespace only in docs/index.html
3776Ian Lynagh <igloo@earth.li>**20081013200625]
3777[Tweak gen_contents_index
3778Ian Lynagh <igloo@earth.li>**20081013192548
3779 It now works again after it has been installed, as well as while it is
3780 in a source tree.
3781 After it's been installed it filters out the ghc package, as that
3782 currently swamps everything else in the index.
3784[Build fixes for DLLized rts
3785Clemens Fruhwirth <clemens@endorphin.org>**20081013201608]
3786[Do not filter the rts from linked libraries in linkDynLib as Windows does not allow unresolved symbols
3787Clemens Fruhwirth <clemens@endorphin.org>**20081013201426]
3788[Add HsFFI.o to INSTALL_LIBS
3789Clemens Fruhwirth <clemens@endorphin.org>**20081013200945]
3790[Rename symbol macros to a consistant naming scheme
3791Clemens Fruhwirth <clemens@endorphin.org>**20081013162433]
3792[Fix #2685: two Bool arguments to tidyTypeEnv were the wrong way around
3793Simon Marlow <marlowsd@gmail.com>**20081013121339
3794 So -XTemplateHaskell was behaving like -fomit-interface-file-pragmas,
3795 and vice versa.
3797[Simplify the "is $bindir in $PATH" test
3798Ian Lynagh <igloo@earth.li>**20081011191008]
3799[Correct the "is $bindir in $PATH" test
3800Ian Lynagh <igloo@earth.li>**20081011191030
3801 We were testing neq instead of eq
3803[Fix a typo which was causing ghci to quit on commands errors
3804pepe <mnislaih@gmail.com>**20081011114720]
3805[Drop libm from the linker dependencies for libffi
3806Clemens Fruhwirth <clemens@endorphin.org>**20081011074524]
3807[Do not generate haddock documentation when running install-docs in libffi
3808Clemens Fruhwirth <clemens@endorphin.org>**20081010192318]
3809[When waking up thread blocked on TVars, wake oldest first (#2319)
3810Josef Svenningsson <josef.svenningsson@gmail.com>**20081010150322
3811 StgTVarWatchQueue contains the threads blocked on a TVar in order
3812 youngest first. The list has to be traversed backwards to unpark the threads
3813 oldest first.
3815 This improves the fairness when using STM in some situations.
3817[add readTVarIO :: TVar a -> IO a
3818Simon Marlow <marlowsd@gmail.com>**20081010131545]
3819[fix #2636: throw missing module errors as SourceErrors, not ErrMsg
3820Simon Marlow <marlowsd@gmail.com>**20081010131535]
3821[atomicModifyIORef: use a local cas() instead of the global lock
3822Simon Marlow <simonmar@microsoft.com>**20081008154702
3823 This should improve scaling when using atomicModifyIORef
3825[Delay building libffi until package.conf is created and fix bindist
3826Clemens Fruhwirth <clemens@endorphin.org>**20081010073106]
3827[Install a versioned ghc-pkg script; fixes trac #2662
3828Ian Lynagh <igloo@earth.li>**20081009164946]
3829[Fix bindist creation: Only the main RTS was being put in the bindists
3830Ian Lynagh <igloo@earth.li>**20081009163451]
3831[pushAtom: add missing case for MachNullAddr (#2589)
3832Simon Marlow <marlowsd@gmail.com>**20081009091118]
3833[undo incorrect assertion, and fix comments
3834Simon Marlow <marlowsd@gmail.com>**20081009085118]
3835[remove old GRAN/PARALLEL_HASKELL code
3836Simon Marlow <marlowsd@gmail.com>**20081009085051]
3837[FIX #2639
3838Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081009132328
3840   MERGE TO 6.10
3842[Cover PredTy case in Type.tyFamInsts
3843Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081009061435
3845   MERGE TO 6.10
3847[Drop ghcconfig.h/RtsConfig.h from libffi's package.conf.in
3848Clemens Fruhwirth <clemens@endorphin.org>**20081009071342]
3849[Don't use sed's -i flag as Solaris doesn't know it in libffi/Makefile
3850Clemens Fruhwirth <clemens@endorphin.org>**20081008234455]
3851[Don't use /dev/null trick to create empty object files in libffi/Makefile
3852Clemens Fruhwirth <clemens@endorphin.org>**20081008232902]
3853[Turn libffi into a Haskell package
3854Clemens Fruhwirth <clemens@endorphin.org>**20081008170443]
3855[Make 'getModSummary' deterministic.
3856Thomas Schilling <nominolo@googlemail.com>**20081008144032]
3857[Add accessors to 'HsModule' and haddockify it.
3858Thomas Schilling <nominolo@googlemail.com>**20081007235656]
3859[fix syntax errors in src-dist publish rules
3860Simon Marlow <marlowsd@gmail.com>**20081008103432]
3861[add comments and an ASSERT_LOCK_HELD()
3862Simon Marlow <marlowsd@gmail.com>**20081008112627]
3863[Fix #2663: we had a hard-wired capabilities[0]
3864Simon Marlow <marlowsd@gmail.com>**20081008112609
3865 For some unknown reason in schedulePostRunThread() we were always
3866 passing capabilities[0] rather than the current Capability to
3867 throwToSingleThreaded().  This caused all kinds of weird failures and
3868 crashes in STM code when running on multiple processors.
3870[Fix #1955 for heap profiles generated by +RTS -hT
3871Simon Marlow <marlowsd@gmail.com>**20081003150745]
3872[add a section id for +RTS -hT
3873Simon Marlow <marlowsd@gmail.com>**20081007151007]
3874[update documentation for PostfixOperators
3875Simon Marlow <marlowsd@gmail.com>**20081007150957]
3876[fix markup
3877Simon Marlow <marlowsd@gmail.com>**20081007150943]
3878[Fix bug in DPH docs
3879Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008101618]
3880[Add short DPH section to users guide
3881Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008064754
3883 MERGE TO 6.10
3885[Users Guide: added type family documentation
3886Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081008061927
3888   MERGE TO 6.10
3890[Track changes to package dph
3891Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008032859
3893 MERGE TO 6.10
3895[Build a profiled GHC API by default if p is in GhcLibWays
3896Ian Lynagh <igloo@earth.li>**20081007152318]
3897[Check whether mk/validate.mk defines anything after validating
3898Ian Lynagh <igloo@earth.li>**20081007144855]
3899[Remove #define _BSD_SOURCE from Stg.h
3900Ian Lynagh <igloo@earth.li>**20081006101959
3901 It's no longer needed, as base no longer #includes it
3903[Make ghctags compile again.
3904Thomas Schilling <nominolo@googlemail.com>**20081007135705]
3905[Revert AutoLinkPackages change for dynamic libraries. Cabal handles that now.
3906Clemens Fruhwirth <clemens@endorphin.org>**20081007100417]
3907[Change suffix for dyn. linked executables from _real to .dyn
3908Clemens Fruhwirth <clemens@endorphin.org>**20081007100750]
3909[Add accessors to 'Target' fields and haddockify.
3910Thomas Schilling <nominolo@googlemail.com>**20081006222940
3912 MERGE TO 6.10
3914[Make 'gblock' and 'gunblock' part of 'ExceptionMonad'.  This way the
3915Thomas Schilling <nominolo@googlemail.com>**20081006222831
3916 default implementations of 'gbracket' and 'gfinally' just work.
3918 MERGE TO 6.10
3920[Add Word8 support to vectoriser
3921Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081007004416
3923 MERGE TO 6.10
3925[Fix generating OS X installers: Set COMMAND_MODE=unix2003
3926Ian Lynagh <igloo@earth.li>**20081005222715
3927 If we don't specify COMMAND_MODE=unix2003 then xcodebuild defaults
3928 to setting it to legacy, which means that ar builds archives
3929 without a table of contents. That makes the build fail later on.
3931[We need to set datadir = $(libdir) in bindists
3932Ian Lynagh <igloo@earth.li>**20081005143307
3933 We already do in the normal Makefiles.
3935 This is because GHC needs package.conf and unlit to be in the same place
3936 (and things like ghc-pkg need to agree on where package.conf is, so we
3937 just set it globally).
3939[prep-bin-dist-mingw complains if it finds a bad version of windres
3940Ian Lynagh <igloo@earth.li>**20081004175351]
3941[removed Data.Generics.Basics, added Data.Data
3942'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082808]
3943[Fix a build problem with GHC 6.4.2
3944Ian Lynagh <igloo@earth.li>**20081003195700]
3945[No AutoLinkPackages for dynamic library linking
3946Clemens Fruhwirth <clemens@endorphin.org>**20081003185304]
3947[use ghcError for error in command line
3948Clemens Fruhwirth <clemens@endorphin.org>**20081001125648]
3949[Fix warnings
3951[Always use extensible exceptions in ghc-pkg, rather than using ifdefs
3952Ian Lynagh <igloo@earth.li>**20081003161247]
3953[Use a proper exception for IOEnvFailure, not just a UserError
3954Ian Lynagh <igloo@earth.li>**20081003160129]
3955[Use an extensible-exceptions package when bootstrapping
3956Ian Lynagh <igloo@earth.li>**20081003140216
3957 Ifdefs for whether we had extensible exceptions or not were spreading
3958 through GHC's source, and things would only have got worse for the next
3959 2-3 years, so instead we now use an implementation of extensible
3960 exceptions built on top of the old exception type.
3962[Expunge ThFake, cure Trac #2632
3965 This patch fixes a dirty hack (the fake ThFake module), which in turn
3966 was causing Trac #2632.
3968 The new scheme is that the top-level binders in a TH [d| ... |] decl splice
3969 get Internal names.  That breaks a previous invariant that things like
3970 TyCons always have External names, but these TyCons are never long-lived;
3971 they live only long enough to typecheck the TH quotation; the result is
3972 discarded.  So it seems cool.
3974 Nevertheless -- Template Haskell folk: please test your code.  The testsuite
3975 is OK but it's conceivable that I've broken something in TH.  Let's see.
3978[Make a debug check more refined
3980[Add ASSERTs to all calls of nameModule
3983 nameModule fails on an InternalName.  These ASSERTS tell you
3984 which call failed.
3987[Let parseModule take a ModSummary like checkAndLoadModule did.
3988Thomas Schilling <nominolo@googlemail.com>**20081002230412
3990 To get the ModSummary for a ModuleName getModSummary can be used.
3991 It's not called find* or lookup* because it assumes that the module is
3992 in the module graph and throws an exception if it cannot be found.
3993 Overall, I'm not quite sure about the usefulness of this function
3994 since the user has no control about which filetype to grab (hs or
3995 hs-boot).
3997[Remove some out-of-date entries from .darcs-boring
3998Ian Lynagh <igloo@earth.li>**20081002201519]
3999[TFs: Allow repeated variables in left-hand sides of instances
4000Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081002134539
4002   MERGE TO 6.10
4004[Clean up some comments
4005Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081002074642
4007   MERGE TO 6.10
4009[Make the new binder-swap stuff in OccurAnal work right for GlobalIds
4012 See Note [Binder swap on GlobalId scrutinees].  I hadn't got this
4013 right before, so repeated cases on imported Ids weren't getting optimised.
4017[Minor refactoring only
4019[Comments only
4021[Zap dead-ness info appropriately in SpecConstr
4024 SpecConstr can make pattern binders come alive, so we must remember
4025 to zap their dead-variable annotation.  See extendCaseBndrs.
4027 (This was triggering a Core Lint failure in DPH.)
4030[Suppress invalid Core Lint complaint about lack of constructors
4032[add some more GC roots (fixes conc048, and possibly some others)
4033Simon Marlow <marlowsd@gmail.com>**20081001164427]
4034[Document +RTS -hT
4035Simon Marlow <marlowsd@gmail.com>**20081001163222
4036 We forgot to document this in GHC 6.8
4038[fix new-qualified-operators link
4039Simon Marlow <marlowsd@gmail.com>**20081001163105]
4040[Proper error message for unsupported pattern signatures
4041Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001144339
4042 - Pattern signatures must be identical to the type expected for the pattern;
4043   see Note [Pattern coercions]
4044 - We now signal an appropriate error if an equality coercion would be needed
4045   (instead of just generating Core that doesn't typecheck)
4047   MERGE TO 6.10
4049[Prevent excessive inlining with DPH
4050Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081002012055
4052 This adds a new flag -finline-if-enough-args which disables inlining for
4053 partially applied functions. It is automatically set by -Odph. This is a
4054 temporary hack and should remain undocumented.
4056 MERGE TO 6.10
4059[On Windows, check that we have a good version of windres when configuring
4060Ian Lynagh <igloo@earth.li>**20081001171133]
4061[Call $(PERL) rather than perl when making the manpage
4062Ian Lynagh <igloo@earth.li>**20080930155054]
4063[don't install the installPackage program
4064Ian Lynagh <igloo@earth.li>**20080930145714]
4065[Fix #2637: conc032(threaded2) failure
4066Simon Marlow <marlowsd@gmail.com>**20081001135549
4067 There was a race condition whereby a thread doing throwTo could be
4068 blocked on a thread that had finished, and the GC would detect this
4069 as a deadlock rather than raising the pending exception.  We can't
4070 close the race, but we can make the right thing happen when the GC
4071 runs later.
4073[Remove outdated link to OGI webpage
4074Simon Marlow <marlowsd@gmail.com>**20080930150912]
4075[TFs: Fixed InstContextNorm (and simplification of IPs)
4076Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001131303
4078   MERGE TO 6.10
4080[TcSimplify.reduceImplication: clean up
4081Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001091315
4082 - This cleans up some of the mess in reduceImplication and documents the
4083   precondition on the form of wanted equalities properly.
4084 - I also made the back off test a bit smarter by allowing to back off in the
4085   presence of wanted equalities as long as none of them got solved in the
4086   attempt.  (That should save generating some superfluous bindings.)
4088   MERGE TO 6.10
4090[Make sure to zonk the kind of coercion variables
4091Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001053243
4093   MERGE TO 6.10
4095[Remover PROT_EXEC flag from mmap()
4096Simon Marlow <marlowsd@gmail.com>**20080930141842
4097 Needed for #738 fix
4099[Fix #2410: carefully generate unique names for CAF CCs
4100Simon Marlow <marlowsd@gmail.com>**20080930141812]
4101[fix #2594: we were erroneously applying masks, as the reporter suggested
4102Simon Marlow <marlowsd@gmail.com>**20080930115611
4103 My guess is that this is left over from when we represented Int8 and
4104 friends as zero-extended rather than sign-extended.  It's amazing it hasn't
4105 been noticed earlier.
4107[Unconditionalize definition of DYNAMIC_* so that libffi.so/.dll is removed even when BuildSharedLibs is reset to NO
4108Clemens Fruhwirth <clemens@endorphin.org>**20080930085449]
4109[Type families: need to instantiate flexible skolems before other flexibles
4110Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080930053559
4112 MERGE TO 6.10
4114[Fix warnings
4115Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080929142227]
4116[Type families: consider subst rules both way
4117Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080929141040
4118 - applySubstFam, applySubstVarVar & applySubstVarFam need to return their
4119   second argument -to be put into the todo list- if the rule would be
4120   applicable if the equalities would be supplied in the opposite order.
4122 MERGE TO 6.10
4124[Clean up a bit and improve an error message
4126[Don't capture error calls in tryUser
4129 A previous patch slightly changed the semantics of tryUser.
4130 This patch restores the original behaviour
4131 (as expected in :print)
4134[tweaks to this section of the docs
4135Simon Marlow <simonmar@microsoft.com>**20080927141834]
4136[Add -outputdir flag (#2295)
4137Simon Marlow <simonmar@microsoft.com>**20080927141822]
4138[oops, forgot to add -XNewQualifiedOperators to the flags table
4139Simon Marlow <simonmar@microsoft.com>**20080923140449]
4140[Fix making OS X installers from source tarballs
4141Ian Lynagh <igloo@earth.li>**20080927150507
4142 I'm not sure why it works in the HEAD, but when making an installer
4143 from the 6.10.1 beta configure hangs when doing the CHECK_HIST_ERRORS
4144 test (during rl_initialize, I believe). Giving make /dev/null as stdin
4145 fixes it.
4147[Make the matching of the filename ghc.exe case insensitive, fixes bug #2603
4148Neil Mitchell <ndmitchell@gmail.com>**20080916160311]
4149[Fix #2411: missing case for CATCH_STM_FRAME in raiseAsync()
4150Simon Marlow <simonmar@microsoft.com>**20080926232806]
4151[Fix parsing of -ignore-package flag.
4152Bertram Felgenhauer <int-e@gmx.de>**20080925053820]
4153[Add an example of how to use SCCs to the user guide
4154Ian Lynagh <igloo@earth.li>**20080926203832]
4155[Add some description of the +RTS -t/-s/-S output
4156Ian Lynagh <igloo@earth.li>**20080926200203]
4157[Remove a redundant options pragma
4158Ian Lynagh <igloo@earth.li>**20080926152731]
4159[Split ShowVersion etc off into a different type to DoInteractive etc
4160Ian Lynagh <igloo@earth.li>**20080926140539
4161 This fixes trac #1348 (ghci --help gave ghc's help), and also tidies
4162 things up a bit. Things would be even tidier if the usage.txt files were
4163 put into a .hs file, so that ShowUsage wouldn't need to be able to find
4164 the libdir.
4166[Pass SRC_HC_OPTS to GHC when building GHC's Main.hs
4167Ian Lynagh <igloo@earth.li>**20080926131609]
4168[Improve runghc docs; fixes trac #2477
4169Ian Lynagh <igloo@earth.li>**20080926124425]
4170[Type families: fixes in flattening & finalisation
4171Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080925225324
4172 * Finalisation didn't do the right thing for equalities x ~ y, where
4173   x was instantiated, but not zonked and y flexible (need to do y := x)
4174 * During flattening we weren't careful enough when turning wanteds
4175   intermediates into locals
4177 Both bugs showed up in a small example of SPJ:
4179   linear :: HasTrie (Basis v) => (Basis v, v)
4180   linear =  basisValue
4182   class HasTrie a where
4184   type family Basis u :: *
4186   basisValue :: (Basis v,v)
4187   basisValue = error "urk"
4190[Fix the behaviour of flags like --help and --version; fixes trac #2620
4191Ian Lynagh <igloo@earth.li>**20080925165618
4192 They should override other mode flags, not conflict with them
4194[Follow the integer package changes
4195Ian Lynagh <igloo@earth.li>**20080925133855]
4196[Type families: fix decomposition problem
4197Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080925084139
4198 * Fixes the problem reported in
4199   <http://www.haskell.org/pipermail/haskell-cafe/2008-July/044911.html>
4201[Don't exit ghci if :info is called on an undefined identifier.
4202Judah Jacobson <judah.jacobson@gmail.com>**20080924212422]
4203[Fix maintainer-clean
4204Ian Lynagh <igloo@earth.li>**20080924230553]
4205[Use -f when making the runhaskell symlink
4206Ian Lynagh <igloo@earth.li>**20080924124255
4207 Otherwise installation fails if runhaskell already exists.
4209[Use -perm -100 rather than -perm /a+x when looking for executable files
4210Ian Lynagh <igloo@earth.li>**20080924124137
4211 /a+x doesn't work on some Solaris and OS X machines. Spotted by
4212 Christian Maeder.
4214[Use $(FIND) rather than find, as the former may be gfind
4215Ian Lynagh <igloo@earth.li>**20080924123323]
4216[Look for gfind as well as find
4217Ian Lynagh <igloo@earth.li>**20080924123046]
4218[In configure, don't call FPTOOLS_HADDOCK
4219Ian Lynagh <igloo@earth.li>**20080924122558
4220 We now use the in-tree haddock, so we don't need to look for it.
4222[Use $(TAR) rather than tar
4223Ian Lynagh <igloo@earth.li>**20080924121759
4224 Fixes problems on Solaris, where we need to use gtar instead of tar
4226[Add $(strip) to a Makefile test
4227Ian Lynagh <igloo@earth.li>**20080924120940
4228 Fixes making bindists on solaris. Patch from Christian Maeder.
4230[Use test -f rather than test -e, for portability (Solaris)
4231Ian Lynagh <igloo@earth.li>**20080924120840]
4232[Remove some dependencies on bootstrapping.conf from libraries/Makefile
4233Ian Lynagh <igloo@earth.li>**20080923205755
4234 They were causing some unnecessary work:
4235 Running make in a built tree reregisters the GHC package in
4236 bootstrapping.conf, and the build system thought that this updated
4237 timestamp meant that the configure stamps were out of date. This is
4238 particularly bad for the libraries with configure scripts, as those
4239 take a while to run.
4241 The bootstrapping.conf is built in an earlier phase ("make boot") so
4242 one shouldn't rely on the dependencies anyway.
4244[Bump the version number to 6.11
4245Ian Lynagh <igloo@earth.li>**20080923165613]
4246[Generalise type of 'defaultErrorHandler' so it can be used inside a Ghc session.
4247Thomas Schilling <nominolo@googlemail.com>**20080921085647]
4248[Make "sh -e boot" work
4249Ian Lynagh <igloo@earth.li>**20080921111508]
4250[Use -f rather than -e for portability
4251Ian Lynagh <igloo@earth.li>**20080921111436]
4252[Add some special cases for putting dph in bindists
4253Ian Lynagh <igloo@earth.li>**20080921000406]
4254[Escape a hash in the Makefile (it was breaking source dist creation)
4255Ian Lynagh <igloo@earth.li>**20080920232945]
4256[Disallow package flags in OPTIONS_GHC pragmas (#2499)
4257Simon Marlow <simonmar@microsoft.com>**20080923173904]
4258[#2566: emit a warning for 'ghc -c foo.bar'
4259Simon Marlow <simonmar@microsoft.com>**20080923144956
4261 $ ghc -c foo.bar
4262 Warning: the following files would be used as linker inputs, but linking is not being done: foo.bar
4263 ghc: no input files
4264 Usage: For basic information, try the `--help' option.
4266[Fix to new executable allocation code (fixed print002 etc.)
4267Simon Marlow <simonmar@microsoft.com>**20080922210915
4268 The problem here is caused by the fact that info tables include a
4269 relative offset to the string naming the constructor.  Executable
4270 memory now resides at two places in the address space: one for writing
4271 and one for executing.  In the info tables generated by GHCi, we were
4272 calculating the offset relative to the writable instance, rather than
4273 the executable instance, which meant that the GHCi debugger couldn't
4274 find the names for constructors it found in the heap.
4276[clean sm/Evac_thr.c and sm/Scav_thr.c
4277Simon Marlow <simonmar@microsoft.com>**20080922152827]
4278[add -XNewQualifiedOperators (Haskell' qualified operator syntax)
4279Simon Marlow <simonmar@microsoft.com>**20080922152340]
4280[Fix Trac #2597 (first bug): correct type checking for empty list
4283 The GHC front end never generates (ExplicitList []), but TH can.
4284 This patch makes the typechecker robust to such programs.
4287[Fix Trac #2597 (second bug): complain about an empty DoE block
4290 When converting an empty do-block from TH syntax to HsSyn,
4291 complain rather than crashing.
4294[Update dependencies
4295Ian Lynagh <igloo@earth.li>**20080920183534]
4296[Fix building with GHC 6.6
4297Ian Lynagh <igloo@earth.li>**20080920162918]
4298[Remove fno-method-sharing from the list of static flags
4299Ian Lynagh <igloo@earth.li>**20080920010635
4300 It is now a dynamic flag
4302[Tidy up the treatment of dead binders
4305 This patch does a lot of tidying up of the way that dead variables are
4306 handled in Core.  Just the sort of thing to do on an aeroplane.
4308 * The tricky "binder-swap" optimisation is moved from the Simplifier
4309   to the Occurrence Analyser.  See Note [Binder swap] in OccurAnal.
4310   This is really a nice change.  It should reduce the number of
4311   simplifier iteratoins (slightly perhaps).  And it means that
4312   we can be much less pessimistic about zapping occurrence info
4313   on binders in a case expression. 
4315 * For example:
4316        case x of y { (a,b) -> e }
4317   Previously, each time around, even if y,a,b were all dead, the
4318   Simplifier would pessimistically zap their OccInfo, so that we
4319   can't see they are dead any more.  As a result virtually no
4320   case expression ended up with dead binders.  This wasn't Bad
4321   in itself, but it always felt wrong.
4323 * I added a check to CoreLint to check that a dead binder really
4324   isn't used.  That showed up a couple of bugs in CSE. (Only in
4325   this sense -- they didn't really matter.)
4327 * I've changed the PprCore printer to print "_" for a dead variable.
4328   (Use -dppr-debug to see it again.)  This reduces clutter quite a
4329   bit, and of course it's much more useful with the above change.
4331 * Another benefit of the binder-swap change is that I could get rid of
4332   the Simplifier hack (working, but hacky) in which the InScopeSet was
4333   used to map a variable to a *different* variable. That allowed me
4334   to remove VarEnv.modifyInScopeSet, and to simplify lookupInScopeSet
4335   so that it doesn't look for a fixpoint.  This fixes no bugs, but
4336   is a useful cleanup.
4338 * Roman pointed out that Id.mkWildId is jolly dangerous, because
4339   of its fixed unique.  So I've
4341      - localied it to MkCore, where it is private (not exported)
4343      - renamed it to 'mkWildBinder' to stress that you should only
4344        use it at binding sites, unless you really know what you are
4345        doing
4347      - provided a function MkCore.mkWildCase that emodies the most
4348        common use of mkWildId, and use that elsewhere
4350    So things are much better
4352 * A knock-on change is that I found a common pattern of localising
4353   a potentially global Id, and made a function for it: Id.localiseId
4356[Gix the ghcii script
4357Ian Lynagh <igloo@earth.li>**20080919174651
4358 The ghc executable name doesn't have a version number on Windows, so
4359 don't put one in the script.
4361[Create runhaskell as well as runghc
4362Ian Lynagh <igloo@earth.li>**20080919153010]
4363[On Linux use libffi for allocating executable memory (fixed #738)
4364Simon Marlow <marlowsd@gmail.com>**20080919134602]
4365[Move the context_switch flag into the Capability
4366Simon Marlow <marlowsd@gmail.com>**20080919102601
4367 Fixes a long-standing bug that could in some cases cause sub-optimal
4368 scheduling behaviour.
4370[Fix building the extralibs tarball
4371Ian Lynagh <igloo@earth.li>**20080919133555
4372 We now need to dig the appropriate lines out of packages, rather than
4373 just catting libraries/extra-packages, in order to find out what the
4374 extralibs are.
4376[Install libffi when installing frmo a bindist
4377Ian Lynagh <igloo@earth.li>**20080919130332]
4378[Fix how we put libffi into bindists
4379Ian Lynagh <igloo@earth.li>**20080919125528]
4380[TAG 6.10 branch has been forked
4381Ian Lynagh <igloo@earth.li>**20080919123437]
4382[Don't require Parser.y in a source dist
4383Ian Lynagh <igloo@earth.li>**20080919115831]
4384[Add HpcParser.hs to source dists
4385Ian Lynagh <igloo@earth.li>**20080919115816]
4386[Fix the list of generated files that need to go into the source dists
4387Ian Lynagh <igloo@earth.li>**20080919112522]
4388[Improve documentation of overlapping instances
4390[Put generated files in source dists
4391Ian Lynagh <igloo@earth.li>**20080918194424
4392 We don't want to require that users building source dists have alex/happy
4394[Add libraries/syb to .darcs-boring
4395Ian Lynagh <igloo@earth.li>**20080918190116]
4396[Fix a couple of issues with :print
4399       - Ticket #1995: Unsoundness with newtypes
4400       - Ticket #2475: "Can't unify" error when stopped at an exception
4402       In addition this patch adds the following:
4404       - Unfailingness: RTTI cannot panic anymore.
4405         In case of failure, it recovers gracefully by returning the "I know nothing" type
4406       - A -ddump-rtti flag
4410pepe <mnislaih@gmail.com>**20080418172303]
4411[RichTokenStream support
4412Chaddai Fouche <chaddai.fouche@gmail.com>**20080918165256
4414 This patch adds support for raw token streams, that contain more
4415 information than normal token streams (they contains comments at
4416 least). The "lexTokenStream" function brings this support to the
4417 Lexer module. In addition to that, functions have been added to
4418 the GHC module to make easier to recover of the token stream of
4419 a module ("getTokenStream").
4421 Building on that, I added what could be called "rich token
4422 stream": token stream to which have been added the source string
4423 corresponding to each token, the function addSourceToToken takes
4424 a StringBuffer and a starting SrcLoc and a token stream and build
4425 this rich token stream. getRichTokenStream is a convenience
4426 function to get a module rich token stream. "showRichTokenStream"
4427 use the SrcLoc information in such a token stream to get a string
4428 similar to the original source (except unsignificant
4429 whitespaces). Thus "putStrLn . showRichTokenStream =<<
4430 getRichTokenStream s mod" should print a valid module source, the
4431 interesting part being to modify the token stream between the get
4432 and the show of course.
4434[When passing gcc -B, also tell it where the mingw include directory is
4435Ian Lynagh <igloo@earth.li>**20080918143312]
4436[Don't put the mingw directory in RTS's package.conf
4437Ian Lynagh <igloo@earth.li>**20080918143118]
4438[Be more forceful when cleaning in compiler/ and ghc/
4439Ian Lynagh <igloo@earth.li>**20080918134443
4440 Now that the Cabal file is generated by configure, it would be nice
4441 if clean worked even if the cabal file is missing. So now we just rm -rf
4442 the dist directory.
4444[Generate ghc.cabal and ghc-bin.cabal with configure
4445Ian Lynagh <igloo@earth.li>**20080918133636
4446 This allows us to put the proper version number into them
4448[Make the ghci scripts point to the versioned GHC program, not just "ghc"
4449Ian Lynagh <igloo@earth.li>**20080918122516]
4450[Fix Trac #1470: improve handling of recursive instances (needed for SYB3)
4453 This bug has been hanging around for a long time, as you'll see by its
4454 number. The fix implements a feature that is really needed by SYB3, to
4455 allow an instance to (rather indirectly) refer to itself.  The trickiness
4456 comes when solving the superclass constraints.
4458 The whoel issue is explained in Note [Recursive instances and superclases]
4459 in TcSimplify.
4461 In cracking this one I found I could remove the WantSCs argument to the
4462 ReduceMe flag, which is a worthwhile simplification.  Good!
4465[Comments only
4467[Replace ASSERT with WARN, and explain why
4470 The DPH library tripped an ASSERT.  The code is actually OK, but it's
4471 badly-optimised so I changed it to WARN.  The issue here is explained
4472 in ClosureInfo, Note [Unsafe coerce complications].
4475[Add a missing "prime" (env' --> env'') thereby fixing a tripping WARN.  Hurrah!
4477[Fix nasty infelicity: do not short-cut empty substitution in the simplifier
4480 I was perplexed about why an arity-related WARN was tripping. It took
4481 me _day_ (sigh) to find that it was because SimplEnv.substExpr was taking
4482 a short cut when the substitution was empty, thereby not subsituting for
4483 Ids in scope, which must be done (CoreSubst Note [Extending the Subst]).
4485 The fix is a matter of deleting the "optimisation".  Same with
4486 CoreSubst.substSpec, although I don't know if that actually caused a
4487 probem.
4490[Avoid arity reduction when doing eta-reduce
4493 We like things with high arity, so when doing eta reduction
4494 it's probably a good idea to avoid reducing arity.
4497[Add extra WARN test
4500 This warning tests that the arity of a function does not decrease.
4501 And that it's at least as great as the strictness signature.
4503 Failing this test isn't a disater, but it's distinctly odd and
4504 usually indicates that not enough information is getting propagated
4505 around, and hence you may get more simplifier iterations.
4508[Comments only
4510[Re-adjust interaction between -ddump flags and force-recompilation
4513 If you say -ddump-xx we effectively add -fforce-recomp, so that you
4514 see your dump output.  But this works badly in --make mode, because
4515 you get the ddump output for every module, which is probably not what
4516 you want.  This patch forces recompilation with -ddump-X only in one-shot
4517 mode. 
4519 Of course, this only affects people using -ddump options.
4522[Add Outputable GhcMode instance
4524[Improve error reporting for 'deriving' (Trac #2604)
4526[Add link to GADT paper re rigid types
4528[Fix MacOS X build: don't believe __GNUC_GNU_INLINE__ on MacOS X
4529Simon Marlow <marlowsd@gmail.com>**20080918112856]
4530[require Alex version 2.1.0
4531Simon Marlow <marlowsd@gmail.com>**20080918112812
4532 Having 2.0.1 causes some unicode tests to fail
4534[Type families: fixes in the new solver
4535Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080918100934]
4536[ext-core library: Parser fixes; make it build with the HEAD
4537Tim Chevalier <chevalier@alum.wellesley.edu>**20080918090349
4539 In the ext-core parser I guess I never tested:
4540 * existential type variable bindings in case alts
4541 * empty data declarations
4543 That'll learn me!
4545[Wibble ghc-pkg imports to fix building on Windows
4546Ian Lynagh <igloo@earth.li>**20080917210813]
4547[ghc-pkg needs to make package.conf with sensible permissions
4548Ian Lynagh <igloo@earth.li>**20080917192155
4549 It was calling openTempFile which uses a 600 permissions mask.
4551[Change 'loadWithCompiler' callback argument to just print warnings.
4552Thomas Schilling <nominolo@googlemail.com>**20080917102925
4553 Rename function accordingly.
4555 The callback wasn't very flexible to begin with.  There's pretty much
4556 no way around to calling 'compile' inside that callback since
4557 'upsweep' depends on certain side effects of compile.  It therefore
4558 makes more sense to restrict the callback to its intended use only,
4559 namely to log warnings and errors.
4561[Fix: GhcStage2HcOpts were being added to stage 3 too
4562Simon Marlow <marlowsd@gmail.com>**20080917085917]
4563[Type families: unify with family apps in checking mode
4564Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080917062548]
4565[Type families: bug fixes
4566Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916151254]
4567[Keep sysnonyms folded in equalities if possible
4568Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916075700]
4569[Type families: apply flattening coercions in the right order
4570Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916055136]
4571[TcTyFuns: tidy warning
4572Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080915031423]
4573[Signature for Inst.isValidWantedEqInst
4574Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080915030118]
4575[Remember if RewriteInst is swapped & bug fixes
4576Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080914163639]
4577[Type families: fixed all non-termination in the testsuite
4578Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080914120638]
4579[Type families: completed the new equality solver
4580Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080913133631
4581 - Implements normalisation of class constraints containing synonym family
4582   applications or skolems refined by local equalities.
4583 - Clean up of TcSimplify.reduceContext by using the new equality solver.
4584 - Removed all the now unused code of the old algorithm.
4585 - This completes the implementation of the new algorithm, but it is largely
4586   untested => many regressions.
4588[Use the new -optdep flag replacements when building with >= GHC 6.9
4589Ian Lynagh <igloo@earth.li>**20080916220057
4590 Fix building the HEAD with itself
4592[Use "exec" when running ghc in the wrapper
4593Ian Lynagh <igloo@earth.li>**20080915100217]
4594[Add "#!/bin/sh" to runghc.wrapper
4595Ian Lynagh <igloo@earth.li>**20080914153507]
4596[Add a "#!/bin/sh" to ghc.wrapper
4597Ian Lynagh <igloo@earth.li>**20080914153344]
4598[Fixing directory creation to not create "" directories inside hpc report (harmless but needless)
4600[Fix Trac #2052 Allowing hpc to understand hsc files.
4602[Fix Trac #2311: creates subdirs for package coverage information
4604[FIX #2469: sort out our static/extern inline story
4605Simon Marlow <marlowsd@gmail.com>**20080916132222
4606 gcc has changed the meaning of "extern inline" when certain flags are
4607 on (e.g. --std=gnu99), and this broke our use of it in the header
4608 files.
4610[Fix a warning
4611Simon Marlow <marlowsd@gmail.com>**20080916130922]
4612[Stop using mremap() to allocate space for trampolines
4613Simon Marlow <marlowsd@gmail.com>**20080915145924
4615 This was causing problems because sometimes mremap() moved the memory
4616 we had allocated from the low 2Gb to above the 2Gb boundary, causing
4617 some linkages to fail.  There's no MAP_32BIT flag to mremap().
4619 So now we just use mmap(MAP_ANON|MAP_32BIT) to allocated space for the
4620 trampolines.  People without MAP_32BIT (eg. *BSD) will still have to
4621 do something else here, such as allocating memory from a fixed
4622 address; so I've made it slightly easier for those guys, but there's
4623 still work to do (#2063).
4625 One solution (that Simon PJ is advocating) is to turn on -fPIC by
4626 default on x86-64.  This is a good solution as it removes the need for
4627 MAP_32BIT, but doesn't work with -fvia-C, so probably this is for
4628 later.
4630[add $(GhcStage[123]HcOpts)
4631Simon Marlow <marlowsd@gmail.com>**20080912155549]
4632[Improve handling of -fdph-* flags
4633Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916034746]
4634[Add -fdph-this
4635Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916033710]
4636[Remove last traces of package ndp
4637Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916033428]
4638[Clean up vectorisation error messages
4639Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916013236]
4640[Fix vectoriser bug
4641Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080915042823
4643 We were using mkWildId in situations where it cause disastrous shadowing
4645[Track changes to dph
4646Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912114028]
4647[Change desugaring of PArr literals
4648Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912015609]
4649[Expose the dph packages automatically if -dph-* is set
4650Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912004403]
4651[Don't panic on non-vectorisable expressions
4652Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080911054333]
4653[-Odph implies -fno-spec-constr-count
4654Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080910045339]
4655[Improve warning for SpecConstr
4657[White space only
4659[Minor refactoring to get rid of Type.splitNewTyConApp
4661[Refactor the desugaring of RULE lhss a bit
4664 This is just a tidy-up.  Previously we were calling occurAnalyse
4665 twice on each LHS which was silly and a bit unclean too. 
4667 This patch should have no overall effect, though.
4670[Do not use the Static Arg Transformation by default with -O2
4673 Max has some more heuristics to add, and is meanwhile worried
4674 that having SAT on by default will make some highly-tuned array
4675 programs worse.  So it's off by default. 
4677 Use -fstatic-argument-transformation to switch it on.
4680[Comments, and a couple of asserts, only
4682[Fix Trac #2587: take account of type lets
4685 GHC allows a non-recursive let for type varaibles
4686        let a = TYPE ty in ...
4687 But the free-variable finder had not caught up with this
4688 fact. This patch catches up.
4691[Don't try to float type-lets
4694 A type let shouldn't really occur in SetLevels, but if it does,
4695 this patch makes sure it is left alone.
4698[add refs and fix a bug (noted by Peter Gammie) in docs of arrow notation
4699Ross Paterson <ross@soi.city.ac.uk>**20080915104757]
4700[Generalise type of 'withExtendedLinkEnv'.
4701Thomas Schilling <nominolo@googlemail.com>**20080915085738]
4702[Use 'GhcMonad' in ghci/InteractiveUI.
4703Thomas Schilling <nominolo@googlemail.com>**20080915085633]
4704[Use 'GhcMonad' in ghci/GhciTags.
4705Thomas Schilling <nominolo@googlemail.com>**20080915084922]
4706[Use 'GhcMonad' in ghci/Debugger.
4707Thomas Schilling <nominolo@googlemail.com>**20080915084738]
4708[Use 'GhcMonad' in ghci/GhciMonad.
4709Thomas Schilling <nominolo@googlemail.com>**20080915084646]
4710[Use 'GhcMonad' in ghc/Main.
4711Thomas Schilling <nominolo@googlemail.com>**20080914232957]
4712[Require PatternSignatures for bootstrapping compiler.
4713Thomas Schilling <nominolo@googlemail.com>**20080914232642]
4714[Use 'GhcMonad' in InteractiveEval.
4715Thomas Schilling <nominolo@googlemail.com>**20080914232454]
4716[Use 'GhcMonad' in GHC and split up checkModule into phases.
4717Thomas Schilling <nominolo@googlemail.com>**20080914232044
4719 I'm not sure I covered all the ways of throwing errors in the code.
4720 Some functions throw ProgramErrors, some error messages.  It's still
4721 quite a mess, but we're getting closer.  The missing cases are mostly
4722 errors that cannot be fixed by the API client either or are a result
4723 of wrong usage, so are in any case fatal.
4725 One function, 'getModuleInfo', still returns a 'Maybe', but the
4726 documentation suggests it should always succeed.  So I may change that
4727 soon.
4729 The spit-up of of 'checkModule' has pros and cons.  The various forms
4730 of 'checkModule*' now become:
4732  checkAndLoadModule ms False ~~>
4733     loadModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
4735  checkAndLoadModule ms True ~~>
4736    loadModule =<< desugarModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
4738  checkModule mn False ~~>
4739    typecheckModule =<< parseModule mn
4741  checkModule mn True ~~>
4742    desugarModule =<< typecheckModule =<< parseModule mn
4744 The old APIs cannot easily be provided, since the result type would be
4745 different depending on the second argument.  However, a more
4746 convenient API can be modelled on top of these four functions
4747 ({parse,typecheck,desugar,load}Module).
4749[Use 'GhcMonad' in DriverPipeline.  Also haddockify a bit while we're at it.
4750Thomas Schilling <nominolo@googlemail.com>**20080914220628]
4751[Use 'GhcMonad' in HscMain.
4752Thomas Schilling <nominolo@googlemail.com>**20080914213655]
4753[Use 'GhcMonad' in DriverMkDepend.
4754Thomas Schilling <nominolo@googlemail.com>**20080914212113]
4755[Haddockify DynFlags (partial).
4756Thomas Schilling <nominolo@googlemail.com>**20080914211718]
4757[Haddockify 'IE'.
4758Thomas Schilling <nominolo@googlemail.com>**20080914210016]
4759[Provide accessors for 'ImportDecl'.
4760Thomas Schilling <nominolo@googlemail.com>**20080914205811]
4761[Start haddockifying 'HsBindLR'.
4762Thomas Schilling <nominolo@googlemail.com>**20080914205629]
4763[Document 'parseStaticFlags'.
4764Thomas Schilling <nominolo@googlemail.com>**20080914205316]
4765[Introduce 'GhcMonad' class and two default implementations 'Ghc' and 'GhcT'.
4766Thomas Schilling <nominolo@googlemail.com>**20080914204930
4768 This monad will be required by most public API calls.
4770[Give the "Failing due to -Werror" message a name.
4771Thomas Schilling <nominolo@googlemail.com>**20080914173904]
4772[Make typechecker top-level functions also return messages instead of
4773Thomas Schilling <nominolo@googlemail.com>**20080914173228
4774 printing them.
4776[Reflect changes of desugarer error reporting in VectMonad.
4777Thomas Schilling <nominolo@googlemail.com>**20080914172711]
4778[Generalise 'handleGhcException' to work with any 'ExceptionMonad'.
4779Thomas Schilling <nominolo@googlemail.com>**20080914172404]
4780[Introduce an 'ExceptionMonad' class.
4781Thomas Schilling <nominolo@googlemail.com>**20080914172154
4783 This monad provides variants of 'catch', 'bracket', and 'finally', so
4784 exceptions can be handled in monads that wrap IO.  The latter two
4785 methods need to be part of the class definition, because GHC uses
4786 'block' and 'unblock' which are used in the definition of those two
4787 methods for the IO monad.  A perhaps better class interface would
4788 consist of 'gcatch', 'gblock', and 'gunblock' and let the latter two
4789 default to 'id' like is done for non-GHC implementations of 'bracket'
4790 and 'finally'.
4792[Provide default MonadIO instance for IO.
4793Thomas Schilling <nominolo@googlemail.com>**20080914164245]
4794[Return instead of print warnings and errors in desugarer.
4795Thomas Schilling <nominolo@googlemail.com>**20080914163641]
4796[Return parser errors and warnings instead of dying.
4797Thomas Schilling <nominolo@googlemail.com>**20080914162644]
4798[Add aliases for bags of warnings and errors.
4799Thomas Schilling <nominolo@googlemail.com>**20080914160337]
4800[Slightly more helpful panic message in DynFlags
4801Tim Chevalier <chevalier@alum.wellesley.edu>**20080915080650]
4802[Comments only: ".core" => ".hcr"
4803Tim Chevalier <chevalier@alum.wellesley.edu>**20080914203645]
4804[We need to tell ghc-pkg to --force if we've only built a profiling library
4805Ian Lynagh <igloo@earth.li>**20080913153142]
4806[If we're profiling GHC, don't bother building the GHC package the vanilla way
4807Ian Lynagh <igloo@earth.li>**20080913144820]
4808[Remove the duplicate show rule in libraries/Makefile
4809Ian Lynagh <igloo@earth.li>**20080913144413]
4810[Move the "show" target from target.mk to boilerplate.mk
4811Ian Lynagh <igloo@earth.li>**20080913141312
4812 target.mk isn't included everywhere, but show is always handy
4814[Change how we detect if we are using the bootstrapping compiler or not
4815Ian Lynagh <igloo@earth.li>**20080913104658
4816 I think looking for $(GHC_COMPILER_DIR_ABS) was failing on the Windows
4817 buildbot due to different path separators. Now we just look for
4818 "inplace".
4820[wibble the distrib Makefile
4821Ian Lynagh <igloo@earth.li>**20080912135932
4822 We now need to install driver after ghc
4824[Reinstate the driver/ghc directory, to create a versioned GHC program
4825Ian Lynagh <igloo@earth.li>**20080912113619
4826 e.g. $(bindir)/ghc-6.9.20080911
4828[If USE_NEW_MKDEPEND_FLAGS is YES then don't use the deprecated -optdep flags
4829Ian Lynagh <igloo@earth.li>**20080912110316]
4830[Use --force-local when calling tar in bindisttest/
4831Ian Lynagh <igloo@earth.li>**20080912012855
4832 Otherwise it thinks that c:/foo is a remote file
4834[Fix #2586, bug in THUNK_SELECTORs (again)
4835Simon Marlow <marlowsd@gmail.com>**20080912130404
4836 This time, we had forgetten the write barrier in one place.
4838[TAG 2008-09-12 2
4839Ian Lynagh <igloo@earth.li>**20080912132848]
4840Patch bundle hash: