Ticket #2910: 2910-more.patch

File 2910-more.patch, 132.5 KB (added by int-e, 9 years ago)

Some other changes that I feel should be made in throwTo()

1Tue Jan  6 20:49:04 CET 2009  Bertram Felgenhauer <int-e@gmx.de>
2  * Fix two more locking issues in throwTo()
5New patches:
7[Fix two more locking issues in throwTo()
8Bertram Felgenhauer <int-e@gmx.de>**20090106194904] {
9hunk ./rts/RaiseAsync.c 418
10        // Unblocking BlockedOnSTM threads requires the TSO to be
11        // locked; see STM.c:unpark_tso().
12        if (target->why_blocked != BlockedOnSTM) {
13+           unlockTSO(target);
14            goto retry;
15        }
16        if ((target->flags & TSO_BLOCKEX) &&
17hunk ./rts/RaiseAsync.c 440
18        // thread is blocking exceptions, and block on its
19        // blocked_exception queue.
20        lockTSO(target);
21+       if (target->why_blocked != BlockedOnCCall &&
22+           target->why_blocked != BlockedOnCCall_NoUnblockExc) {
23+           unlockTSO(target);
24+           return;
25+       }
26        blockedThrowTo(cap,source,target);
27        *out = target;
28        return THROWTO_BLOCKED;
33[wake up the blocked exception queue on ThreadFinished; fixes #2910
34Simon Marlow <marlowsd@gmail.com>**20090106153254]
35[bump GHC's max stack size to 512M
36Simon Marlow <marlowsd@gmail.com>**20081219112211
37 To accomodate compiling very long static lists (#2002)
39[ext-core: change .cabal file so we can build with either GHC 6.8 or 6.10
40Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192757]
41[ext-core: fix some Prep bugs
42Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192734]
43[ext-core: use shorter names when combining modules
44Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192645]
45[ext-core: twiddle primitive things
46Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192434]
47[Don't pin a register for gc_thread on SPARC.
50 This makes the build work again.
52[Require HsColour by default
53Ian Lynagh <igloo@earth.li>**20090104214647
54 This should stop us ending up without HsColour'ed sources on some
55 platforms.
57 We also now tell Cabal where to find HsColour, rather than it finding
58 it itself.
60[Fix build
61Ian Lynagh <igloo@earth.li>**20090104211810]
62[Add GHCi completions to :set and :show
63Ori Avtalion <ori@avtalion.name>**20081209194210]
64[Fix sync-all: Check for --complete/partial before --<anything>
65Ian Lynagh <igloo@earth.li>**20090104184652
66 Patch from megacz in trac #2857
68[Remove time from extralibs at request of maintainer
69Ian Lynagh <igloo@earth.li>**20090104115509]
70[validate fix: InteractiveEval no longer needs to import  IdInfo
71Ian Lynagh <igloo@earth.li>**20090103154754]
72[Fix validate: strs is no longer used in IfaceSyn
73Ian Lynagh <igloo@earth.li>**20090103153624]
74[Remove trailing whitespace from HaddockUtils
75Ian Lynagh <igloo@earth.li>**20081229191727]
76[Fix warnings in HaddockUtils
77Ian Lynagh <igloo@earth.li>**20081229191657]
78[Remove dead code from HaddockUtils
79Ian Lynagh <igloo@earth.li>**20081229191430]
80[Make record selectors into ordinary functions
83 This biggish patch addresses Trac #2670.  The main effect is to make
84 record selectors into ordinary functions, whose unfoldings appear in
85 interface files, in contrast to their previous existence as magic
86 "implicit Ids".  This means that the usual machinery of optimisation,
87 analysis, and inlining applies to them, which was failing before when
88 the selector was somewhat complicated.  (Which it can be when
89 strictness annotations, unboxing annotations, and GADTs are involved.)
91 The change involves the following points
93 * Changes in Var.lhs to the representation of Var.  Now a LocalId can
94   have an IdDetails as well as a GlobalId.  In particular, the
95   information that an Id is a record selector is kept in the
96   IdDetails.  While compiling the current module, the record selector
97   *must* be a LocalId, so that it participates properly in compilation
98   (free variables etc).
100   This led me to change the (hidden) representation of Var, so that there
101   is now only one constructor for Id, not two.
103 * The IdDetails is persisted into interface files, so that an
104   importing module can see which Ids are records selectors.
106 * In TcTyClDecls, we generate the record-selector bindings in renamed,
107   but not typechecked form.  In this way, we can get the typechecker
108   to add all the types and so on, which is jolly helpful especially
109   when GADTs or type families are involved.  Just like derived
110   instance declarations.
112   This is the big new chunk of 180 lines of code (much of which is
113   commentary).  A call to the same function, mkAuxBinds, is needed in
114   TcInstDcls for associated types.
116 * The typechecker therefore has to pin the correct IdDetails on to
117   the record selector, when it typechecks it.  There was a neat way
118   to do this, by adding a new sort of signature to HsBinds.Sig, namely
119   IdSig.  This contains an Id (with the correct Name, Type, and IdDetails);
120   the type checker uses it as the binder for the final binding.  This
121   worked out rather easily.
123 * Record selectors are no longer "implicit ids", which entails changes to
124      IfaceSyn.ifaceDeclSubBndrs
125      HscTypes.implicitTyThings
126      TidyPgm.getImplicitBinds
127   (These three functions must agree.)
129 * MkId.mkRecordSelectorId is deleted entirely, some 300+ lines (incl
130   comments) of very error prone code.  Happy days.
132 * A TyCon no longer contains the list of record selectors:
133   algTcSelIds is gone
135 The renamer is unaffected, including the way that import and export of
136 record selectors is handled.
138 Other small things
140 * IfaceSyn.ifaceDeclSubBndrs had a fragile test for whether a data
141   constructor had a wrapper.  I've replaced that with an explicit flag
142   in the interface file. More robust I hope.
144 * I renamed isIdVar to isId, which touched a few otherwise-unrelated files.
148[Fix Trac #2721: reject newtype deriving if the class has associated types
150[-XImpredicativeTypes implies -XRankNTypes, and improve error msg in TcMType
153 If you are going for impredicative types you almost certainly want RankN
154 too. The change to TcMType improves the error when you say
155      T (forall a. blah)
156 where T is a type synonym.  This doesn't necessarily need impredicativity,
157 if you have LiberalTypeSynonyms.
160[Fix Trac #2856: make deriving work for type families
163 Darn, but TcDeriv is complicated, when type families get in on
164 the act!  This patch makes GeneralisedNewtypeDeriving work
165 properly for type families.  I think.
167 In order to do so, I found that GeneralisedNewtypeDeriving can
168 work for recursive newtypes too -- and since families are conservatively
169 marked recursive, that's a crucial part of the fix, and useful too.
170 See Note [Recursive newtypes] in TcDeriv.
173[White space and spelling in comments
175[Remove -XImpredicativeTypes from -fglasgow-exts
178 See Trac #2846: impredicative types are far from stable, so
179 -fglasgow-exts should not imply them.  Maybe we should merge
180 this into 6.10?
183[Improve error reporting for 'deriving'
186 a) Improve the extra suggested fix when there's a "no instance"
187    error in a deriving clause.
189 b) Improve error location recording in tcInstDecl2
191 Many of the changes in tcInstDecl2 are simple reformatting.
195[Improve error message in deriving (fix Trac #2851)
197[Avoid nasty name clash with associated data types (fixes Trac #2888)
200 The main bug was in TcHsType; see Note [Avoid name clashes for
201 associated data types].  However I did a bit of re-factoring while
202 I was abouut it.
204 I'm still a but unhappy with the use of TyCon.setTyConArgPoss; it'd
205 be better to construct the TyCon correctly in the first place.  But
206 that means passing an extra parameter to tcTyDecl1... maybe we should
207 do this.
211[Refactor RnEnv to fix Trac #2901
214 This tidy-up fixes Trac #2901, and eliminates 20 lines of code.
215 Mainly this is done by making a version of lookupGlobalOccRn that
216 returns (Maybe Name); this replaces lookupSrcOccRn but does more.
219[Add quotes to error message
221[Tidy up treatment of big lambda (fixes Trac #2898)
224 There was a leftover big lambda in the CorePrep'd code, which confused
225 the bytecode generator.  Actually big lambdas are harmless.  This patch
226 refactors ByteCodeGen so that it systemantically used 'bcView' to eliminate
227 junk.  I did a little clean up in CorePrep too.
229 See comments in Trac #2898.
232[Fix warnings in ByteCodeAsm
233Ian Lynagh <igloo@earth.li>**20081229174726]
234[Fix warnings in ByteCodeInstr
235Ian Lynagh <igloo@earth.li>**20081229173331]
236[Fix warnings in Rules
237Ian Lynagh <igloo@earth.li>**20081229171832]
238[Fix warnings in StgCmmForeign
239Ian Lynagh <igloo@earth.li>**20081229165957]
240[Fix warnings in CgCallConv
241Ian Lynagh <igloo@earth.li>**20081229165402]
242[Fix warnings in SMRep
243Ian Lynagh <igloo@earth.li>**20081229164959]
244[Fix warnings in ClosureInfo
245Ian Lynagh <igloo@earth.li>**20081229164618]
246[Fix warnings in CgTicky
247Ian Lynagh <igloo@earth.li>**20081229153416]
248[Fix warnings in CgCon
249Ian Lynagh <igloo@earth.li>**20081229151733]
250[Fix warnings in WorkWrap
251Ian Lynagh <igloo@earth.li>**20081229150406]
252[Fix warnings in NCGMonad
253Ian Lynagh <igloo@earth.li>**20081229145627]
254[Fix warnings in CmmInfo
255Ian Lynagh <igloo@earth.li>**20081229145307]
256[Fix warnings in CmmCPSGen
257Ian Lynagh <igloo@earth.li>**20081229145119]
258[Fix warnings in CmmProcPoint
259Ian Lynagh <igloo@earth.li>**20081229144214]
260[Fix warnings in CmmCallConv
261Ian Lynagh <igloo@earth.li>**20081229141924]
262[Fix warnings in CmmLive
263Ian Lynagh <igloo@earth.li>**20081229141035]
264[Fix warnings in CmmCPS
265Ian Lynagh <igloo@earth.li>**20081229133158]
266[Fix warnings in CmmUtils
267Ian Lynagh <igloo@earth.li>**20081229132637]
268[Comment out dead function breakProc
269Ian Lynagh <igloo@earth.li>**20081229115647]
270[Fix warnings in CmmBrokenBlock
271Ian Lynagh <igloo@earth.li>**20081229115527]
272[Comments only.  Haddockify parts of TcRnTypes.
273Thomas Schilling <nominolo@googlemail.com>**20081211154657]
274[Comments only.  Fix typo.
275Thomas Schilling <nominolo@googlemail.com>**20081211153104]
276[Include PprTyThings in tags file.
277Thomas Schilling <nominolo@googlemail.com>**20081211153005]
278[Use DynFlags to work out if we are doing ticky ticky profiling
279Ian Lynagh <igloo@earth.li>**20081218161928
280 We used to use StaticFlags
282[Fix warnings in CgExpr
283Ian Lynagh <igloo@earth.li>**20081217201152]
284[Fix warnings in CgBindery
285Ian Lynagh <igloo@earth.li>**20081217194607]
286[Fix warnings in CgStackery
287Ian Lynagh <igloo@earth.li>**20081217191713]
288[Fix warnings in CgCase
289Ian Lynagh <igloo@earth.li>**20081217190848]
290[Remove some dead code from CgCase
291Ian Lynagh <igloo@earth.li>**20081217184755]
292[Fix warnings in StgCmmProf
293Ian Lynagh <igloo@earth.li>**20081217182236]
294[Fix warnings in CgProf
295Ian Lynagh <igloo@earth.li>**20081217181711]
296[Fix warnings in CgInfoTbls
297Ian Lynagh <igloo@earth.li>**20081217180144]
298[Remove dead function srtLabelAndLength from CgInfoTbls
299Ian Lynagh <igloo@earth.li>**20081217180044]
300[Fix warnings in CgHeapery
301Ian Lynagh <igloo@earth.li>**20081217175726]
302[Fix warnings in CgTailCall
303Ian Lynagh <igloo@earth.li>**20081217175040]
304[Remove a little dead code from CgTailCall
305Ian Lynagh <igloo@earth.li>**20081217174947]
306[Fix warnings in CodeGen
307Ian Lynagh <igloo@earth.li>**20081217165904]
308[Fix warnings in StgCmmTicky
309Ian Lynagh <igloo@earth.li>**20081217165433]
310[Remove dead code from CgUtils
311Ian Lynagh <igloo@earth.li>**20081217163920]
312[Fix warnings in CgPrimOp
313Ian Lynagh <igloo@earth.li>**20081217163912]
314[Fix warnings in CgMonad
315Ian Lynagh <igloo@earth.li>**20081217163903]
316[Fix warnings in CgClosure
317Ian Lynagh <igloo@earth.li>**20081217163850]
318[Fix warnings in CgForeignCall
319Ian Lynagh <igloo@earth.li>**20081215222515]
320[Remove some redundant code
321Ian Lynagh <igloo@earth.li>**20081215194047
322 We were looking at opt_DoTickyProfiling, and if it was set claling ifTicky
323 which looks at opt_DoTickyProfiling itself.
325[Fix warnings in CgLetNoEscape
326Ian Lynagh <igloo@earth.li>**20081215173752]
327[Workaround for #2262, from Barney Stratford
328Simon Marlow <marlowsd@gmail.com>**20081216124706
329 See http://www.haskell.org/pipermail/glasgow-haskell-users/2008-December/016333.html
331[UNDO: Add -fpass-case-bndr-to-join-points
332Simon Marlow <marlowsd@gmail.com>**20081216114235
334 rolling back:
336 Fri Dec  5 10:51:59 GMT 2008  simonpj@microsoft.com
337   * Add -fpass-case-bndr-to-join-points
339   See Note [Passing the case binder to join points] in Simplify.lhs
340   The default now is *not* to pass the case binder.  There are some
341   nofib results with the above note; the effect is almost always
342   negligible.
344   I don't expect this flag to be used by users (hence no docs). It's just
345   there to let me try the performance effects of switching on and off.
348     M ./compiler/main/StaticFlagParser.hs +1
349     M ./compiler/main/StaticFlags.hs +4
350     M ./compiler/simplCore/Simplify.lhs -14 +73
352[Rollback INLINE patches
353Simon Marlow <marlowsd@gmail.com>**20081216103556
355 rolling back:
357 Fri Dec  5 16:54:00 GMT 2008  simonpj@microsoft.com
358   * Completely new treatment of INLINE pragmas (big patch)
360   This is a major patch, which changes the way INLINE pragmas work.
361   Although lots of files are touched, the net is only +21 lines of
362   code -- and I bet that most of those are comments!
364   HEADS UP: interface file format has changed, so you'll need to
365   recompile everything.
367   There is not much effect on overall performance for nofib,
368   probably because those programs don't make heavy use of INLINE pragmas.
370           Program           Size    Allocs   Runtime   Elapsed
371               Min         -11.3%     -6.9%     -9.2%     -8.2%
372               Max          -0.1%     +4.6%     +7.5%     +8.9%
373    Geometric Mean          -2.2%     -0.2%     -1.0%     -0.8%
375   (The +4.6% for on allocs is cichelli; see other patch relating to
376   -fpass-case-bndr-to-join-points.)
378   The old INLINE system
379   ~~~~~~~~~~~~~~~~~~~~~
380   The old system worked like this. A function with an INLINE pragam
381   got a right-hand side which looked like
382        f = __inline_me__ (\xy. e)
383   The __inline_me__ part was an InlineNote, and was treated specially
384   in various ways.  Notably, the simplifier didn't inline inside an
385   __inline_me__ note. 
387   As a result, the code for f itself was pretty crappy. That matters
388   if you say (map f xs), because then you execute the code for f,
389   rather than inlining a copy at the call site.
391   The new story: InlineRules
392   ~~~~~~~~~~~~~~~~~~~~~~~~~~
393   The new system removes the InlineMe Note altogether.  Instead there
394   is a new constructor InlineRule in CoreSyn.Unfolding.  This is a
395   bit like a RULE, in that it remembers the template to be inlined inside
396   the InlineRule.  No simplification or inlining is done on an InlineRule,
397   just like RULEs. 
399   An Id can have an InlineRule *or* a CoreUnfolding (since these are two
400   constructors from Unfolding). The simplifier treats them differently:
402     - An InlineRule is has the substitution applied (like RULES) but
403       is otherwise left undisturbed.
405     - A CoreUnfolding is updated with the new RHS of the definition,
406       on each iteration of the simplifier.
408   An InlineRule fires regardless of size, but *only* when the function
409   is applied to enough arguments.  The "arity" of the rule is specified
410   (by the programmer) as the number of args on the LHS of the "=".  So
411   it makes a difference whether you say
412        {-# INLINE f #-}
413        f x = \y -> e     or     f x y = e
414   This is one of the big new features that InlineRule gives us, and it
415   is one that Roman really wanted.
417   In contrast, a CoreUnfolding can fire when it is applied to fewer
418   args than than the function has lambdas, provided the result is small
419   enough.
422   Consequential stuff
423   ~~~~~~~~~~~~~~~~~~~
424   * A 'wrapper' no longer has a WrapperInfo in the IdInfo.  Instead,
425     the InlineRule has a field identifying wrappers.
427   * Of course, IfaceSyn and interface serialisation changes appropriately.
429   * Making implication constraints inline nicely was a bit fiddly. In
430     the end I added a var_inline field to HsBInd.VarBind, which is why
431     this patch affects the type checker slightly
433   * I made some changes to the way in which eta expansion happens in
434     CorePrep, mainly to ensure that *arguments* that become let-bound
435     are also eta-expanded.  I'm still not too happy with the clarity
436     and robustness fo the result.
438   * We now complain if the programmer gives an INLINE pragma for
439     a recursive function (prevsiously we just ignored it).  Reason for
440     change: we don't want an InlineRule on a LoopBreaker, because then
441     we'd have to check for loop-breaker-hood at occurrence sites (which
442     isn't currenlty done).  Some tests need changing as a result.
444   This patch has been in my tree for quite a while, so there are
445   probably some other minor changes.
448     M ./compiler/basicTypes/Id.lhs -11
449     M ./compiler/basicTypes/IdInfo.lhs -82
450     M ./compiler/basicTypes/MkId.lhs -2 +2
451     M ./compiler/coreSyn/CoreFVs.lhs -2 +25
452     M ./compiler/coreSyn/CoreLint.lhs -5 +1
453     M ./compiler/coreSyn/CorePrep.lhs -59 +53
454     M ./compiler/coreSyn/CoreSubst.lhs -22 +31
455     M ./compiler/coreSyn/CoreSyn.lhs -66 +92
456     M ./compiler/coreSyn/CoreUnfold.lhs -112 +112
457     M ./compiler/coreSyn/CoreUtils.lhs -185 +184
458     M ./compiler/coreSyn/MkExternalCore.lhs -1
459     M ./compiler/coreSyn/PprCore.lhs -4 +40
460     M ./compiler/deSugar/DsBinds.lhs -70 +118
461     M ./compiler/deSugar/DsForeign.lhs -2 +4
462     M ./compiler/deSugar/DsMeta.hs -4 +3
463     M ./compiler/hsSyn/HsBinds.lhs -3 +3
464     M ./compiler/hsSyn/HsUtils.lhs -2 +7
465     M ./compiler/iface/BinIface.hs -11 +25
466     M ./compiler/iface/IfaceSyn.lhs -13 +21
467     M ./compiler/iface/MkIface.lhs -24 +19
468     M ./compiler/iface/TcIface.lhs -29 +23
469     M ./compiler/main/TidyPgm.lhs -55 +49
470     M ./compiler/parser/ParserCore.y -5 +6
471     M ./compiler/simplCore/CSE.lhs -2 +1
472     M ./compiler/simplCore/FloatIn.lhs -6 +1
473     M ./compiler/simplCore/FloatOut.lhs -23
474     M ./compiler/simplCore/OccurAnal.lhs -36 +5
475     M ./compiler/simplCore/SetLevels.lhs -59 +54
476     M ./compiler/simplCore/SimplCore.lhs -48 +52
477     M ./compiler/simplCore/SimplEnv.lhs -26 +22
478     M ./compiler/simplCore/SimplUtils.lhs -28 +4
479     M ./compiler/simplCore/Simplify.lhs -91 +109
480     M ./compiler/specialise/Specialise.lhs -15 +18
481     M ./compiler/stranal/WorkWrap.lhs -14 +11
482     M ./compiler/stranal/WwLib.lhs -2 +2
483     M ./compiler/typecheck/Inst.lhs -1 +3
484     M ./compiler/typecheck/TcBinds.lhs -17 +27
485     M ./compiler/typecheck/TcClassDcl.lhs -1 +2
486     M ./compiler/typecheck/TcExpr.lhs -4 +6
487     M ./compiler/typecheck/TcForeign.lhs -1 +1
488     M ./compiler/typecheck/TcGenDeriv.lhs -14 +13
489     M ./compiler/typecheck/TcHsSyn.lhs -3 +2
490     M ./compiler/typecheck/TcInstDcls.lhs -5 +4
491     M ./compiler/typecheck/TcRnDriver.lhs -2 +11
492     M ./compiler/typecheck/TcSimplify.lhs -10 +17
493     M ./compiler/vectorise/VectType.hs +7
495 Mon Dec  8 12:43:10 GMT 2008  simonpj@microsoft.com
496   * White space only
498     M ./compiler/simplCore/Simplify.lhs -2
500 Mon Dec  8 12:48:40 GMT 2008  simonpj@microsoft.com
501   * Move simpleOptExpr from CoreUnfold to CoreSubst
503     M ./compiler/coreSyn/CoreSubst.lhs -1 +87
504     M ./compiler/coreSyn/CoreUnfold.lhs -72 +1
506 Mon Dec  8 17:30:18 GMT 2008  simonpj@microsoft.com
507   * Use CoreSubst.simpleOptExpr in place of the ad-hoc simpleSubst (reduces code too)
509     M ./compiler/deSugar/DsBinds.lhs -50 +16
511 Tue Dec  9 17:03:02 GMT 2008  simonpj@microsoft.com
512   * Fix Trac #2861: bogus eta expansion
514   Urghlhl!  I "tided up" the treatment of the "state hack" in CoreUtils, but
515   missed an unexpected interaction with the way that a bottoming function
516   simply swallows excess arguments.  There's a long
517        Note [State hack and bottoming functions]
518   to explain (which accounts for most of the new lines of code).
521     M ./compiler/coreSyn/CoreUtils.lhs -16 +53
523 Mon Dec 15 10:02:21 GMT 2008  Simon Marlow <marlowsd@gmail.com>
524   * Revert CorePrep part of "Completely new treatment of INLINE pragmas..."
526   The original patch said:
528   * I made some changes to the way in which eta expansion happens in
529     CorePrep, mainly to ensure that *arguments* that become let-bound
530     are also eta-expanded.  I'm still not too happy with the clarity
531     and robustness fo the result.
533   Unfortunately this change apparently broke some invariants that were
534   relied on elsewhere, and in particular lead to panics when compiling
535   with profiling on.
537   Will re-investigate in the new year.
539     M ./compiler/coreSyn/CorePrep.lhs -53 +58
540     M ./configure.ac -1 +1
542 Mon Dec 15 12:28:51 GMT 2008  Simon Marlow <marlowsd@gmail.com>
543   * revert accidental change to configure.ac
545     M ./configure.ac -1 +1
547[revert accidental change to configure.ac
548Simon Marlow <marlowsd@gmail.com>**20081215122851]
549[Revert CorePrep part of "Completely new treatment of INLINE pragmas..."
550Simon Marlow <marlowsd@gmail.com>**20081215100221
552 The original patch said:
554 * I made some changes to the way in which eta expansion happens in
555   CorePrep, mainly to ensure that *arguments* that become let-bound
556   are also eta-expanded.  I'm still not too happy with the clarity
557   and robustness fo the result.
559 Unfortunately this change apparently broke some invariants that were
560 relied on elsewhere, and in particular lead to panics when compiling
561 with profiling on.
563 Will re-investigate in the new year.
565[wake up other Capabilities even when there is only one spark (see #2868)
566Simon Marlow <marlowsd@gmail.com>**20081210164644]
567[Document new GC options -q1 and -qg<n>
568Simon Marlow <marlowsd@gmail.com>**20081210164557]
569[SysTools no longer needs -fno-cse
570Ian Lynagh <igloo@earth.li>**20081211182327]
571[Make the lists of files and directories to be cleaned-up non-global
572Ian Lynagh <igloo@earth.li>**20081211180739
573 They still need to be stored in IORefs, as the exception handler needs
574 to know what they all are.
576[The default cleanup handler should /always/ delete the temp files
577Ian Lynagh <igloo@earth.li>**20081211170006
578 Not only if there has been an exception. It worked for GHC anyway,
579 as it was getting an ExitSuccess exception, but GHC API clients
580 shouldn't be required to do that.
582[Fix user guide typesetting
583Ian Lynagh <igloo@earth.li>**20081210165434]
584[FIX #1364: added support for C finalizers that run as soon as the value is not longer reachable.
585Simon Marlow <marlowsd@gmail.com>**20081210150425
587 Patch originally by Ivan Tomac <tomac@pacific.net.au>, amended by
588 Simon Marlow:
590   - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv#
591   - GC parameters to ALLOC_PRIM fixed
593[On FreeBSD, try MAP_FIXED if ordinary mmap() fails to give us suitable memory
594Simon Marlow <marlowsd@gmail.com>**20081210115751
595 This appears to be necessary on FreeBSD.  It might be necessary on
596 other OSs too, but I'm being cautious because using MAP_FIXED can lead
597 to crashes by overwriting existing mappings, and we have no (easy) way
598 to prevent that.
600[Document hs_init() infelicity (#2863)
601Simon Marlow <marlowsd@gmail.com>**20081209164322]
602[Improve documentation for data family instances (cf Trac #1968)
605 The HEAD allows GADT syntax for data/newtype family instances.
606 (GHC 6.10 does not seem to.)
609[Make some profiling flags dynamic
610Ian Lynagh <igloo@earth.li>**20081209230157
611 In particular:
612     -fauto-sccs-on-all-toplevs          -auto-all   -no-auto-all
613     -fauto-sccs-on-exported-toplevs     -auto       -no-auto
614     -fauto-sccs-on-individual-cafs      -caf-all    -no-caf-all
616[Fix warnings in StgCmmGran
617Ian Lynagh <igloo@earth.li>**20081209222413]
618[Add OPTIONS_CATCH,DERIVE,YHC to those that GHC knows about; trac #2847
619Ian Lynagh <igloo@earth.li>**20081209191724]
620[Fix warnings in CgHpc
621Ian Lynagh <igloo@earth.li>**20081209191713]
622[Parse pragma names better; trac #2847
623Ian Lynagh <igloo@earth.li>**20081209190318
624 We require that pragma names are not followed by pragma character,
625 defined as
626     isAlphaNum c || c == '_'
628[Fix warnings in CgParallel
629Ian Lynagh <igloo@earth.li>**20081209184402]
630[Fix warnings in StgCmmHpc
631Ian Lynagh <igloo@earth.li>**20081209184004]
632[Remove an unnecessary -w flag
633Ian Lynagh <igloo@earth.li>**20081209183812]
634[Fix Trac #2861: bogus eta expansion
637 Urghlhl!  I "tided up" the treatment of the "state hack" in CoreUtils, but
638 missed an unexpected interaction with the way that a bottoming function
639 simply swallows excess arguments.  There's a long
640      Note [State hack and bottoming functions]
641 to explain (which accounts for most of the new lines of code).
644[Fix #2592: do an orderly shutdown when the heap is exhausted
645Simon Marlow <marlowsd@gmail.com>**20081209105919
646 Really we should be raising an exception in this case, but that's
647 tricky (see comments).  At least now we shut down the runtime
648 correctly rather than just exiting.
650[Fix #2848: avoid overflow during time calculation
651Simon Marlow <marlowsd@gmail.com>**20081209105600]
652[Fix #2838: we should narrow a CmmInt before converting to ImmInteger
653Simon Marlow <marlowsd@gmail.com>**20081209105515]
654[fix an assertion failure in prof/threaded/debug mode
655Simon Marlow <marlowsd@gmail.com>**20081204101201]
656[Inject implicit bindings after CoreTidy, not before Simplify
659 Originally I inject the "implicit bindings" (record selectors, class
660 method selectors, data con wrappers...) after CoreTidy.  However, in a
661 misguided attempt to fix Trac #2070, I moved the injection point to
662 before the Simplifier, so that record selectors would be optimised by
663 the simplifier.
665 This was misguided because record selectors (indeed all implicit bindings)
666 are GlobalIds, whose IdInfo is meant to be frozen.  But the Simplifier,
667 and other Core-to-Core optimisations, merrily change the IdInfo.  That
668 ultimately made Trac #2844 happen, where a record selector got arity 2,
669 but the GlobalId (which importing scopes re-construct from the class decl
670 rather than reading from the interface file) has arity 1.
672 So this patch moves the injection back to CoreTidy. Happily #2070 should
673 still be OK because we now use CoreSubst.simpleOptExpr on the unfoldings
674 for implict things, which gets rid of the most gratuitous infelicities.
676 Still, there's a strong case for stoppping record selectors from being
677 GlobalIds, and treating them much more like dict-funs.  I'm thinking
678 about that.  Meanwhile, #2844 is ok now.
681[Add assertion for arity match (checks Trac #2844)
684 The exported arity of a function must match the arity for the
685 STG function.  Trac #2844 was a pretty obscure manifestation of
686 the failure of this invariant. This patch doesn't cure the bug;
687 rather it adds an assertion to CoreToStg to check the invariant
688 so we should get an earlier and less obscure warning if this
689 fails in future.
692[Use CoreSubst.simpleOptExpr in place of the ad-hoc simpleSubst (reduces code too)
694[Move simpleOptExpr from CoreUnfold to CoreSubst
696[White space only
698[Comments only
700[Completely new treatment of INLINE pragmas (big patch)
703 This is a major patch, which changes the way INLINE pragmas work.
704 Although lots of files are touched, the net is only +21 lines of
705 code -- and I bet that most of those are comments!
707 HEADS UP: interface file format has changed, so you'll need to
708 recompile everything.
710 There is not much effect on overall performance for nofib,
711 probably because those programs don't make heavy use of INLINE pragmas.
713         Program           Size    Allocs   Runtime   Elapsed
714             Min         -11.3%     -6.9%     -9.2%     -8.2%
715             Max          -0.1%     +4.6%     +7.5%     +8.9%
716  Geometric Mean          -2.2%     -0.2%     -1.0%     -0.8%
718 (The +4.6% for on allocs is cichelli; see other patch relating to
719 -fpass-case-bndr-to-join-points.)
721 The old INLINE system
722 ~~~~~~~~~~~~~~~~~~~~~
723 The old system worked like this. A function with an INLINE pragam
724 got a right-hand side which looked like
725      f = __inline_me__ (\xy. e)
726 The __inline_me__ part was an InlineNote, and was treated specially
727 in various ways.  Notably, the simplifier didn't inline inside an
728 __inline_me__ note. 
730 As a result, the code for f itself was pretty crappy. That matters
731 if you say (map f xs), because then you execute the code for f,
732 rather than inlining a copy at the call site.
734 The new story: InlineRules
735 ~~~~~~~~~~~~~~~~~~~~~~~~~~
736 The new system removes the InlineMe Note altogether.  Instead there
737 is a new constructor InlineRule in CoreSyn.Unfolding.  This is a
738 bit like a RULE, in that it remembers the template to be inlined inside
739 the InlineRule.  No simplification or inlining is done on an InlineRule,
740 just like RULEs. 
742 An Id can have an InlineRule *or* a CoreUnfolding (since these are two
743 constructors from Unfolding). The simplifier treats them differently:
745   - An InlineRule is has the substitution applied (like RULES) but
746     is otherwise left undisturbed.
748   - A CoreUnfolding is updated with the new RHS of the definition,
749     on each iteration of the simplifier.
751 An InlineRule fires regardless of size, but *only* when the function
752 is applied to enough arguments.  The "arity" of the rule is specified
753 (by the programmer) as the number of args on the LHS of the "=".  So
754 it makes a difference whether you say
755        {-# INLINE f #-}
756        f x = \y -> e     or     f x y = e
757 This is one of the big new features that InlineRule gives us, and it
758 is one that Roman really wanted.
760 In contrast, a CoreUnfolding can fire when it is applied to fewer
761 args than than the function has lambdas, provided the result is small
762 enough.
765 Consequential stuff
766 ~~~~~~~~~~~~~~~~~~~
767 * A 'wrapper' no longer has a WrapperInfo in the IdInfo.  Instead,
768   the InlineRule has a field identifying wrappers.
770 * Of course, IfaceSyn and interface serialisation changes appropriately.
772 * Making implication constraints inline nicely was a bit fiddly. In
773   the end I added a var_inline field to HsBInd.VarBind, which is why
774   this patch affects the type checker slightly
776 * I made some changes to the way in which eta expansion happens in
777   CorePrep, mainly to ensure that *arguments* that become let-bound
778   are also eta-expanded.  I'm still not too happy with the clarity
779   and robustness fo the result.
781 * We now complain if the programmer gives an INLINE pragma for
782   a recursive function (prevsiously we just ignored it).  Reason for
783   change: we don't want an InlineRule on a LoopBreaker, because then
784   we'd have to check for loop-breaker-hood at occurrence sites (which
785   isn't currenlty done).  Some tests need changing as a result.
787 This patch has been in my tree for quite a while, so there are
788 probably some other minor changes.
791[Add -fpass-case-bndr-to-join-points
794 See Note [Passing the case binder to join points] in Simplify.lhs
795 The default now is *not* to pass the case binder.  There are some
796 nofib results with the above note; the effect is almost always
797 negligible.
799 I don't expect this flag to be used by users (hence no docs). It's just
800 there to let me try the performance effects of switching on and off.
803[Add static flag -fsimple-list-literals
806 The new static flag -fsimple-list-literals makes ExplicitList literals
807 be desugared in the straightforward way, rather than using 'build' as
808 now.  See SLPJ comments with Note [Desugaring explicit lists].
810 I don't expect this flag to be used by users (hence no docs). It's just
811 there to let me try the performance effects of switching on and off.
814[Comments only in OccurAnal
816[Comments only
818[Layout only
820[Comments only (Note [Entering error thunks])
822[Make CoreToStg a little more robust to eta expansion
824[Add no-op case for addIdSpecialisations (very minor optimisation)
826[Trim redundant import
828[Make CoreTidy retain deadness info (better -ddump-simpl)
831 GHC now retains more robust information about dead variables; but
832 CoreTidy was throwing it away.  This patch makes CoreTidy retain it,
833 which gives better output for -ddump-simpl.
835 New opportunity: shrink interface files by using wildcards for dead variables.
839[Remove INLINE pragmas on recursive functions
842 INLINE pragmas on recursive functions are ignored; and this
843 is checked in my upcoming patch for inlinings.
846[Comments only (on Activation)
848[We need to tell cabal-bin which version of Cabal to use
849Ian Lynagh <igloo@earth.li>**20081203123208
850 Otherwise, if the bootstrapping compiler has a newer version, we get
851 a mismatch between the version used to compile ghc-prim's Setup.hs and
852 the version that installPackage uses.
854[Document 'loadModule'.
855Thomas Schilling <nominolo@googlemail.com>**20081202154800]
856[Add 'needsTemplateHaskell' utility function and document why one might
857Thomas Schilling <nominolo@googlemail.com>**20081202152358
858 want to use it.
860[Documentation only.
861Thomas Schilling <nominolo@googlemail.com>**20081202150158]
862[Export 'succeeded' and 'failed' helper functions.
863Thomas Schilling <nominolo@googlemail.com>**20081202144451]
864[Put full ImportDecls in ModSummary instead of just ModuleNames
865Simon Marlow <marlowsd@gmail.com>**20081202133736
866 ... and use it to make ghc -M generate correct cross-package
867 dependencies when using package-qualified imports (needed for the new
868 build system).  Since we're already parsing the ImportDecl from the
869 source file, there seems no good reason not to keep it in the
870 ModSummary, it might be useful for other things too.
872[ghc -M: need to add a dep on Prelude unless -fno-implicit-prelude is on
873Simon Marlow <marlowsd@gmail.com>**20081128165707]
874[make -include-pkg-deps work (not sure when this got lost)
875Simon Marlow <marlowsd@gmail.com>**20081128135746]
876[Fix more problems caused by padding in the Capability structure
877Simon Marlow <marlowsd@gmail.com>**20081202120735
878 Fixes crashes on Windows and Sparc
880[add missing case to Ord GlobalReg (EagerBlackhole == EagerBlackhole)
881Simon Marlow <marlowsd@gmail.com>**20081128130106]
882[Better error message for fundep conflict
884[Fix typo in quasi-quote documentation's sample.
885shelarcy <shelarcy@gmail.com>**20081129024344]
886[Remove the v_Split_info global variable and use a field of dflags instead
887Ian Lynagh <igloo@earth.li>**20081130152403]
888[Document the --machine-readable RTS flag
889Ian Lynagh <igloo@earth.li>**20081130152311]
890[Let 'loadModule' generate proper code depending on the 'hscTarget'.
891Thomas Schilling <nominolo@googlemail.com>**20081128164412
893 With this change it should be possible to perform something similar to
894 'load' by traversing the module graph in dependency order and calling
895 '{parse,typecheck,load}Module' on each.  Of course, if you want smart
896 recompilation checking you should still use 'load'.
898[Expose a separate 'hscBackend' phase for 'HsCompiler' and change
899Thomas Schilling <nominolo@googlemail.com>**20081128163746
900 parameter to 'InteractiveStatus' to a 'Maybe'.
902[Whoops, *don't* reset the complete session in 'withLocalCallbacks'.
903Thomas Schilling <nominolo@googlemail.com>**20081128150727]
904[Use a record instead of a typeclass for 'HsCompiler'.  This is mostly
905Thomas Schilling <nominolo@googlemail.com>**20081128121947
906 equivalent to a typeclass implementation that uses a functional
907 dependency from the target mode to the result type.
909[Remove dead code
910Ian Lynagh <igloo@earth.li>**20081128193831]
911[Update docs not to talk about deprecated -optdep-* flags; fixes trac #2773
912Ian Lynagh <igloo@earth.li>**20081128193633]
913[Use relative URLs in the GHC API haddock docs; fixes #2755
914Ian Lynagh <igloo@earth.li>**20081128184511]
915[Teach runghc about --help; fixes trac #2757
916Ian Lynagh <igloo@earth.li>**20081128191706]
917[Use a per-session data structure for callbacks.  Make 'WarnErrLogger'
918Thomas Schilling <nominolo@googlemail.com>**20081128103628
919 part of it.
921 Part of the GHC API essentially represents a compilation framework.
922 The difference of a *framework* as opposed to a *library* is that the
923 overall structure of the functionality is pre-defined but certain
924 details can be customised via callbacks.  (Also known as the Hollywood
925 Principle: "Don't call us, we'll call you.")
927 This patch introduces a per-session data structure that contains all
928 the callbacks instead of adding lots of small function arguments
929 whenever we want to give the user more control over certain parts of
930 the API.  This should also help with future changes: Adding a new
931 callback doesn't break old code since code that doesn't know about the
932 new callback will use the (hopefully sane) default implementation.
934 Overall, however, we should try and keep the number of callbacks small
935 and well-defined (and provide useful defaults) and use simple library
936 routines for the rest.
938[Improve error message for #2739 (but no fix).
939Thomas Schilling <nominolo@googlemail.com>**20081127135725
941 This patch changes 'loadModule' to define a fake linkable.  The
942 previous implementation of providing no linkable at all violated a
943 pre-condition in the ByteCode linker.  This doesn't fix #2739, but it
944 improves the error message a bit.
946[Remove the packing I added recently to the Capability structure
947Simon Marlow <marlowsd@gmail.com>**20081128105046
948 The problem is that the packing caused some unaligned loads, which
949 lead to bus errors on Sparc (and reduced performance elsewhere,
950 presumably).
952[don't emit CmmComments for now
953Simon Marlow <marlowsd@gmail.com>**20081127090145
954   - if the string contains */, we need to fix it (demonstrated by
955     building Cabal with -fvia-C)
956   - the strings can get quite large, so we probably only want to
957     inject comments when some debugging option is on.
959[Collect instead of print warnings in 'warnUnnecessarySourceImports'.
960Thomas Schilling <nominolo@googlemail.com>**20081127102534]
961[Force recompilation of BCOs when they were compiled in HscNothing mode.
962Thomas Schilling <nominolo@googlemail.com>**20081126183402
964 Previously, loading a set of modules in HscNothing mode and then
965 switching to HscInterpreted could lead to crashes since modules
966 compiled with HscNothing were thought to be valid bytecode objects.
968 This patch forces recompilation in these cases, hence switching between
969 HscNothing and HscInterpreted should be safe now.
971[Documentation only: Add module description for HscMain.
972Thomas Schilling <nominolo@googlemail.com>**20081126134344]
973[Include GHCi files in ctags/etags.
974Thomas Schilling <nominolo@googlemail.com>**20081126122801]
975[drop some debugging traces and use only one flag for new codegen
977[one more missing patch from new codegen path
979[Fix Trac #2817 (TH syntax -> HsSyn conversion)
981[Fix Trac #2756: CorePrep strictness bug
983[Format output for :t more nicely
985[Fix Trac #2766: printing operator type variables
987[Fix build following codegen patch
989[Removed warnings, made Haddock happy, added examples in documentation
991 The interesting examples talk about our story with heap checks in
992 case alternatives and our story with the case scrutinee as a Boolean.
994[Fixed linear regalloc bug, dropped some tracing code
996 o The linear-scan register allocator sometimes allocated a block
997   before allocating one of its predecessors, which could lead
998   to inconsistent allocations. Now, we allocate a block only
999   if a predecessor has set the "incoming" assignments for the block
1000   (or if it's the procedure's entry block).
1001 o Also commented out some tracing code on the new codegen path.
1003[Keep update frames live even in functions that never return
1005 An unusual case, but without it:
1006 (a) we had an assertion failure
1007 (b) we can overwrite the caller's infotable, which might cause
1008     the garbage collector to collect live data.
1009 Better to keep the update frame live at all call sites,
1010 not just at returns.
1012[Removed space and time inefficiency in procpoint splitting
1014 I was adding extra jumps to every procpoint, even when the split-off graph
1015 referred to only some of the procpoints. No effect on correctness,
1016 but a big effect on space/time efficiency when there are lots of procpoints...
1018[Clarify the SRT building process
1020 Before: building a closure that would build an SRT given the top-level
1021 SRT. It was somewhat difficult to understand the control flow, and it
1022 may have had held onto some data structures long after they should be dead.
1023 Now, I just bundle the info we need about CAFs along with the procedure
1024 and directly call a new top-level function to build the SRTs later.
1026[Don't adjust hp up when the case scrutinee won't allocate
1029 If the case scrutinee can't allocate, we don't need to do a heap
1030 check in the case alternatives. (A previous patch got that right.)
1031 In that case, we had better not adjust the heap pointer to recover
1032 unused stack space before evaluating the scrutinee -- because we
1033 aren't going to reallocate for the case alternative.
1035[Floating infotables were reversed in C back end
1037[forgot a few files
1039[Big collection of patches for the new codegen branch.
1041 o Fixed bug that emitted the copy-in code for closure entry
1042   in the wrong place -- at the initialization of the closure.
1043 o Refactored some of the closure entry code.
1044 o Added code to check that no LocalRegs are live-in to a procedure
1045    -- trip up some buggy programs earlier
1046 o Fixed environment bindings for thunks
1047    -- we weren't (re)binding the free variables in a thunk
1048 o Fixed a bug in proc-point splitting that dropped some updates
1049   to the entry block in a procedure.
1050 o Fixed improper calls to code that generates CmmLit's for strings
1051 o New invariant on cg_loc in CgIdInfo: the expression is always tagged
1052 o Code to load free vars on entry to a thunk was (wrongly) placed before
1053   the heap check.
1054 o Some of the StgCmm code was redundantly passing around Id's
1055   along with CgIdInfo's; no more.
1056 o Initialize the LocalReg's that point to a closure before allocating and
1057   initializing the closure itself -- otherwise, we have problems with
1058   recursive closure bindings
1059 o BlockEnv and BlockSet types are now abstract.
1060 o Update frames:
1061   - push arguments in Old call area
1062   - keep track of the return sp in the FCode monad
1063   - keep the return sp in every call, tail call, and return
1064       (because it might be different at different call sites,
1065        e.g. tail calls to the gc after a heap check are performed
1066             before pushing the update frame)
1067   - set the sp appropriately on returns and tail calls
1068 o Reduce call, tail call, and return to a single LastCall node
1069 o Added slow entry code, using different calling conventions on entry and tail call
1070 o More fixes to the calling convention code.
1071   The tricky stuff is all about the closure environment: it must be passed in R1,
1072   but in non-closures, there is no such argument, so we can't treat all arguments
1073   the same way: the closure environment is special. Maybe the right step forward
1074   would be to define a different calling convention for closure arguments.
1075 o Let-no-escapes need to be emitted out-of-line -- otherwise, we drop code.
1076 o Respect RTS requirement of word alignment for pointers
1077   My stack allocation can pack sub-word values into a single word on the stack,
1078   but it wasn't requiring word-alignment for pointers. It does now,
1079   by word-aligning both pointer registers and call areas.
1080 o CmmLint was over-aggresively ruling out non-word-aligned memory references,
1081   which may be kosher now that we can spill small values into a single word.
1082 o Wrong label order on a conditional branch when compiling switches.
1083 o void args weren't dropped in many cases.
1084   To help prevent this kind of mistake, I defined a NonVoid wrapper,
1085   which I'm applying only to Id's for now, although there are probably
1086   other good candidates.
1087 o A little code refactoring: separate modules for procpoint analysis splitting,
1088   stack layout, and building infotables.
1089 o Stack limit check: insert along with the heap limit check, using a symbolic
1090   constant (a special CmmLit), then replace it when the stack layout is known.
1091 o Removed last node: MidAddToContext
1092 o Adding block id as a literal: means that the lowering of the calling conventions
1093   no longer has to produce labels early, which was inhibiting common-block elimination.
1094   Will also make it easier for the non-procpoint-splitting path.
1095 o Info tables: don't try to describe the update frame!
1096 o Over aggressive use of NonVoid!!!!
1097   Don't drop the non-void args before setting the type of the closure!!!
1098 o Sanity checking:
1099   Added a pass to stub dead dead slots on the stack
1100   (only ~10 lines with the dataflow framework)
1101 o More sanity checking:
1102   Check that incoming pointer arguments are non-stubbed.
1103   Note: these checks are still subject to dead-code removal, but they should
1104   still be quite helpful.
1105 o Better sanity checking: why stop at function arguments?
1106   Instead, in mkAssign, check that _any_ assignment to a pointer type is non-null
1107   -- the sooner the crash, the easier it is to debug.
1108   Still need to add the debugging flag to turn these checks on explicitly.
1109 o Fixed yet another calling convention bug.
1110   This time, the calls to the GC were wrong. I've added a new convention
1111   for GC calls and invoked it where appropriate.
1112   We should really straighten out the calling convention stuff:
1113     some of the code (and documentation) is spread across the compiler,
1114     and there's some magical use of the node register that should really
1115     be handled (not avoided) by calling conventions.
1116 o Switch bug: the arms in mkCmmLitSwitch weren't returning to a single join point.
1117 o Environment shadowing problem in Stg->Cmm:
1118   When a closure f is bound at the top-level, we should not bind f to the
1119   node register on entry to the closure.
1120   Why? Because if the body of f contains a let-bound closure g that refers
1121   to f, we want to make sure that it refers to the static closure for f.
1122   Normally, this would all be fine, because when we compile a closure,
1123   we rebind free variables in the environment. But f doesn't look like
1124   a free variable because it's a static value. So, the binding for f
1125   remains in the environment when we compile g, inconveniently referring
1126   to the wrong thing.
1127   Now, I bind the variable in the local environment only if the closure is not
1128   bound at the top level. It's still okay to make assumptions about the
1129   node holding the closure environment; we just won't find the binding
1130   in the environment, so code that names the closure will now directly
1131   get the label of the static closure, not the node register holding a
1132   pointer to the static closure.
1133 o Don't generate bogus Cmm code containing SRTs during the STG -> Cmm pass!
1134   The tables made reference to some labels that don't exist when we compute and
1135   generate the tables in the back end.
1136 o Safe foreign calls need some special treatment (at least until we have the integrated
1137   codegen). In particular:
1138   o they need info tables
1139   o they are not procpoints -- the successor had better be in the same procedure
1140   o we cannot (yet) implement the calling conventions early, which means we have
1141     to carry the calling-conv info all the way to the end
1142 o We weren't following the old convention when registering a module.
1143   Now, we use update frames to push any new modules that have to be registered
1144   and enter the youngest one on the stack.
1145   We also use the update frame machinery to specify that the return should pop
1146   the return address off the stack.
1147 o At each safe foreign call, an infotable must be at the bottom of the stack,
1148   and the TSO->sp must point to it.
1149 o More problems with void args in a direct call to a function:
1150   We were checking the args (minus voids) to check whether the call was saturated,
1151   which caused problems when the function really wasn't saturated because it
1152   took an extra void argument.
1153 o Forgot to distinguish integer != from floating != during Stg->Cmm
1154 o Updating slotEnv and areaMap to include safe foreign calls
1155   The dataflow analyses that produce the slotEnv and areaMap give
1156   results for each basic block, but we also need the results for
1157   a safe foreign call, which is a middle node.
1158   After running the dataflow analysis, we have another pass that
1159   updates the results to includ any safe foreign calls.
1160 o Added a static flag for the debugging technique that inserts
1161   instructions to stub dead slots on the stack and crashes when
1162   a stubbed value is loaded into a pointer-typed LocalReg.
1163 o C back end expects to see return continuations before their call sites.
1164   Sorted the flowgraphs appropriately after splitting.
1165 o PrimOp calling conventions are special -- unlimited registers, no stack
1166   Yet another calling convention...
1167 o More void value problems: if the RHS of a case arm is a void-typed variable,
1168   don't try to return it.
1169 o When calling some primOp, they may allocate memory; if so, we need to
1170   do a heap check when we return from the call.
1173[Merging in the new codegen branch
1175 This merge does not turn on the new codegen (which only compiles
1176 a select few programs at this point),
1177 but it does introduce some changes to the old code generator.
1179 The high bits:
1180 1. The Rep Swamp patch is finally here.
1181    The highlight is that the representation of types at the
1182    machine level has changed.
1183    Consequently, this patch contains updates across several back ends.
1184 2. The new Stg -> Cmm path is here, although it appears to have a
1185    fair number of bugs lurking.
1186 3. Many improvements along the CmmCPSZ path, including:
1187    o stack layout
1188    o some code for infotables, half of which is right and half wrong
1189    o proc-point splitting
1191[Major clean-up of HscMain.
1192Thomas Schilling <nominolo@googlemail.com>**20081125153201
1194 This patch entails a major restructuring of HscMain and a small bugfix
1195 to MkIface (which required the restructuring in HscMain).
1197 In MkIface:
1199   - mkIface* no longer outputs orphan warnings directly and also no
1200     longer quits GHC when -Werror is set.  Instead, errors are
1201     reported using the common IO (Messages, Maybe result) scheme.
1203 In HscMain:
1205   - Get rid of the 'Comp' monad.  This monad was mostly GhcMonad + two
1206     reader arguments, a ModSummary for the currently compiled module
1207     and a possible old interface.  The latter actually lead to a small
1208     space-leak since only its hash was needed (to check whether the
1209     newly-generated interface file was the same as the original one).
1211     Functions originally of type 'Comp' now only take the arguments
1212     that they actually need.  This leads to slighly longer argument
1213     lists in some places, however, it is now much easier to see what
1214     is actually going on.
1216   - Get rid of 'myParseModule'.  Rename 'parseFile' to 'hscParse'.
1218   - Join 'deSugarModule' and 'hscDesugar' (keeping the latter).
1220   - Rename 'typecheck{Rename}Module{'}' to 'hscTypecheck{Rename}'.
1221     One variant keeps the renamed syntax, the other doesn't.
1223   - Parameterise 'HscStatus', so that 'InteractiveStatus' is just a
1224     different parameterisation of 'HscStatus'.
1226   - 'hscCompile{OneShot,Batch,Nothing,Interactive}' are now
1227     implemented using a (local) typeclass called 'HsCompiler'.  The
1228     idea is to make the common structure more obvious.  Using this
1229     typeclass we now have two functions 'genericHscCompile' (original
1230     'hscCompiler') and 'genericHscRecompile' (original 'genComp')
1231     describing the default pipeline.  The methods of the typeclass
1232     describe a sort of "hook" interface (in OO-terms this would be
1233     called the "template method" pattern).
1235     One problem with this approach is that we parameterise over the
1236     /result/ type which, in fact, is not actually different for
1237     "nothing" and "batch" mode.  To avoid functional dependencies or
1238     associated types, we use type tags to make them artificially
1239     different and parameterise the type class over the result type.
1240     A perhaps better approach might be to use records instead.
1242   - Drop some redundant 'HscEnv' arguments.  These were likely
1243     different from what 'getSession' would return because during
1244     compilation we temporarily set the module's DynFlags as well as a
1245     few other fields.  We now use the 'withTempSession' combinator to
1246     temporarily change the 'HscEnv' and automatically restore the
1247     original session after the enclosed action has returned (even in
1248     case of exceptions).
1250   - Rename 'hscCompile' to 'hscGenHardCode' (since that is what it
1251     does).
1253 Calls in 'GHC' and 'DriverPipeline' accordingly needed small
1254 adaptions.
1256[Fix Trac #2799: TcType.isOverloadedTy
1259 A missing case (for equality predicates) in isOverloadedTy make
1260 bindInstsOfLocalFuns/Pats do the wrong thing.  Core Lint nailed it.
1262 Merge to 6.10 branch.
1265[Fix #2740: we were missing the free variables on some expressions
1266Simon Marlow <marlowsd@gmail.com>**20081125103113
1267 Particularly boolean expresions: the conditional of an 'if', and
1268 guards, were missing their free variables.
1270[Fix symbol macro names in Linker.c
1271Thorkil Naur <naur@post11.tele.dk>**20081121160149]
1272[Add a --machine-readable RTS flag
1273Ian Lynagh <igloo@earth.li>**20081123152127
1274 Currently it only affects the -t flag output
1276[Return errors instead of dying in myParseModule.
1277Thomas Schilling <nominolo@googlemail.com>**20081122154151]
1278[Comments/Haddockification only.
1279Thomas Schilling <nominolo@googlemail.com>**20081122143018]
1280[Report source span instead of just source location for unused names.
1281Thomas Schilling <nominolo@googlemail.com>**20081122142641]
1282[Change 'handleFlagWarnings' to throw exceptions instead of dying.
1283Thomas Schilling <nominolo@googlemail.com>**20081122130658
1285 It now uses the standard warning log and error reporting mechanism.
1287[Document exported functions in main/HeaderInfo.
1288Thomas Schilling <nominolo@googlemail.com>**20081121145307]
1289[Remove warning supression klugde in main/HeaderInfo
1290Thomas Schilling <nominolo@googlemail.com>**20081121144155]
1291[Use mutator threads to do GC, instead of having a separate pool of GC threads
1292Simon Marlow <marlowsd@gmail.com>**20081121151233
1294 Previously, the GC had its own pool of threads to use as workers when
1295 doing parallel GC.  There was a "leader", which was the mutator thread
1296 that initiated the GC, and the other threads were taken from the pool.
1298 This was simple and worked fine for sequential programs, where we did
1299 most of the benchmarking for the parallel GC, but falls down for
1300 parallel programs.  When we have N mutator threads and N cores, at GC
1301 time we would have to stop N-1 mutator threads and start up N-1 GC
1302 threads, and hope that the OS schedules them all onto separate cores.
1303 It practice it doesn't, as you might expect.
1305 Now we use the mutator threads to do GC.  This works quite nicely,
1306 particularly for parallel programs, where each mutator thread scans
1307 its own spark pool, which is probably in its cache anyway.
1309 There are some flag changes:
1311   -g<n> is removed (-g1 is still accepted for backwards compat).
1312   There's no way to have a different number of GC threads than mutator
1313   threads now.
1315   -q1       Use one OS thread for GC (turns off parallel GC)
1316   -qg<n>    Use parallel GC for generations >= <n> (default: 1)
1318 Using parallel GC only for generations >=1 works well for sequential
1319 programs.  Compiling an ordinary sequential program with -threaded and
1320 running it with -N2 or more should help if you do a lot of GC.  I've
1321 found that adding -qg0 (do parallel GC for generation 0 too) speeds up
1322 some parallel programs, but slows down some sequential programs.
1323 Being conservative, I left the threshold at 1.
1325 ToDo: document the new options.
1328[we shouldn't update topBound in discardSparks()
1329Simon Marlow <marlowsd@gmail.com>**20081121113539]
1330[Throw SourceErrors instead of ProgramErrors in main/HeaderInfo.
1331Thomas Schilling <nominolo@googlemail.com>**20081121141339
1333 Parse errors during dependency analysis or options parsing really
1334 shouldn't kill GHC; this is particularly annoying for GHC API clients.
1336[fix the build when !USE_MMAP
1337Simon Marlow <marlowsd@gmail.com>**20081121085418]
1338[round the size up to a page in mmapForLinker() instead of in the caller
1339Simon Marlow <marlowsd@gmail.com>**20081120154014]
1340[Fix a race in the deadlock-detection code
1341Simon Marlow <marlowsd@gmail.com>**20081120112438
1342 After a deadlock it was possible for the timer signal to remain off,
1343 which meant that the next deadlock would not be detected, and the
1344 system would hang.  Spotted by conc047(threaded2).
1346[error message wibble
1347Simon Marlow <marlowsd@gmail.com>**20081120084901]
1348[Fix flag name -XDisambiguateRecordFields
1350[Fix regTableToCapability() if gcc introduces padding
1351Simon Marlow <marlowsd@gmail.com>**20081119162910
1352 Also avoid padding if possible using __attribute__((packed))
1353 Fixes the Windows build
1355[Fix 32-bit breakage
1356Simon Marlow <marlowsd@gmail.com>**20081119145429]
1357[Small refactoring, and add comments
1358Simon Marlow <marlowsd@gmail.com>**20081119143702
1359 I discovered a new invariant while experimenting (blackholing is not
1360 optional when using parallel GC), so documented it.
1362[Fix some unsigned comparisions that should be signed
1363Simon Marlow <marlowsd@gmail.com>**20081119143205
1364 Fixes crashes when using reclaimSpark() (not used currently, but may
1365 be in the future).
1367[Remove incorrect assertions in steal()
1368Simon Marlow <marlowsd@gmail.com>**20081119143043]
1369[don't run sparks if there are other threads on this Capability
1370Simon Marlow <marlowsd@gmail.com>**20081114121022]
1371[Fix typo (HAVE_LIBGMP => HAVE_LIB_GMP); omit local gmp includes if HAVE_LIB_GMP
1372Simon Marlow <marlowsd@gmail.com>**20081119131056
1373 If we're using the system's installed GMP, we don't want to be picking
1374 up the local gmp.h header file.
1376 Fixes 2469(ghci) for me, because it turns out the system's GMP is more
1377 up-to-date than GHC's version and has a fix for more recent versions
1378 of gcc.  We also need to pull in a more recent GMP, but that's a
1379 separte issue.
1381[Fix some more shutdown races
1382Simon Marlow <marlowsd@gmail.com>**20081119124848
1383 There were races between workerTaskStop() and freeTaskManager(): we
1384 need to be sure that all Tasks have exited properly before we start
1385 tearing things down.  This isn't completely straighforward, see
1386 comments for details.
1388[Add help messages about --with-editline-(includes,libraries) to the ghc configure script.
1389Judah Jacobson <judah.jacobson@gmail.com>**20081114183334]
1390[Add optional eager black-holing, with new flag -feager-blackholing
1391Simon Marlow <marlowsd@gmail.com>**20081118142442
1393 Eager blackholing can improve parallel performance by reducing the
1394 chances that two threads perform the same computation.  However, it
1395 has a cost: one extra memory write per thunk entry. 
1397 To get the best results, any code which may be executed in parallel
1398 should be compiled with eager blackholing turned on.  But since
1399 there's a cost for sequential code, we make it optional and turn it on
1400 for the parallel package only.  It might be a good idea to compile
1401 applications (or modules) with parallel code in with
1402 -feager-blackholing.
1404 ToDo: document -feager-blackholing.
1406[Fix #2783: detect black-hole loops properly
1407Simon Marlow <marlowsd@gmail.com>**20081117144515
1408 At some point we regressed on detecting simple black-hole loops.  This
1409 happened due to the introduction of duplicate-work detection for
1410 parallelism: a black-hole loop looks very much like duplicate work,
1411 except it's duplicate work being performed by the very same thread.
1412 So we have to detect and handle this case.
1414[Fix warning on Windows (use deleteThread() not deleteThread_())
1415Simon Marlow <marlowsd@gmail.com>**20081117143047]
1416[fix compile breakage on Windows
1417Simon Marlow <marlowsd@gmail.com>**20081117142831]
1418[Attempt to fix #2512 and #2063;  add +RTS -xm<address> -RTS option
1419Simon Marlow <marlowsd@gmail.com>**20081117120556
1420 On x86_64, the RTS needs to allocate memory in the low 2Gb of the
1421 address space.  On Linux we can do this with MAP_32BIT, but sometimes
1422 this doesn't work (#2512) and other OSs don't support it at all
1423 (#2063).  So to work around this:
1425   - Try MAP_32BIT first, if available.
1427   - Otherwise, try allocating memory from a fixed address (by default
1428     1Gb)
1430   - We now provide an option to configure the address to allocate
1431     from.  This allows a workaround on machines where the default
1432     breaks, and also provides a way for people to test workarounds
1433     that we can incorporate in future releases.
1435[Another shutdown fix
1436Simon Marlow <marlowsd@gmail.com>**20081117094350
1437 If we encounter a runnable thread during shutdown, just kill it.  All
1438 the threads are supposed to be dead at this stage, but this catches
1439 threads that might have just returned from a foreign call, or were
1440 finalizers created by the GC.
1442 Fixes memo002(threaded1)
1444[Correct an example in the users guide
1445Ian Lynagh <igloo@earth.li>**20081116174938]
1446[Fix gen_contents_index when not run inplace; trac #2764
1447Ian Lynagh <igloo@earth.li>**20081116174122
1448 Based on a patch from juhpetersen.
1450[close the temporary Handle before removing the file
1451Simon Marlow <marlowsd@gmail.com>**20081114130958]
1452[refactor: move unlockClosure() into SMPClosureOps() where it should be
1453Simon Marlow <marlowsd@gmail.com>**20081114095817]
1454[Omit definitions of cas() and xchg() in .hc code
1455Simon Marlow <marlowsd@gmail.com>**20081114095738
1456 They cause compilation errors (correctly) with newer gccs
1457 Shows up compiling the RTS via C, which happens on Windows
1459[Don't put stdin into non-blocking mode (#2778, #2777)
1460Simon Marlow <marlowsd@gmail.com>**20081114130546
1461 This used to be necessary when our I/O library needed all FDs in
1462 O_NONBLOCK mode, and readline used to put stdin back into blocking
1463 mode.  Nowadays the I/O library can cope with FDs in blocking mode,
1464 and #2778/#2777 show why this is important.
1466[Rmoeve --enable-dotnet
1467Simon Marlow <marlowsd@gmail.com>**20081114124929]
1468[#2751: disourage --enable-shared in ./configure --help
1469Simon Marlow <marlowsd@gmail.com>**20081114124748]
1470[add a warning that --enable-shared is experimental
1471Simon Marlow <marlowsd@gmail.com>**20081114104034]
1472[lookupSymbol: revert to looking up both with and without the @N suffix
1473Simon Marlow <marlowsd@gmail.com>**20081113122927]
1474[#2768: fix compatibility problem with newer version of mingw
1475Simon Marlow <marlowsd@gmail.com>**20081113114626]
1476[notice ^C exceptions when waiting for I/O
1477Simon Marlow <marlowsd@gmail.com>**20081113114342]
1478[Fix a bug in the recompilation checking logic.
1479Thomas Schilling <nominolo@googlemail.com>**20081113162653
1481 Previously, using target HscNothing resulted in unnessesary
1482 recompilation because 'upsweep_mod' treated HscInterface specially.
1483 This patch changes relaxes this.
1485 When running GHC with debug level 5, 'upsweep_mod' will now also be
1486 more verbose about what it is doing.
1488 There is (at least) one possible remaining problem, though: When using
1489 target 'HscNothing' we generate a fake linkable to signal that we have
1490 processed a module.  When switching to 'HscInterpreted' this may cause
1491 objects to not be recompiled.  Switching from HscNothing to
1492 HscInterpreted is therefore only safe if we unload everything first.
1494[Fix another subtle shutdown deadlock
1495Simon Marlow <marlowsd@gmail.com>**20081113160005
1496 The problem occurred when a thread tries to GC during shutdown.  In
1497 order to GC it has to acquire all the Capabilities in the system, but
1498 during shutdown, some of the Capabilities have already been closed and
1499 can never be acquired.
1501[Fix an extremely subtle deadlock bug on x86_64
1502Simon Marlow <marlowsd@gmail.com>**20081113155730
1503 The recent_activity flag was an unsigned int, but we sometimes do a
1504 64-bit xchg() on it, which overwrites the next word in memory.  This
1505 happened to contain the sched_state flag, which is used to control the
1506 orderly shutdown of the system.  If the xchg() happened during
1507 shutdown, the scheduler would get confused and deadlock.  Don't you
1508 just love C?
1510[move an assertion
1511Simon Marlow <marlowsd@gmail.com>**20081113154542]
1512[Always zap the trailing @N from symbols when looking up in a DLL
1513Simon Marlow <marlowsd@gmail.com>**20081112111518
1515 Fixes win32002(ghci)
1517 Previously we only did this for references from object files, but we
1518 should do it for all symbols, including those that GHCi looks up due
1519 to FFI calls from bytecode.
1521[Only allocate a mark stack if we're actually doing marking
1522Simon Marlow <marlowsd@gmail.com>**20081112112144
1523 saves a bit of memory in major GCs
1525[Fix parse error with older gccs (#2752)
1526Simon Marlow <marlowsd@gmail.com>**20081111135344]
1527[Fix to i386_insert_ffrees (#2724, #1944)
1528Simon Marlow <marlowsd@gmail.com>**20081111125619
1529 The i386 native code generator has to arrange that the FPU stack is
1530 clear on exit from any function that uses the FPU.  Unfortunately it
1531 was getting this wrong (and has been ever since this code was written,
1532 I think): it was looking for basic blocks that used the FPU and adding
1533 the code to clear the FPU stack on any non-local exit from the block.
1534 In fact it should be doing this on a whole-function basis, rather than
1535 individual basic blocks.
1537[Fix bootstrap with 6.10.1 on Windows
1538Simon Marlow <marlowsd@gmail.com>**20081110134318
1539 ghc-pkg doesn't understand the old syntax any more, so 'ghc-pkg -l' fails
1541[Perform case-insensitive matching of path components in getBaseDir on Windows (Fixes bug 2743)
1542Neil Mitchell <ndmitchell@gmail.com>**20081105134315]
1543[Documentation only.  Clarify that 'load*' may indeed throw SourceErrors.
1544Thomas Schilling <nominolo@googlemail.com>**20081110175614
1546 I don't think errors during dependency analysis should be passed to
1547 the logger.
1549[Fix documentation (to say the opposite).
1550Thomas Schilling <nominolo@googlemail.com>**20081110153819]
1551[Fix line numbers in TAGS files.
1552Thomas Schilling <nominolo@googlemail.com>**20081110153621]
1553[Documentation only.
1554Thomas Schilling <nominolo@googlemail.com>**20081110153456]
1555[Add 'packageDbModules' function to GHC API.
1556Thomas Schilling <nominolo@googlemail.com>**20081110143510
1558 This function returns a list of all modules available through the
1559 package DB.
1561 MERGE TO 6.10
1563[We now require GHC 6.6, so we always have Applicative
1564Ian Lynagh <igloo@earth.li>**20081108144723]
1565[Remove a CPP test that's always true (__GLASGOW_HASKELL__ >= 605)
1566Ian Lynagh <igloo@earth.li>**20081108144544]
1567[Remove some dead code now that __GLASGOW_HASKELL__ >= 606
1568Ian Lynagh <igloo@earth.li>**20081108144459]
1569[Remove some flag duplication from a Makefile
1570Ian Lynagh <igloo@earth.li>**20081108144412]
1571[ghc_ge_605 is now always YES
1572Ian Lynagh <igloo@earth.li>**20081108144328]
1573[Remove the GHC 6.4 unicode compat stuff; we can now just use Data.Char
1574Ian Lynagh <igloo@earth.li>**20081108143423]
1575[Fix libffi bindist
1576Clemens Fruhwirth <clemens@endorphin.org>**20081108094725]
1577[Replace couple of fromJust with expectJust
1578Clemens Fruhwirth <clemens@endorphin.org>**20081107160735]
1579[Bugfix for patch "Do not filter the rts from linked libraries..." (#2745)
1580Simon Marlow <marlowsd@gmail.com>**20081107092925
1581 The sense of the #ifdef was wrong
1583[fix via-C compilation: import ghczmprim_GHCziBool_False_closure
1584Simon Marlow <marlowsd@gmail.com>**20081107090432]
1585[disable instance MonadPlus CoreM for GHC <= 6.6
1586Simon Marlow <marlowsd@gmail.com>**20081107085250]
1587[re-instate counting of sparks converted
1588Simon Marlow <marlowsd@gmail.com>**20081106160810
1589 lost in patch "Run sparks in batches"
1591[fix ASSERT_SPARK_POOL_INVARIANTS(): top>bottom is valid
1592Simon Marlow <marlowsd@gmail.com>**20081106155826]
1593[pruneSparkQueue(): fix bug when top>bottom
1594Simon Marlow <marlowsd@gmail.com>**20081106155648]
1595[don't yield if the system is shutting down
1596Simon Marlow <marlowsd@gmail.com>**20081106155356]
1597[leave out ATTRIBUTE_ALIGNED on Windows, it gives a warning
1598Simon Marlow <marlowsd@gmail.com>**20081106132105]
1599[Cope with ThreadRelocated when traversing the blocked_queue
1600Simon Marlow <marlowsd@gmail.com>**20081106114045
1601 Fixes "invalid what_next field" in ioref001 on Windows, and perhaps others
1603[Remove dead code.
1604Thomas Schilling <nominolo@googlemail.com>**20081031162036]
1605[Run sparks in batches, instead of creating a new thread for each one
1606Simon Marlow <marlowsd@gmail.com>**20081106113639
1607 Signficantly reduces the overhead for par, which means that we can
1608 make use of paralellism at a much finer granularity.
1610[allocateInGen(): increase alloc_blocks (#2747)
1611Simon Marlow <marlowsd@gmail.com>**20081106113714]
1612[disable MonadPlus instance that doesn't compile with 6.6
1613Simon Marlow <marlowsd@gmail.com>**20081106100411]
1614[don't yield the Capability if blackholes_need_checking
1615Simon Marlow <marlowsd@gmail.com>**20081105154928]
1616[deadlock fix: reset the flag *after* checking the blackhole queue
1617Simon Marlow <marlowsd@gmail.com>**20081105150542]
1618[retreat the top/bottom fields of the spark pool in pruneSparkPool()
1619Simon Marlow <marlowsd@gmail.com>**20081105150359]
1620[fix the :help docs for :set stop (#2737)
1621Simon Marlow <marlowsd@gmail.com>**20081104092929]
1622[bugfix: don't ingore the return value from rts_evalIO()
1623Simon Marlow <marlowsd@gmail.com>**20081104142147]
1624[Document the new SPARKS statistic, and xref from the parallelism section
1625Simon Marlow <marlowsd@gmail.com>**20081024120236]
1626[Move the freeing of Capabilities later in the shutdown sequence
1627Simon Marlow <marlowsd@gmail.com>**20081024104301
1628 Fixes a bug whereby the Capability has been freed but other
1629 Capabilities are still trying to steal sparks from its pool.
1631[Pad Capabilities and Tasks to 64 bytes
1632Simon Marlow <marlowsd@gmail.com>**20081023080749
1633 This is just good practice to avoid placing two structures heavily
1634 accessed by different CPUs on the same cache line
1636[Fix desugaring of record update (fixes Trac #2735)
1638[Refuse to register packages with unversioned dependencies; trac #1837
1639Ian Lynagh <igloo@earth.li>**20081031181746]
1640[We now require GHC 6.6 to build the HEAD (and thus 6.12)
1641Ian Lynagh <igloo@earth.li>**20081031171506]
1642[:set prompt now understand Haskell String syntax; trace #2652
1643Ian Lynagh <igloo@earth.li>**20081031145227]
1644[Comments only
1646[Quickfix for warning.
1647Thomas Schilling <nominolo@googlemail.com>**20081031113125]
1648[Export typeclasses for accessing compiler results.
1649Thomas Schilling <nominolo@googlemail.com>**20081028182310
1651 MERGE TO 6.10.
1653[Minor refactoring.
1654Thomas Schilling <nominolo@googlemail.com>**20081028182202]
1655[Include record fields in tags.
1656Thomas Schilling <nominolo@googlemail.com>**20081028180538]
1657[Fix imports
1659[Improve error reporting for non-rigid GADT matches
1662 Following suggestions from users, this patch improves the error message
1663 when a GADT match needs a rigid type:
1665  tcfail172.hs:19:10:
1666      GADT pattern match in non-rigid context for `Nil'
1667 -      Solution: add a type signature
1668 +      Probable solution: add a type signature for `is_normal'
1669      In the pattern: Nil
1670      In the definition of `is_normal': is_normal Nil = True
1672 Now GHC tries to tell you what to give a type signature *for*.
1673 Thanks to Daniel Gorin and others for the suggestions.
1676[Add (a) CoreM monad, (b) new Annotations feature
1679 This patch, written by Max Bolingbroke,  does two things
1681 1.  It adds a new CoreM monad (defined in simplCore/CoreMonad),
1682     which is used as the top-level monad for all the Core-to-Core
1683     transformations (starting at SimplCore).  It supports
1684        * I/O (for debug printing)
1685        * Unique supply
1686        * Statistics gathering
1687        * Access to the HscEnv, RuleBase, Annotations, Module
1688     The patch therefore refactors the top "skin" of every Core-to-Core
1689     pass, but does not change their functionality.
1691 2.  It adds a completely new facility to GHC: Core "annotations".
1692     The idea is that you can say
1693        {#- ANN foo (Just "Hello") #-}
1694     which adds the annotation (Just "Hello") to the top level function
1695     foo.  These annotations can be looked up in any Core-to-Core pass,
1696     and are persisted into interface files.  (Hence a Core-to-Core pass
1697     can also query the annotations of imported things.)  Furthermore,
1698     a Core-to-Core pass can add new annotations (eg strictness info)
1699     of its own, which can be queried by importing modules.
1701 The design of the annotation system is somewhat in flux.  It's
1702 designed to work with the (upcoming) dynamic plug-ins mechanism,
1703 but is meanwhile independently useful.
1705 Do not merge to 6.10! 
1708[Fix Trac #2674: in TH reject empty case expressions and function definitions
1710[Change naming conventions for compiler-generated dictionaries and type functions
1713 Up to now, the data constructor dictionary for class C as been called
1714 ":DC". But there is no reason for the colon to be at the front; indeed
1715 it confuses the (simple-minded) pretty-printer for types.  So this
1716 patch changes it to be "D:C".  This makes Core a lot easier to read.
1717 Having a colon in the middle ensures that it can't clash with a user-written
1718 data type.
1720 Similarly I changed
1722   T:C     Data type corresponding a class dictionary (was :TC)
1723   D:C     Data constructor for class dictionary (was :DC)
1725   NTCo:T   Coercion mapping from a newtype T to its representation type
1726                (was :CoT)
1728   TFCo:R   Coercion mapping from a data family to its respresentation type R
1729                (was :CoFR)
1731   Rn:T     The n'th respresentation data type for a data type T
1732                (was :RnT)
1735 Do not merge to 6.10.
1737 HEADS-UP: you'll need to recompile libraries from scratch. 
1739 ROMAN: you could do the same for OccName.mkVectTyConOcc etc, if you wanted.
1743[Fix tcrun031: yet more tidying up in TcDeriv
1745[Add Outputable instance for CoercionI
1747[Fix Trac #2720: inlining and casts
1750 The issue here is what happens when we have
1752        (f |> co) x
1754 where f is itself marked INLINE.  We want callSiteInline to "see"
1755 the fact that the function is applied, and hence have some incentive
1756 to inline.  I've done this by extending CoreUnfold.CallCtxt with
1757 ValAppCtxt.  I think that should catch this case without messing up
1758 any of the others.
1761[Clarify documentatoin
1763[Update library version numbers in the release notes
1764Ian Lynagh <igloo@earth.li>**20081023144018]
1765[various updates to the release notes
1766Simon Marlow <marlowsd@gmail.com>**20081007151647]
1767[Add library release notes
1768Ian Lynagh <igloo@earth.li>**20080920155722]
1769[Add release notes for the compiler
1770Ian Lynagh <igloo@earth.li>**20080920114857]
1771[Doc fix
1772Ian Lynagh <igloo@earth.li>**20081028150534]
1773[Rename some variables in docs
1774Ian Lynagh <igloo@earth.li>**20081028150447]
1775[Fix typos
1776Ian Lynagh <igloo@earth.li>**20081028144655]
1777[Mostly-fix Trac #2595: updates for existentials
1780 Ganesh wanted to update records that involve existentials.  That
1781 seems reasonable to me, and this patch covers existentials, GADTs,
1782 and data type families.
1784 The restriction is that
1785   The types of the updated fields may mention only the
1786   universally-quantified type variables of the data constructor
1788 This doesn't allow everything in #2595 (it allows 'g' but not 'f' in
1789 the ticket), but it gets a lot closer.
1791 Lots of the new lines are comments!
1794[Fix Trac #2723: keep track of record field names in the renamer
1797 The idea here is that with -XNamedFieldPuns and -XRecordWildCards we don't
1798 want to report shadowing errors for
1799        let fld = <blah> in C { .. }
1800 But to suppress such shadowing errors, the renamer needs to know that
1801 'fld' *is* a record selector.  Hence the new NameSet in
1802 TcRnFypes.RecFieldEnv
1805[Remove dead code
1807[Fix Trac #2713: refactor and tidy up renaming of fixity decls
1810 In fixing #2713, this patch also eliminates two almost-unused
1811 functions from RnEnv (lookupBndr and lookupBndr_maybe).  The
1812 net lines of code is prety much unchanged, but more of them
1813 are comments!
1816[Fix Trac #2701: make deriving check better for unlifted args
1819 Getting the automatic deriving mechanism to work really smoothly
1820 is surprisingly hard.  I keep finding myself in TcDeriv!
1822 Anyway, this is a nice clean fix to Trac #2701.
1825[Use pdflatex rather than latex for building
1826Ian Lynagh <igloo@earth.li>**20081024112400
1827 The Windows builder is having problems running ps2pdf, so this works
1828 aroudn the problem.
1830[Remove an unmatched } in core.tex
1831Ian Lynagh <igloo@earth.li>**20081024111750]
1832[Add a usepackage{url}
1833Ian Lynagh <igloo@earth.li>**20081024111458]
1834[Update ANNOUNCE
1835Ian Lynagh <igloo@earth.li>**20081022164423]
1836[Fix a bug in the new scheduler
1837Simon Marlow <marlowsd@gmail.com>**20081023155017
1838 If the current thread blocks, we should yield the Capability
1839 immediately, because the thread and hence possibly the current Task
1840 are now owned by someone else.  This worked in the old scheduler, but
1841 we moved where the yield happens in the new scheduler which broke it.
1843[add an assertion
1844Simon Marlow <marlowsd@gmail.com>**20081023154551]
1845[fix a warning
1846Simon Marlow <marlowsd@gmail.com>**20081023082213]
1847[traverse the spark pools only once during GC rather than twice
1848Simon Marlow <marlowsd@gmail.com>**20081022115233]
1849[Refactoring and reorganisation of the scheduler
1850Simon Marlow <marlowsd@gmail.com>**20081022092744
1852 Change the way we look for work in the scheduler.  Previously,
1853 checking to see whether there was anything to do was a
1854 non-side-effecting operation, but this has changed now that we do
1855 work-stealing.  This lead to a refactoring of the inner loop of the
1856 scheduler.
1858 Also, lots of cleanup in the new work-stealing code, but no functional
1859 changes.
1861 One new statistic is added to the +RTS -s output:
1863   SPARKS: 1430 (2 converted, 1427 pruned)
1865 lets you know something about the use of `par` in the program.
1867[Work stealing for sparks
1870    Spark stealing support for PARALLEL_HASKELL and THREADED_RTS versions of the RTS.
1872   Spark pools are per capability, separately allocated and held in the Capability
1873   structure. The implementation uses Double-Ended Queues (deque) and cas-protected
1874   access.
1876   The write end of the queue (position bottom) can only be used with
1877   mutual exclusion, i.e. by exactly one caller at a time.
1878   Multiple readers can steal()/findSpark() from the read end
1879   (position top), and are synchronised without a lock, based on a cas
1880   of the top position. One reader wins, the others return NULL for a
1881   failure.
1883   Work stealing is called when Capabilities find no other work (inside yieldCapability),
1884   and tries all capabilities 0..n-1 twice, unless a theft succeeds.
1886   Inside schedulePushWork, all considered cap.s (those which were idle and could
1887   be grabbed) are woken up. Future versions should wake up capabilities immediately when
1888   putting a new spark in the local pool, from newSpark().
1890 Patch has been re-recorded due to conflicting bugfixes in the sparks.c, also fixing a
1891 (strange) conflict in the scheduler.
1894[include an elapsed time table
1895Simon Marlow <marlowsd@gmail.com>**20081023080648]
1896[generate a valid summary for older GHC versions too
1897Simon Marlow <marlowsd@gmail.com>**20081023080629]
1898[Fix Trac #2714 (a minor wibble)
1901 In boxy_match (which is a pure function used by preSubType) we can
1902 encounter TyVars not just TcTyVars; this patch takes account of that.
1905[Reject programs with superclass equalities for now
1906Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021131721
1907 - The current implementation of type families cannot properly deal
1908   with superclass equalities.  Instead of making a half-hearted attempt at
1909   supporting them, which mostly ends in cryptic error message, rejecting
1910   right away with an appropriate message.
1912   MERGE TO 6.10
1914[Fix doc syntax
1915Ian Lynagh <igloo@earth.li>**20081021183317]
1916[Don't put the README file in the Windows installer; fixes trac #2698
1917Ian Lynagh <igloo@earth.li>**20081021162543
1918 The README file talks about getting and building the sources, which
1919 doesn't make sense for the installer.
1921[Comments and parens only
1923[Do proper cloning in worker/wrapper splitting
1926 See Note [Freshen type variables] in WwLib.  We need to clone type
1927 variables when building a worker/wrapper split, else we simply get
1928 bogus code, admittedly in rather obscure situations.  I can't quite
1929 remember what program showed this up, unfortunately, but there
1930 definitely *was* one!  (You get a Lint error.)
1933[Don't float an expression wrapped in a cast
1936 There is no point in floating out an expression wrapped in a coercion;
1937 If we do we'll transform 
1938        lvl = e |> co [_$_]
1939 to     
1940        lvl' = e; lvl = lvl' |> co
1941 and then inline lvl.  Better just to float out the payload (e).
1944[Fix Trac #2668, and refactor TcDeriv
1947 TcDeriv deals with both standalone and ordinary 'deriving';
1948 and with both data types and 'newtype deriving'.  The result
1949 is really rather compilcated and ad hoc.  Ryan discovered
1950 #2668; this patch fixes that bug, and makes the internal interfces
1951 #more uniform.  Specifically, the business of knocking off
1952 type arguments from the instance type until it matches the kind of the
1953 class, is now done by derivTyData, not mkNewTypeEqn, because the
1954 latter is shared with standalone derriving, whree the trimmed
1955 type application is what the user wrote.
1958[Spelling error in comment
1960[White space only
1962[Comments to explain strict overlap checking for type family instances
1964[Allow type families to use GADT syntax (and be GADTs)
1967 We've always intended to allow you to use GADT syntax for
1968 data families:
1969        data instance T [a] where
1970          T1 :: a -> T [a]
1971 and indeed to allow data instances to *be* GADTs
1972        data intsance T [a] where
1973          T1 :: Int -> T [Int]
1974          T2 :: a -> b -> T [(a,b)]
1976 This patch fixes the renamer and type checker to allow this.
1979[Improve crash message from applyTys and applyTypeToArgs
1981[Wibble to ungrammatical error message
1983[Comments only: replace ":=:" by "~" (notation for equality predicates)
1985[FIX #2693
1986Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021120107
1987 - As long as the first reduceContext in tcSimplifyRestricted potentially
1988   performs improvement, we need to zonk again before the second reduceContext.
1989   It would be better to prevent the improvement in the first place, but given
1990   the current situation zonking is definitely the right thing to do.
1992   MERGE TO 6.10
1994[Restore the terminal attributes even if ghci does not exit normally.
1995Judah Jacobson <judah.jacobson@gmail.com>**20081020164109]
1996[FIX #2688
1997Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021044213
1998 - Change in TcSimplify.reduceContext:
2000      We do *not* go around for new extra_eqs.  Morally, we should,
2001      but we can't without risking non-termination (see #2688).  By
2002      not going around, we miss some legal programs mixing FDs and
2003      TFs, but we never claimed to support such programs in the
2004      current implementation anyway.
2006   MERGE TO 6.10
2008[Move documentation within 80 column boundary.
2009Thomas Schilling <nominolo@googlemail.com>**20081014134016]
2010[Improve haddock documentation for 'GHC.topSortModuleGraph'.
2011Thomas Schilling <nominolo@googlemail.com>**20081014133833]
2012[Improve haddock documentation for HsExpr module.
2013Thomas Schilling <nominolo@googlemail.com>**20081014133740]
2014[Improve Haddock-markup for HsDecls module.
2015Thomas Schilling <nominolo@googlemail.com>**20081014133556]
2016[Run Haddock with compacting GC and show RTS statistics.
2017Thomas Schilling <nominolo@googlemail.com>**20081020111410]
2018[FIX (partially) #2703: bug in stack overflow handling when inside block
2019Simon Marlow <marlowsd@gmail.com>**20081020121103
2020 As a result of a previous ticket (#767) we disabled the generation of
2021 StackOverflow exceptions when inside a Control.Exception.block, on the
2022 grounds that StackOverflow is like an asynchronous exception.  Instead
2023 we just increase the stack size.  However, the stack size calculation
2024 was wrong, and ended up not increasing the size of the stack, with the
2025 result that the runtime just kept re-allocating the stack and filling
2026 up memory.
2028[Re-export Located(..) and related functions
2029Simon Marlow <marlowsd@gmail.com>**20081020102422
2030 So that clients don't need to import SrcLoc
2032[whitespace fix
2033Simon Marlow <marlowsd@gmail.com>**20081020101241]
2034[FIX #2691: Manually reset the terminal to its initial settings; works around a bug in libedit.
2035Judah Jacobson <judah.jacobson@gmail.com>**20081016024838]
2036[Eliminate duplicate flags in the tab completion of ghci's :set command.
2037Judah Jacobson <judah.jacobson@gmail.com>**20081016015721]
2038[Add dph haddock docs to the doc index
2039Ian Lynagh <igloo@earth.li>**20081019133208]
2040[Clean the bootstrapping extensible-exceptions package
2041Ian Lynagh <igloo@earth.li>**20081017195942]
2042[Fix trac #2687
2043Ian Lynagh <igloo@earth.li>**20081015163412
2044 OtherPunctuation, ConnectorPunctuation and DashPunctuation are now
2045 treated as symbols, rather than merely graphic characters.
2047[Fix trac #2680; avoid quadratic behaviour from (++)
2048Ian Lynagh <igloo@earth.li>**20081015163235]
2049[Fix the build when the bootstrapping compiler has a newer Cabal than us
2050Ian Lynagh <igloo@earth.li>**20081015144023
2051 We need to forcibly use the in-tree Cabal, or we get version mismatch errors
2053[Fix the name of prologue.txt when making bindists
2054Ian Lynagh <igloo@earth.li>**20081014114714]
2055[Comments only
2057[Fix Trac #2497; two separate typos in Lexer.x
2060 The patch to switch on lexing of 'forall' inside a RULES pragma
2061 wasn't working.  This fixes it so that it does.
2064[Update manual: tidy up instances, say more about type families in instance decls
2066[Make tags work on Unices, too.
2067Thomas Schilling <nominolo@googlemail.com>**20081014211236]
2068[Undefine __PIC__ before defining it to work around "multiple definitions of __PIC__" warnings
2069Clemens Fruhwirth <clemens@endorphin.org>**20081014143206]
2070[Add "dyn" to GhcRTSWays when compiling --enable-shared
2071Clemens Fruhwirth <clemens@endorphin.org>**20081014125123]
2072[Fill out the ghc package's cabal file
2073Ian Lynagh <igloo@earth.li>**20081013235817]
2074[Patching libffi so it can be built as DLL
2075Clemens Fruhwirth <clemens@endorphin.org>**20081014103459
2077 libffi-dllize-3.0.6.patch should be pushed upstream
2079[Add 'etags' makefile target.
2080Thomas Schilling <nominolo@googlemail.com>**20081013170927
2082 This only works with stage2 since `ghctags' is built against stage1
2083 but not against the bootstrapping compiler.  Also note that all of GHC
2084 must typecheck for this target to succeed.  Perhaps we should not
2085 overwrite the old TAGS file by default then.
2087[Use cabal information to get GHC's flags to `ghctags'.
2088Thomas Schilling <nominolo@googlemail.com>**20081013170658
2090 By giving the dist-directory to ghctags we can get all the GHC API
2091 flags we need in order to load the required modules.  The flag name
2092 could perhaps be improved, but apart from that it seems to work well.
2094[Version bump for libffi to 3.0.6
2095Clemens Fruhwirth <clemens@endorphin.org>**20081014081300]
2096[Encode shared/static configuration into stamps to do the right thing when rebuilding
2097Clemens Fruhwirth <clemens@endorphin.org>**20081013221530]
2098[Add a link to the GHC API docs from the library haddock index
2099Ian Lynagh <igloo@earth.li>**20081013195943]
2100[Link to the GHC API documentation from the main doc page
2101Ian Lynagh <igloo@earth.li>**20081013200927]
2102[Whitespace only in docs/index.html
2103Ian Lynagh <igloo@earth.li>**20081013200625]
2104[Tweak gen_contents_index
2105Ian Lynagh <igloo@earth.li>**20081013192548
2106 It now works again after it has been installed, as well as while it is
2107 in a source tree.
2108 After it's been installed it filters out the ghc package, as that
2109 currently swamps everything else in the index.
2111[Build fixes for DLLized rts
2112Clemens Fruhwirth <clemens@endorphin.org>**20081013201608]
2113[Do not filter the rts from linked libraries in linkDynLib as Windows does not allow unresolved symbols
2114Clemens Fruhwirth <clemens@endorphin.org>**20081013201426]
2115[Add HsFFI.o to INSTALL_LIBS
2116Clemens Fruhwirth <clemens@endorphin.org>**20081013200945]
2117[Rename symbol macros to a consistant naming scheme
2118Clemens Fruhwirth <clemens@endorphin.org>**20081013162433]
2119[Fix #2685: two Bool arguments to tidyTypeEnv were the wrong way around
2120Simon Marlow <marlowsd@gmail.com>**20081013121339
2121 So -XTemplateHaskell was behaving like -fomit-interface-file-pragmas,
2122 and vice versa.
2124[Simplify the "is $bindir in $PATH" test
2125Ian Lynagh <igloo@earth.li>**20081011191008]
2126[Correct the "is $bindir in $PATH" test
2127Ian Lynagh <igloo@earth.li>**20081011191030
2128 We were testing neq instead of eq
2130[Fix a typo which was causing ghci to quit on commands errors
2131pepe <mnislaih@gmail.com>**20081011114720]
2132[Drop libm from the linker dependencies for libffi
2133Clemens Fruhwirth <clemens@endorphin.org>**20081011074524]
2134[Do not generate haddock documentation when running install-docs in libffi
2135Clemens Fruhwirth <clemens@endorphin.org>**20081010192318]
2136[When waking up thread blocked on TVars, wake oldest first (#2319)
2137Josef Svenningsson <josef.svenningsson@gmail.com>**20081010150322
2138 StgTVarWatchQueue contains the threads blocked on a TVar in order
2139 youngest first. The list has to be traversed backwards to unpark the threads
2140 oldest first.
2142 This improves the fairness when using STM in some situations.
2144[add readTVarIO :: TVar a -> IO a
2145Simon Marlow <marlowsd@gmail.com>**20081010131545]
2146[fix #2636: throw missing module errors as SourceErrors, not ErrMsg
2147Simon Marlow <marlowsd@gmail.com>**20081010131535]
2148[atomicModifyIORef: use a local cas() instead of the global lock
2149Simon Marlow <simonmar@microsoft.com>**20081008154702
2150 This should improve scaling when using atomicModifyIORef
2152[Delay building libffi until package.conf is created and fix bindist
2153Clemens Fruhwirth <clemens@endorphin.org>**20081010073106]
2154[Install a versioned ghc-pkg script; fixes trac #2662
2155Ian Lynagh <igloo@earth.li>**20081009164946]
2156[Fix bindist creation: Only the main RTS was being put in the bindists
2157Ian Lynagh <igloo@earth.li>**20081009163451]
2158[pushAtom: add missing case for MachNullAddr (#2589)
2159Simon Marlow <marlowsd@gmail.com>**20081009091118]
2160[undo incorrect assertion, and fix comments
2161Simon Marlow <marlowsd@gmail.com>**20081009085118]
2162[remove old GRAN/PARALLEL_HASKELL code
2163Simon Marlow <marlowsd@gmail.com>**20081009085051]
2164[FIX #2639
2165Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081009132328
2167   MERGE TO 6.10
2169[Cover PredTy case in Type.tyFamInsts
2170Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081009061435
2172   MERGE TO 6.10
2174[Drop ghcconfig.h/RtsConfig.h from libffi's package.conf.in
2175Clemens Fruhwirth <clemens@endorphin.org>**20081009071342]
2176[Don't use sed's -i flag as Solaris doesn't know it in libffi/Makefile
2177Clemens Fruhwirth <clemens@endorphin.org>**20081008234455]
2178[Don't use /dev/null trick to create empty object files in libffi/Makefile
2179Clemens Fruhwirth <clemens@endorphin.org>**20081008232902]
2180[Turn libffi into a Haskell package
2181Clemens Fruhwirth <clemens@endorphin.org>**20081008170443]
2182[Make 'getModSummary' deterministic.
2183Thomas Schilling <nominolo@googlemail.com>**20081008144032]
2184[Add accessors to 'HsModule' and haddockify it.
2185Thomas Schilling <nominolo@googlemail.com>**20081007235656]
2186[fix syntax errors in src-dist publish rules
2187Simon Marlow <marlowsd@gmail.com>**20081008103432]
2188[add comments and an ASSERT_LOCK_HELD()
2189Simon Marlow <marlowsd@gmail.com>**20081008112627]
2190[Fix #2663: we had a hard-wired capabilities[0]
2191Simon Marlow <marlowsd@gmail.com>**20081008112609
2192 For some unknown reason in schedulePostRunThread() we were always
2193 passing capabilities[0] rather than the current Capability to
2194 throwToSingleThreaded().  This caused all kinds of weird failures and
2195 crashes in STM code when running on multiple processors.
2197[Fix #1955 for heap profiles generated by +RTS -hT
2198Simon Marlow <marlowsd@gmail.com>**20081003150745]
2199[add a section id for +RTS -hT
2200Simon Marlow <marlowsd@gmail.com>**20081007151007]
2201[update documentation for PostfixOperators
2202Simon Marlow <marlowsd@gmail.com>**20081007150957]
2203[fix markup
2204Simon Marlow <marlowsd@gmail.com>**20081007150943]
2205[Fix bug in DPH docs
2206Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008101618]
2207[Add short DPH section to users guide
2208Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008064754
2210 MERGE TO 6.10
2212[Users Guide: added type family documentation
2213Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081008061927
2215   MERGE TO 6.10
2217[Track changes to package dph
2218Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008032859
2220 MERGE TO 6.10
2222[Build a profiled GHC API by default if p is in GhcLibWays
2223Ian Lynagh <igloo@earth.li>**20081007152318]
2224[Check whether mk/validate.mk defines anything after validating
2225Ian Lynagh <igloo@earth.li>**20081007144855]
2226[Remove #define _BSD_SOURCE from Stg.h
2227Ian Lynagh <igloo@earth.li>**20081006101959
2228 It's no longer needed, as base no longer #includes it
2230[Make ghctags compile again.
2231Thomas Schilling <nominolo@googlemail.com>**20081007135705]
2232[Revert AutoLinkPackages change for dynamic libraries. Cabal handles that now.
2233Clemens Fruhwirth <clemens@endorphin.org>**20081007100417]
2234[Change suffix for dyn. linked executables from _real to .dyn
2235Clemens Fruhwirth <clemens@endorphin.org>**20081007100750]
2236[Add accessors to 'Target' fields and haddockify.
2237Thomas Schilling <nominolo@googlemail.com>**20081006222940
2239 MERGE TO 6.10
2241[Make 'gblock' and 'gunblock' part of 'ExceptionMonad'.  This way the
2242Thomas Schilling <nominolo@googlemail.com>**20081006222831
2243 default implementations of 'gbracket' and 'gfinally' just work.
2245 MERGE TO 6.10
2247[Add Word8 support to vectoriser
2248Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081007004416
2250 MERGE TO 6.10
2252[Fix generating OS X installers: Set COMMAND_MODE=unix2003
2253Ian Lynagh <igloo@earth.li>**20081005222715
2254 If we don't specify COMMAND_MODE=unix2003 then xcodebuild defaults
2255 to setting it to legacy, which means that ar builds archives
2256 without a table of contents. That makes the build fail later on.
2258[We need to set datadir = $(libdir) in bindists
2259Ian Lynagh <igloo@earth.li>**20081005143307
2260 We already do in the normal Makefiles.
2262 This is because GHC needs package.conf and unlit to be in the same place
2263 (and things like ghc-pkg need to agree on where package.conf is, so we
2264 just set it globally).
2266[prep-bin-dist-mingw complains if it finds a bad version of windres
2267Ian Lynagh <igloo@earth.li>**20081004175351]
2268[removed Data.Generics.Basics, added Data.Data
2269'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082808]
2270[Fix a build problem with GHC 6.4.2
2271Ian Lynagh <igloo@earth.li>**20081003195700]
2272[No AutoLinkPackages for dynamic library linking
2273Clemens Fruhwirth <clemens@endorphin.org>**20081003185304]
2274[use ghcError for error in command line
2275Clemens Fruhwirth <clemens@endorphin.org>**20081001125648]
2276[Fix warnings
2278[Always use extensible exceptions in ghc-pkg, rather than using ifdefs
2279Ian Lynagh <igloo@earth.li>**20081003161247]
2280[Use a proper exception for IOEnvFailure, not just a UserError
2281Ian Lynagh <igloo@earth.li>**20081003160129]
2282[Use an extensible-exceptions package when bootstrapping
2283Ian Lynagh <igloo@earth.li>**20081003140216
2284 Ifdefs for whether we had extensible exceptions or not were spreading
2285 through GHC's source, and things would only have got worse for the next
2286 2-3 years, so instead we now use an implementation of extensible
2287 exceptions built on top of the old exception type.
2289[Expunge ThFake, cure Trac #2632
2292 This patch fixes a dirty hack (the fake ThFake module), which in turn
2293 was causing Trac #2632.
2295 The new scheme is that the top-level binders in a TH [d| ... |] decl splice
2296 get Internal names.  That breaks a previous invariant that things like
2297 TyCons always have External names, but these TyCons are never long-lived;
2298 they live only long enough to typecheck the TH quotation; the result is
2299 discarded.  So it seems cool.
2301 Nevertheless -- Template Haskell folk: please test your code.  The testsuite
2302 is OK but it's conceivable that I've broken something in TH.  Let's see.
2305[Make a debug check more refined
2307[Add ASSERTs to all calls of nameModule
2310 nameModule fails on an InternalName.  These ASSERTS tell you
2311 which call failed.
2314[Let parseModule take a ModSummary like checkAndLoadModule did.
2315Thomas Schilling <nominolo@googlemail.com>**20081002230412
2317 To get the ModSummary for a ModuleName getModSummary can be used.
2318 It's not called find* or lookup* because it assumes that the module is
2319 in the module graph and throws an exception if it cannot be found.
2320 Overall, I'm not quite sure about the usefulness of this function
2321 since the user has no control about which filetype to grab (hs or
2322 hs-boot).
2324[Remove some out-of-date entries from .darcs-boring
2325Ian Lynagh <igloo@earth.li>**20081002201519]
2326[TFs: Allow repeated variables in left-hand sides of instances
2327Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081002134539
2329   MERGE TO 6.10
2331[Clean up some comments
2332Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081002074642
2334   MERGE TO 6.10
2336[Make the new binder-swap stuff in OccurAnal work right for GlobalIds
2339 See Note [Binder swap on GlobalId scrutinees].  I hadn't got this
2340 right before, so repeated cases on imported Ids weren't getting optimised.
2344[Minor refactoring only
2346[Comments only
2348[Zap dead-ness info appropriately in SpecConstr
2351 SpecConstr can make pattern binders come alive, so we must remember
2352 to zap their dead-variable annotation.  See extendCaseBndrs.
2354 (This was triggering a Core Lint failure in DPH.)
2357[Suppress invalid Core Lint complaint about lack of constructors
2359[add some more GC roots (fixes conc048, and possibly some others)
2360Simon Marlow <marlowsd@gmail.com>**20081001164427]
2361[Document +RTS -hT
2362Simon Marlow <marlowsd@gmail.com>**20081001163222
2363 We forgot to document this in GHC 6.8
2365[fix new-qualified-operators link
2366Simon Marlow <marlowsd@gmail.com>**20081001163105]
2367[Proper error message for unsupported pattern signatures
2368Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001144339
2369 - Pattern signatures must be identical to the type expected for the pattern;
2370   see Note [Pattern coercions]
2371 - We now signal an appropriate error if an equality coercion would be needed
2372   (instead of just generating Core that doesn't typecheck)
2374   MERGE TO 6.10
2376[Prevent excessive inlining with DPH
2377Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081002012055
2379 This adds a new flag -finline-if-enough-args which disables inlining for
2380 partially applied functions. It is automatically set by -Odph. This is a
2381 temporary hack and should remain undocumented.
2383 MERGE TO 6.10
2386[On Windows, check that we have a good version of windres when configuring
2387Ian Lynagh <igloo@earth.li>**20081001171133]
2388[Call $(PERL) rather than perl when making the manpage
2389Ian Lynagh <igloo@earth.li>**20080930155054]
2390[don't install the installPackage program
2391Ian Lynagh <igloo@earth.li>**20080930145714]
2392[Fix #2637: conc032(threaded2) failure
2393Simon Marlow <marlowsd@gmail.com>**20081001135549
2394 There was a race condition whereby a thread doing throwTo could be
2395 blocked on a thread that had finished, and the GC would detect this
2396 as a deadlock rather than raising the pending exception.  We can't
2397 close the race, but we can make the right thing happen when the GC
2398 runs later.
2400[Remove outdated link to OGI webpage
2401Simon Marlow <marlowsd@gmail.com>**20080930150912]
2402[TFs: Fixed InstContextNorm (and simplification of IPs)
2403Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001131303
2405   MERGE TO 6.10
2407[TcSimplify.reduceImplication: clean up
2408Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001091315
2409 - This cleans up some of the mess in reduceImplication and documents the
2410   precondition on the form of wanted equalities properly.
2411 - I also made the back off test a bit smarter by allowing to back off in the
2412   presence of wanted equalities as long as none of them got solved in the
2413   attempt.  (That should save generating some superfluous bindings.)
2415   MERGE TO 6.10
2417[Make sure to zonk the kind of coercion variables
2418Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001053243
2420   MERGE TO 6.10
2422[Remover PROT_EXEC flag from mmap()
2423Simon Marlow <marlowsd@gmail.com>**20080930141842
2424 Needed for #738 fix
2426[Fix #2410: carefully generate unique names for CAF CCs
2427Simon Marlow <marlowsd@gmail.com>**20080930141812]
2428[fix #2594: we were erroneously applying masks, as the reporter suggested
2429Simon Marlow <marlowsd@gmail.com>**20080930115611
2430 My guess is that this is left over from when we represented Int8 and
2431 friends as zero-extended rather than sign-extended.  It's amazing it hasn't
2432 been noticed earlier.
2434[Unconditionalize definition of DYNAMIC_* so that libffi.so/.dll is removed even when BuildSharedLibs is reset to NO
2435Clemens Fruhwirth <clemens@endorphin.org>**20080930085449]
2436[Type families: need to instantiate flexible skolems before other flexibles
2437Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080930053559
2439 MERGE TO 6.10
2441[Fix warnings
2442Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080929142227]
2443[Type families: consider subst rules both way
2444Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080929141040
2445 - applySubstFam, applySubstVarVar & applySubstVarFam need to return their
2446   second argument -to be put into the todo list- if the rule would be
2447   applicable if the equalities would be supplied in the opposite order.
2449 MERGE TO 6.10
2451[Clean up a bit and improve an error message
2453[Don't capture error calls in tryUser
2456 A previous patch slightly changed the semantics of tryUser.
2457 This patch restores the original behaviour
2458 (as expected in :print)
2461[tweaks to this section of the docs
2462Simon Marlow <simonmar@microsoft.com>**20080927141834]
2463[Add -outputdir flag (#2295)
2464Simon Marlow <simonmar@microsoft.com>**20080927141822]
2465[oops, forgot to add -XNewQualifiedOperators to the flags table
2466Simon Marlow <simonmar@microsoft.com>**20080923140449]
2467[Fix making OS X installers from source tarballs
2468Ian Lynagh <igloo@earth.li>**20080927150507
2469 I'm not sure why it works in the HEAD, but when making an installer
2470 from the 6.10.1 beta configure hangs when doing the CHECK_HIST_ERRORS
2471 test (during rl_initialize, I believe). Giving make /dev/null as stdin
2472 fixes it.
2474[Make the matching of the filename ghc.exe case insensitive, fixes bug #2603
2475Neil Mitchell <ndmitchell@gmail.com>**20080916160311]
2476[Fix #2411: missing case for CATCH_STM_FRAME in raiseAsync()
2477Simon Marlow <simonmar@microsoft.com>**20080926232806]
2478[Add an example of how to use SCCs to the user guide
2479Ian Lynagh <igloo@earth.li>**20080926203832]
2480[Add some description of the +RTS -t/-s/-S output
2481Ian Lynagh <igloo@earth.li>**20080926200203]
2482[Remove a redundant options pragma
2483Ian Lynagh <igloo@earth.li>**20080926152731]
2484[Split ShowVersion etc off into a different type to DoInteractive etc
2485Ian Lynagh <igloo@earth.li>**20080926140539
2486 This fixes trac #1348 (ghci --help gave ghc's help), and also tidies
2487 things up a bit. Things would be even tidier if the usage.txt files were
2488 put into a .hs file, so that ShowUsage wouldn't need to be able to find
2489 the libdir.
2491[Pass SRC_HC_OPTS to GHC when building GHC's Main.hs
2492Ian Lynagh <igloo@earth.li>**20080926131609]
2493[Improve runghc docs; fixes trac #2477
2494Ian Lynagh <igloo@earth.li>**20080926124425]
2495[Type families: fixes in flattening & finalisation
2496Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080925225324
2497 * Finalisation didn't do the right thing for equalities x ~ y, where
2498   x was instantiated, but not zonked and y flexible (need to do y := x)
2499 * During flattening we weren't careful enough when turning wanteds
2500   intermediates into locals
2502 Both bugs showed up in a small example of SPJ:
2504   linear :: HasTrie (Basis v) => (Basis v, v)
2505   linear =  basisValue
2507   class HasTrie a where
2509   type family Basis u :: *
2511   basisValue :: (Basis v,v)
2512   basisValue = error "urk"
2515[Fix the behaviour of flags like --help and --version; fixes trac #2620
2516Ian Lynagh <igloo@earth.li>**20080925165618
2517 They should override other mode flags, not conflict with them
2519[Follow the integer package changes
2520Ian Lynagh <igloo@earth.li>**20080925133855]
2521[Type families: fix decomposition problem
2522Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080925084139
2523 * Fixes the problem reported in
2524   <http://www.haskell.org/pipermail/haskell-cafe/2008-July/044911.html>
2526[Fix parsing of -ignore-package flag.
2527Bertram Felgenhauer <int-e@gmx.de>**20080925053820]
2528[Don't exit ghci if :info is called on an undefined identifier.
2529Judah Jacobson <judah.jacobson@gmail.com>**20080924212422]
2530[Fix maintainer-clean
2531Ian Lynagh <igloo@earth.li>**20080924230553]
2532[Use -f when making the runhaskell symlink
2533Ian Lynagh <igloo@earth.li>**20080924124255
2534 Otherwise installation fails if runhaskell already exists.
2536[Use -perm -100 rather than -perm /a+x when looking for executable files
2537Ian Lynagh <igloo@earth.li>**20080924124137
2538 /a+x doesn't work on some Solaris and OS X machines. Spotted by
2539 Christian Maeder.
2541[Use $(FIND) rather than find, as the former may be gfind
2542Ian Lynagh <igloo@earth.li>**20080924123323]
2543[Look for gfind as well as find
2544Ian Lynagh <igloo@earth.li>**20080924123046]
2545[In configure, don't call FPTOOLS_HADDOCK
2546Ian Lynagh <igloo@earth.li>**20080924122558
2547 We now use the in-tree haddock, so we don't need to look for it.
2549[Use $(TAR) rather than tar
2550Ian Lynagh <igloo@earth.li>**20080924121759
2551 Fixes problems on Solaris, where we need to use gtar instead of tar
2553[Add $(strip) to a Makefile test
2554Ian Lynagh <igloo@earth.li>**20080924120940
2555 Fixes making bindists on solaris. Patch from Christian Maeder.
2557[Use test -f rather than test -e, for portability (Solaris)
2558Ian Lynagh <igloo@earth.li>**20080924120840]
2559[Remove some dependencies on bootstrapping.conf from libraries/Makefile
2560Ian Lynagh <igloo@earth.li>**20080923205755
2561 They were causing some unnecessary work:
2562 Running make in a built tree reregisters the GHC package in
2563 bootstrapping.conf, and the build system thought that this updated
2564 timestamp meant that the configure stamps were out of date. This is
2565 particularly bad for the libraries with configure scripts, as those
2566 take a while to run.
2568 The bootstrapping.conf is built in an earlier phase ("make boot") so
2569 one shouldn't rely on the dependencies anyway.
2571[Bump the version number to 6.11
2572Ian Lynagh <igloo@earth.li>**20080923165613]
2573[Generalise type of 'defaultErrorHandler' so it can be used inside a Ghc session.
2574Thomas Schilling <nominolo@googlemail.com>**20080921085647]
2575[Make "sh -e boot" work
2576Ian Lynagh <igloo@earth.li>**20080921111508]
2577[Use -f rather than -e for portability
2578Ian Lynagh <igloo@earth.li>**20080921111436]
2579[Add some special cases for putting dph in bindists
2580Ian Lynagh <igloo@earth.li>**20080921000406]
2581[Escape a hash in the Makefile (it was breaking source dist creation)
2582Ian Lynagh <igloo@earth.li>**20080920232945]
2583[Disallow package flags in OPTIONS_GHC pragmas (#2499)
2584Simon Marlow <simonmar@microsoft.com>**20080923173904]
2585[#2566: emit a warning for 'ghc -c foo.bar'
2586Simon Marlow <simonmar@microsoft.com>**20080923144956
2588 $ ghc -c foo.bar
2589 Warning: the following files would be used as linker inputs, but linking is not being done: foo.bar
2590 ghc: no input files
2591 Usage: For basic information, try the `--help' option.
2593[Fix to new executable allocation code (fixed print002 etc.)
2594Simon Marlow <simonmar@microsoft.com>**20080922210915
2595 The problem here is caused by the fact that info tables include a
2596 relative offset to the string naming the constructor.  Executable
2597 memory now resides at two places in the address space: one for writing
2598 and one for executing.  In the info tables generated by GHCi, we were
2599 calculating the offset relative to the writable instance, rather than
2600 the executable instance, which meant that the GHCi debugger couldn't
2601 find the names for constructors it found in the heap.
2603[clean sm/Evac_thr.c and sm/Scav_thr.c
2604Simon Marlow <simonmar@microsoft.com>**20080922152827]
2605[add -XNewQualifiedOperators (Haskell' qualified operator syntax)
2606Simon Marlow <simonmar@microsoft.com>**20080922152340]
2607[Fix Trac #2597 (first bug): correct type checking for empty list
2610 The GHC front end never generates (ExplicitList []), but TH can.
2611 This patch makes the typechecker robust to such programs.
2614[Fix Trac #2597 (second bug): complain about an empty DoE block
2617 When converting an empty do-block from TH syntax to HsSyn,
2618 complain rather than crashing.
2621[Update dependencies
2622Ian Lynagh <igloo@earth.li>**20080920183534]
2623[Fix building with GHC 6.6
2624Ian Lynagh <igloo@earth.li>**20080920162918]
2625[Remove fno-method-sharing from the list of static flags
2626Ian Lynagh <igloo@earth.li>**20080920010635
2627 It is now a dynamic flag
2629[Tidy up the treatment of dead binders
2632 This patch does a lot of tidying up of the way that dead variables are
2633 handled in Core.  Just the sort of thing to do on an aeroplane.
2635 * The tricky "binder-swap" optimisation is moved from the Simplifier
2636   to the Occurrence Analyser.  See Note [Binder swap] in OccurAnal.
2637   This is really a nice change.  It should reduce the number of
2638   simplifier iteratoins (slightly perhaps).  And it means that
2639   we can be much less pessimistic about zapping occurrence info
2640   on binders in a case expression. 
2642 * For example:
2643        case x of y { (a,b) -> e }
2644   Previously, each time around, even if y,a,b were all dead, the
2645   Simplifier would pessimistically zap their OccInfo, so that we
2646   can't see they are dead any more.  As a result virtually no
2647   case expression ended up with dead binders.  This wasn't Bad
2648   in itself, but it always felt wrong.
2650 * I added a check to CoreLint to check that a dead binder really
2651   isn't used.  That showed up a couple of bugs in CSE. (Only in
2652   this sense -- they didn't really matter.)
2654 * I've changed the PprCore printer to print "_" for a dead variable.
2655   (Use -dppr-debug to see it again.)  This reduces clutter quite a
2656   bit, and of course it's much more useful with the above change.
2658 * Another benefit of the binder-swap change is that I could get rid of
2659   the Simplifier hack (working, but hacky) in which the InScopeSet was
2660   used to map a variable to a *different* variable. That allowed me
2661   to remove VarEnv.modifyInScopeSet, and to simplify lookupInScopeSet
2662   so that it doesn't look for a fixpoint.  This fixes no bugs, but
2663   is a useful cleanup.
2665 * Roman pointed out that Id.mkWildId is jolly dangerous, because
2666   of its fixed unique.  So I've
2668      - localied it to MkCore, where it is private (not exported)
2670      - renamed it to 'mkWildBinder' to stress that you should only
2671        use it at binding sites, unless you really know what you are
2672        doing
2674      - provided a function MkCore.mkWildCase that emodies the most
2675        common use of mkWildId, and use that elsewhere
2677    So things are much better
2679 * A knock-on change is that I found a common pattern of localising
2680   a potentially global Id, and made a function for it: Id.localiseId
2683[Gix the ghcii script
2684Ian Lynagh <igloo@earth.li>**20080919174651
2685 The ghc executable name doesn't have a version number on Windows, so
2686 don't put one in the script.
2688[Create runhaskell as well as runghc
2689Ian Lynagh <igloo@earth.li>**20080919153010]
2690[On Linux use libffi for allocating executable memory (fixed #738)
2691Simon Marlow <marlowsd@gmail.com>**20080919134602]
2692[Move the context_switch flag into the Capability
2693Simon Marlow <marlowsd@gmail.com>**20080919102601
2694 Fixes a long-standing bug that could in some cases cause sub-optimal
2695 scheduling behaviour.
2697[Fix building the extralibs tarball
2698Ian Lynagh <igloo@earth.li>**20080919133555
2699 We now need to dig the appropriate lines out of packages, rather than
2700 just catting libraries/extra-packages, in order to find out what the
2701 extralibs are.
2703[Install libffi when installing frmo a bindist
2704Ian Lynagh <igloo@earth.li>**20080919130332]
2705[Fix how we put libffi into bindists
2706Ian Lynagh <igloo@earth.li>**20080919125528]
2707[TAG 6.10 branch has been forked
2708Ian Lynagh <igloo@earth.li>**20080919123437]
2709[Don't require Parser.y in a source dist
2710Ian Lynagh <igloo@earth.li>**20080919115831]
2711[Add HpcParser.hs to source dists
2712Ian Lynagh <igloo@earth.li>**20080919115816]
2713[Fix the list of generated files that need to go into the source dists
2714Ian Lynagh <igloo@earth.li>**20080919112522]
2715[Improve documentation of overlapping instances
2717[Put generated files in source dists
2718Ian Lynagh <igloo@earth.li>**20080918194424
2719 We don't want to require that users building source dists have alex/happy
2721[Add libraries/syb to .darcs-boring
2722Ian Lynagh <igloo@earth.li>**20080918190116]
2723[Fix a couple of issues with :print
2726       - Ticket #1995: Unsoundness with newtypes
2727       - Ticket #2475: "Can't unify" error when stopped at an exception
2729       In addition this patch adds the following:
2731       - Unfailingness: RTTI cannot panic anymore.
2732         In case of failure, it recovers gracefully by returning the "I know nothing" type
2733       - A -ddump-rtti flag
2737pepe <mnislaih@gmail.com>**20080418172303]
2738[RichTokenStream support
2739Chaddai Fouche <chaddai.fouche@gmail.com>**20080918165256
2741 This patch adds support for raw token streams, that contain more
2742 information than normal token streams (they contains comments at
2743 least). The "lexTokenStream" function brings this support to the
2744 Lexer module. In addition to that, functions have been added to
2745 the GHC module to make easier to recover of the token stream of
2746 a module ("getTokenStream").
2748 Building on that, I added what could be called "rich token
2749 stream": token stream to which have been added the source string
2750 corresponding to each token, the function addSourceToToken takes
2751 a StringBuffer and a starting SrcLoc and a token stream and build
2752 this rich token stream. getRichTokenStream is a convenience
2753 function to get a module rich token stream. "showRichTokenStream"
2754 use the SrcLoc information in such a token stream to get a string
2755 similar to the original source (except unsignificant
2756 whitespaces). Thus "putStrLn . showRichTokenStream =<<
2757 getRichTokenStream s mod" should print a valid module source, the
2758 interesting part being to modify the token stream between the get
2759 and the show of course.
2761[When passing gcc -B, also tell it where the mingw include directory is
2762Ian Lynagh <igloo@earth.li>**20080918143312]
2763[Don't put the mingw directory in RTS's package.conf
2764Ian Lynagh <igloo@earth.li>**20080918143118]
2765[Be more forceful when cleaning in compiler/ and ghc/
2766Ian Lynagh <igloo@earth.li>**20080918134443
2767 Now that the Cabal file is generated by configure, it would be nice
2768 if clean worked even if the cabal file is missing. So now we just rm -rf
2769 the dist directory.
2771[Generate ghc.cabal and ghc-bin.cabal with configure
2772Ian Lynagh <igloo@earth.li>**20080918133636
2773 This allows us to put the proper version number into them
2775[Make the ghci scripts point to the versioned GHC program, not just "ghc"
2776Ian Lynagh <igloo@earth.li>**20080918122516]
2777[Fix Trac #1470: improve handling of recursive instances (needed for SYB3)
2780 This bug has been hanging around for a long time, as you'll see by its
2781 number. The fix implements a feature that is really needed by SYB3, to
2782 allow an instance to (rather indirectly) refer to itself.  The trickiness
2783 comes when solving the superclass constraints.
2785 The whoel issue is explained in Note [Recursive instances and superclases]
2786 in TcSimplify.
2788 In cracking this one I found I could remove the WantSCs argument to the
2789 ReduceMe flag, which is a worthwhile simplification.  Good!
2792[Comments only
2794[Replace ASSERT with WARN, and explain why
2797 The DPH library tripped an ASSERT.  The code is actually OK, but it's
2798 badly-optimised so I changed it to WARN.  The issue here is explained
2799 in ClosureInfo, Note [Unsafe coerce complications].
2802[Add a missing "prime" (env' --> env'') thereby fixing a tripping WARN.  Hurrah!
2804[Fix nasty infelicity: do not short-cut empty substitution in the simplifier
2807 I was perplexed about why an arity-related WARN was tripping. It took
2808 me _day_ (sigh) to find that it was because SimplEnv.substExpr was taking
2809 a short cut when the substitution was empty, thereby not subsituting for
2810 Ids in scope, which must be done (CoreSubst Note [Extending the Subst]).
2812 The fix is a matter of deleting the "optimisation".  Same with
2813 CoreSubst.substSpec, although I don't know if that actually caused a
2814 probem.
2817[Avoid arity reduction when doing eta-reduce
2820 We like things with high arity, so when doing eta reduction
2821 it's probably a good idea to avoid reducing arity.
2824[Add extra WARN test
2827 This warning tests that the arity of a function does not decrease.
2828 And that it's at least as great as the strictness signature.
2830 Failing this test isn't a disater, but it's distinctly odd and
2831 usually indicates that not enough information is getting propagated
2832 around, and hence you may get more simplifier iterations.
2835[Comments only
2837[Re-adjust interaction between -ddump flags and force-recompilation
2840 If you say -ddump-xx we effectively add -fforce-recomp, so that you
2841 see your dump output.  But this works badly in --make mode, because
2842 you get the ddump output for every module, which is probably not what
2843 you want.  This patch forces recompilation with -ddump-X only in one-shot
2844 mode. 
2846 Of course, this only affects people using -ddump options.
2849[Add Outputable GhcMode instance
2851[Improve error reporting for 'deriving' (Trac #2604)
2853[Add link to GADT paper re rigid types
2855[Fix MacOS X build: don't believe __GNUC_GNU_INLINE__ on MacOS X
2856Simon Marlow <marlowsd@gmail.com>**20080918112856]
2857[require Alex version 2.1.0
2858Simon Marlow <marlowsd@gmail.com>**20080918112812
2859 Having 2.0.1 causes some unicode tests to fail
2861[Type families: fixes in the new solver
2862Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080918100934]
2863[ext-core library: Parser fixes; make it build with the HEAD
2864Tim Chevalier <chevalier@alum.wellesley.edu>**20080918090349
2866 In the ext-core parser I guess I never tested:
2867 * existential type variable bindings in case alts
2868 * empty data declarations
2870 That'll learn me!
2872[Wibble ghc-pkg imports to fix building on Windows
2873Ian Lynagh <igloo@earth.li>**20080917210813]
2874[ghc-pkg needs to make package.conf with sensible permissions
2875Ian Lynagh <igloo@earth.li>**20080917192155
2876 It was calling openTempFile which uses a 600 permissions mask.
2878[Change 'loadWithCompiler' callback argument to just print warnings.
2879Thomas Schilling <nominolo@googlemail.com>**20080917102925
2880 Rename function accordingly.
2882 The callback wasn't very flexible to begin with.  There's pretty much
2883 no way around to calling 'compile' inside that callback since
2884 'upsweep' depends on certain side effects of compile.  It therefore
2885 makes more sense to restrict the callback to its intended use only,
2886 namely to log warnings and errors.
2888[Fix: GhcStage2HcOpts were being added to stage 3 too
2889Simon Marlow <marlowsd@gmail.com>**20080917085917]
2890[Type families: unify with family apps in checking mode
2891Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080917062548]
2892[Type families: bug fixes
2893Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916151254]
2894[Keep sysnonyms folded in equalities if possible
2895Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916075700]
2896[Type families: apply flattening coercions in the right order
2897Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916055136]
2898[TcTyFuns: tidy warning
2899Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080915031423]
2900[Signature for Inst.isValidWantedEqInst
2901Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080915030118]
2902[Remember if RewriteInst is swapped & bug fixes
2903Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080914163639]
2904[Type families: fixed all non-termination in the testsuite
2905Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080914120638]
2906[Type families: completed the new equality solver
2907Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080913133631
2908 - Implements normalisation of class constraints containing synonym family
2909   applications or skolems refined by local equalities.
2910 - Clean up of TcSimplify.reduceContext by using the new equality solver.
2911 - Removed all the now unused code of the old algorithm.
2912 - This completes the implementation of the new algorithm, but it is largely
2913   untested => many regressions.
2915[Use the new -optdep flag replacements when building with >= GHC 6.9
2916Ian Lynagh <igloo@earth.li>**20080916220057
2917 Fix building the HEAD with itself
2919[Use "exec" when running ghc in the wrapper
2920Ian Lynagh <igloo@earth.li>**20080915100217]
2921[Add "#!/bin/sh" to runghc.wrapper
2922Ian Lynagh <igloo@earth.li>**20080914153507]
2923[Add a "#!/bin/sh" to ghc.wrapper
2924Ian Lynagh <igloo@earth.li>**20080914153344]
2925[Fixing directory creation to not create "" directories inside hpc report (harmless but needless)
2927[Fix Trac #2052 Allowing hpc to understand hsc files.
2929[Fix Trac #2311: creates subdirs for package coverage information
2931[FIX #2469: sort out our static/extern inline story
2932Simon Marlow <marlowsd@gmail.com>**20080916132222
2933 gcc has changed the meaning of "extern inline" when certain flags are
2934 on (e.g. --std=gnu99), and this broke our use of it in the header
2935 files.
2937[Fix a warning
2938Simon Marlow <marlowsd@gmail.com>**20080916130922]
2939[Stop using mremap() to allocate space for trampolines
2940Simon Marlow <marlowsd@gmail.com>**20080915145924
2942 This was causing problems because sometimes mremap() moved the memory
2943 we had allocated from the low 2Gb to above the 2Gb boundary, causing
2944 some linkages to fail.  There's no MAP_32BIT flag to mremap().
2946 So now we just use mmap(MAP_ANON|MAP_32BIT) to allocated space for the
2947 trampolines.  People without MAP_32BIT (eg. *BSD) will still have to
2948 do something else here, such as allocating memory from a fixed
2949 address; so I've made it slightly easier for those guys, but there's
2950 still work to do (#2063).
2952 One solution (that Simon PJ is advocating) is to turn on -fPIC by
2953 default on x86-64.  This is a good solution as it removes the need for
2954 MAP_32BIT, but doesn't work with -fvia-C, so probably this is for
2955 later.
2957[add $(GhcStage[123]HcOpts)
2958Simon Marlow <marlowsd@gmail.com>**20080912155549]
2959[Improve handling of -fdph-* flags
2960Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916034746]
2961[Add -fdph-this
2962Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916033710]
2963[Remove last traces of package ndp
2964Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916033428]
2965[Clean up vectorisation error messages
2966Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916013236]
2967[Fix vectoriser bug
2968Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080915042823
2970 We were using mkWildId in situations where it cause disastrous shadowing
2972[Track changes to dph
2973Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912114028]
2974[Change desugaring of PArr literals
2975Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912015609]
2976[Expose the dph packages automatically if -dph-* is set
2977Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912004403]
2978[Don't panic on non-vectorisable expressions
2979Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080911054333]
2980[-Odph implies -fno-spec-constr-count
2981Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080910045339]
2982[Improve warning for SpecConstr
2984[White space only
2986[Minor refactoring to get rid of Type.splitNewTyConApp
2988[Refactor the desugaring of RULE lhss a bit
2991 This is just a tidy-up.  Previously we were calling occurAnalyse
2992 twice on each LHS which was silly and a bit unclean too. 
2994 This patch should have no overall effect, though.
2997[Do not use the Static Arg Transformation by default with -O2
3000 Max has some more heuristics to add, and is meanwhile worried
3001 that having SAT on by default will make some highly-tuned array
3002 programs worse.  So it's off by default. 
3004 Use -fstatic-argument-transformation to switch it on.
3007[Comments, and a couple of asserts, only
3009[Fix Trac #2587: take account of type lets
3012 GHC allows a non-recursive let for type varaibles
3013        let a = TYPE ty in ...
3014 But the free-variable finder had not caught up with this
3015 fact. This patch catches up.
3018[Don't try to float type-lets
3021 A type let shouldn't really occur in SetLevels, but if it does,
3022 this patch makes sure it is left alone.
3025[add refs and fix a bug (noted by Peter Gammie) in docs of arrow notation
3026Ross Paterson <ross@soi.city.ac.uk>**20080915104757]
3027[Generalise type of 'withExtendedLinkEnv'.
3028Thomas Schilling <nominolo@googlemail.com>**20080915085738]
3029[Use 'GhcMonad' in ghci/InteractiveUI.
3030Thomas Schilling <nominolo@googlemail.com>**20080915085633]
3031[Use 'GhcMonad' in ghci/GhciTags.
3032Thomas Schilling <nominolo@googlemail.com>**20080915084922]
3033[Use 'GhcMonad' in ghci/Debugger.
3034Thomas Schilling <nominolo@googlemail.com>**20080915084738]
3035[Use 'GhcMonad' in ghci/GhciMonad.
3036Thomas Schilling <nominolo@googlemail.com>**20080915084646]
3037[Use 'GhcMonad' in ghc/Main.
3038Thomas Schilling <nominolo@googlemail.com>**20080914232957]
3039[Require PatternSignatures for bootstrapping compiler.
3040Thomas Schilling <nominolo@googlemail.com>**20080914232642]
3041[Use 'GhcMonad' in InteractiveEval.
3042Thomas Schilling <nominolo@googlemail.com>**20080914232454]
3043[Use 'GhcMonad' in GHC and split up checkModule into phases.
3044Thomas Schilling <nominolo@googlemail.com>**20080914232044
3046 I'm not sure I covered all the ways of throwing errors in the code.
3047 Some functions throw ProgramErrors, some error messages.  It's still
3048 quite a mess, but we're getting closer.  The missing cases are mostly
3049 errors that cannot be fixed by the API client either or are a result
3050 of wrong usage, so are in any case fatal.
3052 One function, 'getModuleInfo', still returns a 'Maybe', but the
3053 documentation suggests it should always succeed.  So I may change that
3054 soon.
3056 The spit-up of of 'checkModule' has pros and cons.  The various forms
3057 of 'checkModule*' now become:
3059  checkAndLoadModule ms False ~~>
3060     loadModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
3062  checkAndLoadModule ms True ~~>
3063    loadModule =<< desugarModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
3065  checkModule mn False ~~>
3066    typecheckModule =<< parseModule mn
3068  checkModule mn True ~~>
3069    desugarModule =<< typecheckModule =<< parseModule mn
3071 The old APIs cannot easily be provided, since the result type would be
3072 different depending on the second argument.  However, a more
3073 convenient API can be modelled on top of these four functions
3074 ({parse,typecheck,desugar,load}Module).
3076[Use 'GhcMonad' in DriverPipeline.  Also haddockify a bit while we're at it.
3077Thomas Schilling <nominolo@googlemail.com>**20080914220628]
3078[Use 'GhcMonad' in HscMain.
3079Thomas Schilling <nominolo@googlemail.com>**20080914213655]
3080[Use 'GhcMonad' in DriverMkDepend.
3081Thomas Schilling <nominolo@googlemail.com>**20080914212113]
3082[Haddockify DynFlags (partial).
3083Thomas Schilling <nominolo@googlemail.com>**20080914211718]
3084[Haddockify 'IE'.
3085Thomas Schilling <nominolo@googlemail.com>**20080914210016]
3086[Provide accessors for 'ImportDecl'.
3087Thomas Schilling <nominolo@googlemail.com>**20080914205811]
3088[Start haddockifying 'HsBindLR'.
3089Thomas Schilling <nominolo@googlemail.com>**20080914205629]
3090[Document 'parseStaticFlags'.
3091Thomas Schilling <nominolo@googlemail.com>**20080914205316]
3092[Introduce 'GhcMonad' class and two default implementations 'Ghc' and 'GhcT'.
3093Thomas Schilling <nominolo@googlemail.com>**20080914204930
3095 This monad will be required by most public API calls.
3097[Give the "Failing due to -Werror" message a name.
3098Thomas Schilling <nominolo@googlemail.com>**20080914173904]
3099[Make typechecker top-level functions also return messages instead of
3100Thomas Schilling <nominolo@googlemail.com>**20080914173228
3101 printing them.
3103[Reflect changes of desugarer error reporting in VectMonad.
3104Thomas Schilling <nominolo@googlemail.com>**20080914172711]
3105[Generalise 'handleGhcException' to work with any 'ExceptionMonad'.
3106Thomas Schilling <nominolo@googlemail.com>**20080914172404]
3107[Introduce an 'ExceptionMonad' class.
3108Thomas Schilling <nominolo@googlemail.com>**20080914172154
3110 This monad provides variants of 'catch', 'bracket', and 'finally', so
3111 exceptions can be handled in monads that wrap IO.  The latter two
3112 methods need to be part of the class definition, because GHC uses
3113 'block' and 'unblock' which are used in the definition of those two
3114 methods for the IO monad.  A perhaps better class interface would
3115 consist of 'gcatch', 'gblock', and 'gunblock' and let the latter two
3116 default to 'id' like is done for non-GHC implementations of 'bracket'
3117 and 'finally'.
3119[Provide default MonadIO instance for IO.
3120Thomas Schilling <nominolo@googlemail.com>**20080914164245]
3121[Return instead of print warnings and errors in desugarer.
3122Thomas Schilling <nominolo@googlemail.com>**20080914163641]
3123[Return parser errors and warnings instead of dying.
3124Thomas Schilling <nominolo@googlemail.com>**20080914162644]
3125[Add aliases for bags of warnings and errors.
3126Thomas Schilling <nominolo@googlemail.com>**20080914160337]
3127[Slightly more helpful panic message in DynFlags
3128Tim Chevalier <chevalier@alum.wellesley.edu>**20080915080650]
3129[Comments only: ".core" => ".hcr"
3130Tim Chevalier <chevalier@alum.wellesley.edu>**20080914203645]
3131[We need to tell ghc-pkg to --force if we've only built a profiling library
3132Ian Lynagh <igloo@earth.li>**20080913153142]
3133[If we're profiling GHC, don't bother building the GHC package the vanilla way
3134Ian Lynagh <igloo@earth.li>**20080913144820]
3135[Remove the duplicate show rule in libraries/Makefile
3136Ian Lynagh <igloo@earth.li>**20080913144413]
3137[Move the "show" target from target.mk to boilerplate.mk
3138Ian Lynagh <igloo@earth.li>**20080913141312
3139 target.mk isn't included everywhere, but show is always handy
3141[Change how we detect if we are using the bootstrapping compiler or not
3142Ian Lynagh <igloo@earth.li>**20080913104658
3143 I think looking for $(GHC_COMPILER_DIR_ABS) was failing on the Windows
3144 buildbot due to different path separators. Now we just look for
3145 "inplace".
3147[wibble the distrib Makefile
3148Ian Lynagh <igloo@earth.li>**20080912135932
3149 We now need to install driver after ghc
3151[Reinstate the driver/ghc directory, to create a versioned GHC program
3152Ian Lynagh <igloo@earth.li>**20080912113619
3153 e.g. $(bindir)/ghc-6.9.20080911
3155[If USE_NEW_MKDEPEND_FLAGS is YES then don't use the deprecated -optdep flags
3156Ian Lynagh <igloo@earth.li>**20080912110316]
3157[Use --force-local when calling tar in bindisttest/
3158Ian Lynagh <igloo@earth.li>**20080912012855
3159 Otherwise it thinks that c:/foo is a remote file
3161[Fix #2586, bug in THUNK_SELECTORs (again)
3162Simon Marlow <marlowsd@gmail.com>**20080912130404
3163 This time, we had forgetten the write barrier in one place.
3165[TAG 2008-09-12 2
3166Ian Lynagh <igloo@earth.li>**20080912132848]
3167Patch bundle hash: