Ticket #1364: fix1364-ghc.patch

File fix1364-ghc.patch, 53.0 KB (added by Svarog, 6 years ago)
Line 
1Tue Oct 21 19:13:09 EST 2008  Ivan Tomac <[email protected]>
2  * FIX #1364: added support for C finalizers that run as soon as the value is not longer reachable.
3
4New patches:
5
6[FIX #1364: added support for C finalizers that run as soon as the value is not longer reachable.
7Ivan Tomac <[email protected]>**20081021081309] {
8hunk ./compiler/prelude/primops.txt.pp 1560
9+primop  MkWeakForeignOp "mkWeakForeign#" GenPrimOp
10+   o -> b -> Addr# -> Addr# -> State# RealWorld -> (# State# RealWorld, Weak# b #)
11+   with
12+   has_side_effects = True
13+   out_of_line      = True
14+
15+primop  MkWeakForeignEnvOp "mkWeakForeignEnv#" GenPrimOp
16+   o -> b -> Addr# -> Addr# -> Addr# -> State# RealWorld -> (# State# RealWorld, Weak# b #)
17+   with
18+   has_side_effects = True
19+   out_of_line      = True
20+
21hunk ./includes/Closures.h 193
22+  StgClosure *cfinalizer;
23hunk ./includes/StgMiscClosures.h 591
24+RTS_FUN(mkWeakForeignzh_fast);
25+RTS_FUN(mkWeakForeignEnvzh_fast);
26hunk ./includes/mkDerivedConstants.c 363
27+    closure_field(StgWeak,cfinalizer);
28hunk ./rts/Linker.c 180
29+                               SymI_HasProto(mkWeakForeignzh_fast)             \
30+                               SymI_HasProto(mkWeakForeignEnvzh_fast)          \
31hunk ./rts/PrimOps.cmm 299
32-  StgWeak_key(w)       = R1;
33-  StgWeak_value(w)     = R2;
34-  StgWeak_finalizer(w) = R3;
35+  // We don't care about cfinalizer here.
36+  // Should StgWeak_cfinalizer(w) be stg_NO_FINALIZER_closure or
37+  // something else?
38+
39+  StgWeak_key(w)        = R1;
40+  StgWeak_value(w)      = R2;
41+  StgWeak_finalizer(w)  = R3;
42+  StgWeak_cfinalizer(w) = stg_NO_FINALIZER_closure;
43hunk ./rts/PrimOps.cmm 316
44+// TODO: there is a lot of repeated code in mkWeakForeignzh_fast and
45+// mkWeakForeignEnvzh_fast. Need to do something about it.
46+
47+mkWeakForeignzh_fast
48+{
49+  /* R1 = key
50+     R2 = value
51+     R3 = finalizer
52+     R4 = pointer
53+  */
54+  W_ w, payload_words, words, p;
55+
56+  W_ key, val, fptr, ptr;
57+
58+  key  = R1;
59+  val  = R2;
60+  fptr = R3;
61+  ptr  = R4;
62+
63+  ALLOC_PRIM( SIZEOF_StgWeak, NO_PTRS, mkWeakForeignzh_fast );
64+
65+  w = Hp - SIZEOF_StgWeak + WDS(1);
66+  SET_HDR(w, stg_WEAK_info, W_[CCCS]);
67+
68+  payload_words = 4;
69+  words         = BYTES_TO_WDS(SIZEOF_StgArrWords) + payload_words;
70+  ("ptr" p)     = foreign "C" allocateLocal(MyCapability() "ptr", words) [];
71+
72+  TICK_ALLOC_PRIM(SIZEOF_StgArrWords,WDS(payload_words),0);
73+  SET_HDR(p, stg_ARR_WORDS_info, W_[CCCS]);
74+
75+  StgArrWords_words(p)     = payload_words;
76+  StgArrWords_payload(p,0) = fptr;
77+  StgArrWords_payload(p,1) = ptr;
78+  StgArrWords_payload(p,2) = NULL;
79+  StgArrWords_payload(p,3) = 0;
80+
81+  StgWeak_key(w)        = key;
82+  StgWeak_value(w)      = val;
83+  StgWeak_finalizer(w)  = stg_NO_FINALIZER_closure;
84+  StgWeak_cfinalizer(w) = p;
85+
86+  StgWeak_link(w)   = W_[weak_ptr_list];
87+  W_[weak_ptr_list] = w;
88+
89+  IF_DEBUG(weak, foreign "C" debugBelch(stg_weak_msg,w) []);
90+
91+  RET_P(w);
92+}
93+
94+mkWeakForeignEnvzh_fast
95+{
96+  /* R1 = key
97+     R2 = value
98+     R3 = finalizer
99+     R4 = pointer
100+     R5 = environment
101+  */
102+  W_ w, payload_words, words, p;
103+
104+  W_ key, val, fptr, ptr, eptr;
105+
106+  key  = R1;
107+  val  = R2;
108+  fptr = R3;
109+  ptr  = R4;
110+  eptr = R5;
111+
112+  ALLOC_PRIM( SIZEOF_StgWeak, NO_PTRS, mkWeakForeignEnvzh_fast );
113+
114+  w = Hp - SIZEOF_StgWeak + WDS(1);
115+  SET_HDR(w, stg_WEAK_info, W_[CCCS]);
116+
117+  payload_words = 4;
118+  words         = BYTES_TO_WDS(SIZEOF_StgArrWords) + payload_words;
119+  ("ptr" p)     = foreign "C" allocateLocal(MyCapability() "ptr", words) [];
120+
121+  TICK_ALLOC_PRIM(SIZEOF_StgArrWords,WDS(payload_words),0);
122+  SET_HDR(p, stg_ARR_WORDS_info, W_[CCCS]);
123+
124+  StgArrWords_words(p)     = payload_words;
125+  StgArrWords_payload(p,0) = fptr;
126+  StgArrWords_payload(p,1) = ptr;
127+  StgArrWords_payload(p,2) = eptr;
128+  StgArrWords_payload(p,3) = 1;
129+
130+  // We don't care about the value here.
131+  // Should StgWeak_value(w) be stg_NO_FINALIZER_closure or something else?
132+
133+  StgWeak_key(w)        = key;
134+  StgWeak_value(w)      = val;
135+  StgWeak_finalizer(w)  = stg_NO_FINALIZER_closure;
136+  StgWeak_cfinalizer(w) = p;
137+
138+  StgWeak_link(w)   = W_[weak_ptr_list];
139+  W_[weak_ptr_list] = w;
140+
141+  IF_DEBUG(weak, foreign "C" debugBelch(stg_weak_msg,w) []);
142+
143+  RET_P(w);
144+}
145hunk ./rts/PrimOps.cmm 422
146-  W_ w, f;
147+  W_ w, f, arr;
148hunk ./rts/PrimOps.cmm 450
149-  f = StgWeak_finalizer(w);
150+  f   = StgWeak_finalizer(w);
151+  arr = StgWeak_cfinalizer(w);
152+
153hunk ./rts/PrimOps.cmm 455
154+  if (arr != stg_NO_FINALIZER_closure) {
155+    foreign "C" runCFinalizer(StgArrWords_payload(arr,0),
156+                              StgArrWords_payload(arr,1),
157+                              StgArrWords_payload(arr,2),
158+                              StgArrWords_payload(arr,3)) [];
159+  }
160+
161hunk ./rts/RtsStartup.c 417
162+
163+    /* run C finalizers for all active weak pointers */
164+    runAllCFinalizers(weak_ptr_list);
165hunk ./rts/StgMiscClosures.cmm 419
166-INFO_TABLE(stg_WEAK,0,4,WEAK,"WEAK","WEAK")
167+INFO_TABLE(stg_WEAK,1,4,WEAK,"WEAK","WEAK")
168hunk ./rts/StgMiscClosures.cmm 426
169- * DEAD_WEAK 4 non-pointer fields, the same as WEAK.
170+ * DEAD_WEAK 5 non-pointer fields.
171hunk ./rts/StgMiscClosures.cmm 428
172-INFO_TABLE_CONSTR(stg_DEAD_WEAK,0,4,0,CONSTR,"DEAD_WEAK","DEAD_WEAK")
173+INFO_TABLE_CONSTR(stg_DEAD_WEAK,0,5,0,CONSTR,"DEAD_WEAK","DEAD_WEAK")
174hunk ./rts/Weak.c 20
175+// ForeignPtrs with C finalizers rely on weak pointers inside weak_ptr_list
176+// to always be in the same order.
177+
178hunk ./rts/Weak.c 25
179+void
180+runCFinalizer(StgVoid *fn, StgVoid *ptr, StgVoid *env, StgWord flag)
181+{
182+    if (flag)
183+       ((void (*)(void *, void *))fn)(env, ptr);
184+    else
185+       ((void (*)(void *))fn)(ptr);
186+}
187+
188+void
189+runAllCFinalizers(StgWeak *list)
190+{
191+    StgWeak *w;
192+
193+    for (w = list; w; w = w->link) {
194+       StgArrWords *farr;
195+
196+       farr = (StgArrWords *)UNTAG_CLOSURE(w->cfinalizer);
197+
198+       if ((StgClosure *)farr != &stg_NO_FINALIZER_closure)
199+           runCFinalizer((StgVoid *)farr->payload[0],
200+                         (StgVoid *)farr->payload[1],
201+                         (StgVoid *)farr->payload[2],
202+                         farr->payload[3]);
203+    }
204+}
205+
206hunk ./rts/Weak.c 78
207+       StgArrWords *farr;
208hunk ./rts/Weak.c 88
209+       farr = (StgArrWords *)UNTAG_CLOSURE(w->cfinalizer);
210+
211+       if ((StgClosure *)farr != &stg_NO_FINALIZER_closure)
212+           runCFinalizer((StgVoid *)farr->payload[0],
213+                         (StgVoid *)farr->payload[1],
214+                         (StgVoid *)farr->payload[2],
215+                         farr->payload[3]);
216+
217hunk ./rts/Weak.h 14
218+void runCFinalizer(StgVoid *fn, StgVoid *ptr, StgVoid *env, StgWord flag);
219+void runAllCFinalizers(StgWeak *w);
220}
221
222Context:
223
224[Fix trac #2687
225Ian Lynagh <[email protected]>**20081015163412
226 OtherPunctuation, ConnectorPunctuation and DashPunctuation are now
227 treated as symbols, rather than merely graphic characters.
228]
229[Fix trac #2680; avoid quadratic behaviour from (++)
230Ian Lynagh <[email protected]>**20081015163235]
231[Fix the build when the bootstrapping compiler has a newer Cabal than us
232Ian Lynagh <[email protected]>**20081015144023
233 We need to forcibly use the in-tree Cabal, or we get version mismatch errors
234]
235[Fix the name of prologue.txt when making bindists
236Ian Lynagh <[email protected]>**20081014114714]
237[Comments only
238[email protected]**20081015084501]
239[Fix Trac #2497; two separate typos in Lexer.x
240[email protected]**20081015084344
241 
242 The patch to switch on lexing of 'forall' inside a RULES pragma
243 wasn't working.  This fixes it so that it does.
244 
245]
246[Update manual: tidy up instances, say more about type families in instance decls
247[email protected]**20081015080509]
248[Make tags work on Unices, too.
249Thomas Schilling <[email protected]>**20081014211236]
250[Undefine __PIC__ before defining it to work around "multiple definitions of __PIC__" warnings
251Clemens Fruhwirth <[email protected]>**20081014143206]
252[Add "dyn" to GhcRTSWays when compiling --enable-shared
253Clemens Fruhwirth <[email protected]>**20081014125123]
254[Fill out the ghc package's cabal file
255Ian Lynagh <[email protected]>**20081013235817]
256[Patching libffi so it can be built as DLL
257Clemens Fruhwirth <[email protected]>**20081014103459
258 
259 libffi-dllize-3.0.6.patch should be pushed upstream
260]
261[Add 'etags' makefile target.
262Thomas Schilling <[email protected]>**20081013170927
263 
264 This only works with stage2 since `ghctags' is built against stage1
265 but not against the bootstrapping compiler.  Also note that all of GHC
266 must typecheck for this target to succeed.  Perhaps we should not
267 overwrite the old TAGS file by default then.
268]
269[Use cabal information to get GHC's flags to `ghctags'.
270Thomas Schilling <[email protected]>**20081013170658
271 
272 By giving the dist-directory to ghctags we can get all the GHC API
273 flags we need in order to load the required modules.  The flag name
274 could perhaps be improved, but apart from that it seems to work well.
275]
276[Version bump for libffi to 3.0.6
277Clemens Fruhwirth <[email protected]>**20081014081300]
278[Encode shared/static configuration into stamps to do the right thing when rebuilding
279Clemens Fruhwirth <[email protected]>**20081013221530]
280[Add a link to the GHC API docs from the library haddock index
281Ian Lynagh <[email protected]>**20081013195943]
282[Link to the GHC API documentation from the main doc page
283Ian Lynagh <[email protected]>**20081013200927]
284[Whitespace only in docs/index.html
285Ian Lynagh <[email protected]>**20081013200625]
286[Tweak gen_contents_index
287Ian Lynagh <[email protected]>**20081013192548
288 It now works again after it has been installed, as well as while it is
289 in a source tree.
290 After it's been installed it filters out the ghc package, as that
291 currently swamps everything else in the index.
292]
293[Build fixes for DLLized rts
294Clemens Fruhwirth <[email protected]>**20081013201608]
295[Do not filter the rts from linked libraries in linkDynLib as Windows does not allow unresolved symbols
296Clemens Fruhwirth <[email protected]>**20081013201426]
297[Add HsFFI.o to INSTALL_LIBS
298Clemens Fruhwirth <[email protected]>**20081013200945]
299[Rename symbol macros to a consistant naming scheme
300Clemens Fruhwirth <[email protected]>**20081013162433]
301[Fix #2685: two Bool arguments to tidyTypeEnv were the wrong way around
302Simon Marlow <[email protected]>**20081013121339
303 So -XTemplateHaskell was behaving like -fomit-interface-file-pragmas,
304 and vice versa.
305]
306[Simplify the "is $bindir in $PATH" test
307Ian Lynagh <[email protected]>**20081011191008]
308[Correct the "is $bindir in $PATH" test
309Ian Lynagh <[email protected]>**20081011191030
310 We were testing neq instead of eq
311]
312[Fix a typo which was causing ghci to quit on commands errors
313pepe <[email protected]>**20081011114720]
314[Drop libm from the linker dependencies for libffi
315Clemens Fruhwirth <[email protected]>**20081011074524]
316[Do not generate haddock documentation when running install-docs in libffi
317Clemens Fruhwirth <[email protected]>**20081010192318]
318[When waking up thread blocked on TVars, wake oldest first (#2319)
319Josef Svenningsson <[email protected]>**20081010150322
320 StgTVarWatchQueue contains the threads blocked on a TVar in order
321 youngest first. The list has to be traversed backwards to unpark the threads
322 oldest first.
323 
324 This improves the fairness when using STM in some situations.
325]
326[add readTVarIO :: TVar a -> IO a
327Simon Marlow <[email protected]>**20081010131545]
328[fix #2636: throw missing module errors as SourceErrors, not ErrMsg
329Simon Marlow <[email protected]>**20081010131535]
330[atomicModifyIORef: use a local cas() instead of the global lock
331Simon Marlow <[email protected]>**20081008154702
332 This should improve scaling when using atomicModifyIORef
333]
334[Delay building libffi until package.conf is created and fix bindist
335Clemens Fruhwirth <[email protected]>**20081010073106]
336[Install a versioned ghc-pkg script; fixes trac #2662
337Ian Lynagh <[email protected]>**20081009164946]
338[Fix bindist creation: Only the main RTS was being put in the bindists
339Ian Lynagh <[email protected]>**20081009163451]
340[pushAtom: add missing case for MachNullAddr (#2589)
341Simon Marlow <[email protected]>**20081009091118]
342[undo incorrect assertion, and fix comments
343Simon Marlow <[email protected]>**20081009085118]
344[remove old GRAN/PARALLEL_HASKELL code
345Simon Marlow <[email protected]>**20081009085051]
346[FIX #2639
347Manuel M T Chakravarty <[email protected]>**20081009132328
348 
349   MERGE TO 6.10
350]
351[Cover PredTy case in Type.tyFamInsts
352Manuel M T Chakravarty <[email protected]>**20081009061435
353 
354   MERGE TO 6.10
355]
356[Drop ghcconfig.h/RtsConfig.h from libffi's package.conf.in
357Clemens Fruhwirth <[email protected]>**20081009071342]
358[Don't use sed's -i flag as Solaris doesn't know it in libffi/Makefile
359Clemens Fruhwirth <[email protected]>**20081008234455]
360[Don't use /dev/null trick to create empty object files in libffi/Makefile
361Clemens Fruhwirth <[email protected]>**20081008232902]
362[Turn libffi into a Haskell package
363Clemens Fruhwirth <[email protected]>**20081008170443]
364[Make 'getModSummary' deterministic.
365Thomas Schilling <[email protected]>**20081008144032]
366[Add accessors to 'HsModule' and haddockify it.
367Thomas Schilling <[email protected]>**20081007235656]
368[fix syntax errors in src-dist publish rules
369Simon Marlow <[email protected]>**20081008103432]
370[add comments and an ASSERT_LOCK_HELD()
371Simon Marlow <[email protected]>**20081008112627]
372[Fix #2663: we had a hard-wired capabilities[0]
373Simon Marlow <[email protected]>**20081008112609
374 For some unknown reason in schedulePostRunThread() we were always
375 passing capabilities[0] rather than the current Capability to
376 throwToSingleThreaded().  This caused all kinds of weird failures and
377 crashes in STM code when running on multiple processors.
378]
379[Fix #1955 for heap profiles generated by +RTS -hT
380Simon Marlow <[email protected]>**20081003150745]
381[add a section id for +RTS -hT
382Simon Marlow <[email protected]>**20081007151007]
383[update documentation for PostfixOperators
384Simon Marlow <[email protected]>**20081007150957]
385[fix markup
386Simon Marlow <[email protected]>**20081007150943]
387[Fix bug in DPH docs
388Roman Leshchinskiy <[email protected]>**20081008101618]
389[Add short DPH section to users guide
390Roman Leshchinskiy <[email protected]>**20081008064754
391 
392 MERGE TO 6.10
393]
394[Users Guide: added type family documentation
395Manuel M T Chakravarty <[email protected]>**20081008061927
396 
397   MERGE TO 6.10
398]
399[Track changes to package dph
400Roman Leshchinskiy <[email protected]>**20081008032859
401 
402 MERGE TO 6.10
403]
404[Build a profiled GHC API by default if p is in GhcLibWays
405Ian Lynagh <[email protected]>**20081007152318]
406[Check whether mk/validate.mk defines anything after validating
407Ian Lynagh <[email protected]>**20081007144855]
408[Remove #define _BSD_SOURCE from Stg.h
409Ian Lynagh <[email protected]>**20081006101959
410 It's no longer needed, as base no longer #includes it
411]
412[Make ghctags compile again.
413Thomas Schilling <[email protected]>**20081007135705]
414[Revert AutoLinkPackages change for dynamic libraries. Cabal handles that now.
415Clemens Fruhwirth <[email protected]>**20081007100417]
416[Change suffix for dyn. linked executables from _real to .dyn
417Clemens Fruhwirth <[email protected]>**20081007100750]
418[Add accessors to 'Target' fields and haddockify.
419Thomas Schilling <[email protected]>**20081006222940
420 
421 MERGE TO 6.10
422]
423[Make 'gblock' and 'gunblock' part of 'ExceptionMonad'.  This way the
424Thomas Schilling <[email protected]>**20081006222831
425 default implementations of 'gbracket' and 'gfinally' just work.
426 
427 MERGE TO 6.10
428]
429[Add Word8 support to vectoriser
430Roman Leshchinskiy <[email protected]>**20081007004416
431 
432 MERGE TO 6.10
433]
434[Fix generating OS X installers: Set COMMAND_MODE=unix2003
435Ian Lynagh <[email protected]>**20081005222715
436 If we don't specify COMMAND_MODE=unix2003 then xcodebuild defaults
437 to setting it to legacy, which means that ar builds archives
438 without a table of contents. That makes the build fail later on.
439]
440[We need to set datadir = $(libdir) in bindists
441Ian Lynagh <[email protected]>**20081005143307
442 We already do in the normal Makefiles.
443 
444 This is because GHC needs package.conf and unlit to be in the same place
445 (and things like ghc-pkg need to agree on where package.conf is, so we
446 just set it globally).
447]
448[prep-bin-dist-mingw complains if it finds a bad version of windres
449Ian Lynagh <[email protected]>**20081004175351]
450[removed Data.Generics.Basics, added Data.Data
451'Jose Pedro Magalhaes <[email protected]>'**20081002082808]
452[Fix a build problem with GHC 6.4.2
453Ian Lynagh <[email protected]>**20081003195700]
454[No AutoLinkPackages for dynamic library linking
455Clemens Fruhwirth <[email protected]>**20081003185304]
456[use ghcError for error in command line
457Clemens Fruhwirth <[email protected]>**20081001125648]
458[Fix warnings
459[email protected]**20081003171207]
460[Always use extensible exceptions in ghc-pkg, rather than using ifdefs
461Ian Lynagh <[email protected]>**20081003161247]
462[Use a proper exception for IOEnvFailure, not just a UserError
463Ian Lynagh <[email protected]>**20081003160129]
464[Use an extensible-exceptions package when bootstrapping
465Ian Lynagh <[email protected]>**20081003140216
466 Ifdefs for whether we had extensible exceptions or not were spreading
467 through GHC's source, and things would only have got worse for the next
468 2-3 years, so instead we now use an implementation of extensible
469 exceptions built on top of the old exception type.
470]
471[Expunge ThFake, cure Trac #2632
472[email protected]**20081003140423
473 
474 This patch fixes a dirty hack (the fake ThFake module), which in turn
475 was causing Trac #2632.
476 
477 The new scheme is that the top-level binders in a TH [d| ... |] decl splice
478 get Internal names.  That breaks a previous invariant that things like
479 TyCons always have External names, but these TyCons are never long-lived;
480 they live only long enough to typecheck the TH quotation; the result is
481 discarded.  So it seems cool.
482 
483 Nevertheless -- Template Haskell folk: please test your code.  The testsuite
484 is OK but it's conceivable that I've broken something in TH.  Let's see.
485 
486]
487[Make a debug check more refined
488[email protected]**20081003140144]
489[Add ASSERTs to all calls of nameModule
490[email protected]**20081003135334
491 
492 nameModule fails on an InternalName.  These ASSERTS tell you
493 which call failed.
494 
495]
496[Let parseModule take a ModSummary like checkAndLoadModule did.
497Thomas Schilling <[email protected]>**20081002230412
498 
499 To get the ModSummary for a ModuleName getModSummary can be used.
500 It's not called find* or lookup* because it assumes that the module is
501 in the module graph and throws an exception if it cannot be found.
502 Overall, I'm not quite sure about the usefulness of this function
503 since the user has no control about which filetype to grab (hs or
504 hs-boot).
505]
506[Remove some out-of-date entries from .darcs-boring
507Ian Lynagh <[email protected]>**20081002201519]
508[TFs: Allow repeated variables in left-hand sides of instances
509Manuel M T Chakravarty <[email protected]>**20081002134539
510 
511   MERGE TO 6.10
512]
513[Clean up some comments
514Manuel M T Chakravarty <[email protected]>**20081002074642
515 
516   MERGE TO 6.10
517]
518[Make the new binder-swap stuff in OccurAnal work right for GlobalIds
519[email protected]**20081002133002
520 
521 See Note [Binder swap on GlobalId scrutinees].  I hadn't got this
522 right before, so repeated cases on imported Ids weren't getting optimised.
523 
524 
525]
526[Minor refactoring only
527[email protected]**20081002132929]
528[Comments only
529[email protected]**20081002132833]
530[Zap dead-ness info appropriately in SpecConstr
531[email protected]**20081002132657
532 
533 SpecConstr can make pattern binders come alive, so we must remember
534 to zap their dead-variable annotation.  See extendCaseBndrs.
535 
536 (This was triggering a Core Lint failure in DPH.)
537 
538]
539[Suppress invalid Core Lint complaint about lack of constructors
540[email protected]**20081002132426]
541[add some more GC roots (fixes conc048, and possibly some others)
542Simon Marlow <[email protected]>**20081001164427]
543[Document +RTS -hT
544Simon Marlow <[email protected]>**20081001163222
545 We forgot to document this in GHC 6.8
546]
547[fix new-qualified-operators link
548Simon Marlow <[email protected]>**20081001163105]
549[Proper error message for unsupported pattern signatures
550Manuel M T Chakravarty <[email protected]>**20081001144339
551 - Pattern signatures must be identical to the type expected for the pattern;
552   see Note [Pattern coercions]
553 - We now signal an appropriate error if an equality coercion would be needed
554   (instead of just generating Core that doesn't typecheck)
555 
556   MERGE TO 6.10
557]
558[Prevent excessive inlining with DPH
559Roman Leshchinskiy <[email protected]>**20081002012055
560 
561 This adds a new flag -finline-if-enough-args which disables inlining for
562 partially applied functions. It is automatically set by -Odph. This is a
563 temporary hack and should remain undocumented.
564 
565 MERGE TO 6.10
566 
567]
568[On Windows, check that we have a good version of windres when configuring
569Ian Lynagh <[email protected]>**20081001171133]
570[Call $(PERL) rather than perl when making the manpage
571Ian Lynagh <[email protected]>**20080930155054]
572[don't install the installPackage program
573Ian Lynagh <igloo@earth.li>**20080930145714]
574[Fix #2637: conc032(threaded2) failure
575Simon Marlow <marlowsd@gmail.com>**20081001135549
576 There was a race condition whereby a thread doing throwTo could be
577 blocked on a thread that had finished, and the GC would detect this
578 as a deadlock rather than raising the pending exception.  We can't
579 close the race, but we can make the right thing happen when the GC
580 runs later.
581]
582[Remove outdated link to OGI webpage
583Simon Marlow <marlowsd@gmail.com>**20080930150912]
584[TFs: Fixed InstContextNorm (and simplification of IPs)
585Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001131303
586 
587   MERGE TO 6.10
588]
589[TcSimplify.reduceImplication: clean up
590Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001091315
591 - This cleans up some of the mess in reduceImplication and documents the
592   precondition on the form of wanted equalities properly.
593 - I also made the back off test a bit smarter by allowing to back off in the
594   presence of wanted equalities as long as none of them got solved in the
595   attempt.  (That should save generating some superfluous bindings.)
596 
597   MERGE TO 6.10
598]
599[Make sure to zonk the kind of coercion variables
600Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001053243
601 
602   MERGE TO 6.10
603]
604[Remover PROT_EXEC flag from mmap()
605Simon Marlow <marlowsd@gmail.com>**20080930141842
606 Needed for #738 fix
607]
608[Fix #2410: carefully generate unique names for CAF CCs
609Simon Marlow <marlowsd@gmail.com>**20080930141812]
610[fix #2594: we were erroneously applying masks, as the reporter suggested
611Simon Marlow <marlowsd@gmail.com>**20080930115611
612 My guess is that this is left over from when we represented Int8 and
613 friends as zero-extended rather than sign-extended.  It's amazing it hasn't
614 been noticed earlier.
615]
616[Unconditionalize definition of DYNAMIC_* so that libffi.so/.dll is removed even when BuildSharedLibs is reset to NO
617Clemens Fruhwirth <clemens@endorphin.org>**20080930085449]
618[Type families: need to instantiate flexible skolems before other flexibles
619Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080930053559
620 
621 MERGE TO 6.10
622]
623[Fix warnings
624Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080929142227]
625[Type families: consider subst rules both way
626Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080929141040
627 - applySubstFam, applySubstVarVar & applySubstVarFam need to return their
628   second argument -to be put into the todo list- if the rule would be
629   applicable if the equalities would be supplied in the opposite order.
630 
631 MERGE TO 6.10
632]
633[Clean up a bit and improve an error message
634pepe**20080926211429]
635[Don't capture error calls in tryUser
636pepe**20080926204836
637 
638 A previous patch slightly changed the semantics of tryUser.
639 This patch restores the original behaviour
640 (as expected in :print)
641 
642]
643[tweaks to this section of the docs
644Simon Marlow <simonmar@microsoft.com>**20080927141834]
645[Add -outputdir flag (#2295)
646Simon Marlow <simonmar@microsoft.com>**20080927141822]
647[oops, forgot to add -XNewQualifiedOperators to the flags table
648Simon Marlow <simonmar@microsoft.com>**20080923140449]
649[Fix making OS X installers from source tarballs
650Ian Lynagh <igloo@earth.li>**20080927150507
651 I'm not sure why it works in the HEAD, but when making an installer
652 from the 6.10.1 beta configure hangs when doing the CHECK_HIST_ERRORS
653 test (during rl_initialize, I believe). Giving make /dev/null as stdin
654 fixes it.
655]
656[Make the matching of the filename ghc.exe case insensitive, fixes bug #2603
657Neil Mitchell <ndmitchell@gmail.com>**20080916160311]
658[Fix #2411: missing case for CATCH_STM_FRAME in raiseAsync()
659Simon Marlow <simonmar@microsoft.com>**20080926232806]
660[Fix parsing of -ignore-package flag.
661Bertram Felgenhauer <int-e@gmx.de>**20080925053820]
662[Add an example of how to use SCCs to the user guide
663Ian Lynagh <igloo@earth.li>**20080926203832]
664[Add some description of the +RTS -t/-s/-S output
665Ian Lynagh <igloo@earth.li>**20080926200203]
666[Remove a redundant options pragma
667Ian Lynagh <igloo@earth.li>**20080926152731]
668[Split ShowVersion etc off into a different type to DoInteractive etc
669Ian Lynagh <igloo@earth.li>**20080926140539
670 This fixes trac #1348 (ghci --help gave ghc's help), and also tidies
671 things up a bit. Things would be even tidier if the usage.txt files were
672 put into a .hs file, so that ShowUsage wouldn't need to be able to find
673 the libdir.
674]
675[Pass SRC_HC_OPTS to GHC when building GHC's Main.hs
676Ian Lynagh <igloo@earth.li>**20080926131609]
677[Improve runghc docs; fixes trac #2477
678Ian Lynagh <igloo@earth.li>**20080926124425]
679[Type families: fixes in flattening & finalisation
680Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080925225324
681 * Finalisation didn't do the right thing for equalities x ~ y, where
682   x was instantiated, but not zonked and y flexible (need to do y := x)
683 * During flattening we weren't careful enough when turning wanteds
684   intermediates into locals
685 
686 Both bugs showed up in a small example of SPJ:
687 
688   linear :: HasTrie (Basis v) => (Basis v, v)
689   linear =  basisValue
690 
691   class HasTrie a where
692 
693   type family Basis u :: *
694 
695   basisValue :: (Basis v,v)
696   basisValue = error "urk"
697 
698]
699[Fix the behaviour of flags like --help and --version; fixes trac #2620
700Ian Lynagh <igloo@earth.li>**20080925165618
701 They should override other mode flags, not conflict with them
702]
703[Follow the integer package changes
704Ian Lynagh <igloo@earth.li>**20080925133855]
705[Type families: fix decomposition problem
706Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080925084139
707 * Fixes the problem reported in
708   <http://www.haskell.org/pipermail/haskell-cafe/2008-July/044911.html>
709]
710[Don't exit ghci if :info is called on an undefined identifier.
711Judah Jacobson <judah.jacobson@gmail.com>**20080924212422]
712[Fix maintainer-clean
713Ian Lynagh <igloo@earth.li>**20080924230553]
714[Use -f when making the runhaskell symlink
715Ian Lynagh <igloo@earth.li>**20080924124255
716 Otherwise installation fails if runhaskell already exists.
717]
718[Use -perm -100 rather than -perm /a+x when looking for executable files
719Ian Lynagh <igloo@earth.li>**20080924124137
720 /a+x doesn't work on some Solaris and OS X machines. Spotted by
721 Christian Maeder.
722]
723[Use $(FIND) rather than find, as the former may be gfind
724Ian Lynagh <igloo@earth.li>**20080924123323]
725[Look for gfind as well as find
726Ian Lynagh <igloo@earth.li>**20080924123046]
727[In configure, don't call FPTOOLS_HADDOCK
728Ian Lynagh <igloo@earth.li>**20080924122558
729 We now use the in-tree haddock, so we don't need to look for it.
730]
731[Use $(TAR) rather than tar
732Ian Lynagh <igloo@earth.li>**20080924121759
733 Fixes problems on Solaris, where we need to use gtar instead of tar
734]
735[Add $(strip) to a Makefile test
736Ian Lynagh <igloo@earth.li>**20080924120940
737 Fixes making bindists on solaris. Patch from Christian Maeder.
738]
739[Use test -f rather than test -e, for portability (Solaris)
740Ian Lynagh <igloo@earth.li>**20080924120840]
741[Remove some dependencies on bootstrapping.conf from libraries/Makefile
742Ian Lynagh <igloo@earth.li>**20080923205755
743 They were causing some unnecessary work:
744 Running make in a built tree reregisters the GHC package in
745 bootstrapping.conf, and the build system thought that this updated
746 timestamp meant that the configure stamps were out of date. This is
747 particularly bad for the libraries with configure scripts, as those
748 take a while to run.
749 
750 The bootstrapping.conf is built in an earlier phase ("make boot") so
751 one shouldn't rely on the dependencies anyway.
752]
753[Bump the version number to 6.11
754Ian Lynagh <igloo@earth.li>**20080923165613]
755[Generalise type of 'defaultErrorHandler' so it can be used inside a Ghc session.
756Thomas Schilling <nominolo@googlemail.com>**20080921085647]
757[Make "sh -e boot" work
758Ian Lynagh <igloo@earth.li>**20080921111508]
759[Use -f rather than -e for portability
760Ian Lynagh <igloo@earth.li>**20080921111436]
761[Add some special cases for putting dph in bindists
762Ian Lynagh <igloo@earth.li>**20080921000406]
763[Escape a hash in the Makefile (it was breaking source dist creation)
764Ian Lynagh <igloo@earth.li>**20080920232945]
765[Disallow package flags in OPTIONS_GHC pragmas (#2499)
766Simon Marlow <simonmar@microsoft.com>**20080923173904]
767[#2566: emit a warning for 'ghc -c foo.bar'
768Simon Marlow <simonmar@microsoft.com>**20080923144956
769 
770 $ ghc -c foo.bar
771 Warning: the following files would be used as linker inputs, but linking is not being done: foo.bar
772 ghc: no input files
773 Usage: For basic information, try the `--help' option.
774]
775[Fix to new executable allocation code (fixed print002 etc.)
776Simon Marlow <simonmar@microsoft.com>**20080922210915
777 The problem here is caused by the fact that info tables include a
778 relative offset to the string naming the constructor.  Executable
779 memory now resides at two places in the address space: one for writing
780 and one for executing.  In the info tables generated by GHCi, we were
781 calculating the offset relative to the writable instance, rather than
782 the executable instance, which meant that the GHCi debugger couldn't
783 find the names for constructors it found in the heap.
784]
785[clean sm/Evac_thr.c and sm/Scav_thr.c
786Simon Marlow <simonmar@microsoft.com>**20080922152827]
787[add -XNewQualifiedOperators (Haskell' qualified operator syntax)
788Simon Marlow <simonmar@microsoft.com>**20080922152340]
789[Fix Trac #2597 (first bug): correct type checking for empty list
790simonpj@microsoft.com**20080920212010
791 
792 The GHC front end never generates (ExplicitList []), but TH can.
793 This patch makes the typechecker robust to such programs.
794 
795]
796[Fix Trac #2597 (second bug): complain about an empty DoE block
797simonpj@microsoft.com**20080920211101
798 
799 When converting an empty do-block from TH syntax to HsSyn,
800 complain rather than crashing.
801 
802]
803[Update dependencies
804Ian Lynagh <igloo@earth.li>**20080920183534]
805[Fix building with GHC 6.6
806Ian Lynagh <igloo@earth.li>**20080920162918]
807[Remove fno-method-sharing from the list of static flags
808Ian Lynagh <igloo@earth.li>**20080920010635
809 It is now a dynamic flag
810]
811[Tidy up the treatment of dead binders
812simonpj@microsoft.com**20080920175238
813 
814 This patch does a lot of tidying up of the way that dead variables are
815 handled in Core.  Just the sort of thing to do on an aeroplane.
816 
817 * The tricky "binder-swap" optimisation is moved from the Simplifier
818   to the Occurrence Analyser.  See Note [Binder swap] in OccurAnal.
819   This is really a nice change.  It should reduce the number of
820   simplifier iteratoins (slightly perhaps).  And it means that
821   we can be much less pessimistic about zapping occurrence info
822   on binders in a case expression. 
823 
824 * For example:
825        case x of y { (a,b) -> e }
826   Previously, each time around, even if y,a,b were all dead, the
827   Simplifier would pessimistically zap their OccInfo, so that we
828   can't see they are dead any more.  As a result virtually no
829   case expression ended up with dead binders.  This wasn't Bad
830   in itself, but it always felt wrong.
831 
832 * I added a check to CoreLint to check that a dead binder really
833   isn't used.  That showed up a couple of bugs in CSE. (Only in
834   this sense -- they didn't really matter.)
835   
836 * I've changed the PprCore printer to print "_" for a dead variable.
837   (Use -dppr-debug to see it again.)  This reduces clutter quite a
838   bit, and of course it's much more useful with the above change.
839 
840 * Another benefit of the binder-swap change is that I could get rid of
841   the Simplifier hack (working, but hacky) in which the InScopeSet was
842   used to map a variable to a *different* variable. That allowed me
843   to remove VarEnv.modifyInScopeSet, and to simplify lookupInScopeSet
844   so that it doesn't look for a fixpoint.  This fixes no bugs, but
845   is a useful cleanup.
846 
847 * Roman pointed out that Id.mkWildId is jolly dangerous, because
848   of its fixed unique.  So I've
849 
850      - localied it to MkCore, where it is private (not exported)
851 
852      - renamed it to 'mkWildBinder' to stress that you should only
853        use it at binding sites, unless you really know what you are
854        doing
855 
856      - provided a function MkCore.mkWildCase that emodies the most
857        common use of mkWildId, and use that elsewhere
858 
859    So things are much better
860 
861 * A knock-on change is that I found a common pattern of localising
862   a potentially global Id, and made a function for it: Id.localiseId
863 
864]
865[Gix the ghcii script
866Ian Lynagh <igloo@earth.li>**20080919174651
867 The ghc executable name doesn't have a version number on Windows, so
868 don't put one in the script.
869]
870[Create runhaskell as well as runghc
871Ian Lynagh <igloo@earth.li>**20080919153010]
872[On Linux use libffi for allocating executable memory (fixed #738)
873Simon Marlow <marlowsd@gmail.com>**20080919134602]
874[Move the context_switch flag into the Capability
875Simon Marlow <marlowsd@gmail.com>**20080919102601
876 Fixes a long-standing bug that could in some cases cause sub-optimal
877 scheduling behaviour.
878]
879[Fix building the extralibs tarball
880Ian Lynagh <igloo@earth.li>**20080919133555
881 We now need to dig the appropriate lines out of packages, rather than
882 just catting libraries/extra-packages, in order to find out what the
883 extralibs are.
884]
885[Install libffi when installing frmo a bindist
886Ian Lynagh <igloo@earth.li>**20080919130332]
887[Fix how we put libffi into bindists
888Ian Lynagh <igloo@earth.li>**20080919125528]
889[TAG 6.10 branch has been forked
890Ian Lynagh <igloo@earth.li>**20080919123437]
891[Don't require Parser.y in a source dist
892Ian Lynagh <igloo@earth.li>**20080919115831]
893[Add HpcParser.hs to source dists
894Ian Lynagh <igloo@earth.li>**20080919115816]
895[Fix the list of generated files that need to go into the source dists
896Ian Lynagh <igloo@earth.li>**20080919112522]
897[Improve documentation of overlapping instances
898simonpj@microsoft.com**20080919093147]
899[Put generated files in source dists
900Ian Lynagh <igloo@earth.li>**20080918194424
901 We don't want to require that users building source dists have alex/happy
902]
903[Add libraries/syb to .darcs-boring
904Ian Lynagh <igloo@earth.li>**20080918190116]
905[Fix a couple of issues with :print
906pepe**20080918122133
907       
908       - Ticket #1995: Unsoundness with newtypes
909       - Ticket #2475: "Can't unify" error when stopped at an exception
910       
911       In addition this patch adds the following:
912       
913       - Unfailingness: RTTI cannot panic anymore.
914         In case of failure, it recovers gracefully by returning the "I know nothing" type
915       - A -ddump-rtti flag
916 
917]
918[wibble
919pepe <mnislaih@gmail.com>**20080418172303]
920[RichTokenStream support
921Chaddai Fouche <chaddai.fouche@gmail.com>**20080918165256
922 
923 This patch adds support for raw token streams, that contain more
924 information than normal token streams (they contains comments at
925 least). The "lexTokenStream" function brings this support to the
926 Lexer module. In addition to that, functions have been added to
927 the GHC module to make easier to recover of the token stream of
928 a module ("getTokenStream").
929 
930 Building on that, I added what could be called "rich token
931 stream": token stream to which have been added the source string
932 corresponding to each token, the function addSourceToToken takes
933 a StringBuffer and a starting SrcLoc and a token stream and build
934 this rich token stream. getRichTokenStream is a convenience
935 function to get a module rich token stream. "showRichTokenStream"
936 use the SrcLoc information in such a token stream to get a string
937 similar to the original source (except unsignificant
938 whitespaces). Thus "putStrLn . showRichTokenStream =<<
939 getRichTokenStream s mod" should print a valid module source, the
940 interesting part being to modify the token stream between the get
941 and the show of course.
942]
943[When passing gcc -B, also tell it where the mingw include directory is
944Ian Lynagh <igloo@earth.li>**20080918143312]
945[Don't put the mingw directory in RTS's package.conf
946Ian Lynagh <igloo@earth.li>**20080918143118]
947[Be more forceful when cleaning in compiler/ and ghc/
948Ian Lynagh <igloo@earth.li>**20080918134443
949 Now that the Cabal file is generated by configure, it would be nice
950 if clean worked even if the cabal file is missing. So now we just rm -rf
951 the dist directory.
952]
953[Generate ghc.cabal and ghc-bin.cabal with configure
954Ian Lynagh <igloo@earth.li>**20080918133636
955 This allows us to put the proper version number into them
956]
957[Make the ghci scripts point to the versioned GHC program, not just "ghc"
958Ian Lynagh <igloo@earth.li>**20080918122516]
959[Fix Trac #1470: improve handling of recursive instances (needed for SYB3)
960simonpj@microsoft.com**20080918161719
961 
962 This bug has been hanging around for a long time, as you'll see by its
963 number. The fix implements a feature that is really needed by SYB3, to
964 allow an instance to (rather indirectly) refer to itself.  The trickiness
965 comes when solving the superclass constraints.
966 
967 The whoel issue is explained in Note [Recursive instances and superclases]
968 in TcSimplify.
969 
970 In cracking this one I found I could remove the WantSCs argument to the
971 ReduceMe flag, which is a worthwhile simplification.  Good!
972 
973]
974[Comments only
975simonpj@microsoft.com**20080918155602]
976[Replace ASSERT with WARN, and explain why
977simonpj@microsoft.com**20080918155245
978 
979 The DPH library tripped an ASSERT.  The code is actually OK, but it's
980 badly-optimised so I changed it to WARN.  The issue here is explained
981 in ClosureInfo, Note [Unsafe coerce complications].
982 
983]
984[Add a missing "prime" (env' --> env'') thereby fixing a tripping WARN.  Hurrah!
985simonpj@microsoft.com**20080918155144]
986[Fix nasty infelicity: do not short-cut empty substitution in the simplifier
987simonpj@microsoft.com**20080917162910
988 
989 I was perplexed about why an arity-related WARN was tripping. It took
990 me _day_ (sigh) to find that it was because SimplEnv.substExpr was taking
991 a short cut when the substitution was empty, thereby not subsituting for
992 Ids in scope, which must be done (CoreSubst Note [Extending the Subst]).
993 
994 The fix is a matter of deleting the "optimisation".  Same with
995 CoreSubst.substSpec, although I don't know if that actually caused a
996 probem.
997 
998]
999[Avoid arity reduction when doing eta-reduce
1000simonpj@microsoft.com**20080917162704
1001 
1002 We like things with high arity, so when doing eta reduction
1003 it's probably a good idea to avoid reducing arity.
1004 
1005]
1006[Add extra WARN test
1007simonpj@microsoft.com**20080917162434
1008 
1009 This warning tests that the arity of a function does not decrease.
1010 And that it's at least as great as the strictness signature.
1011 
1012 Failing this test isn't a disater, but it's distinctly odd and
1013 usually indicates that not enough information is getting propagated
1014 around, and hence you may get more simplifier iterations.
1015 
1016]
1017[Comments only
1018simonpj@microsoft.com**20080917162350]
1019[Re-adjust interaction between -ddump flags and force-recompilation
1020simonpj@microsoft.com**20080917161920
1021 
1022 If you say -ddump-xx we effectively add -fforce-recomp, so that you
1023 see your dump output.  But this works badly in --make mode, because
1024 you get the ddump output for every module, which is probably not what
1025 you want.  This patch forces recompilation with -ddump-X only in one-shot
1026 mode. 
1027 
1028 Of course, this only affects people using -ddump options.
1029 
1030]
1031[Add Outputable GhcMode instance
1032simonpj@microsoft.com**20080917161847]
1033[Improve error reporting for 'deriving' (Trac #2604)
1034simonpj@microsoft.com**20080917135104]
1035[Add link to GADT paper re rigid types
1036simonpj@microsoft.com**20080916094521]
1037[Fix MacOS X build: don't believe __GNUC_GNU_INLINE__ on MacOS X
1038Simon Marlow <marlowsd@gmail.com>**20080918112856]
1039[require Alex version 2.1.0
1040Simon Marlow <marlowsd@gmail.com>**20080918112812
1041 Having 2.0.1 causes some unicode tests to fail
1042]
1043[Type families: fixes in the new solver
1044Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080918100934]
1045[ext-core library: Parser fixes; make it build with the HEAD
1046Tim Chevalier <chevalier@alum.wellesley.edu>**20080918090349
1047 
1048 In the ext-core parser I guess I never tested:
1049 * existential type variable bindings in case alts
1050 * empty data declarations
1051 
1052 That'll learn me!
1053]
1054[Wibble ghc-pkg imports to fix building on Windows
1055Ian Lynagh <igloo@earth.li>**20080917210813]
1056[ghc-pkg needs to make package.conf with sensible permissions
1057Ian Lynagh <igloo@earth.li>**20080917192155
1058 It was calling openTempFile which uses a 600 permissions mask.
1059]
1060[Change 'loadWithCompiler' callback argument to just print warnings.
1061Thomas Schilling <nominolo@googlemail.com>**20080917102925
1062 Rename function accordingly.
1063 
1064 The callback wasn't very flexible to begin with.  There's pretty much
1065 no way around to calling 'compile' inside that callback since
1066 'upsweep' depends on certain side effects of compile.  It therefore
1067 makes more sense to restrict the callback to its intended use only,
1068 namely to log warnings and errors.
1069]
1070[Fix: GhcStage2HcOpts were being added to stage 3 too
1071Simon Marlow <marlowsd@gmail.com>**20080917085917]
1072[Type families: unify with family apps in checking mode
1073Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080917062548]
1074[Type families: bug fixes
1075Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916151254]
1076[Keep sysnonyms folded in equalities if possible
1077Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916075700]
1078[Type families: apply flattening coercions in the right order
1079Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916055136]
1080[TcTyFuns: tidy warning
1081Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080915031423]
1082[Signature for Inst.isValidWantedEqInst
1083Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080915030118]
1084[Remember if RewriteInst is swapped & bug fixes
1085Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080914163639]
1086[Type families: fixed all non-termination in the testsuite
1087Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080914120638]
1088[Type families: completed the new equality solver
1089Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080913133631
1090 - Implements normalisation of class constraints containing synonym family
1091   applications or skolems refined by local equalities.
1092 - Clean up of TcSimplify.reduceContext by using the new equality solver.
1093 - Removed all the now unused code of the old algorithm.
1094 - This completes the implementation of the new algorithm, but it is largely
1095   untested => many regressions.
1096]
1097[Use the new -optdep flag replacements when building with >= GHC 6.9
1098Ian Lynagh <igloo@earth.li>**20080916220057
1099 Fix building the HEAD with itself
1100]
1101[Use "exec" when running ghc in the wrapper
1102Ian Lynagh <igloo@earth.li>**20080915100217]
1103[Add "#!/bin/sh" to runghc.wrapper
1104Ian Lynagh <igloo@earth.li>**20080914153507]
1105[Add a "#!/bin/sh" to ghc.wrapper
1106Ian Lynagh <igloo@earth.li>**20080914153344]
1107[Fixing directory creation to not create "" directories inside hpc report (harmless but needless)
1108andygill@ku.edu**20080916172313]
1109[Fix Trac #2052 Allowing hpc to understand hsc files.
1110andygill@ku.edu**20080916030521]
1111[Fix Trac #2311: creates subdirs for package coverage information
1112andygill@ku.edu**20080915204322]
1113[FIX #2469: sort out our static/extern inline story
1114Simon Marlow <marlowsd@gmail.com>**20080916132222
1115 gcc has changed the meaning of "extern inline" when certain flags are
1116 on (e.g. --std=gnu99), and this broke our use of it in the header
1117 files.
1118]
1119[Fix a warning
1120Simon Marlow <marlowsd@gmail.com>**20080916130922]
1121[Stop using mremap() to allocate space for trampolines
1122Simon Marlow <marlowsd@gmail.com>**20080915145924
1123 
1124 This was causing problems because sometimes mremap() moved the memory
1125 we had allocated from the low 2Gb to above the 2Gb boundary, causing
1126 some linkages to fail.  There's no MAP_32BIT flag to mremap().
1127 
1128 So now we just use mmap(MAP_ANON|MAP_32BIT) to allocated space for the
1129 trampolines.  People without MAP_32BIT (eg. *BSD) will still have to
1130 do something else here, such as allocating memory from a fixed
1131 address; so I've made it slightly easier for those guys, but there's
1132 still work to do (#2063).
1133 
1134 One solution (that Simon PJ is advocating) is to turn on -fPIC by
1135 default on x86-64.  This is a good solution as it removes the need for
1136 MAP_32BIT, but doesn't work with -fvia-C, so probably this is for
1137 later.
1138]
1139[add $(GhcStage[123]HcOpts)
1140Simon Marlow <marlowsd@gmail.com>**20080912155549]
1141[Improve handling of -fdph-* flags
1142Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916034746]
1143[Add -fdph-this
1144Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916033710]
1145[Remove last traces of package ndp
1146Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916033428]
1147[Clean up vectorisation error messages
1148Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916013236]
1149[Fix vectoriser bug
1150Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080915042823
1151 
1152 We were using mkWildId in situations where it cause disastrous shadowing
1153]
1154[Track changes to dph
1155Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912114028]
1156[Change desugaring of PArr literals
1157Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912015609]
1158[Expose the dph packages automatically if -dph-* is set
1159Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912004403]
1160[Don't panic on non-vectorisable expressions
1161Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080911054333]
1162[-Odph implies -fno-spec-constr-count
1163Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080910045339]
1164[Improve warning for SpecConstr
1165simonpj@microsoft.com**20080915154908]
1166[White space only
1167simonpj@microsoft.com**20080915154841]
1168[Minor refactoring to get rid of Type.splitNewTyConApp
1169simonpj@microsoft.com**20080915072946]
1170[Refactor the desugaring of RULE lhss a bit
1171simonpj@microsoft.com**20080915150601
1172 
1173 This is just a tidy-up.  Previously we were calling occurAnalyse
1174 twice on each LHS which was silly and a bit unclean too. 
1175 
1176 This patch should have no overall effect, though.
1177 
1178]
1179[Do not use the Static Arg Transformation by default with -O2
1180simonpj@microsoft.com**20080915150433
1181 
1182 Max has some more heuristics to add, and is meanwhile worried
1183 that having SAT on by default will make some highly-tuned array
1184 programs worse.  So it's off by default. 
1185 
1186 Use -fstatic-argument-transformation to switch it on.
1187 
1188]
1189[Comments, and a couple of asserts, only
1190simonpj@microsoft.com**20080914114641]
1191[Fix Trac #2587: take account of type lets
1192simonpj@microsoft.com**20080914113434
1193 
1194 GHC allows a non-recursive let for type varaibles
1195        let a = TYPE ty in ...
1196 But the free-variable finder had not caught up with this
1197 fact. This patch catches up.
1198 
1199]
1200[Don't try to float type-lets
1201simonpj@microsoft.com**20080914113324
1202 
1203 A type let shouldn't really occur in SetLevels, but if it does,
1204 this patch makes sure it is left alone.
1205 
1206]
1207[add refs and fix a bug (noted by Peter Gammie) in docs of arrow notation
1208Ross Paterson <ross@soi.city.ac.uk>**20080915104757]
1209[Generalise type of 'withExtendedLinkEnv'.
1210Thomas Schilling <nominolo@googlemail.com>**20080915085738]
1211[Use 'GhcMonad' in ghci/InteractiveUI.
1212Thomas Schilling <nominolo@googlemail.com>**20080915085633]
1213[Use 'GhcMonad' in ghci/GhciTags.
1214Thomas Schilling <nominolo@googlemail.com>**20080915084922]
1215[Use 'GhcMonad' in ghci/Debugger.
1216Thomas Schilling <nominolo@googlemail.com>**20080915084738]
1217[Use 'GhcMonad' in ghci/GhciMonad.
1218Thomas Schilling <nominolo@googlemail.com>**20080915084646]
1219[Use 'GhcMonad' in ghc/Main.
1220Thomas Schilling <nominolo@googlemail.com>**20080914232957]
1221[Require PatternSignatures for bootstrapping compiler.
1222Thomas Schilling <nominolo@googlemail.com>**20080914232642]
1223[Use 'GhcMonad' in InteractiveEval.
1224Thomas Schilling <nominolo@googlemail.com>**20080914232454]
1225[Use 'GhcMonad' in GHC and split up checkModule into phases.
1226Thomas Schilling <nominolo@googlemail.com>**20080914232044
1227 
1228 I'm not sure I covered all the ways of throwing errors in the code.
1229 Some functions throw ProgramErrors, some error messages.  It's still
1230 quite a mess, but we're getting closer.  The missing cases are mostly
1231 errors that cannot be fixed by the API client either or are a result
1232 of wrong usage, so are in any case fatal.
1233 
1234 One function, 'getModuleInfo', still returns a 'Maybe', but the
1235 documentation suggests it should always succeed.  So I may change that
1236 soon.
1237 
1238 The spit-up of of 'checkModule' has pros and cons.  The various forms
1239 of 'checkModule*' now become:
1240 
1241  checkAndLoadModule ms False ~~>
1242     loadModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
1243 
1244  checkAndLoadModule ms True ~~>
1245    loadModule =<< desugarModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
1246 
1247  checkModule mn False ~~>
1248    typecheckModule =<< parseModule mn
1249 
1250  checkModule mn True ~~>
1251    desugarModule =<< typecheckModule =<< parseModule mn
1252 
1253 The old APIs cannot easily be provided, since the result type would be
1254 different depending on the second argument.  However, a more
1255 convenient API can be modelled on top of these four functions
1256 ({parse,typecheck,desugar,load}Module).
1257]
1258[Use 'GhcMonad' in DriverPipeline.  Also haddockify a bit while we're at it.
1259Thomas Schilling <nominolo@googlemail.com>**20080914220628]
1260[Use 'GhcMonad' in HscMain.
1261Thomas Schilling <nominolo@googlemail.com>**20080914213655]
1262[Use 'GhcMonad' in DriverMkDepend.
1263Thomas Schilling <nominolo@googlemail.com>**20080914212113]
1264[Haddockify DynFlags (partial).
1265Thomas Schilling <nominolo@googlemail.com>**20080914211718]
1266[Haddockify 'IE'.
1267Thomas Schilling <nominolo@googlemail.com>**20080914210016]
1268[Provide accessors for 'ImportDecl'.
1269Thomas Schilling <nominolo@googlemail.com>**20080914205811]
1270[Start haddockifying 'HsBindLR'.
1271Thomas Schilling <nominolo@googlemail.com>**20080914205629]
1272[Document 'parseStaticFlags'.
1273Thomas Schilling <nominolo@googlemail.com>**20080914205316]
1274[Introduce 'GhcMonad' class and two default implementations 'Ghc' and 'GhcT'.
1275Thomas Schilling <nominolo@googlemail.com>**20080914204930
1276 
1277 This monad will be required by most public API calls.
1278]
1279[Give the "Failing due to -Werror" message a name.
1280Thomas Schilling <nominolo@googlemail.com>**20080914173904]
1281[Make typechecker top-level functions also return messages instead of
1282Thomas Schilling <nominolo@googlemail.com>**20080914173228
1283 printing them.
1284]
1285[Reflect changes of desugarer error reporting in VectMonad.
1286Thomas Schilling <nominolo@googlemail.com>**20080914172711]
1287[Generalise 'handleGhcException' to work with any 'ExceptionMonad'.
1288Thomas Schilling <nominolo@googlemail.com>**20080914172404]
1289[Introduce an 'ExceptionMonad' class.
1290Thomas Schilling <nominolo@googlemail.com>**20080914172154
1291 
1292 This monad provides variants of 'catch', 'bracket', and 'finally', so
1293 exceptions can be handled in monads that wrap IO.  The latter two
1294 methods need to be part of the class definition, because GHC uses
1295 'block' and 'unblock' which are used in the definition of those two
1296 methods for the IO monad.  A perhaps better class interface would
1297 consist of 'gcatch', 'gblock', and 'gunblock' and let the latter two
1298 default to 'id' like is done for non-GHC implementations of 'bracket'
1299 and 'finally'.
1300]
1301[Provide default MonadIO instance for IO.
1302Thomas Schilling <nominolo@googlemail.com>**20080914164245]
1303[Return instead of print warnings and errors in desugarer.
1304Thomas Schilling <nominolo@googlemail.com>**20080914163641]
1305[Return parser errors and warnings instead of dying.
1306Thomas Schilling <nominolo@googlemail.com>**20080914162644]
1307[Add aliases for bags of warnings and errors.
1308Thomas Schilling <nominolo@googlemail.com>**20080914160337]
1309[Slightly more helpful panic message in DynFlags
1310Tim Chevalier <chevalier@alum.wellesley.edu>**20080915080650]
1311[Comments only: ".core" => ".hcr"
1312Tim Chevalier <chevalier@alum.wellesley.edu>**20080914203645]
1313[We need to tell ghc-pkg to --force if we've only built a profiling library
1314Ian Lynagh <igloo@earth.li>**20080913153142]
1315[If we're profiling GHC, don't bother building the GHC package the vanilla way
1316Ian Lynagh <igloo@earth.li>**20080913144820]
1317[Remove the duplicate show rule in libraries/Makefile
1318Ian Lynagh <igloo@earth.li>**20080913144413]
1319[Move the "show" target from target.mk to boilerplate.mk
1320Ian Lynagh <igloo@earth.li>**20080913141312
1321 target.mk isn't included everywhere, but show is always handy
1322]
1323[Change how we detect if we are using the bootstrapping compiler or not
1324Ian Lynagh <igloo@earth.li>**20080913104658
1325 I think looking for $(GHC_COMPILER_DIR_ABS) was failing on the Windows
1326 buildbot due to different path separators. Now we just look for
1327 "inplace".
1328]
1329[wibble the distrib Makefile
1330Ian Lynagh <igloo@earth.li>**20080912135932
1331 We now need to install driver after ghc
1332]
1333[Reinstate the driver/ghc directory, to create a versioned GHC program
1334Ian Lynagh <igloo@earth.li>**20080912113619
1335 e.g. $(bindir)/ghc-6.9.20080911
1336]
1337[If USE_NEW_MKDEPEND_FLAGS is YES then don't use the deprecated -optdep flags
1338Ian Lynagh <igloo@earth.li>**20080912110316]
1339[Use --force-local when calling tar in bindisttest/
1340Ian Lynagh <igloo@earth.li>**20080912012855
1341 Otherwise it thinks that c:/foo is a remote file
1342]
1343[Fix #2586, bug in THUNK_SELECTORs (again)
1344Simon Marlow <marlowsd@gmail.com>**20080912130404
1345 This time, we had forgetten the write barrier in one place.
1346]
1347[TAG 2008-09-12 2
1348Ian Lynagh <igloo@earth.li>**20080912132848]
1349Patch bundle hash:
1350025f514335da41ead35a8ee1e9c2695364fba73b