Tue Jan  6 20:49:04 CET 2009  Bertram Felgenhauer <int-e@gmx.de>
  * Fix two more locking issues in throwTo()


New patches:

[Fix two more locking issues in throwTo()
Bertram Felgenhauer <int-e@gmx.de>**20090106194904] {
hunk ./rts/RaiseAsync.c 418
 	// Unblocking BlockedOnSTM threads requires the TSO to be
 	// locked; see STM.c:unpark_tso().
 	if (target->why_blocked != BlockedOnSTM) {
+	    unlockTSO(target);
 	    goto retry;
 	}
 	if ((target->flags & TSO_BLOCKEX) &&
hunk ./rts/RaiseAsync.c 440
 	// thread is blocking exceptions, and block on its
 	// blocked_exception queue.
 	lockTSO(target);
+	if (target->why_blocked != BlockedOnCCall &&
+ 	    target->why_blocked != BlockedOnCCall_NoUnblockExc) {
+	    unlockTSO(target);
+	    return;
+	}
 	blockedThrowTo(cap,source,target);
 	*out = target;
 	return THROWTO_BLOCKED;
}

Context:

[wake up the blocked exception queue on ThreadFinished; fixes #2910
Simon Marlow <marlowsd@gmail.com>**20090106153254] 
[bump GHC's max stack size to 512M
Simon Marlow <marlowsd@gmail.com>**20081219112211
 To accomodate compiling very long static lists (#2002)
] 
[ext-core: change .cabal file so we can build with either GHC 6.8 or 6.10
Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192757] 
[ext-core: fix some Prep bugs
Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192734] 
[ext-core: use shorter names when combining modules
Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192645] 
[ext-core: twiddle primitive things
Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192434] 
[Don't pin a register for gc_thread on SPARC.
Ben.Lippmeier@anu.edu.au**20090105030758
 
 This makes the build work again.
] 
[Require HsColour by default
Ian Lynagh <igloo@earth.li>**20090104214647
 This should stop us ending up without HsColour'ed sources on some
 platforms.
 
 We also now tell Cabal where to find HsColour, rather than it finding
 it itself.
] 
[Fix build
Ian Lynagh <igloo@earth.li>**20090104211810] 
[Add GHCi completions to :set and :show
Ori Avtalion <ori@avtalion.name>**20081209194210] 
[Fix sync-all: Check for --complete/partial before --<anything>
Ian Lynagh <igloo@earth.li>**20090104184652
 Patch from megacz in trac #2857
] 
[Remove time from extralibs at request of maintainer
Ian Lynagh <igloo@earth.li>**20090104115509] 
[validate fix: InteractiveEval no longer needs to import  IdInfo
Ian Lynagh <igloo@earth.li>**20090103154754] 
[Fix validate: strs is no longer used in IfaceSyn
Ian Lynagh <igloo@earth.li>**20090103153624] 
[Remove trailing whitespace from HaddockUtils
Ian Lynagh <igloo@earth.li>**20081229191727] 
[Fix warnings in HaddockUtils
Ian Lynagh <igloo@earth.li>**20081229191657] 
[Remove dead code from HaddockUtils
Ian Lynagh <igloo@earth.li>**20081229191430] 
[Make record selectors into ordinary functions
simonpj@microsoft.com**20090102142851
 
 This biggish patch addresses Trac #2670.  The main effect is to make
 record selectors into ordinary functions, whose unfoldings appear in
 interface files, in contrast to their previous existence as magic
 "implicit Ids".  This means that the usual machinery of optimisation,
 analysis, and inlining applies to them, which was failing before when
 the selector was somewhat complicated.  (Which it can be when
 strictness annotations, unboxing annotations, and GADTs are involved.)
 
 The change involves the following points
 
 * Changes in Var.lhs to the representation of Var.  Now a LocalId can
   have an IdDetails as well as a GlobalId.  In particular, the
   information that an Id is a record selector is kept in the
   IdDetails.  While compiling the current module, the record selector
   *must* be a LocalId, so that it participates properly in compilation
   (free variables etc).
 
   This led me to change the (hidden) representation of Var, so that there
   is now only one constructor for Id, not two.
 
 * The IdDetails is persisted into interface files, so that an
   importing module can see which Ids are records selectors.
 
 * In TcTyClDecls, we generate the record-selector bindings in renamed,
   but not typechecked form.  In this way, we can get the typechecker
   to add all the types and so on, which is jolly helpful especially
   when GADTs or type families are involved.  Just like derived
   instance declarations.
 
   This is the big new chunk of 180 lines of code (much of which is
   commentary).  A call to the same function, mkAuxBinds, is needed in
   TcInstDcls for associated types.
 
 * The typechecker therefore has to pin the correct IdDetails on to 
   the record selector, when it typechecks it.  There was a neat way
   to do this, by adding a new sort of signature to HsBinds.Sig, namely
   IdSig.  This contains an Id (with the correct Name, Type, and IdDetails);
   the type checker uses it as the binder for the final binding.  This
   worked out rather easily.
 
 * Record selectors are no longer "implicit ids", which entails changes to
      IfaceSyn.ifaceDeclSubBndrs
      HscTypes.implicitTyThings
      TidyPgm.getImplicitBinds
   (These three functions must agree.)
 
 * MkId.mkRecordSelectorId is deleted entirely, some 300+ lines (incl
   comments) of very error prone code.  Happy days.
 
 * A TyCon no longer contains the list of record selectors: 
   algTcSelIds is gone
 
 The renamer is unaffected, including the way that import and export of
 record selectors is handled.
 
 Other small things
 
 * IfaceSyn.ifaceDeclSubBndrs had a fragile test for whether a data
   constructor had a wrapper.  I've replaced that with an explicit flag
   in the interface file. More robust I hope.
 
 * I renamed isIdVar to isId, which touched a few otherwise-unrelated files.
 
 
] 
[Fix Trac #2721: reject newtype deriving if the class has associated types
simonpj@microsoft.com**20081231164300] 
[-XImpredicativeTypes implies -XRankNTypes, and improve error msg in TcMType
simonpj@microsoft.com**20081231152517
 
 If you are going for impredicative types you almost certainly want RankN
 too. The change to TcMType improves the error when you say
      T (forall a. blah)
 where T is a type synonym.  This doesn't necessarily need impredicativity,
 if you have LiberalTypeSynonyms.
 
] 
[Fix Trac #2856: make deriving work for type families
simonpj@microsoft.com**20081231144151
 
 Darn, but TcDeriv is complicated, when type families get in on
 the act!  This patch makes GeneralisedNewtypeDeriving work 
 properly for type families.  I think.
 
 In order to do so, I found that GeneralisedNewtypeDeriving can
 work for recursive newtypes too -- and since families are conservatively
 marked recursive, that's a crucial part of the fix, and useful too.
 See Note [Recursive newtypes] in TcDeriv.
 
] 
[White space and spelling in comments
simonpj@microsoft.com**20081231144131] 
[Remove -XImpredicativeTypes from -fglasgow-exts
simonpj@microsoft.com**20081231144006
 
 See Trac #2846: impredicative types are far from stable, so
 -fglasgow-exts should not imply them.  Maybe we should merge
 this into 6.10?
 
] 
[Improve error reporting for 'deriving'
simonpj@microsoft.com**20081231143521
 
 a) Improve the extra suggested fix when there's a "no instance"
    error in a deriving clause.
 
 b) Improve error location recording in tcInstDecl2
 
 Many of the changes in tcInstDecl2 are simple reformatting.
 
 
] 
[Improve error message in deriving (fix Trac #2851)
simonpj@microsoft.com**20081230165906] 
[Avoid nasty name clash with associated data types (fixes Trac #2888)
simonpj@microsoft.com**20081230164432
 
 The main bug was in TcHsType; see Note [Avoid name clashes for 
 associated data types].  However I did a bit of re-factoring while 
 I was abouut it.
 
 I'm still a but unhappy with the use of TyCon.setTyConArgPoss; it'd
 be better to construct the TyCon correctly in the first place.  But
 that means passing an extra parameter to tcTyDecl1... maybe we should
 do this.
 
 
] 
[Refactor RnEnv to fix Trac #2901
simonpj@microsoft.com**20081230150445
 
 This tidy-up fixes Trac #2901, and eliminates 20 lines of code.
 Mainly this is done by making a version of lookupGlobalOccRn that
 returns (Maybe Name); this replaces lookupSrcOccRn but does more.
 
] 
[Add quotes to error message
simonpj@microsoft.com**20081230150402] 
[Tidy up treatment of big lambda (fixes Trac #2898)
simonpj@microsoft.com**20081230145948
 
 There was a leftover big lambda in the CorePrep'd code, which confused
 the bytecode generator.  Actually big lambdas are harmless.  This patch
 refactors ByteCodeGen so that it systemantically used 'bcView' to eliminate
 junk.  I did a little clean up in CorePrep too.
 
 See comments in Trac #2898.
 
] 
[Fix warnings in ByteCodeAsm
Ian Lynagh <igloo@earth.li>**20081229174726] 
[Fix warnings in ByteCodeInstr
Ian Lynagh <igloo@earth.li>**20081229173331] 
[Fix warnings in Rules
Ian Lynagh <igloo@earth.li>**20081229171832] 
[Fix warnings in StgCmmForeign
Ian Lynagh <igloo@earth.li>**20081229165957] 
[Fix warnings in CgCallConv
Ian Lynagh <igloo@earth.li>**20081229165402] 
[Fix warnings in SMRep
Ian Lynagh <igloo@earth.li>**20081229164959] 
[Fix warnings in ClosureInfo
Ian Lynagh <igloo@earth.li>**20081229164618] 
[Fix warnings in CgTicky
Ian Lynagh <igloo@earth.li>**20081229153416] 
[Fix warnings in CgCon
Ian Lynagh <igloo@earth.li>**20081229151733] 
[Fix warnings in WorkWrap
Ian Lynagh <igloo@earth.li>**20081229150406] 
[Fix warnings in NCGMonad
Ian Lynagh <igloo@earth.li>**20081229145627] 
[Fix warnings in CmmInfo
Ian Lynagh <igloo@earth.li>**20081229145307] 
[Fix warnings in CmmCPSGen
Ian Lynagh <igloo@earth.li>**20081229145119] 
[Fix warnings in CmmProcPoint
Ian Lynagh <igloo@earth.li>**20081229144214] 
[Fix warnings in CmmCallConv
Ian Lynagh <igloo@earth.li>**20081229141924] 
[Fix warnings in CmmLive
Ian Lynagh <igloo@earth.li>**20081229141035] 
[Fix warnings in CmmCPS
Ian Lynagh <igloo@earth.li>**20081229133158] 
[Fix warnings in CmmUtils
Ian Lynagh <igloo@earth.li>**20081229132637] 
[Comment out dead function breakProc
Ian Lynagh <igloo@earth.li>**20081229115647] 
[Fix warnings in CmmBrokenBlock
Ian Lynagh <igloo@earth.li>**20081229115527] 
[Comments only.  Haddockify parts of TcRnTypes.
Thomas Schilling <nominolo@googlemail.com>**20081211154657] 
[Comments only.  Fix typo.
Thomas Schilling <nominolo@googlemail.com>**20081211153104] 
[Include PprTyThings in tags file.
Thomas Schilling <nominolo@googlemail.com>**20081211153005] 
[Use DynFlags to work out if we are doing ticky ticky profiling
Ian Lynagh <igloo@earth.li>**20081218161928
 We used to use StaticFlags
] 
[Fix warnings in CgExpr
Ian Lynagh <igloo@earth.li>**20081217201152] 
[Fix warnings in CgBindery
Ian Lynagh <igloo@earth.li>**20081217194607] 
[Fix warnings in CgStackery
Ian Lynagh <igloo@earth.li>**20081217191713] 
[Fix warnings in CgCase
Ian Lynagh <igloo@earth.li>**20081217190848] 
[Remove some dead code from CgCase
Ian Lynagh <igloo@earth.li>**20081217184755] 
[Fix warnings in StgCmmProf
Ian Lynagh <igloo@earth.li>**20081217182236] 
[Fix warnings in CgProf
Ian Lynagh <igloo@earth.li>**20081217181711] 
[Fix warnings in CgInfoTbls
Ian Lynagh <igloo@earth.li>**20081217180144] 
[Remove dead function srtLabelAndLength from CgInfoTbls
Ian Lynagh <igloo@earth.li>**20081217180044] 
[Fix warnings in CgHeapery
Ian Lynagh <igloo@earth.li>**20081217175726] 
[Fix warnings in CgTailCall
Ian Lynagh <igloo@earth.li>**20081217175040] 
[Remove a little dead code from CgTailCall
Ian Lynagh <igloo@earth.li>**20081217174947] 
[Fix warnings in CodeGen
Ian Lynagh <igloo@earth.li>**20081217165904] 
[Fix warnings in StgCmmTicky
Ian Lynagh <igloo@earth.li>**20081217165433] 
[Remove dead code from CgUtils
Ian Lynagh <igloo@earth.li>**20081217163920] 
[Fix warnings in CgPrimOp
Ian Lynagh <igloo@earth.li>**20081217163912] 
[Fix warnings in CgMonad
Ian Lynagh <igloo@earth.li>**20081217163903] 
[Fix warnings in CgClosure
Ian Lynagh <igloo@earth.li>**20081217163850] 
[Fix warnings in CgForeignCall
Ian Lynagh <igloo@earth.li>**20081215222515] 
[Remove some redundant code
Ian Lynagh <igloo@earth.li>**20081215194047
 We were looking at opt_DoTickyProfiling, and if it was set claling ifTicky
 which looks at opt_DoTickyProfiling itself.
] 
[Fix warnings in CgLetNoEscape
Ian Lynagh <igloo@earth.li>**20081215173752] 
[Workaround for #2262, from Barney Stratford
Simon Marlow <marlowsd@gmail.com>**20081216124706
 See http://www.haskell.org/pipermail/glasgow-haskell-users/2008-December/016333.html
] 
[UNDO: Add -fpass-case-bndr-to-join-points
Simon Marlow <marlowsd@gmail.com>**20081216114235
 
 rolling back:
 
 Fri Dec  5 10:51:59 GMT 2008  simonpj@microsoft.com
   * Add -fpass-case-bndr-to-join-points
   
   See Note [Passing the case binder to join points] in Simplify.lhs
   The default now is *not* to pass the case binder.  There are some
   nofib results with the above note; the effect is almost always 
   negligible.
   
   I don't expect this flag to be used by users (hence no docs). It's just
   there to let me try the performance effects of switching on and off.
   
 
     M ./compiler/main/StaticFlagParser.hs +1
     M ./compiler/main/StaticFlags.hs +4
     M ./compiler/simplCore/Simplify.lhs -14 +73
] 
[Rollback INLINE patches
Simon Marlow <marlowsd@gmail.com>**20081216103556
 
 rolling back:
 
 Fri Dec  5 16:54:00 GMT 2008  simonpj@microsoft.com
   * Completely new treatment of INLINE pragmas (big patch)
   
   This is a major patch, which changes the way INLINE pragmas work.
   Although lots of files are touched, the net is only +21 lines of
   code -- and I bet that most of those are comments!
   
   HEADS UP: interface file format has changed, so you'll need to
   recompile everything.
   
   There is not much effect on overall performance for nofib, 
   probably because those programs don't make heavy use of INLINE pragmas.
   
           Program           Size    Allocs   Runtime   Elapsed
               Min         -11.3%     -6.9%     -9.2%     -8.2%
               Max          -0.1%     +4.6%     +7.5%     +8.9%
    Geometric Mean          -2.2%     -0.2%     -1.0%     -0.8%
   
   (The +4.6% for on allocs is cichelli; see other patch relating to
   -fpass-case-bndr-to-join-points.)
   
   The old INLINE system
   ~~~~~~~~~~~~~~~~~~~~~
   The old system worked like this. A function with an INLINE pragam
   got a right-hand side which looked like
        f = __inline_me__ (\xy. e)
   The __inline_me__ part was an InlineNote, and was treated specially
   in various ways.  Notably, the simplifier didn't inline inside an
   __inline_me__ note.  
   
   As a result, the code for f itself was pretty crappy. That matters
   if you say (map f xs), because then you execute the code for f,
   rather than inlining a copy at the call site.
   
   The new story: InlineRules
   ~~~~~~~~~~~~~~~~~~~~~~~~~~
   The new system removes the InlineMe Note altogether.  Instead there
   is a new constructor InlineRule in CoreSyn.Unfolding.  This is a 
   bit like a RULE, in that it remembers the template to be inlined inside
   the InlineRule.  No simplification or inlining is done on an InlineRule,
   just like RULEs.  
   
   An Id can have an InlineRule *or* a CoreUnfolding (since these are two
   constructors from Unfolding). The simplifier treats them differently:
   
     - An InlineRule is has the substitution applied (like RULES) but 
       is otherwise left undisturbed.
   
     - A CoreUnfolding is updated with the new RHS of the definition,
       on each iteration of the simplifier.
   
   An InlineRule fires regardless of size, but *only* when the function
   is applied to enough arguments.  The "arity" of the rule is specified
   (by the programmer) as the number of args on the LHS of the "=".  So
   it makes a difference whether you say
     	{-# INLINE f #-}
   	f x = \y -> e     or     f x y = e
   This is one of the big new features that InlineRule gives us, and it
   is one that Roman really wanted.
   
   In contrast, a CoreUnfolding can fire when it is applied to fewer
   args than than the function has lambdas, provided the result is small
   enough.
   
   
   Consequential stuff
   ~~~~~~~~~~~~~~~~~~~
   * A 'wrapper' no longer has a WrapperInfo in the IdInfo.  Instead,
     the InlineRule has a field identifying wrappers.
   
   * Of course, IfaceSyn and interface serialisation changes appropriately.
   
   * Making implication constraints inline nicely was a bit fiddly. In
     the end I added a var_inline field to HsBInd.VarBind, which is why
     this patch affects the type checker slightly
   
   * I made some changes to the way in which eta expansion happens in
     CorePrep, mainly to ensure that *arguments* that become let-bound
     are also eta-expanded.  I'm still not too happy with the clarity
     and robustness fo the result.
   
   * We now complain if the programmer gives an INLINE pragma for
     a recursive function (prevsiously we just ignored it).  Reason for
     change: we don't want an InlineRule on a LoopBreaker, because then
     we'd have to check for loop-breaker-hood at occurrence sites (which
     isn't currenlty done).  Some tests need changing as a result.
   
   This patch has been in my tree for quite a while, so there are
   probably some other minor changes.
   
 
     M ./compiler/basicTypes/Id.lhs -11
     M ./compiler/basicTypes/IdInfo.lhs -82
     M ./compiler/basicTypes/MkId.lhs -2 +2
     M ./compiler/coreSyn/CoreFVs.lhs -2 +25
     M ./compiler/coreSyn/CoreLint.lhs -5 +1
     M ./compiler/coreSyn/CorePrep.lhs -59 +53
     M ./compiler/coreSyn/CoreSubst.lhs -22 +31
     M ./compiler/coreSyn/CoreSyn.lhs -66 +92
     M ./compiler/coreSyn/CoreUnfold.lhs -112 +112
     M ./compiler/coreSyn/CoreUtils.lhs -185 +184
     M ./compiler/coreSyn/MkExternalCore.lhs -1
     M ./compiler/coreSyn/PprCore.lhs -4 +40
     M ./compiler/deSugar/DsBinds.lhs -70 +118
     M ./compiler/deSugar/DsForeign.lhs -2 +4
     M ./compiler/deSugar/DsMeta.hs -4 +3
     M ./compiler/hsSyn/HsBinds.lhs -3 +3
     M ./compiler/hsSyn/HsUtils.lhs -2 +7
     M ./compiler/iface/BinIface.hs -11 +25
     M ./compiler/iface/IfaceSyn.lhs -13 +21
     M ./compiler/iface/MkIface.lhs -24 +19
     M ./compiler/iface/TcIface.lhs -29 +23
     M ./compiler/main/TidyPgm.lhs -55 +49
     M ./compiler/parser/ParserCore.y -5 +6
     M ./compiler/simplCore/CSE.lhs -2 +1
     M ./compiler/simplCore/FloatIn.lhs -6 +1
     M ./compiler/simplCore/FloatOut.lhs -23
     M ./compiler/simplCore/OccurAnal.lhs -36 +5
     M ./compiler/simplCore/SetLevels.lhs -59 +54
     M ./compiler/simplCore/SimplCore.lhs -48 +52
     M ./compiler/simplCore/SimplEnv.lhs -26 +22
     M ./compiler/simplCore/SimplUtils.lhs -28 +4
     M ./compiler/simplCore/Simplify.lhs -91 +109
     M ./compiler/specialise/Specialise.lhs -15 +18
     M ./compiler/stranal/WorkWrap.lhs -14 +11
     M ./compiler/stranal/WwLib.lhs -2 +2
     M ./compiler/typecheck/Inst.lhs -1 +3
     M ./compiler/typecheck/TcBinds.lhs -17 +27
     M ./compiler/typecheck/TcClassDcl.lhs -1 +2
     M ./compiler/typecheck/TcExpr.lhs -4 +6
     M ./compiler/typecheck/TcForeign.lhs -1 +1
     M ./compiler/typecheck/TcGenDeriv.lhs -14 +13
     M ./compiler/typecheck/TcHsSyn.lhs -3 +2
     M ./compiler/typecheck/TcInstDcls.lhs -5 +4
     M ./compiler/typecheck/TcRnDriver.lhs -2 +11
     M ./compiler/typecheck/TcSimplify.lhs -10 +17
     M ./compiler/vectorise/VectType.hs +7
 
 Mon Dec  8 12:43:10 GMT 2008  simonpj@microsoft.com
   * White space only
 
     M ./compiler/simplCore/Simplify.lhs -2
 
 Mon Dec  8 12:48:40 GMT 2008  simonpj@microsoft.com
   * Move simpleOptExpr from CoreUnfold to CoreSubst
 
     M ./compiler/coreSyn/CoreSubst.lhs -1 +87
     M ./compiler/coreSyn/CoreUnfold.lhs -72 +1
 
 Mon Dec  8 17:30:18 GMT 2008  simonpj@microsoft.com
   * Use CoreSubst.simpleOptExpr in place of the ad-hoc simpleSubst (reduces code too)
 
     M ./compiler/deSugar/DsBinds.lhs -50 +16
 
 Tue Dec  9 17:03:02 GMT 2008  simonpj@microsoft.com
   * Fix Trac #2861: bogus eta expansion
   
   Urghlhl!  I "tided up" the treatment of the "state hack" in CoreUtils, but
   missed an unexpected interaction with the way that a bottoming function
   simply swallows excess arguments.  There's a long
        Note [State hack and bottoming functions]
   to explain (which accounts for most of the new lines of code).
   
 
     M ./compiler/coreSyn/CoreUtils.lhs -16 +53
 
 Mon Dec 15 10:02:21 GMT 2008  Simon Marlow <marlowsd@gmail.com>
   * Revert CorePrep part of "Completely new treatment of INLINE pragmas..."
   
   The original patch said:
   
   * I made some changes to the way in which eta expansion happens in
     CorePrep, mainly to ensure that *arguments* that become let-bound
     are also eta-expanded.  I'm still not too happy with the clarity
     and robustness fo the result.
     
   Unfortunately this change apparently broke some invariants that were
   relied on elsewhere, and in particular lead to panics when compiling
   with profiling on.
   
   Will re-investigate in the new year.
 
     M ./compiler/coreSyn/CorePrep.lhs -53 +58
     M ./configure.ac -1 +1
 
 Mon Dec 15 12:28:51 GMT 2008  Simon Marlow <marlowsd@gmail.com>
   * revert accidental change to configure.ac
 
     M ./configure.ac -1 +1
] 
[revert accidental change to configure.ac
Simon Marlow <marlowsd@gmail.com>**20081215122851] 
[Revert CorePrep part of "Completely new treatment of INLINE pragmas..."
Simon Marlow <marlowsd@gmail.com>**20081215100221
 
 The original patch said:
 
 * I made some changes to the way in which eta expansion happens in
   CorePrep, mainly to ensure that *arguments* that become let-bound
   are also eta-expanded.  I'm still not too happy with the clarity
   and robustness fo the result.
   
 Unfortunately this change apparently broke some invariants that were
 relied on elsewhere, and in particular lead to panics when compiling
 with profiling on.
 
 Will re-investigate in the new year.
] 
[wake up other Capabilities even when there is only one spark (see #2868)
Simon Marlow <marlowsd@gmail.com>**20081210164644] 
[Document new GC options -q1 and -qg<n>
Simon Marlow <marlowsd@gmail.com>**20081210164557] 
[SysTools no longer needs -fno-cse
Ian Lynagh <igloo@earth.li>**20081211182327] 
[Make the lists of files and directories to be cleaned-up non-global
Ian Lynagh <igloo@earth.li>**20081211180739
 They still need to be stored in IORefs, as the exception handler needs
 to know what they all are.
] 
[The default cleanup handler should /always/ delete the temp files
Ian Lynagh <igloo@earth.li>**20081211170006
 Not only if there has been an exception. It worked for GHC anyway,
 as it was getting an ExitSuccess exception, but GHC API clients
 shouldn't be required to do that.
] 
[Fix user guide typesetting
Ian Lynagh <igloo@earth.li>**20081210165434] 
[FIX #1364: added support for C finalizers that run as soon as the value is not longer reachable.
Simon Marlow <marlowsd@gmail.com>**20081210150425
   
 Patch originally by Ivan Tomac <tomac@pacific.net.au>, amended by
 Simon Marlow:
 
   - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv#
   - GC parameters to ALLOC_PRIM fixed
] 
[On FreeBSD, try MAP_FIXED if ordinary mmap() fails to give us suitable memory
Simon Marlow <marlowsd@gmail.com>**20081210115751
 This appears to be necessary on FreeBSD.  It might be necessary on
 other OSs too, but I'm being cautious because using MAP_FIXED can lead
 to crashes by overwriting existing mappings, and we have no (easy) way
 to prevent that.
] 
[Document hs_init() infelicity (#2863)
Simon Marlow <marlowsd@gmail.com>**20081209164322] 
[Improve documentation for data family instances (cf Trac #1968)
simonpj@microsoft.com**20081210054432
 
 The HEAD allows GADT syntax for data/newtype family instances. 
 (GHC 6.10 does not seem to.)
 
] 
[Make some profiling flags dynamic
Ian Lynagh <igloo@earth.li>**20081209230157
 In particular:
     -fauto-sccs-on-all-toplevs          -auto-all   -no-auto-all
     -fauto-sccs-on-exported-toplevs     -auto       -no-auto
     -fauto-sccs-on-individual-cafs      -caf-all    -no-caf-all
] 
[Fix warnings in StgCmmGran
Ian Lynagh <igloo@earth.li>**20081209222413] 
[Add OPTIONS_CATCH,DERIVE,YHC to those that GHC knows about; trac #2847
Ian Lynagh <igloo@earth.li>**20081209191724] 
[Fix warnings in CgHpc
Ian Lynagh <igloo@earth.li>**20081209191713] 
[Parse pragma names better; trac #2847
Ian Lynagh <igloo@earth.li>**20081209190318
 We require that pragma names are not followed by pragma character,
 defined as
     isAlphaNum c || c == '_'
] 
[Fix warnings in CgParallel
Ian Lynagh <igloo@earth.li>**20081209184402] 
[Fix warnings in StgCmmHpc
Ian Lynagh <igloo@earth.li>**20081209184004] 
[Remove an unnecessary -w flag
Ian Lynagh <igloo@earth.li>**20081209183812] 
[Fix Trac #2861: bogus eta expansion
simonpj@microsoft.com**20081209170302
 
 Urghlhl!  I "tided up" the treatment of the "state hack" in CoreUtils, but
 missed an unexpected interaction with the way that a bottoming function
 simply swallows excess arguments.  There's a long
      Note [State hack and bottoming functions]
 to explain (which accounts for most of the new lines of code).
 
] 
[Fix #2592: do an orderly shutdown when the heap is exhausted
Simon Marlow <marlowsd@gmail.com>**20081209105919
 Really we should be raising an exception in this case, but that's
 tricky (see comments).  At least now we shut down the runtime
 correctly rather than just exiting.
] 
[Fix #2848: avoid overflow during time calculation
Simon Marlow <marlowsd@gmail.com>**20081209105600] 
[Fix #2838: we should narrow a CmmInt before converting to ImmInteger
Simon Marlow <marlowsd@gmail.com>**20081209105515] 
[fix an assertion failure in prof/threaded/debug mode
Simon Marlow <marlowsd@gmail.com>**20081204101201] 
[Inject implicit bindings after CoreTidy, not before Simplify
simonpj@microsoft.com**20081208173525
 
 Originally I inject the "implicit bindings" (record selectors, class
 method selectors, data con wrappers...) after CoreTidy.  However, in a
 misguided attempt to fix Trac #2070, I moved the injection point to
 before the Simplifier, so that record selectors would be optimised by
 the simplifier.
 
 This was misguided because record selectors (indeed all implicit bindings)
 are GlobalIds, whose IdInfo is meant to be frozen.  But the Simplifier,
 and other Core-to-Core optimisations, merrily change the IdInfo.  That 
 ultimately made Trac #2844 happen, where a record selector got arity 2,
 but the GlobalId (which importing scopes re-construct from the class decl
 rather than reading from the interface file) has arity 1.
 
 So this patch moves the injection back to CoreTidy. Happily #2070 should
 still be OK because we now use CoreSubst.simpleOptExpr on the unfoldings
 for implict things, which gets rid of the most gratuitous infelicities.
 
 Still, there's a strong case for stoppping record selectors from being
 GlobalIds, and treating them much more like dict-funs.  I'm thinking
 about that.  Meanwhile, #2844 is ok now.
 
] 
[Add assertion for arity match (checks Trac #2844)
simonpj@microsoft.com**20081208173241
 
 The exported arity of a function must match the arity for the
 STG function.  Trac #2844 was a pretty obscure manifestation of
 the failure of this invariant. This patch doesn't cure the bug;
 rather it adds an assertion to CoreToStg to check the invariant
 so we should get an earlier and less obscure warning if this
 fails in future.
 
] 
[Use CoreSubst.simpleOptExpr in place of the ad-hoc simpleSubst (reduces code too)
simonpj@microsoft.com**20081208173018] 
[Move simpleOptExpr from CoreUnfold to CoreSubst
simonpj@microsoft.com**20081208124840] 
[White space only
simonpj@microsoft.com**20081208124310] 
[Comments only
simonpj@microsoft.com**20081208124155] 
[Completely new treatment of INLINE pragmas (big patch)
simonpj@microsoft.com**20081205165400
 
 This is a major patch, which changes the way INLINE pragmas work.
 Although lots of files are touched, the net is only +21 lines of
 code -- and I bet that most of those are comments!
 
 HEADS UP: interface file format has changed, so you'll need to
 recompile everything.
 
 There is not much effect on overall performance for nofib, 
 probably because those programs don't make heavy use of INLINE pragmas.
 
         Program           Size    Allocs   Runtime   Elapsed
             Min         -11.3%     -6.9%     -9.2%     -8.2%
             Max          -0.1%     +4.6%     +7.5%     +8.9%
  Geometric Mean          -2.2%     -0.2%     -1.0%     -0.8%
 
 (The +4.6% for on allocs is cichelli; see other patch relating to
 -fpass-case-bndr-to-join-points.)
 
 The old INLINE system
 ~~~~~~~~~~~~~~~~~~~~~
 The old system worked like this. A function with an INLINE pragam
 got a right-hand side which looked like
      f = __inline_me__ (\xy. e)
 The __inline_me__ part was an InlineNote, and was treated specially
 in various ways.  Notably, the simplifier didn't inline inside an
 __inline_me__ note.  
 
 As a result, the code for f itself was pretty crappy. That matters
 if you say (map f xs), because then you execute the code for f,
 rather than inlining a copy at the call site.
 
 The new story: InlineRules
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 The new system removes the InlineMe Note altogether.  Instead there
 is a new constructor InlineRule in CoreSyn.Unfolding.  This is a 
 bit like a RULE, in that it remembers the template to be inlined inside
 the InlineRule.  No simplification or inlining is done on an InlineRule,
 just like RULEs.  
 
 An Id can have an InlineRule *or* a CoreUnfolding (since these are two
 constructors from Unfolding). The simplifier treats them differently:
 
   - An InlineRule is has the substitution applied (like RULES) but 
     is otherwise left undisturbed.
 
   - A CoreUnfolding is updated with the new RHS of the definition,
     on each iteration of the simplifier.
 
 An InlineRule fires regardless of size, but *only* when the function
 is applied to enough arguments.  The "arity" of the rule is specified
 (by the programmer) as the number of args on the LHS of the "=".  So
 it makes a difference whether you say
   	{-# INLINE f #-}
 	f x = \y -> e     or     f x y = e
 This is one of the big new features that InlineRule gives us, and it
 is one that Roman really wanted.
 
 In contrast, a CoreUnfolding can fire when it is applied to fewer
 args than than the function has lambdas, provided the result is small
 enough.
 
 
 Consequential stuff
 ~~~~~~~~~~~~~~~~~~~
 * A 'wrapper' no longer has a WrapperInfo in the IdInfo.  Instead,
   the InlineRule has a field identifying wrappers.
 
 * Of course, IfaceSyn and interface serialisation changes appropriately.
 
 * Making implication constraints inline nicely was a bit fiddly. In
   the end I added a var_inline field to HsBInd.VarBind, which is why
   this patch affects the type checker slightly
 
 * I made some changes to the way in which eta expansion happens in
   CorePrep, mainly to ensure that *arguments* that become let-bound
   are also eta-expanded.  I'm still not too happy with the clarity
   and robustness fo the result.
 
 * We now complain if the programmer gives an INLINE pragma for
   a recursive function (prevsiously we just ignored it).  Reason for
   change: we don't want an InlineRule on a LoopBreaker, because then
   we'd have to check for loop-breaker-hood at occurrence sites (which
   isn't currenlty done).  Some tests need changing as a result.
 
 This patch has been in my tree for quite a while, so there are
 probably some other minor changes.
 
] 
[Add -fpass-case-bndr-to-join-points
simonpj@microsoft.com**20081205105159
 
 See Note [Passing the case binder to join points] in Simplify.lhs
 The default now is *not* to pass the case binder.  There are some
 nofib results with the above note; the effect is almost always 
 negligible.
 
 I don't expect this flag to be used by users (hence no docs). It's just
 there to let me try the performance effects of switching on and off.
 
] 
[Add static flag -fsimple-list-literals
simonpj@microsoft.com**20081205105002
 
 The new static flag -fsimple-list-literals makes ExplicitList literals
 be desugared in the straightforward way, rather than using 'build' as
 now.  See SLPJ comments with Note [Desugaring explicit lists].
 
 I don't expect this flag to be used by users (hence no docs). It's just
 there to let me try the performance effects of switching on and off.
 
] 
[Comments only in OccurAnal
simonpj@microsoft.com**20081205103252] 
[Comments only
simonpj@microsoft.com**20081205102437] 
[Layout only
simonpj@microsoft.com**20081205102252] 
[Comments only (Note [Entering error thunks])
simonpj@microsoft.com**20081205102149] 
[Make CoreToStg a little more robust to eta expansion
simonpj@microsoft.com**20081205101932] 
[Add no-op case for addIdSpecialisations (very minor optimisation)
simonpj@microsoft.com**20081205101022] 
[Trim redundant import
simonpj@microsoft.com**20081205101006] 
[Make CoreTidy retain deadness info (better -ddump-simpl)
simonpj@microsoft.com**20081205100518
 
 GHC now retains more robust information about dead variables; but
 CoreTidy was throwing it away.  This patch makes CoreTidy retain it,
 which gives better output for -ddump-simpl.
 
 New opportunity: shrink interface files by using wildcards for dead variables.
 
 
] 
[Remove INLINE pragmas on recursive functions
simonpj@microsoft.com**20081205100353
 
 INLINE pragmas on recursive functions are ignored; and this
 is checked in my upcoming patch for inlinings.
 
] 
[Comments only (on Activation)
simonpj@microsoft.com**20081205100139] 
[We need to tell cabal-bin which version of Cabal to use
Ian Lynagh <igloo@earth.li>**20081203123208
 Otherwise, if the bootstrapping compiler has a newer version, we get
 a mismatch between the version used to compile ghc-prim's Setup.hs and
 the version that installPackage uses.
] 
[Document 'loadModule'.
Thomas Schilling <nominolo@googlemail.com>**20081202154800] 
[Add 'needsTemplateHaskell' utility function and document why one might
Thomas Schilling <nominolo@googlemail.com>**20081202152358
 want to use it.
] 
[Documentation only.
Thomas Schilling <nominolo@googlemail.com>**20081202150158] 
[Export 'succeeded' and 'failed' helper functions.
Thomas Schilling <nominolo@googlemail.com>**20081202144451] 
[Put full ImportDecls in ModSummary instead of just ModuleNames
Simon Marlow <marlowsd@gmail.com>**20081202133736
 ... and use it to make ghc -M generate correct cross-package
 dependencies when using package-qualified imports (needed for the new
 build system).  Since we're already parsing the ImportDecl from the
 source file, there seems no good reason not to keep it in the
 ModSummary, it might be useful for other things too.
] 
[ghc -M: need to add a dep on Prelude unless -fno-implicit-prelude is on
Simon Marlow <marlowsd@gmail.com>**20081128165707] 
[make -include-pkg-deps work (not sure when this got lost)
Simon Marlow <marlowsd@gmail.com>**20081128135746] 
[Fix more problems caused by padding in the Capability structure
Simon Marlow <marlowsd@gmail.com>**20081202120735
 Fixes crashes on Windows and Sparc
] 
[add missing case to Ord GlobalReg (EagerBlackhole == EagerBlackhole)
Simon Marlow <marlowsd@gmail.com>**20081128130106] 
[Better error message for fundep conflict
simonpj@microsoft.com**20081201162845] 
[Fix typo in quasi-quote documentation's sample.
shelarcy <shelarcy@gmail.com>**20081129024344] 
[Remove the v_Split_info global variable and use a field of dflags instead
Ian Lynagh <igloo@earth.li>**20081130152403] 
[Document the --machine-readable RTS flag
Ian Lynagh <igloo@earth.li>**20081130152311] 
[Let 'loadModule' generate proper code depending on the 'hscTarget'.
Thomas Schilling <nominolo@googlemail.com>**20081128164412
 
 With this change it should be possible to perform something similar to
 'load' by traversing the module graph in dependency order and calling
 '{parse,typecheck,load}Module' on each.  Of course, if you want smart
 recompilation checking you should still use 'load'.
] 
[Expose a separate 'hscBackend' phase for 'HsCompiler' and change
Thomas Schilling <nominolo@googlemail.com>**20081128163746
 parameter to 'InteractiveStatus' to a 'Maybe'.
] 
[Whoops, *don't* reset the complete session in 'withLocalCallbacks'.
Thomas Schilling <nominolo@googlemail.com>**20081128150727] 
[Use a record instead of a typeclass for 'HsCompiler'.  This is mostly
Thomas Schilling <nominolo@googlemail.com>**20081128121947
 equivalent to a typeclass implementation that uses a functional
 dependency from the target mode to the result type.
] 
[Remove dead code
Ian Lynagh <igloo@earth.li>**20081128193831] 
[Update docs not to talk about deprecated -optdep-* flags; fixes trac #2773
Ian Lynagh <igloo@earth.li>**20081128193633] 
[Use relative URLs in the GHC API haddock docs; fixes #2755
Ian Lynagh <igloo@earth.li>**20081128184511] 
[Teach runghc about --help; fixes trac #2757
Ian Lynagh <igloo@earth.li>**20081128191706] 
[Use a per-session data structure for callbacks.  Make 'WarnErrLogger'
Thomas Schilling <nominolo@googlemail.com>**20081128103628
 part of it.
 
 Part of the GHC API essentially represents a compilation framework.
 The difference of a *framework* as opposed to a *library* is that the
 overall structure of the functionality is pre-defined but certain
 details can be customised via callbacks.  (Also known as the Hollywood
 Principle: "Don't call us, we'll call you.")
 
 This patch introduces a per-session data structure that contains all
 the callbacks instead of adding lots of small function arguments
 whenever we want to give the user more control over certain parts of
 the API.  This should also help with future changes: Adding a new
 callback doesn't break old code since code that doesn't know about the
 new callback will use the (hopefully sane) default implementation.
 
 Overall, however, we should try and keep the number of callbacks small
 and well-defined (and provide useful defaults) and use simple library
 routines for the rest.
] 
[Improve error message for #2739 (but no fix).
Thomas Schilling <nominolo@googlemail.com>**20081127135725
 
 This patch changes 'loadModule' to define a fake linkable.  The
 previous implementation of providing no linkable at all violated a
 pre-condition in the ByteCode linker.  This doesn't fix #2739, but it
 improves the error message a bit.
] 
[Remove the packing I added recently to the Capability structure
Simon Marlow <marlowsd@gmail.com>**20081128105046
 The problem is that the packing caused some unaligned loads, which
 lead to bus errors on Sparc (and reduced performance elsewhere,
 presumably).
] 
[don't emit CmmComments for now
Simon Marlow <marlowsd@gmail.com>**20081127090145
   - if the string contains */, we need to fix it (demonstrated by 
     building Cabal with -fvia-C)
   - the strings can get quite large, so we probably only want to
     inject comments when some debugging option is on.
] 
[Collect instead of print warnings in 'warnUnnecessarySourceImports'.
Thomas Schilling <nominolo@googlemail.com>**20081127102534] 
[Force recompilation of BCOs when they were compiled in HscNothing mode.
Thomas Schilling <nominolo@googlemail.com>**20081126183402
 
 Previously, loading a set of modules in HscNothing mode and then
 switching to HscInterpreted could lead to crashes since modules
 compiled with HscNothing were thought to be valid bytecode objects.
 
 This patch forces recompilation in these cases, hence switching between
 HscNothing and HscInterpreted should be safe now.
] 
[Documentation only: Add module description for HscMain.
Thomas Schilling <nominolo@googlemail.com>**20081126134344] 
[Include GHCi files in ctags/etags.
Thomas Schilling <nominolo@googlemail.com>**20081126122801] 
[drop some debugging traces and use only one flag for new codegen
dias@eecs.harvard.edu**20081126180808] 
[one more missing patch from new codegen path
dias@eecs.harvard.edu**20081126165742] 
[Fix Trac #2817 (TH syntax -> HsSyn conversion)
simonpj@microsoft.com**20081126154022] 
[Fix Trac #2756: CorePrep strictness bug
simonpj@microsoft.com**20081126143448] 
[Format output for :t more nicely
simonpj@microsoft.com**20081126134814] 
[Fix Trac #2766: printing operator type variables
simonpj@microsoft.com**20081126132202] 
[Fix build following codegen patch
simonpj@microsoft.com**20081126125526] 
[Removed warnings, made Haddock happy, added examples in documentation
dias@eecs.harvard.edu**20081017170707
 The interesting examples talk about our story with heap checks in
 case alternatives and our story with the case scrutinee as a Boolean.
] 
[Fixed linear regalloc bug, dropped some tracing code
dias@eecs.harvard.edu**20081016104218
 o The linear-scan register allocator sometimes allocated a block
   before allocating one of its predecessors, which could lead
   to inconsistent allocations. Now, we allocate a block only
   if a predecessor has set the "incoming" assignments for the block
   (or if it's the procedure's entry block).
 o Also commented out some tracing code on the new codegen path.
] 
[Keep update frames live even in functions that never return
dias@eecs.harvard.edu**20081014165437
 An unusual case, but without it:
 (a) we had an assertion failure
 (b) we can overwrite the caller's infotable, which might cause
     the garbage collector to collect live data.
 Better to keep the update frame live at all call sites,
 not just at returns.
] 
[Removed space and time inefficiency in procpoint splitting
dias@eecs.harvard.edu**20081014160354
 I was adding extra jumps to every procpoint, even when the split-off graph
 referred to only some of the procpoints. No effect on correctness,
 but a big effect on space/time efficiency when there are lots of procpoints...
] 
[Clarify the SRT building process
dias@eecs.harvard.edu**20081014140202
 Before: building a closure that would build an SRT given the top-level
 SRT. It was somewhat difficult to understand the control flow, and it
 may have had held onto some data structures long after they should be dead.
 Now, I just bundle the info we need about CAFs along with the procedure
 and directly call a new top-level function to build the SRTs later.
] 
[Don't adjust hp up when the case scrutinee won't allocate
dias@eecs.harvard.edu**20081014112618
 
 If the case scrutinee can't allocate, we don't need to do a heap
 check in the case alternatives. (A previous patch got that right.)
 In that case, we had better not adjust the heap pointer to recover
 unused stack space before evaluating the scrutinee -- because we
 aren't going to reallocate for the case alternative.
] 
[Floating infotables were reversed in C back end
dias@eecs.harvard.edu**20081013152718] 
[forgot a few files
dias@eecs.harvard.edu**20081013134251] 
[Big collection of patches for the new codegen branch.
dias@eecs.harvard.edu**20081013132556
 o Fixed bug that emitted the copy-in code for closure entry
   in the wrong place -- at the initialization of the closure.
 o Refactored some of the closure entry code.
 o Added code to check that no LocalRegs are live-in to a procedure
    -- trip up some buggy programs earlier
 o Fixed environment bindings for thunks
    -- we weren't (re)binding the free variables in a thunk
 o Fixed a bug in proc-point splitting that dropped some updates
   to the entry block in a procedure.
 o Fixed improper calls to code that generates CmmLit's for strings
 o New invariant on cg_loc in CgIdInfo: the expression is always tagged
 o Code to load free vars on entry to a thunk was (wrongly) placed before
   the heap check.
 o Some of the StgCmm code was redundantly passing around Id's
   along with CgIdInfo's; no more.
 o Initialize the LocalReg's that point to a closure before allocating and
   initializing the closure itself -- otherwise, we have problems with
   recursive closure bindings
 o BlockEnv and BlockSet types are now abstract.
 o Update frames:
   - push arguments in Old call area
   - keep track of the return sp in the FCode monad
   - keep the return sp in every call, tail call, and return
       (because it might be different at different call sites,
        e.g. tail calls to the gc after a heap check are performed
             before pushing the update frame)
   - set the sp appropriately on returns and tail calls
 o Reduce call, tail call, and return to a single LastCall node
 o Added slow entry code, using different calling conventions on entry and tail call
 o More fixes to the calling convention code.
   The tricky stuff is all about the closure environment: it must be passed in R1,
   but in non-closures, there is no such argument, so we can't treat all arguments
   the same way: the closure environment is special. Maybe the right step forward
   would be to define a different calling convention for closure arguments.
 o Let-no-escapes need to be emitted out-of-line -- otherwise, we drop code.
 o Respect RTS requirement of word alignment for pointers
   My stack allocation can pack sub-word values into a single word on the stack,
   but it wasn't requiring word-alignment for pointers. It does now,
   by word-aligning both pointer registers and call areas.
 o CmmLint was over-aggresively ruling out non-word-aligned memory references,
   which may be kosher now that we can spill small values into a single word.
 o Wrong label order on a conditional branch when compiling switches.
 o void args weren't dropped in many cases.
   To help prevent this kind of mistake, I defined a NonVoid wrapper,
   which I'm applying only to Id's for now, although there are probably
   other good candidates.
 o A little code refactoring: separate modules for procpoint analysis splitting, 
   stack layout, and building infotables.
 o Stack limit check: insert along with the heap limit check, using a symbolic
   constant (a special CmmLit), then replace it when the stack layout is known.
 o Removed last node: MidAddToContext 
 o Adding block id as a literal: means that the lowering of the calling conventions
   no longer has to produce labels early, which was inhibiting common-block elimination.
   Will also make it easier for the non-procpoint-splitting path.
 o Info tables: don't try to describe the update frame!
 o Over aggressive use of NonVoid!!!!
   Don't drop the non-void args before setting the type of the closure!!!
 o Sanity checking:
   Added a pass to stub dead dead slots on the stack
   (only ~10 lines with the dataflow framework)
 o More sanity checking:
   Check that incoming pointer arguments are non-stubbed.
   Note: these checks are still subject to dead-code removal, but they should
   still be quite helpful.
 o Better sanity checking: why stop at function arguments?
   Instead, in mkAssign, check that _any_ assignment to a pointer type is non-null
   -- the sooner the crash, the easier it is to debug.
   Still need to add the debugging flag to turn these checks on explicitly.
 o Fixed yet another calling convention bug.
   This time, the calls to the GC were wrong. I've added a new convention
   for GC calls and invoked it where appropriate.
   We should really straighten out the calling convention stuff:
     some of the code (and documentation) is spread across the compiler,
     and there's some magical use of the node register that should really
     be handled (not avoided) by calling conventions.
 o Switch bug: the arms in mkCmmLitSwitch weren't returning to a single join point.
 o Environment shadowing problem in Stg->Cmm:
   When a closure f is bound at the top-level, we should not bind f to the
   node register on entry to the closure.
   Why? Because if the body of f contains a let-bound closure g that refers
   to f, we want to make sure that it refers to the static closure for f.
   Normally, this would all be fine, because when we compile a closure,
   we rebind free variables in the environment. But f doesn't look like
   a free variable because it's a static value. So, the binding for f
   remains in the environment when we compile g, inconveniently referring
   to the wrong thing.
   Now, I bind the variable in the local environment only if the closure is not
   bound at the top level. It's still okay to make assumptions about the
   node holding the closure environment; we just won't find the binding
   in the environment, so code that names the closure will now directly
   get the label of the static closure, not the node register holding a
   pointer to the static closure.
 o Don't generate bogus Cmm code containing SRTs during the STG -> Cmm pass!
   The tables made reference to some labels that don't exist when we compute and
   generate the tables in the back end.
 o Safe foreign calls need some special treatment (at least until we have the integrated
   codegen). In particular:
   o they need info tables
   o they are not procpoints -- the successor had better be in the same procedure
   o we cannot (yet) implement the calling conventions early, which means we have
     to carry the calling-conv info all the way to the end
 o We weren't following the old convention when registering a module.
   Now, we use update frames to push any new modules that have to be registered
   and enter the youngest one on the stack.
   We also use the update frame machinery to specify that the return should pop
   the return address off the stack.
 o At each safe foreign call, an infotable must be at the bottom of the stack,
   and the TSO->sp must point to it.
 o More problems with void args in a direct call to a function:
   We were checking the args (minus voids) to check whether the call was saturated,
   which caused problems when the function really wasn't saturated because it
   took an extra void argument.
 o Forgot to distinguish integer != from floating != during Stg->Cmm
 o Updating slotEnv and areaMap to include safe foreign calls
   The dataflow analyses that produce the slotEnv and areaMap give
   results for each basic block, but we also need the results for
   a safe foreign call, which is a middle node.
   After running the dataflow analysis, we have another pass that
   updates the results to includ any safe foreign calls.
 o Added a static flag for the debugging technique that inserts
   instructions to stub dead slots on the stack and crashes when
   a stubbed value is loaded into a pointer-typed LocalReg.
 o C back end expects to see return continuations before their call sites.
   Sorted the flowgraphs appropriately after splitting.
 o PrimOp calling conventions are special -- unlimited registers, no stack
   Yet another calling convention...
 o More void value problems: if the RHS of a case arm is a void-typed variable,
   don't try to return it.
 o When calling some primOp, they may allocate memory; if so, we need to
   do a heap check when we return from the call.
 
] 
[Merging in the new codegen branch
dias@eecs.harvard.edu**20080814124027
 This merge does not turn on the new codegen (which only compiles
 a select few programs at this point),
 but it does introduce some changes to the old code generator.
 
 The high bits:
 1. The Rep Swamp patch is finally here.
    The highlight is that the representation of types at the
    machine level has changed.
    Consequently, this patch contains updates across several back ends.
 2. The new Stg -> Cmm path is here, although it appears to have a
    fair number of bugs lurking.
 3. Many improvements along the CmmCPSZ path, including:
    o stack layout
    o some code for infotables, half of which is right and half wrong
    o proc-point splitting
] 
[Major clean-up of HscMain.
Thomas Schilling <nominolo@googlemail.com>**20081125153201
 
 This patch entails a major restructuring of HscMain and a small bugfix
 to MkIface (which required the restructuring in HscMain).
 
 In MkIface:
 
   - mkIface* no longer outputs orphan warnings directly and also no
     longer quits GHC when -Werror is set.  Instead, errors are
     reported using the common IO (Messages, Maybe result) scheme.
 
 In HscMain:
 
   - Get rid of the 'Comp' monad.  This monad was mostly GhcMonad + two
     reader arguments, a ModSummary for the currently compiled module
     and a possible old interface.  The latter actually lead to a small
     space-leak since only its hash was needed (to check whether the
     newly-generated interface file was the same as the original one).
 
     Functions originally of type 'Comp' now only take the arguments
     that they actually need.  This leads to slighly longer argument
     lists in some places, however, it is now much easier to see what
     is actually going on.
 
   - Get rid of 'myParseModule'.  Rename 'parseFile' to 'hscParse'.
 
   - Join 'deSugarModule' and 'hscDesugar' (keeping the latter).
 
   - Rename 'typecheck{Rename}Module{'}' to 'hscTypecheck{Rename}'.
     One variant keeps the renamed syntax, the other doesn't.
 
   - Parameterise 'HscStatus', so that 'InteractiveStatus' is just a
     different parameterisation of 'HscStatus'.
 
   - 'hscCompile{OneShot,Batch,Nothing,Interactive}' are now
     implemented using a (local) typeclass called 'HsCompiler'.  The
     idea is to make the common structure more obvious.  Using this
     typeclass we now have two functions 'genericHscCompile' (original
     'hscCompiler') and 'genericHscRecompile' (original 'genComp')
     describing the default pipeline.  The methods of the typeclass
     describe a sort of "hook" interface (in OO-terms this would be
     called the "template method" pattern).
 
     One problem with this approach is that we parameterise over the
     /result/ type which, in fact, is not actually different for
     "nothing" and "batch" mode.  To avoid functional dependencies or
     associated types, we use type tags to make them artificially
     different and parameterise the type class over the result type.
     A perhaps better approach might be to use records instead.
     
   - Drop some redundant 'HscEnv' arguments.  These were likely
     different from what 'getSession' would return because during
     compilation we temporarily set the module's DynFlags as well as a
     few other fields.  We now use the 'withTempSession' combinator to
     temporarily change the 'HscEnv' and automatically restore the
     original session after the enclosed action has returned (even in
     case of exceptions).
 
   - Rename 'hscCompile' to 'hscGenHardCode' (since that is what it
     does).
 
 Calls in 'GHC' and 'DriverPipeline' accordingly needed small
 adaptions.
] 
[Fix Trac #2799: TcType.isOverloadedTy
simonpj@microsoft.com**20081125110540
 
 A missing case (for equality predicates) in isOverloadedTy make
 bindInstsOfLocalFuns/Pats do the wrong thing.  Core Lint nailed it.
 
 Merge to 6.10 branch.
 
] 
[Fix #2740: we were missing the free variables on some expressions
Simon Marlow <marlowsd@gmail.com>**20081125103113
 Particularly boolean expresions: the conditional of an 'if', and
 guards, were missing their free variables.
] 
[Fix symbol macro names in Linker.c
Thorkil Naur <naur@post11.tele.dk>**20081121160149] 
[Add a --machine-readable RTS flag
Ian Lynagh <igloo@earth.li>**20081123152127
 Currently it only affects the -t flag output
] 
[Return errors instead of dying in myParseModule.
Thomas Schilling <nominolo@googlemail.com>**20081122154151] 
[Comments/Haddockification only.
Thomas Schilling <nominolo@googlemail.com>**20081122143018] 
[Report source span instead of just source location for unused names.
Thomas Schilling <nominolo@googlemail.com>**20081122142641] 
[Change 'handleFlagWarnings' to throw exceptions instead of dying.
Thomas Schilling <nominolo@googlemail.com>**20081122130658
 
 It now uses the standard warning log and error reporting mechanism.
] 
[Document exported functions in main/HeaderInfo.
Thomas Schilling <nominolo@googlemail.com>**20081121145307] 
[Remove warning supression klugde in main/HeaderInfo
Thomas Schilling <nominolo@googlemail.com>**20081121144155] 
[Use mutator threads to do GC, instead of having a separate pool of GC threads
Simon Marlow <marlowsd@gmail.com>**20081121151233
 
 Previously, the GC had its own pool of threads to use as workers when
 doing parallel GC.  There was a "leader", which was the mutator thread
 that initiated the GC, and the other threads were taken from the pool.
 
 This was simple and worked fine for sequential programs, where we did
 most of the benchmarking for the parallel GC, but falls down for
 parallel programs.  When we have N mutator threads and N cores, at GC
 time we would have to stop N-1 mutator threads and start up N-1 GC
 threads, and hope that the OS schedules them all onto separate cores.
 It practice it doesn't, as you might expect.
 
 Now we use the mutator threads to do GC.  This works quite nicely,
 particularly for parallel programs, where each mutator thread scans
 its own spark pool, which is probably in its cache anyway.
 
 There are some flag changes:
 
   -g<n> is removed (-g1 is still accepted for backwards compat).
   There's no way to have a different number of GC threads than mutator
   threads now.
 
   -q1       Use one OS thread for GC (turns off parallel GC)
   -qg<n>    Use parallel GC for generations >= <n> (default: 1)
 
 Using parallel GC only for generations >=1 works well for sequential
 programs.  Compiling an ordinary sequential program with -threaded and
 running it with -N2 or more should help if you do a lot of GC.  I've
 found that adding -qg0 (do parallel GC for generation 0 too) speeds up
 some parallel programs, but slows down some sequential programs.
 Being conservative, I left the threshold at 1.
 
 ToDo: document the new options.
 
] 
[we shouldn't update topBound in discardSparks()
Simon Marlow <marlowsd@gmail.com>**20081121113539] 
[Throw SourceErrors instead of ProgramErrors in main/HeaderInfo.
Thomas Schilling <nominolo@googlemail.com>**20081121141339
 
 Parse errors during dependency analysis or options parsing really
 shouldn't kill GHC; this is particularly annoying for GHC API clients.
] 
[fix the build when !USE_MMAP
Simon Marlow <marlowsd@gmail.com>**20081121085418] 
[round the size up to a page in mmapForLinker() instead of in the caller
Simon Marlow <marlowsd@gmail.com>**20081120154014] 
[Fix a race in the deadlock-detection code
Simon Marlow <marlowsd@gmail.com>**20081120112438
 After a deadlock it was possible for the timer signal to remain off,
 which meant that the next deadlock would not be detected, and the
 system would hang.  Spotted by conc047(threaded2).
] 
[error message wibble
Simon Marlow <marlowsd@gmail.com>**20081120084901] 
[Fix flag name -XDisambiguateRecordFields
simonpj@microsoft.com**20081120123205] 
[Fix regTableToCapability() if gcc introduces padding
Simon Marlow <marlowsd@gmail.com>**20081119162910
 Also avoid padding if possible using __attribute__((packed))
 Fixes the Windows build
] 
[Fix 32-bit breakage
Simon Marlow <marlowsd@gmail.com>**20081119145429] 
[Small refactoring, and add comments
Simon Marlow <marlowsd@gmail.com>**20081119143702
 I discovered a new invariant while experimenting (blackholing is not
 optional when using parallel GC), so documented it.
] 
[Fix some unsigned comparisions that should be signed
Simon Marlow <marlowsd@gmail.com>**20081119143205
 Fixes crashes when using reclaimSpark() (not used currently, but may
 be in the future).
] 
[Remove incorrect assertions in steal()
Simon Marlow <marlowsd@gmail.com>**20081119143043] 
[don't run sparks if there are other threads on this Capability
Simon Marlow <marlowsd@gmail.com>**20081114121022] 
[Fix typo (HAVE_LIBGMP => HAVE_LIB_GMP); omit local gmp includes if HAVE_LIB_GMP
Simon Marlow <marlowsd@gmail.com>**20081119131056
 If we're using the system's installed GMP, we don't want to be picking
 up the local gmp.h header file.
 
 Fixes 2469(ghci) for me, because it turns out the system's GMP is more
 up-to-date than GHC's version and has a fix for more recent versions
 of gcc.  We also need to pull in a more recent GMP, but that's a
 separte issue.
] 
[Fix some more shutdown races
Simon Marlow <marlowsd@gmail.com>**20081119124848
 There were races between workerTaskStop() and freeTaskManager(): we
 need to be sure that all Tasks have exited properly before we start
 tearing things down.  This isn't completely straighforward, see
 comments for details.
] 
[Add help messages about --with-editline-(includes,libraries) to the ghc configure script.
Judah Jacobson <judah.jacobson@gmail.com>**20081114183334] 
[Add optional eager black-holing, with new flag -feager-blackholing
Simon Marlow <marlowsd@gmail.com>**20081118142442
 
 Eager blackholing can improve parallel performance by reducing the
 chances that two threads perform the same computation.  However, it
 has a cost: one extra memory write per thunk entry.  
 
 To get the best results, any code which may be executed in parallel
 should be compiled with eager blackholing turned on.  But since
 there's a cost for sequential code, we make it optional and turn it on
 for the parallel package only.  It might be a good idea to compile
 applications (or modules) with parallel code in with
 -feager-blackholing.
 
 ToDo: document -feager-blackholing.
] 
[Fix #2783: detect black-hole loops properly
Simon Marlow <marlowsd@gmail.com>**20081117144515
 At some point we regressed on detecting simple black-hole loops.  This
 happened due to the introduction of duplicate-work detection for
 parallelism: a black-hole loop looks very much like duplicate work,
 except it's duplicate work being performed by the very same thread.
 So we have to detect and handle this case.
] 
[Fix warning on Windows (use deleteThread() not deleteThread_())
Simon Marlow <marlowsd@gmail.com>**20081117143047] 
[fix compile breakage on Windows
Simon Marlow <marlowsd@gmail.com>**20081117142831] 
[Attempt to fix #2512 and #2063;  add +RTS -xm<address> -RTS option
Simon Marlow <marlowsd@gmail.com>**20081117120556
 On x86_64, the RTS needs to allocate memory in the low 2Gb of the
 address space.  On Linux we can do this with MAP_32BIT, but sometimes
 this doesn't work (#2512) and other OSs don't support it at all
 (#2063).  So to work around this:
 
   - Try MAP_32BIT first, if available.
 
   - Otherwise, try allocating memory from a fixed address (by default
     1Gb)
 
   - We now provide an option to configure the address to allocate
     from.  This allows a workaround on machines where the default
     breaks, and also provides a way for people to test workarounds
     that we can incorporate in future releases.
] 
[Another shutdown fix
Simon Marlow <marlowsd@gmail.com>**20081117094350
 If we encounter a runnable thread during shutdown, just kill it.  All
 the threads are supposed to be dead at this stage, but this catches
 threads that might have just returned from a foreign call, or were
 finalizers created by the GC.
 
 Fixes memo002(threaded1)
] 
[Correct an example in the users guide
Ian Lynagh <igloo@earth.li>**20081116174938] 
[Fix gen_contents_index when not run inplace; trac #2764
Ian Lynagh <igloo@earth.li>**20081116174122
 Based on a patch from juhpetersen.
] 
[close the temporary Handle before removing the file
Simon Marlow <marlowsd@gmail.com>**20081114130958] 
[refactor: move unlockClosure() into SMPClosureOps() where it should be
Simon Marlow <marlowsd@gmail.com>**20081114095817] 
[Omit definitions of cas() and xchg() in .hc code
Simon Marlow <marlowsd@gmail.com>**20081114095738
 They cause compilation errors (correctly) with newer gccs
 Shows up compiling the RTS via C, which happens on Windows
] 
[Don't put stdin into non-blocking mode (#2778, #2777)
Simon Marlow <marlowsd@gmail.com>**20081114130546
 This used to be necessary when our I/O library needed all FDs in
 O_NONBLOCK mode, and readline used to put stdin back into blocking
 mode.  Nowadays the I/O library can cope with FDs in blocking mode,
 and #2778/#2777 show why this is important.
] 
[Rmoeve --enable-dotnet
Simon Marlow <marlowsd@gmail.com>**20081114124929] 
[#2751: disourage --enable-shared in ./configure --help
Simon Marlow <marlowsd@gmail.com>**20081114124748] 
[add a warning that --enable-shared is experimental
Simon Marlow <marlowsd@gmail.com>**20081114104034] 
[lookupSymbol: revert to looking up both with and without the @N suffix
Simon Marlow <marlowsd@gmail.com>**20081113122927] 
[#2768: fix compatibility problem with newer version of mingw
Simon Marlow <marlowsd@gmail.com>**20081113114626] 
[notice ^C exceptions when waiting for I/O
Simon Marlow <marlowsd@gmail.com>**20081113114342] 
[Fix a bug in the recompilation checking logic.
Thomas Schilling <nominolo@googlemail.com>**20081113162653
 
 Previously, using target HscNothing resulted in unnessesary
 recompilation because 'upsweep_mod' treated HscInterface specially.
 This patch changes relaxes this.
 
 When running GHC with debug level 5, 'upsweep_mod' will now also be
 more verbose about what it is doing.
 
 There is (at least) one possible remaining problem, though: When using
 target 'HscNothing' we generate a fake linkable to signal that we have
 processed a module.  When switching to 'HscInterpreted' this may cause
 objects to not be recompiled.  Switching from HscNothing to
 HscInterpreted is therefore only safe if we unload everything first.
] 
[Fix another subtle shutdown deadlock
Simon Marlow <marlowsd@gmail.com>**20081113160005
 The problem occurred when a thread tries to GC during shutdown.  In
 order to GC it has to acquire all the Capabilities in the system, but
 during shutdown, some of the Capabilities have already been closed and
 can never be acquired.
] 
[Fix an extremely subtle deadlock bug on x86_64
Simon Marlow <marlowsd@gmail.com>**20081113155730
 The recent_activity flag was an unsigned int, but we sometimes do a
 64-bit xchg() on it, which overwrites the next word in memory.  This
 happened to contain the sched_state flag, which is used to control the
 orderly shutdown of the system.  If the xchg() happened during
 shutdown, the scheduler would get confused and deadlock.  Don't you
 just love C?
] 
[move an assertion
Simon Marlow <marlowsd@gmail.com>**20081113154542] 
[Always zap the trailing @N from symbols when looking up in a DLL
Simon Marlow <marlowsd@gmail.com>**20081112111518
 
 Fixes win32002(ghci)
 
 Previously we only did this for references from object files, but we
 should do it for all symbols, including those that GHCi looks up due
 to FFI calls from bytecode.
] 
[Only allocate a mark stack if we're actually doing marking
Simon Marlow <marlowsd@gmail.com>**20081112112144
 saves a bit of memory in major GCs
] 
[Fix parse error with older gccs (#2752)
Simon Marlow <marlowsd@gmail.com>**20081111135344] 
[Fix to i386_insert_ffrees (#2724, #1944)
Simon Marlow <marlowsd@gmail.com>**20081111125619
 The i386 native code generator has to arrange that the FPU stack is
 clear on exit from any function that uses the FPU.  Unfortunately it
 was getting this wrong (and has been ever since this code was written,
 I think): it was looking for basic blocks that used the FPU and adding
 the code to clear the FPU stack on any non-local exit from the block.
 In fact it should be doing this on a whole-function basis, rather than
 individual basic blocks.
] 
[Fix bootstrap with 6.10.1 on Windows
Simon Marlow <marlowsd@gmail.com>**20081110134318
 ghc-pkg doesn't understand the old syntax any more, so 'ghc-pkg -l' fails
] 
[Perform case-insensitive matching of path components in getBaseDir on Windows (Fixes bug 2743)
Neil Mitchell <ndmitchell@gmail.com>**20081105134315] 
[Documentation only.  Clarify that 'load*' may indeed throw SourceErrors.
Thomas Schilling <nominolo@googlemail.com>**20081110175614
 
 I don't think errors during dependency analysis should be passed to
 the logger.
] 
[Fix documentation (to say the opposite).
Thomas Schilling <nominolo@googlemail.com>**20081110153819] 
[Fix line numbers in TAGS files.
Thomas Schilling <nominolo@googlemail.com>**20081110153621] 
[Documentation only.
Thomas Schilling <nominolo@googlemail.com>**20081110153456] 
[Add 'packageDbModules' function to GHC API.
Thomas Schilling <nominolo@googlemail.com>**20081110143510
 
 This function returns a list of all modules available through the
 package DB.
 
 MERGE TO 6.10
] 
[We now require GHC 6.6, so we always have Applicative
Ian Lynagh <igloo@earth.li>**20081108144723] 
[Remove a CPP test that's always true (__GLASGOW_HASKELL__ >= 605)
Ian Lynagh <igloo@earth.li>**20081108144544] 
[Remove some dead code now that __GLASGOW_HASKELL__ >= 606
Ian Lynagh <igloo@earth.li>**20081108144459] 
[Remove some flag duplication from a Makefile
Ian Lynagh <igloo@earth.li>**20081108144412] 
[ghc_ge_605 is now always YES
Ian Lynagh <igloo@earth.li>**20081108144328] 
[Remove the GHC 6.4 unicode compat stuff; we can now just use Data.Char
Ian Lynagh <igloo@earth.li>**20081108143423] 
[Fix libffi bindist
Clemens Fruhwirth <clemens@endorphin.org>**20081108094725] 
[Replace couple of fromJust with expectJust
Clemens Fruhwirth <clemens@endorphin.org>**20081107160735] 
[Bugfix for patch "Do not filter the rts from linked libraries..." (#2745)
Simon Marlow <marlowsd@gmail.com>**20081107092925
 The sense of the #ifdef was wrong
] 
[fix via-C compilation: import ghczmprim_GHCziBool_False_closure
Simon Marlow <marlowsd@gmail.com>**20081107090432] 
[disable instance MonadPlus CoreM for GHC <= 6.6
Simon Marlow <marlowsd@gmail.com>**20081107085250] 
[re-instate counting of sparks converted
Simon Marlow <marlowsd@gmail.com>**20081106160810
 lost in patch "Run sparks in batches"
] 
[fix ASSERT_SPARK_POOL_INVARIANTS(): top>bottom is valid
Simon Marlow <marlowsd@gmail.com>**20081106155826] 
[pruneSparkQueue(): fix bug when top>bottom
Simon Marlow <marlowsd@gmail.com>**20081106155648] 
[don't yield if the system is shutting down
Simon Marlow <marlowsd@gmail.com>**20081106155356] 
[leave out ATTRIBUTE_ALIGNED on Windows, it gives a warning
Simon Marlow <marlowsd@gmail.com>**20081106132105] 
[Cope with ThreadRelocated when traversing the blocked_queue
Simon Marlow <marlowsd@gmail.com>**20081106114045
 Fixes "invalid what_next field" in ioref001 on Windows, and perhaps others
] 
[Remove dead code.
Thomas Schilling <nominolo@googlemail.com>**20081031162036] 
[Run sparks in batches, instead of creating a new thread for each one
Simon Marlow <marlowsd@gmail.com>**20081106113639
 Signficantly reduces the overhead for par, which means that we can
 make use of paralellism at a much finer granularity.
] 
[allocateInGen(): increase alloc_blocks (#2747)
Simon Marlow <marlowsd@gmail.com>**20081106113714] 
[disable MonadPlus instance that doesn't compile with 6.6
Simon Marlow <marlowsd@gmail.com>**20081106100411] 
[don't yield the Capability if blackholes_need_checking
Simon Marlow <marlowsd@gmail.com>**20081105154928] 
[deadlock fix: reset the flag *after* checking the blackhole queue
Simon Marlow <marlowsd@gmail.com>**20081105150542] 
[retreat the top/bottom fields of the spark pool in pruneSparkPool()
Simon Marlow <marlowsd@gmail.com>**20081105150359] 
[fix the :help docs for :set stop (#2737)
Simon Marlow <marlowsd@gmail.com>**20081104092929] 
[bugfix: don't ingore the return value from rts_evalIO()
Simon Marlow <marlowsd@gmail.com>**20081104142147] 
[Document the new SPARKS statistic, and xref from the parallelism section
Simon Marlow <marlowsd@gmail.com>**20081024120236] 
[Move the freeing of Capabilities later in the shutdown sequence
Simon Marlow <marlowsd@gmail.com>**20081024104301
 Fixes a bug whereby the Capability has been freed but other
 Capabilities are still trying to steal sparks from its pool.
] 
[Pad Capabilities and Tasks to 64 bytes
Simon Marlow <marlowsd@gmail.com>**20081023080749
 This is just good practice to avoid placing two structures heavily
 accessed by different CPUs on the same cache line
] 
[Fix desugaring of record update (fixes Trac #2735)
simonpj@microsoft.com**20081103110819] 
[Refuse to register packages with unversioned dependencies; trac #1837
Ian Lynagh <igloo@earth.li>**20081031181746] 
[We now require GHC 6.6 to build the HEAD (and thus 6.12)
Ian Lynagh <igloo@earth.li>**20081031171506] 
[:set prompt now understand Haskell String syntax; trace #2652
Ian Lynagh <igloo@earth.li>**20081031145227] 
[Comments only
simonpj@microsoft.com**20081031140236] 
[Quickfix for warning.
Thomas Schilling <nominolo@googlemail.com>**20081031113125] 
[Export typeclasses for accessing compiler results.
Thomas Schilling <nominolo@googlemail.com>**20081028182310
 
 MERGE TO 6.10.
] 
[Minor refactoring.
Thomas Schilling <nominolo@googlemail.com>**20081028182202] 
[Include record fields in tags.
Thomas Schilling <nominolo@googlemail.com>**20081028180538] 
[Fix imports
simonpj@microsoft.com**20081031092306] 
[Improve error reporting for non-rigid GADT matches
simonpj@microsoft.com**20081030143947
 
 Following suggestions from users, this patch improves the error message
 when a GADT match needs a rigid type:
 
  tcfail172.hs:19:10:
      GADT pattern match in non-rigid context for `Nil'
 -      Solution: add a type signature
 +      Probable solution: add a type signature for `is_normal'
      In the pattern: Nil
      In the definition of `is_normal': is_normal Nil = True
 
 Now GHC tries to tell you what to give a type signature *for*.
 Thanks to Daniel Gorin and others for the suggestions.
 
] 
[Add (a) CoreM monad, (b) new Annotations feature
simonpj@microsoft.com**20081030125108
 
 This patch, written by Max Bolingbroke,  does two things
 
 1.  It adds a new CoreM monad (defined in simplCore/CoreMonad),
     which is used as the top-level monad for all the Core-to-Core
     transformations (starting at SimplCore).  It supports
        * I/O (for debug printing)
        * Unique supply
        * Statistics gathering
        * Access to the HscEnv, RuleBase, Annotations, Module
     The patch therefore refactors the top "skin" of every Core-to-Core
     pass, but does not change their functionality.
 
 2.  It adds a completely new facility to GHC: Core "annotations".
     The idea is that you can say
        {#- ANN foo (Just "Hello") #-}
     which adds the annotation (Just "Hello") to the top level function
     foo.  These annotations can be looked up in any Core-to-Core pass,
     and are persisted into interface files.  (Hence a Core-to-Core pass
     can also query the annotations of imported things.)  Furthermore,
     a Core-to-Core pass can add new annotations (eg strictness info)
     of its own, which can be queried by importing modules.
 
 The design of the annotation system is somewhat in flux.  It's
 designed to work with the (upcoming) dynamic plug-ins mechanism,
 but is meanwhile independently useful.
 
 Do not merge to 6.10!  
 
] 
[Fix Trac #2674: in TH reject empty case expressions and function definitions
simonpj@microsoft.com**20081030094528] 
[Change naming conventions for compiler-generated dictionaries and type functions
simonpj@microsoft.com**20081029140858
 
 Up to now, the data constructor dictionary for class C as been called
 ":DC". But there is no reason for the colon to be at the front; indeed
 it confuses the (simple-minded) pretty-printer for types.  So this
 patch changes it to be "D:C".  This makes Core a lot easier to read.
 Having a colon in the middle ensures that it can't clash with a user-written
 data type.
 
 Similarly I changed
 
   T:C 	   Data type corresponding a class dictionary (was :TC)
   D:C	   Data constructor for class dictionary (was :DC)
 
   NTCo:T   Coercion mapping from a newtype T to its representation type
 		(was :CoT)
 
   TFCo:R   Coercion mapping from a data family to its respresentation type R
 		(was :CoFR)
 
   Rn:T     The n'th respresentation data type for a data type T
 		(was :RnT)
 
 
 Do not merge to 6.10.
 
 HEADS-UP: you'll need to recompile libraries from scratch.  
 
 ROMAN: you could do the same for OccName.mkVectTyConOcc etc, if you wanted.
 
 
] 
[Fix tcrun031: yet more tidying up in TcDeriv
simonpj@microsoft.com**20081029130155] 
[Add Outputable instance for CoercionI
simonpj@microsoft.com**20081029130114] 
[Fix Trac #2720: inlining and casts
simonpj@microsoft.com**20081028140828
 
 The issue here is what happens when we have
 
 	(f |> co) x
 
 where f is itself marked INLINE.  We want callSiteInline to "see" 
 the fact that the function is applied, and hence have some incentive
 to inline.  I've done this by extending CoreUnfold.CallCtxt with 
 ValAppCtxt.  I think that should catch this case without messing up
 any of the others.
 
] 
[Clarify documentatoin
simonpj@microsoft.com**20081028133009] 
[Update library version numbers in the release notes
Ian Lynagh <igloo@earth.li>**20081023144018] 
[various updates to the release notes
Simon Marlow <marlowsd@gmail.com>**20081007151647] 
[Add library release notes
Ian Lynagh <igloo@earth.li>**20080920155722] 
[Add release notes for the compiler
Ian Lynagh <igloo@earth.li>**20080920114857] 
[Doc fix
Ian Lynagh <igloo@earth.li>**20081028150534] 
[Rename some variables in docs
Ian Lynagh <igloo@earth.li>**20081028150447] 
[Fix typos
Ian Lynagh <igloo@earth.li>**20081028144655] 
[Mostly-fix Trac #2595: updates for existentials
simonpj@microsoft.com**20081028115427
 
 Ganesh wanted to update records that involve existentials.  That 
 seems reasonable to me, and this patch covers existentials, GADTs,
 and data type families.
 
 The restriction is that 
   The types of the updated fields may mention only the
   universally-quantified type variables of the data constructor
 
 This doesn't allow everything in #2595 (it allows 'g' but not 'f' in
 the ticket), but it gets a lot closer.
 
 Lots of the new lines are comments!
 
] 
[Fix Trac #2723: keep track of record field names in the renamer
simonpj@microsoft.com**20081028110445
 
 The idea here is that with -XNamedFieldPuns and -XRecordWildCards we don't
 want to report shadowing errors for
 	let fld = <blah> in C { .. }
 But to suppress such shadowing errors, the renamer needs to know that
 'fld' *is* a record selector.  Hence the new NameSet in 
 TcRnFypes.RecFieldEnv
 
] 
[Remove dead code
simonpj@microsoft.com**20081028074639] 
[Fix Trac #2713: refactor and tidy up renaming of fixity decls
simonpj@microsoft.com**20081027222738
 
 In fixing #2713, this patch also eliminates two almost-unused
 functions from RnEnv (lookupBndr and lookupBndr_maybe).  The
 net lines of code is prety much unchanged, but more of them
 are comments!
 
] 
[Fix Trac #2701: make deriving check better for unlifted args
simonpj@microsoft.com**20081025171211
 
 Getting the automatic deriving mechanism to work really smoothly
 is surprisingly hard.  I keep finding myself in TcDeriv!
 
 Anyway, this is a nice clean fix to Trac #2701.
 
] 
[Use pdflatex rather than latex for building
Ian Lynagh <igloo@earth.li>**20081024112400
 The Windows builder is having problems running ps2pdf, so this works
 aroudn the problem.
] 
[Remove an unmatched } in core.tex
Ian Lynagh <igloo@earth.li>**20081024111750] 
[Add a usepackage{url}
Ian Lynagh <igloo@earth.li>**20081024111458] 
[Update ANNOUNCE
Ian Lynagh <igloo@earth.li>**20081022164423] 
[Fix a bug in the new scheduler
Simon Marlow <marlowsd@gmail.com>**20081023155017
 If the current thread blocks, we should yield the Capability
 immediately, because the thread and hence possibly the current Task
 are now owned by someone else.  This worked in the old scheduler, but
 we moved where the yield happens in the new scheduler which broke it.
] 
[add an assertion
Simon Marlow <marlowsd@gmail.com>**20081023154551] 
[fix a warning
Simon Marlow <marlowsd@gmail.com>**20081023082213] 
[traverse the spark pools only once during GC rather than twice
Simon Marlow <marlowsd@gmail.com>**20081022115233] 
[Refactoring and reorganisation of the scheduler
Simon Marlow <marlowsd@gmail.com>**20081022092744
 
 Change the way we look for work in the scheduler.  Previously,
 checking to see whether there was anything to do was a
 non-side-effecting operation, but this has changed now that we do
 work-stealing.  This lead to a refactoring of the inner loop of the
 scheduler.
 
 Also, lots of cleanup in the new work-stealing code, but no functional
 changes.
 
 One new statistic is added to the +RTS -s output:
 
   SPARKS: 1430 (2 converted, 1427 pruned)
 
 lets you know something about the use of `par` in the program.
] 
[Work stealing for sparks
berthold@mathematik.uni-marburg.de**20080915132846
 
    Spark stealing support for PARALLEL_HASKELL and THREADED_RTS versions of the RTS.
   
   Spark pools are per capability, separately allocated and held in the Capability 
   structure. The implementation uses Double-Ended Queues (deque) and cas-protected 
   access.
   
   The write end of the queue (position bottom) can only be used with
   mutual exclusion, i.e. by exactly one caller at a time.
   Multiple readers can steal()/findSpark() from the read end
   (position top), and are synchronised without a lock, based on a cas
   of the top position. One reader wins, the others return NULL for a
   failure.
   
   Work stealing is called when Capabilities find no other work (inside yieldCapability),
   and tries all capabilities 0..n-1 twice, unless a theft succeeds.
   
   Inside schedulePushWork, all considered cap.s (those which were idle and could 
   be grabbed) are woken up. Future versions should wake up capabilities immediately when 
   putting a new spark in the local pool, from newSpark().
 
 Patch has been re-recorded due to conflicting bugfixes in the sparks.c, also fixing a 
 (strange) conflict in the scheduler.
 
] 
[include an elapsed time table
Simon Marlow <marlowsd@gmail.com>**20081023080648] 
[generate a valid summary for older GHC versions too
Simon Marlow <marlowsd@gmail.com>**20081023080629] 
[Fix Trac #2714 (a minor wibble)
simonpj@microsoft.com**20081022145138
 
 In boxy_match (which is a pure function used by preSubType) we can
 encounter TyVars not just TcTyVars; this patch takes account of that.
 
] 
[Reject programs with superclass equalities for now
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021131721
 - The current implementation of type families cannot properly deal
   with superclass equalities.  Instead of making a half-hearted attempt at
   supporting them, which mostly ends in cryptic error message, rejecting
   right away with an appropriate message.
 
   MERGE TO 6.10
] 
[Fix doc syntax
Ian Lynagh <igloo@earth.li>**20081021183317] 
[Don't put the README file in the Windows installer; fixes trac #2698
Ian Lynagh <igloo@earth.li>**20081021162543
 The README file talks about getting and building the sources, which
 doesn't make sense for the installer.
] 
[Comments and parens only
simonpj@microsoft.com**20081021151401] 
[Do proper cloning in worker/wrapper splitting
simonpj@microsoft.com**20081021143156
 
 See Note [Freshen type variables] in WwLib.  We need to clone type
 variables when building a worker/wrapper split, else we simply get
 bogus code, admittedly in rather obscure situations.  I can't quite
 remember what program showed this up, unfortunately, but there 
 definitely *was* one!  (You get a Lint error.)
 
] 
[Don't float an expression wrapped in a cast
simonpj@microsoft.com**20081021143019
 
 There is no point in floating out an expression wrapped in a coercion;
 If we do we'll transform  
 	lvl = e |> co [_$_]
 to  	
 	lvl' = e; lvl = lvl' |> co
 and then inline lvl.  Better just to float out the payload (e).
 
] 
[Fix Trac #2668, and refactor TcDeriv
simonpj@microsoft.com**20081021142922
 
 TcDeriv deals with both standalone and ordinary 'deriving';
 and with both data types and 'newtype deriving'.  The result
 is really rather compilcated and ad hoc.  Ryan discovered
 #2668; this patch fixes that bug, and makes the internal interfces
 #more uniform.  Specifically, the business of knocking off 
 type arguments from the instance type until it matches the kind of the
 class, is now done by derivTyData, not mkNewTypeEqn, because the
 latter is shared with standalone derriving, whree the trimmed
 type application is what the user wrote.
 
] 
[Spelling error in comment
simonpj@microsoft.com**20081019233511] 
[White space only
simonpj@microsoft.com**20081019233352] 
[Comments to explain strict overlap checking for type family instances
simonpj@microsoft.com**20081019184208] 
[Allow type families to use GADT syntax (and be GADTs)
simonpj@microsoft.com**20080923140535
 
 We've always intended to allow you to use GADT syntax for
 data families:
 	data instance T [a] where
 	  T1 :: a -> T [a]
 and indeed to allow data instances to *be* GADTs
 	data intsance T [a] where
 	  T1 :: Int -> T [Int]
 	  T2 :: a -> b -> T [(a,b)]
 
 This patch fixes the renamer and type checker to allow this.
 	
] 
[Improve crash message from applyTys and applyTypeToArgs
simonpj@microsoft.com**20080923135419] 
[Wibble to ungrammatical error message
simonpj@microsoft.com**20080920232256] 
[Comments only: replace ":=:" by "~" (notation for equality predicates)
simonpj@microsoft.com**20080920232024] 
[FIX #2693
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021120107
 - As long as the first reduceContext in tcSimplifyRestricted potentially
   performs improvement, we need to zonk again before the second reduceContext.
   It would be better to prevent the improvement in the first place, but given
   the current situation zonking is definitely the right thing to do.
 
   MERGE TO 6.10
] 
[Restore the terminal attributes even if ghci does not exit normally.
Judah Jacobson <judah.jacobson@gmail.com>**20081020164109] 
[FIX #2688
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021044213
 - Change in TcSimplify.reduceContext:
 
      We do *not* go around for new extra_eqs.  Morally, we should,
      but we can't without risking non-termination (see #2688).  By
      not going around, we miss some legal programs mixing FDs and
      TFs, but we never claimed to support such programs in the
      current implementation anyway.
 
   MERGE TO 6.10
] 
[Move documentation within 80 column boundary.
Thomas Schilling <nominolo@googlemail.com>**20081014134016] 
[Improve haddock documentation for 'GHC.topSortModuleGraph'.
Thomas Schilling <nominolo@googlemail.com>**20081014133833] 
[Improve haddock documentation for HsExpr module.
Thomas Schilling <nominolo@googlemail.com>**20081014133740] 
[Improve Haddock-markup for HsDecls module.
Thomas Schilling <nominolo@googlemail.com>**20081014133556] 
[Run Haddock with compacting GC and show RTS statistics.
Thomas Schilling <nominolo@googlemail.com>**20081020111410] 
[FIX (partially) #2703: bug in stack overflow handling when inside block
Simon Marlow <marlowsd@gmail.com>**20081020121103
 As a result of a previous ticket (#767) we disabled the generation of
 StackOverflow exceptions when inside a Control.Exception.block, on the
 grounds that StackOverflow is like an asynchronous exception.  Instead
 we just increase the stack size.  However, the stack size calculation
 was wrong, and ended up not increasing the size of the stack, with the
 result that the runtime just kept re-allocating the stack and filling
 up memory.
] 
[Re-export Located(..) and related functions
Simon Marlow <marlowsd@gmail.com>**20081020102422
 So that clients don't need to import SrcLoc
] 
[whitespace fix
Simon Marlow <marlowsd@gmail.com>**20081020101241] 
[FIX #2691: Manually reset the terminal to its initial settings; works around a bug in libedit.
Judah Jacobson <judah.jacobson@gmail.com>**20081016024838] 
[Eliminate duplicate flags in the tab completion of ghci's :set command.
Judah Jacobson <judah.jacobson@gmail.com>**20081016015721] 
[Add dph haddock docs to the doc index
Ian Lynagh <igloo@earth.li>**20081019133208] 
[Clean the bootstrapping extensible-exceptions package
Ian Lynagh <igloo@earth.li>**20081017195942] 
[Fix trac #2687
Ian Lynagh <igloo@earth.li>**20081015163412
 OtherPunctuation, ConnectorPunctuation and DashPunctuation are now
 treated as symbols, rather than merely graphic characters.
] 
[Fix trac #2680; avoid quadratic behaviour from (++)
Ian Lynagh <igloo@earth.li>**20081015163235] 
[Fix the build when the bootstrapping compiler has a newer Cabal than us
Ian Lynagh <igloo@earth.li>**20081015144023
 We need to forcibly use the in-tree Cabal, or we get version mismatch errors
] 
[Fix the name of prologue.txt when making bindists
Ian Lynagh <igloo@earth.li>**20081014114714] 
[Comments only
simonpj@microsoft.com**20081015084501] 
[Fix Trac #2497; two separate typos in Lexer.x
simonpj@microsoft.com**20081015084344
 
 The patch to switch on lexing of 'forall' inside a RULES pragma
 wasn't working.  This fixes it so that it does.
 
] 
[Update manual: tidy up instances, say more about type families in instance decls
simonpj@microsoft.com**20081015080509] 
[Make tags work on Unices, too.
Thomas Schilling <nominolo@googlemail.com>**20081014211236] 
[Undefine __PIC__ before defining it to work around "multiple definitions of __PIC__" warnings
Clemens Fruhwirth <clemens@endorphin.org>**20081014143206] 
[Add "dyn" to GhcRTSWays when compiling --enable-shared
Clemens Fruhwirth <clemens@endorphin.org>**20081014125123] 
[Fill out the ghc package's cabal file
Ian Lynagh <igloo@earth.li>**20081013235817] 
[Patching libffi so it can be built as DLL
Clemens Fruhwirth <clemens@endorphin.org>**20081014103459
 
 libffi-dllize-3.0.6.patch should be pushed upstream
] 
[Add 'etags' makefile target.
Thomas Schilling <nominolo@googlemail.com>**20081013170927
 
 This only works with stage2 since `ghctags' is built against stage1
 but not against the bootstrapping compiler.  Also note that all of GHC
 must typecheck for this target to succeed.  Perhaps we should not
 overwrite the old TAGS file by default then.
] 
[Use cabal information to get GHC's flags to `ghctags'.
Thomas Schilling <nominolo@googlemail.com>**20081013170658
 
 By giving the dist-directory to ghctags we can get all the GHC API
 flags we need in order to load the required modules.  The flag name
 could perhaps be improved, but apart from that it seems to work well.
] 
[Version bump for libffi to 3.0.6
Clemens Fruhwirth <clemens@endorphin.org>**20081014081300] 
[Encode shared/static configuration into stamps to do the right thing when rebuilding
Clemens Fruhwirth <clemens@endorphin.org>**20081013221530] 
[Add a link to the GHC API docs from the library haddock index
Ian Lynagh <igloo@earth.li>**20081013195943] 
[Link to the GHC API documentation from the main doc page
Ian Lynagh <igloo@earth.li>**20081013200927] 
[Whitespace only in docs/index.html
Ian Lynagh <igloo@earth.li>**20081013200625] 
[Tweak gen_contents_index
Ian Lynagh <igloo@earth.li>**20081013192548
 It now works again after it has been installed, as well as while it is
 in a source tree.
 After it's been installed it filters out the ghc package, as that
 currently swamps everything else in the index.
] 
[Build fixes for DLLized rts
Clemens Fruhwirth <clemens@endorphin.org>**20081013201608] 
[Do not filter the rts from linked libraries in linkDynLib as Windows does not allow unresolved symbols
Clemens Fruhwirth <clemens@endorphin.org>**20081013201426] 
[Add HsFFI.o to INSTALL_LIBS
Clemens Fruhwirth <clemens@endorphin.org>**20081013200945] 
[Rename symbol macros to a consistant naming scheme
Clemens Fruhwirth <clemens@endorphin.org>**20081013162433] 
[Fix #2685: two Bool arguments to tidyTypeEnv were the wrong way around
Simon Marlow <marlowsd@gmail.com>**20081013121339
 So -XTemplateHaskell was behaving like -fomit-interface-file-pragmas,
 and vice versa.
] 
[Simplify the "is $bindir in $PATH" test
Ian Lynagh <igloo@earth.li>**20081011191008] 
[Correct the "is $bindir in $PATH" test
Ian Lynagh <igloo@earth.li>**20081011191030
 We were testing neq instead of eq
] 
[Fix a typo which was causing ghci to quit on commands errors
pepe <mnislaih@gmail.com>**20081011114720] 
[Drop libm from the linker dependencies for libffi
Clemens Fruhwirth <clemens@endorphin.org>**20081011074524] 
[Do not generate haddock documentation when running install-docs in libffi
Clemens Fruhwirth <clemens@endorphin.org>**20081010192318] 
[When waking up thread blocked on TVars, wake oldest first (#2319)
Josef Svenningsson <josef.svenningsson@gmail.com>**20081010150322
 StgTVarWatchQueue contains the threads blocked on a TVar in order 
 youngest first. The list has to be traversed backwards to unpark the threads 
 oldest first.
 
 This improves the fairness when using STM in some situations.
] 
[add readTVarIO :: TVar a -> IO a
Simon Marlow <marlowsd@gmail.com>**20081010131545] 
[fix #2636: throw missing module errors as SourceErrors, not ErrMsg
Simon Marlow <marlowsd@gmail.com>**20081010131535] 
[atomicModifyIORef: use a local cas() instead of the global lock
Simon Marlow <simonmar@microsoft.com>**20081008154702
 This should improve scaling when using atomicModifyIORef
] 
[Delay building libffi until package.conf is created and fix bindist
Clemens Fruhwirth <clemens@endorphin.org>**20081010073106] 
[Install a versioned ghc-pkg script; fixes trac #2662
Ian Lynagh <igloo@earth.li>**20081009164946] 
[Fix bindist creation: Only the main RTS was being put in the bindists
Ian Lynagh <igloo@earth.li>**20081009163451] 
[pushAtom: add missing case for MachNullAddr (#2589)
Simon Marlow <marlowsd@gmail.com>**20081009091118] 
[undo incorrect assertion, and fix comments
Simon Marlow <marlowsd@gmail.com>**20081009085118] 
[remove old GRAN/PARALLEL_HASKELL code
Simon Marlow <marlowsd@gmail.com>**20081009085051] 
[FIX #2639
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081009132328
 
   MERGE TO 6.10
] 
[Cover PredTy case in Type.tyFamInsts
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081009061435
 
   MERGE TO 6.10
] 
[Drop ghcconfig.h/RtsConfig.h from libffi's package.conf.in
Clemens Fruhwirth <clemens@endorphin.org>**20081009071342] 
[Don't use sed's -i flag as Solaris doesn't know it in libffi/Makefile
Clemens Fruhwirth <clemens@endorphin.org>**20081008234455] 
[Don't use /dev/null trick to create empty object files in libffi/Makefile
Clemens Fruhwirth <clemens@endorphin.org>**20081008232902] 
[Turn libffi into a Haskell package
Clemens Fruhwirth <clemens@endorphin.org>**20081008170443] 
[Make 'getModSummary' deterministic.
Thomas Schilling <nominolo@googlemail.com>**20081008144032] 
[Add accessors to 'HsModule' and haddockify it.
Thomas Schilling <nominolo@googlemail.com>**20081007235656] 
[fix syntax errors in src-dist publish rules
Simon Marlow <marlowsd@gmail.com>**20081008103432] 
[add comments and an ASSERT_LOCK_HELD()
Simon Marlow <marlowsd@gmail.com>**20081008112627] 
[Fix #2663: we had a hard-wired capabilities[0]
Simon Marlow <marlowsd@gmail.com>**20081008112609
 For some unknown reason in schedulePostRunThread() we were always
 passing capabilities[0] rather than the current Capability to
 throwToSingleThreaded().  This caused all kinds of weird failures and
 crashes in STM code when running on multiple processors.
] 
[Fix #1955 for heap profiles generated by +RTS -hT
Simon Marlow <marlowsd@gmail.com>**20081003150745] 
[add a section id for +RTS -hT
Simon Marlow <marlowsd@gmail.com>**20081007151007] 
[update documentation for PostfixOperators
Simon Marlow <marlowsd@gmail.com>**20081007150957] 
[fix markup
Simon Marlow <marlowsd@gmail.com>**20081007150943] 
[Fix bug in DPH docs
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008101618] 
[Add short DPH section to users guide
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008064754
 
 MERGE TO 6.10
] 
[Users Guide: added type family documentation
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081008061927
 
   MERGE TO 6.10
] 
[Track changes to package dph
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008032859
 
 MERGE TO 6.10
] 
[Build a profiled GHC API by default if p is in GhcLibWays
Ian Lynagh <igloo@earth.li>**20081007152318] 
[Check whether mk/validate.mk defines anything after validating
Ian Lynagh <igloo@earth.li>**20081007144855] 
[Remove #define _BSD_SOURCE from Stg.h
Ian Lynagh <igloo@earth.li>**20081006101959
 It's no longer needed, as base no longer #includes it
] 
[Make ghctags compile again.
Thomas Schilling <nominolo@googlemail.com>**20081007135705] 
[Revert AutoLinkPackages change for dynamic libraries. Cabal handles that now.
Clemens Fruhwirth <clemens@endorphin.org>**20081007100417] 
[Change suffix for dyn. linked executables from _real to .dyn
Clemens Fruhwirth <clemens@endorphin.org>**20081007100750] 
[Add accessors to 'Target' fields and haddockify.
Thomas Schilling <nominolo@googlemail.com>**20081006222940
 
 MERGE TO 6.10
] 
[Make 'gblock' and 'gunblock' part of 'ExceptionMonad'.  This way the
Thomas Schilling <nominolo@googlemail.com>**20081006222831
 default implementations of 'gbracket' and 'gfinally' just work.
 
 MERGE TO 6.10
] 
[Add Word8 support to vectoriser
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081007004416
 
 MERGE TO 6.10
] 
[Fix generating OS X installers: Set COMMAND_MODE=unix2003
Ian Lynagh <igloo@earth.li>**20081005222715
 If we don't specify COMMAND_MODE=unix2003 then xcodebuild defaults
 to setting it to legacy, which means that ar builds archives
 without a table of contents. That makes the build fail later on.
] 
[We need to set datadir = $(libdir) in bindists
Ian Lynagh <igloo@earth.li>**20081005143307
 We already do in the normal Makefiles.
 
 This is because GHC needs package.conf and unlit to be in the same place
 (and things like ghc-pkg need to agree on where package.conf is, so we
 just set it globally).
] 
[prep-bin-dist-mingw complains if it finds a bad version of windres
Ian Lynagh <igloo@earth.li>**20081004175351] 
[removed Data.Generics.Basics, added Data.Data
'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082808] 
[Fix a build problem with GHC 6.4.2
Ian Lynagh <igloo@earth.li>**20081003195700] 
[No AutoLinkPackages for dynamic library linking
Clemens Fruhwirth <clemens@endorphin.org>**20081003185304] 
[use ghcError for error in command line
Clemens Fruhwirth <clemens@endorphin.org>**20081001125648] 
[Fix warnings
simonpj@microsoft.com**20081003171207] 
[Always use extensible exceptions in ghc-pkg, rather than using ifdefs
Ian Lynagh <igloo@earth.li>**20081003161247] 
[Use a proper exception for IOEnvFailure, not just a UserError
Ian Lynagh <igloo@earth.li>**20081003160129] 
[Use an extensible-exceptions package when bootstrapping
Ian Lynagh <igloo@earth.li>**20081003140216
 Ifdefs for whether we had extensible exceptions or not were spreading
 through GHC's source, and things would only have got worse for the next
 2-3 years, so instead we now use an implementation of extensible
 exceptions built on top of the old exception type.
] 
[Expunge ThFake, cure Trac #2632
simonpj@microsoft.com**20081003140423
 
 This patch fixes a dirty hack (the fake ThFake module), which in turn
 was causing Trac #2632.
 
 The new scheme is that the top-level binders in a TH [d| ... |] decl splice
 get Internal names.  That breaks a previous invariant that things like
 TyCons always have External names, but these TyCons are never long-lived;
 they live only long enough to typecheck the TH quotation; the result is
 discarded.  So it seems cool.
 
 Nevertheless -- Template Haskell folk: please test your code.  The testsuite
 is OK but it's conceivable that I've broken something in TH.  Let's see.
 
] 
[Make a debug check more refined
simonpj@microsoft.com**20081003140144] 
[Add ASSERTs to all calls of nameModule
simonpj@microsoft.com**20081003135334
 
 nameModule fails on an InternalName.  These ASSERTS tell you
 which call failed.
 
] 
[Let parseModule take a ModSummary like checkAndLoadModule did.
Thomas Schilling <nominolo@googlemail.com>**20081002230412
 
 To get the ModSummary for a ModuleName getModSummary can be used.
 It's not called find* or lookup* because it assumes that the module is
 in the module graph and throws an exception if it cannot be found.
 Overall, I'm not quite sure about the usefulness of this function
 since the user has no control about which filetype to grab (hs or
 hs-boot).
] 
[Remove some out-of-date entries from .darcs-boring
Ian Lynagh <igloo@earth.li>**20081002201519] 
[TFs: Allow repeated variables in left-hand sides of instances
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081002134539
 
   MERGE TO 6.10
] 
[Clean up some comments
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081002074642
 
   MERGE TO 6.10
] 
[Make the new binder-swap stuff in OccurAnal work right for GlobalIds
simonpj@microsoft.com**20081002133002
 
 See Note [Binder swap on GlobalId scrutinees].  I hadn't got this
 right before, so repeated cases on imported Ids weren't getting optimised.
 
 
] 
[Minor refactoring only
simonpj@microsoft.com**20081002132929] 
[Comments only
simonpj@microsoft.com**20081002132833] 
[Zap dead-ness info appropriately in SpecConstr
simonpj@microsoft.com**20081002132657
 
 SpecConstr can make pattern binders come alive, so we must remember
 to zap their dead-variable annotation.  See extendCaseBndrs.
 
 (This was triggering a Core Lint failure in DPH.)
 
] 
[Suppress invalid Core Lint complaint about lack of constructors
simonpj@microsoft.com**20081002132426] 
[add some more GC roots (fixes conc048, and possibly some others)
Simon Marlow <marlowsd@gmail.com>**20081001164427] 
[Document +RTS -hT 
Simon Marlow <marlowsd@gmail.com>**20081001163222
 We forgot to document this in GHC 6.8
] 
[fix new-qualified-operators link
Simon Marlow <marlowsd@gmail.com>**20081001163105] 
[Proper error message for unsupported pattern signatures
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001144339
 - Pattern signatures must be identical to the type expected for the pattern;
   see Note [Pattern coercions]
 - We now signal an appropriate error if an equality coercion would be needed
   (instead of just generating Core that doesn't typecheck)
 
   MERGE TO 6.10
] 
[Prevent excessive inlining with DPH
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081002012055
 
 This adds a new flag -finline-if-enough-args which disables inlining for
 partially applied functions. It is automatically set by -Odph. This is a
 temporary hack and should remain undocumented.
 
 MERGE TO 6.10
 
] 
[On Windows, check that we have a good version of windres when configuring
Ian Lynagh <igloo@earth.li>**20081001171133] 
[Call $(PERL) rather than perl when making the manpage
Ian Lynagh <igloo@earth.li>**20080930155054] 
[don't install the installPackage program
Ian Lynagh <igloo@earth.li>**20080930145714] 
[Fix #2637: conc032(threaded2) failure
Simon Marlow <marlowsd@gmail.com>**20081001135549
 There was a race condition whereby a thread doing throwTo could be
 blocked on a thread that had finished, and the GC would detect this
 as a deadlock rather than raising the pending exception.  We can't
 close the race, but we can make the right thing happen when the GC
 runs later.
] 
[Remove outdated link to OGI webpage
Simon Marlow <marlowsd@gmail.com>**20080930150912] 
[TFs: Fixed InstContextNorm (and simplification of IPs)
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001131303
 
   MERGE TO 6.10
] 
[TcSimplify.reduceImplication: clean up
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001091315
 - This cleans up some of the mess in reduceImplication and documents the
   precondition on the form of wanted equalities properly.
 - I also made the back off test a bit smarter by allowing to back off in the
   presence of wanted equalities as long as none of them got solved in the
   attempt.  (That should save generating some superfluous bindings.)
 
   MERGE TO 6.10
] 
[Make sure to zonk the kind of coercion variables
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001053243
 
   MERGE TO 6.10
] 
[Remover PROT_EXEC flag from mmap()
Simon Marlow <marlowsd@gmail.com>**20080930141842
 Needed for #738 fix
] 
[Fix #2410: carefully generate unique names for CAF CCs
Simon Marlow <marlowsd@gmail.com>**20080930141812] 
[fix #2594: we were erroneously applying masks, as the reporter suggested
Simon Marlow <marlowsd@gmail.com>**20080930115611
 My guess is that this is left over from when we represented Int8 and
 friends as zero-extended rather than sign-extended.  It's amazing it hasn't
 been noticed earlier.
] 
[Unconditionalize definition of DYNAMIC_* so that libffi.so/.dll is removed even when BuildSharedLibs is reset to NO
Clemens Fruhwirth <clemens@endorphin.org>**20080930085449] 
[Type families: need to instantiate flexible skolems before other flexibles
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080930053559
 
 MERGE TO 6.10
] 
[Fix warnings
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080929142227] 
[Type families: consider subst rules both way
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080929141040
 - applySubstFam, applySubstVarVar & applySubstVarFam need to return their 
   second argument -to be put into the todo list- if the rule would be 
   applicable if the equalities would be supplied in the opposite order.
 
 MERGE TO 6.10
] 
[Clean up a bit and improve an error message
pepe**20080926211429] 
[Don't capture error calls in tryUser
pepe**20080926204836
 
 A previous patch slightly changed the semantics of tryUser.
 This patch restores the original behaviour
 (as expected in :print)
 
] 
[tweaks to this section of the docs
Simon Marlow <simonmar@microsoft.com>**20080927141834] 
[Add -outputdir flag (#2295)
Simon Marlow <simonmar@microsoft.com>**20080927141822] 
[oops, forgot to add -XNewQualifiedOperators to the flags table
Simon Marlow <simonmar@microsoft.com>**20080923140449] 
[Fix making OS X installers from source tarballs
Ian Lynagh <igloo@earth.li>**20080927150507
 I'm not sure why it works in the HEAD, but when making an installer
 from the 6.10.1 beta configure hangs when doing the CHECK_HIST_ERRORS
 test (during rl_initialize, I believe). Giving make /dev/null as stdin
 fixes it.
] 
[Make the matching of the filename ghc.exe case insensitive, fixes bug #2603
Neil Mitchell <ndmitchell@gmail.com>**20080916160311] 
[Fix #2411: missing case for CATCH_STM_FRAME in raiseAsync()
Simon Marlow <simonmar@microsoft.com>**20080926232806] 
[Add an example of how to use SCCs to the user guide
Ian Lynagh <igloo@earth.li>**20080926203832] 
[Add some description of the +RTS -t/-s/-S output
Ian Lynagh <igloo@earth.li>**20080926200203] 
[Remove a redundant options pragma
Ian Lynagh <igloo@earth.li>**20080926152731] 
[Split ShowVersion etc off into a different type to DoInteractive etc
Ian Lynagh <igloo@earth.li>**20080926140539
 This fixes trac #1348 (ghci --help gave ghc's help), and also tidies
 things up a bit. Things would be even tidier if the usage.txt files were
 put into a .hs file, so that ShowUsage wouldn't need to be able to find
 the libdir.
] 
[Pass SRC_HC_OPTS to GHC when building GHC's Main.hs
Ian Lynagh <igloo@earth.li>**20080926131609] 
[Improve runghc docs; fixes trac #2477
Ian Lynagh <igloo@earth.li>**20080926124425] 
[Type families: fixes in flattening & finalisation
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080925225324
 * Finalisation didn't do the right thing for equalities x ~ y, where
   x was instantiated, but not zonked and y flexible (need to do y := x)
 * During flattening we weren't careful enough when turning wanteds 
   intermediates into locals
 
 Both bugs showed up in a small example of SPJ:
 
   linear :: HasTrie (Basis v) => (Basis v, v)
   linear =  basisValue
 
   class HasTrie a where
 
   type family Basis u :: *
 
   basisValue :: (Basis v,v)
   basisValue = error "urk"
 
] 
[Fix the behaviour of flags like --help and --version; fixes trac #2620
Ian Lynagh <igloo@earth.li>**20080925165618
 They should override other mode flags, not conflict with them
] 
[Follow the integer package changes
Ian Lynagh <igloo@earth.li>**20080925133855] 
[Type families: fix decomposition problem
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080925084139
 * Fixes the problem reported in 
   <http://www.haskell.org/pipermail/haskell-cafe/2008-July/044911.html>
] 
[Fix parsing of -ignore-package flag.
Bertram Felgenhauer <int-e@gmx.de>**20080925053820] 
[Don't exit ghci if :info is called on an undefined identifier.
Judah Jacobson <judah.jacobson@gmail.com>**20080924212422] 
[Fix maintainer-clean
Ian Lynagh <igloo@earth.li>**20080924230553] 
[Use -f when making the runhaskell symlink
Ian Lynagh <igloo@earth.li>**20080924124255
 Otherwise installation fails if runhaskell already exists.
] 
[Use -perm -100 rather than -perm /a+x when looking for executable files
Ian Lynagh <igloo@earth.li>**20080924124137
 /a+x doesn't work on some Solaris and OS X machines. Spotted by
 Christian Maeder.
] 
[Use $(FIND) rather than find, as the former may be gfind
Ian Lynagh <igloo@earth.li>**20080924123323] 
[Look for gfind as well as find
Ian Lynagh <igloo@earth.li>**20080924123046] 
[In configure, don't call FPTOOLS_HADDOCK
Ian Lynagh <igloo@earth.li>**20080924122558
 We now use the in-tree haddock, so we don't need to look for it.
] 
[Use $(TAR) rather than tar
Ian Lynagh <igloo@earth.li>**20080924121759
 Fixes problems on Solaris, where we need to use gtar instead of tar
] 
[Add $(strip) to a Makefile test
Ian Lynagh <igloo@earth.li>**20080924120940
 Fixes making bindists on solaris. Patch from Christian Maeder.
] 
[Use test -f rather than test -e, for portability (Solaris)
Ian Lynagh <igloo@earth.li>**20080924120840] 
[Remove some dependencies on bootstrapping.conf from libraries/Makefile
Ian Lynagh <igloo@earth.li>**20080923205755
 They were causing some unnecessary work:
 Running make in a built tree reregisters the GHC package in
 bootstrapping.conf, and the build system thought that this updated
 timestamp meant that the configure stamps were out of date. This is
 particularly bad for the libraries with configure scripts, as those
 take a while to run.
 
 The bootstrapping.conf is built in an earlier phase ("make boot") so
 one shouldn't rely on the dependencies anyway.
] 
[Bump the version number to 6.11
Ian Lynagh <igloo@earth.li>**20080923165613] 
[Generalise type of 'defaultErrorHandler' so it can be used inside a Ghc session.
Thomas Schilling <nominolo@googlemail.com>**20080921085647] 
[Make "sh -e boot" work
Ian Lynagh <igloo@earth.li>**20080921111508] 
[Use -f rather than -e for portability
Ian Lynagh <igloo@earth.li>**20080921111436] 
[Add some special cases for putting dph in bindists
Ian Lynagh <igloo@earth.li>**20080921000406] 
[Escape a hash in the Makefile (it was breaking source dist creation)
Ian Lynagh <igloo@earth.li>**20080920232945] 
[Disallow package flags in OPTIONS_GHC pragmas (#2499)
Simon Marlow <simonmar@microsoft.com>**20080923173904] 
[#2566: emit a warning for 'ghc -c foo.bar'
Simon Marlow <simonmar@microsoft.com>**20080923144956
 
 $ ghc -c foo.bar
 Warning: the following files would be used as linker inputs, but linking is not being done: foo.bar
 ghc: no input files
 Usage: For basic information, try the `--help' option.
] 
[Fix to new executable allocation code (fixed print002 etc.)
Simon Marlow <simonmar@microsoft.com>**20080922210915
 The problem here is caused by the fact that info tables include a
 relative offset to the string naming the constructor.  Executable
 memory now resides at two places in the address space: one for writing
 and one for executing.  In the info tables generated by GHCi, we were
 calculating the offset relative to the writable instance, rather than
 the executable instance, which meant that the GHCi debugger couldn't
 find the names for constructors it found in the heap.
] 
[clean sm/Evac_thr.c and sm/Scav_thr.c
Simon Marlow <simonmar@microsoft.com>**20080922152827] 
[add -XNewQualifiedOperators (Haskell' qualified operator syntax)
Simon Marlow <simonmar@microsoft.com>**20080922152340] 
[Fix Trac #2597 (first bug): correct type checking for empty list
simonpj@microsoft.com**20080920212010
 
 The GHC front end never generates (ExplicitList []), but TH can.
 This patch makes the typechecker robust to such programs.
 
] 
[Fix Trac #2597 (second bug): complain about an empty DoE block
simonpj@microsoft.com**20080920211101
 
 When converting an empty do-block from TH syntax to HsSyn,
 complain rather than crashing.
 
] 
[Update dependencies
Ian Lynagh <igloo@earth.li>**20080920183534] 
[Fix building with GHC 6.6
Ian Lynagh <igloo@earth.li>**20080920162918] 
[Remove fno-method-sharing from the list of static flags
Ian Lynagh <igloo@earth.li>**20080920010635
 It is now a dynamic flag
] 
[Tidy up the treatment of dead binders
simonpj@microsoft.com**20080920175238
 
 This patch does a lot of tidying up of the way that dead variables are
 handled in Core.  Just the sort of thing to do on an aeroplane.
 
 * The tricky "binder-swap" optimisation is moved from the Simplifier
   to the Occurrence Analyser.  See Note [Binder swap] in OccurAnal.
   This is really a nice change.  It should reduce the number of
   simplifier iteratoins (slightly perhaps).  And it means that
   we can be much less pessimistic about zapping occurrence info
   on binders in a case expression.  
 
 * For example:
 	case x of y { (a,b) -> e }
   Previously, each time around, even if y,a,b were all dead, the
   Simplifier would pessimistically zap their OccInfo, so that we
   can't see they are dead any more.  As a result virtually no 
   case expression ended up with dead binders.  This wasn't Bad
   in itself, but it always felt wrong.
 
 * I added a check to CoreLint to check that a dead binder really
   isn't used.  That showed up a couple of bugs in CSE. (Only in
   this sense -- they didn't really matter.)
   
 * I've changed the PprCore printer to print "_" for a dead variable.
   (Use -dppr-debug to see it again.)  This reduces clutter quite a
   bit, and of course it's much more useful with the above change.
 
 * Another benefit of the binder-swap change is that I could get rid of
   the Simplifier hack (working, but hacky) in which the InScopeSet was
   used to map a variable to a *different* variable. That allowed me
   to remove VarEnv.modifyInScopeSet, and to simplify lookupInScopeSet
   so that it doesn't look for a fixpoint.  This fixes no bugs, but 
   is a useful cleanup.
 
 * Roman pointed out that Id.mkWildId is jolly dangerous, because
   of its fixed unique.  So I've 
 
      - localied it to MkCore, where it is private (not exported)
 
      - renamed it to 'mkWildBinder' to stress that you should only
        use it at binding sites, unless you really know what you are
        doing
 
      - provided a function MkCore.mkWildCase that emodies the most
        common use of mkWildId, and use that elsewhere
 
    So things are much better
 
 * A knock-on change is that I found a common pattern of localising
   a potentially global Id, and made a function for it: Id.localiseId
 
] 
[Gix the ghcii script
Ian Lynagh <igloo@earth.li>**20080919174651
 The ghc executable name doesn't have a version number on Windows, so
 don't put one in the script.
] 
[Create runhaskell as well as runghc
Ian Lynagh <igloo@earth.li>**20080919153010] 
[On Linux use libffi for allocating executable memory (fixed #738)
Simon Marlow <marlowsd@gmail.com>**20080919134602] 
[Move the context_switch flag into the Capability
Simon Marlow <marlowsd@gmail.com>**20080919102601
 Fixes a long-standing bug that could in some cases cause sub-optimal
 scheduling behaviour.
] 
[Fix building the extralibs tarball
Ian Lynagh <igloo@earth.li>**20080919133555
 We now need to dig the appropriate lines out of packages, rather than
 just catting libraries/extra-packages, in order to find out what the
 extralibs are.
] 
[Install libffi when installing frmo a bindist
Ian Lynagh <igloo@earth.li>**20080919130332] 
[Fix how we put libffi into bindists
Ian Lynagh <igloo@earth.li>**20080919125528] 
[TAG 6.10 branch has been forked
Ian Lynagh <igloo@earth.li>**20080919123437] 
[Don't require Parser.y in a source dist
Ian Lynagh <igloo@earth.li>**20080919115831] 
[Add HpcParser.hs to source dists
Ian Lynagh <igloo@earth.li>**20080919115816] 
[Fix the list of generated files that need to go into the source dists
Ian Lynagh <igloo@earth.li>**20080919112522] 
[Improve documentation of overlapping instances
simonpj@microsoft.com**20080919093147] 
[Put generated files in source dists
Ian Lynagh <igloo@earth.li>**20080918194424
 We don't want to require that users building source dists have alex/happy
] 
[Add libraries/syb to .darcs-boring
Ian Lynagh <igloo@earth.li>**20080918190116] 
[Fix a couple of issues with :print
pepe**20080918122133
       
       - Ticket #1995: Unsoundness with newtypes
       - Ticket #2475: "Can't unify" error when stopped at an exception
       
       In addition this patch adds the following:
       
       - Unfailingness: RTTI cannot panic anymore. 
         In case of failure, it recovers gracefully by returning the "I know nothing" type
       - A -ddump-rtti flag
 
] 
[wibble
pepe <mnislaih@gmail.com>**20080418172303] 
[RichTokenStream support
Chaddai Fouche <chaddai.fouche@gmail.com>**20080918165256
 
 This patch adds support for raw token streams, that contain more
 information than normal token streams (they contains comments at
 least). The "lexTokenStream" function brings this support to the
 Lexer module. In addition to that, functions have been added to
 the GHC module to make easier to recover of the token stream of 
 a module ("getTokenStream").
 
 Building on that, I added what could be called "rich token
 stream": token stream to which have been added the source string
 corresponding to each token, the function addSourceToToken takes
 a StringBuffer and a starting SrcLoc and a token stream and build
 this rich token stream. getRichTokenStream is a convenience
 function to get a module rich token stream. "showRichTokenStream"
 use the SrcLoc information in such a token stream to get a string
 similar to the original source (except unsignificant
 whitespaces). Thus "putStrLn . showRichTokenStream =<<
 getRichTokenStream s mod" should print a valid module source, the
 interesting part being to modify the token stream between the get
 and the show of course.
] 
[When passing gcc -B, also tell it where the mingw include directory is
Ian Lynagh <igloo@earth.li>**20080918143312] 
[Don't put the mingw directory in RTS's package.conf
Ian Lynagh <igloo@earth.li>**20080918143118] 
[Be more forceful when cleaning in compiler/ and ghc/
Ian Lynagh <igloo@earth.li>**20080918134443
 Now that the Cabal file is generated by configure, it would be nice
 if clean worked even if the cabal file is missing. So now we just rm -rf
 the dist directory.
] 
[Generate ghc.cabal and ghc-bin.cabal with configure
Ian Lynagh <igloo@earth.li>**20080918133636
 This allows us to put the proper version number into them
] 
[Make the ghci scripts point to the versioned GHC program, not just "ghc"
Ian Lynagh <igloo@earth.li>**20080918122516] 
[Fix Trac #1470: improve handling of recursive instances (needed for SYB3)
simonpj@microsoft.com**20080918161719
 
 This bug has been hanging around for a long time, as you'll see by its
 number. The fix implements a feature that is really needed by SYB3, to
 allow an instance to (rather indirectly) refer to itself.  The trickiness
 comes when solving the superclass constraints.
 
 The whoel issue is explained in Note [Recursive instances and superclases]
 in TcSimplify.
 
 In cracking this one I found I could remove the WantSCs argument to the
 ReduceMe flag, which is a worthwhile simplification.  Good!
 
] 
[Comments only
simonpj@microsoft.com**20080918155602] 
[Replace ASSERT with WARN, and explain why
simonpj@microsoft.com**20080918155245
 
 The DPH library tripped an ASSERT.  The code is actually OK, but it's
 badly-optimised so I changed it to WARN.  The issue here is explained
 in ClosureInfo, Note [Unsafe coerce complications].
 
] 
[Add a missing "prime" (env' --> env'') thereby fixing a tripping WARN.  Hurrah!
simonpj@microsoft.com**20080918155144] 
[Fix nasty infelicity: do not short-cut empty substitution in the simplifier
simonpj@microsoft.com**20080917162910
 
 I was perplexed about why an arity-related WARN was tripping. It took 
 me _day_ (sigh) to find that it was because SimplEnv.substExpr was taking
 a short cut when the substitution was empty, thereby not subsituting for
 Ids in scope, which must be done (CoreSubst Note [Extending the Subst]).
 
 The fix is a matter of deleting the "optimisation".  Same with
 CoreSubst.substSpec, although I don't know if that actually caused a
 probem.
 
] 
[Avoid arity reduction when doing eta-reduce
simonpj@microsoft.com**20080917162704
 
 We like things with high arity, so when doing eta reduction
 it's probably a good idea to avoid reducing arity.
 
] 
[Add extra WARN test
simonpj@microsoft.com**20080917162434
 
 This warning tests that the arity of a function does not decrease.
 And that it's at least as great as the strictness signature.
 
 Failing this test isn't a disater, but it's distinctly odd and 
 usually indicates that not enough information is getting propagated
 around, and hence you may get more simplifier iterations.
 
] 
[Comments only
simonpj@microsoft.com**20080917162350] 
[Re-adjust interaction between -ddump flags and force-recompilation
simonpj@microsoft.com**20080917161920
 
 If you say -ddump-xx we effectively add -fforce-recomp, so that you
 see your dump output.  But this works badly in --make mode, because
 you get the ddump output for every module, which is probably not what
 you want.  This patch forces recompilation with -ddump-X only in one-shot
 mode.  
 
 Of course, this only affects people using -ddump options.
 
] 
[Add Outputable GhcMode instance
simonpj@microsoft.com**20080917161847] 
[Improve error reporting for 'deriving' (Trac #2604)
simonpj@microsoft.com**20080917135104] 
[Add link to GADT paper re rigid types
simonpj@microsoft.com**20080916094521] 
[Fix MacOS X build: don't believe __GNUC_GNU_INLINE__ on MacOS X
Simon Marlow <marlowsd@gmail.com>**20080918112856] 
[require Alex version 2.1.0
Simon Marlow <marlowsd@gmail.com>**20080918112812
 Having 2.0.1 causes some unicode tests to fail
] 
[Type families: fixes in the new solver
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080918100934] 
[ext-core library: Parser fixes; make it build with the HEAD
Tim Chevalier <chevalier@alum.wellesley.edu>**20080918090349
 
 In the ext-core parser I guess I never tested:
 * existential type variable bindings in case alts
 * empty data declarations
 
 That'll learn me!
] 
[Wibble ghc-pkg imports to fix building on Windows
Ian Lynagh <igloo@earth.li>**20080917210813] 
[ghc-pkg needs to make package.conf with sensible permissions
Ian Lynagh <igloo@earth.li>**20080917192155
 It was calling openTempFile which uses a 600 permissions mask.
] 
[Change 'loadWithCompiler' callback argument to just print warnings.
Thomas Schilling <nominolo@googlemail.com>**20080917102925
 Rename function accordingly.
 
 The callback wasn't very flexible to begin with.  There's pretty much
 no way around to calling 'compile' inside that callback since
 'upsweep' depends on certain side effects of compile.  It therefore
 makes more sense to restrict the callback to its intended use only,
 namely to log warnings and errors.
] 
[Fix: GhcStage2HcOpts were being added to stage 3 too
Simon Marlow <marlowsd@gmail.com>**20080917085917] 
[Type families: unify with family apps in checking mode
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080917062548] 
[Type families: bug fixes
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916151254] 
[Keep sysnonyms folded in equalities if possible
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916075700] 
[Type families: apply flattening coercions in the right order
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916055136] 
[TcTyFuns: tidy warning
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080915031423] 
[Signature for Inst.isValidWantedEqInst
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080915030118] 
[Remember if RewriteInst is swapped & bug fixes
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080914163639] 
[Type families: fixed all non-termination in the testsuite
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080914120638] 
[Type families: completed the new equality solver
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080913133631
 - Implements normalisation of class constraints containing synonym family
   applications or skolems refined by local equalities.
 - Clean up of TcSimplify.reduceContext by using the new equality solver.
 - Removed all the now unused code of the old algorithm.
 - This completes the implementation of the new algorithm, but it is largely
   untested => many regressions.
] 
[Use the new -optdep flag replacements when building with >= GHC 6.9
Ian Lynagh <igloo@earth.li>**20080916220057
 Fix building the HEAD with itself
] 
[Use "exec" when running ghc in the wrapper
Ian Lynagh <igloo@earth.li>**20080915100217] 
[Add "#!/bin/sh" to runghc.wrapper
Ian Lynagh <igloo@earth.li>**20080914153507] 
[Add a "#!/bin/sh" to ghc.wrapper
Ian Lynagh <igloo@earth.li>**20080914153344] 
[Fixing directory creation to not create "" directories inside hpc report (harmless but needless)
andygill@ku.edu**20080916172313] 
[Fix Trac #2052 Allowing hpc to understand hsc files.
andygill@ku.edu**20080916030521] 
[Fix Trac #2311: creates subdirs for package coverage information
andygill@ku.edu**20080915204322] 
[FIX #2469: sort out our static/extern inline story
Simon Marlow <marlowsd@gmail.com>**20080916132222
 gcc has changed the meaning of "extern inline" when certain flags are
 on (e.g. --std=gnu99), and this broke our use of it in the header
 files.
] 
[Fix a warning
Simon Marlow <marlowsd@gmail.com>**20080916130922] 
[Stop using mremap() to allocate space for trampolines
Simon Marlow <marlowsd@gmail.com>**20080915145924
 
 This was causing problems because sometimes mremap() moved the memory
 we had allocated from the low 2Gb to above the 2Gb boundary, causing
 some linkages to fail.  There's no MAP_32BIT flag to mremap().
 
 So now we just use mmap(MAP_ANON|MAP_32BIT) to allocated space for the
 trampolines.  People without MAP_32BIT (eg. *BSD) will still have to
 do something else here, such as allocating memory from a fixed
 address; so I've made it slightly easier for those guys, but there's
 still work to do (#2063).
 
 One solution (that Simon PJ is advocating) is to turn on -fPIC by
 default on x86-64.  This is a good solution as it removes the need for
 MAP_32BIT, but doesn't work with -fvia-C, so probably this is for
 later.
] 
[add $(GhcStage[123]HcOpts)
Simon Marlow <marlowsd@gmail.com>**20080912155549] 
[Improve handling of -fdph-* flags
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916034746] 
[Add -fdph-this
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916033710] 
[Remove last traces of package ndp
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916033428] 
[Clean up vectorisation error messages
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916013236] 
[Fix vectoriser bug
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080915042823
 
 We were using mkWildId in situations where it cause disastrous shadowing
] 
[Track changes to dph
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912114028] 
[Change desugaring of PArr literals
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912015609] 
[Expose the dph packages automatically if -dph-* is set
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912004403] 
[Don't panic on non-vectorisable expressions
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080911054333] 
[-Odph implies -fno-spec-constr-count
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080910045339] 
[Improve warning for SpecConstr
simonpj@microsoft.com**20080915154908] 
[White space only
simonpj@microsoft.com**20080915154841] 
[Minor refactoring to get rid of Type.splitNewTyConApp
simonpj@microsoft.com**20080915072946] 
[Refactor the desugaring of RULE lhss a bit
simonpj@microsoft.com**20080915150601
 
 This is just a tidy-up.  Previously we were calling occurAnalyse
 twice on each LHS which was silly and a bit unclean too.  
 
 This patch should have no overall effect, though.
 
] 
[Do not use the Static Arg Transformation by default with -O2
simonpj@microsoft.com**20080915150433
 
 Max has some more heuristics to add, and is meanwhile worried
 that having SAT on by default will make some highly-tuned array
 programs worse.  So it's off by default.  
 
 Use -fstatic-argument-transformation to switch it on.
 
] 
[Comments, and a couple of asserts, only
simonpj@microsoft.com**20080914114641] 
[Fix Trac #2587: take account of type lets
simonpj@microsoft.com**20080914113434
 
 GHC allows a non-recursive let for type varaibles
 	let a = TYPE ty in ...
 But the free-variable finder had not caught up with this
 fact. This patch catches up.
 
] 
[Don't try to float type-lets
simonpj@microsoft.com**20080914113324
 
 A type let shouldn't really occur in SetLevels, but if it does,
 this patch makes sure it is left alone.
 
] 
[add refs and fix a bug (noted by Peter Gammie) in docs of arrow notation
Ross Paterson <ross@soi.city.ac.uk>**20080915104757] 
[Generalise type of 'withExtendedLinkEnv'.
Thomas Schilling <nominolo@googlemail.com>**20080915085738] 
[Use 'GhcMonad' in ghci/InteractiveUI.
Thomas Schilling <nominolo@googlemail.com>**20080915085633] 
[Use 'GhcMonad' in ghci/GhciTags.
Thomas Schilling <nominolo@googlemail.com>**20080915084922] 
[Use 'GhcMonad' in ghci/Debugger.
Thomas Schilling <nominolo@googlemail.com>**20080915084738] 
[Use 'GhcMonad' in ghci/GhciMonad.
Thomas Schilling <nominolo@googlemail.com>**20080915084646] 
[Use 'GhcMonad' in ghc/Main.
Thomas Schilling <nominolo@googlemail.com>**20080914232957] 
[Require PatternSignatures for bootstrapping compiler.
Thomas Schilling <nominolo@googlemail.com>**20080914232642] 
[Use 'GhcMonad' in InteractiveEval.
Thomas Schilling <nominolo@googlemail.com>**20080914232454] 
[Use 'GhcMonad' in GHC and split up checkModule into phases.
Thomas Schilling <nominolo@googlemail.com>**20080914232044
 
 I'm not sure I covered all the ways of throwing errors in the code.
 Some functions throw ProgramErrors, some error messages.  It's still
 quite a mess, but we're getting closer.  The missing cases are mostly
 errors that cannot be fixed by the API client either or are a result
 of wrong usage, so are in any case fatal.
 
 One function, 'getModuleInfo', still returns a 'Maybe', but the
 documentation suggests it should always succeed.  So I may change that
 soon.
 
 The spit-up of of 'checkModule' has pros and cons.  The various forms
 of 'checkModule*' now become:
 
  checkAndLoadModule ms False ~~>
     loadModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
 
  checkAndLoadModule ms True ~~>
    loadModule =<< desugarModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
 
  checkModule mn False ~~>
    typecheckModule =<< parseModule mn
 
  checkModule mn True ~~>
    desugarModule =<< typecheckModule =<< parseModule mn
 
 The old APIs cannot easily be provided, since the result type would be
 different depending on the second argument.  However, a more
 convenient API can be modelled on top of these four functions
 ({parse,typecheck,desugar,load}Module).
] 
[Use 'GhcMonad' in DriverPipeline.  Also haddockify a bit while we're at it.
Thomas Schilling <nominolo@googlemail.com>**20080914220628] 
[Use 'GhcMonad' in HscMain.
Thomas Schilling <nominolo@googlemail.com>**20080914213655] 
[Use 'GhcMonad' in DriverMkDepend.
Thomas Schilling <nominolo@googlemail.com>**20080914212113] 
[Haddockify DynFlags (partial).
Thomas Schilling <nominolo@googlemail.com>**20080914211718] 
[Haddockify 'IE'.
Thomas Schilling <nominolo@googlemail.com>**20080914210016] 
[Provide accessors for 'ImportDecl'.
Thomas Schilling <nominolo@googlemail.com>**20080914205811] 
[Start haddockifying 'HsBindLR'.
Thomas Schilling <nominolo@googlemail.com>**20080914205629] 
[Document 'parseStaticFlags'.
Thomas Schilling <nominolo@googlemail.com>**20080914205316] 
[Introduce 'GhcMonad' class and two default implementations 'Ghc' and 'GhcT'.
Thomas Schilling <nominolo@googlemail.com>**20080914204930
 
 This monad will be required by most public API calls.
] 
[Give the "Failing due to -Werror" message a name.
Thomas Schilling <nominolo@googlemail.com>**20080914173904] 
[Make typechecker top-level functions also return messages instead of
Thomas Schilling <nominolo@googlemail.com>**20080914173228
 printing them.
] 
[Reflect changes of desugarer error reporting in VectMonad.
Thomas Schilling <nominolo@googlemail.com>**20080914172711] 
[Generalise 'handleGhcException' to work with any 'ExceptionMonad'.
Thomas Schilling <nominolo@googlemail.com>**20080914172404] 
[Introduce an 'ExceptionMonad' class.
Thomas Schilling <nominolo@googlemail.com>**20080914172154
 
 This monad provides variants of 'catch', 'bracket', and 'finally', so
 exceptions can be handled in monads that wrap IO.  The latter two
 methods need to be part of the class definition, because GHC uses
 'block' and 'unblock' which are used in the definition of those two
 methods for the IO monad.  A perhaps better class interface would
 consist of 'gcatch', 'gblock', and 'gunblock' and let the latter two
 default to 'id' like is done for non-GHC implementations of 'bracket'
 and 'finally'.
] 
[Provide default MonadIO instance for IO.
Thomas Schilling <nominolo@googlemail.com>**20080914164245] 
[Return instead of print warnings and errors in desugarer.
Thomas Schilling <nominolo@googlemail.com>**20080914163641] 
[Return parser errors and warnings instead of dying.
Thomas Schilling <nominolo@googlemail.com>**20080914162644] 
[Add aliases for bags of warnings and errors.
Thomas Schilling <nominolo@googlemail.com>**20080914160337] 
[Slightly more helpful panic message in DynFlags
Tim Chevalier <chevalier@alum.wellesley.edu>**20080915080650] 
[Comments only: ".core" => ".hcr"
Tim Chevalier <chevalier@alum.wellesley.edu>**20080914203645] 
[We need to tell ghc-pkg to --force if we've only built a profiling library
Ian Lynagh <igloo@earth.li>**20080913153142] 
[If we're profiling GHC, don't bother building the GHC package the vanilla way
Ian Lynagh <igloo@earth.li>**20080913144820] 
[Remove the duplicate show rule in libraries/Makefile
Ian Lynagh <igloo@earth.li>**20080913144413] 
[Move the "show" target from target.mk to boilerplate.mk
Ian Lynagh <igloo@earth.li>**20080913141312
 target.mk isn't included everywhere, but show is always handy
] 
[Change how we detect if we are using the bootstrapping compiler or not
Ian Lynagh <igloo@earth.li>**20080913104658
 I think looking for $(GHC_COMPILER_DIR_ABS) was failing on the Windows
 buildbot due to different path separators. Now we just look for
 "inplace".
] 
[wibble the distrib Makefile
Ian Lynagh <igloo@earth.li>**20080912135932
 We now need to install driver after ghc
] 
[Reinstate the driver/ghc directory, to create a versioned GHC program
Ian Lynagh <igloo@earth.li>**20080912113619
 e.g. $(bindir)/ghc-6.9.20080911
] 
[If USE_NEW_MKDEPEND_FLAGS is YES then don't use the deprecated -optdep flags
Ian Lynagh <igloo@earth.li>**20080912110316] 
[Use --force-local when calling tar in bindisttest/
Ian Lynagh <igloo@earth.li>**20080912012855
 Otherwise it thinks that c:/foo is a remote file
] 
[Fix #2586, bug in THUNK_SELECTORs (again)
Simon Marlow <marlowsd@gmail.com>**20080912130404
 This time, we had forgetten the write barrier in one place.
] 
[TAG 2008-09-12 2
Ian Lynagh <igloo@earth.li>**20080912132848] 
Patch bundle hash:
81f6df5047ea20dc9515ddd77b301ddbc7f395f7
