
New patches:

[Fix #2759: add ability to serialize Rational
'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081209125551] {
hunk ./compiler/utils/Serialized.hs 89
-serializeConstr (FloatConstr d)  = serializeWord8 3 . serializeDouble d
+serializeConstr (FloatConstr r)  = serializeWord8 3 . serializeRational r
hunk ./compiler/utils/Serialized.hs 95
-                                1 -> deserializeInt     bytes $ \ix -> k (AlgConstr ix)
-                                2 -> deserializeInteger bytes $ \i  -> k (IntConstr i)
-                                3 -> deserializeDouble  bytes $ \d  -> k (FloatConstr d)
-                                4 -> deserializeString  bytes $ \s  -> k (StringConstr s)
+                                1 -> deserializeInt      bytes $ \ix -> k (AlgConstr ix)
+                                2 -> deserializeInteger  bytes $ \i  -> k (IntConstr i)
+                                3 -> deserializeRational bytes $ \r  -> k (FloatConstr r)
+                                4 -> deserializeString   bytes $ \s  -> k (StringConstr s)
hunk ./compiler/utils/Serialized.hs 143
-serializeDouble :: Double -> [Word8] -> [Word8]
-serializeDouble = serializeString . show
+serializeRational :: (Real a) => a -> [Word8] -> [Word8]
+serializeRational = serializeString . show . toRational
hunk ./compiler/utils/Serialized.hs 146
-deserializeDouble :: [Word8] -> (Double -> [Word8] -> a) -> a
-deserializeDouble bytes k = deserializeString bytes (k . read)
+deserializeRational :: (Fractional a) => [Word8] -> (a -> [Word8] -> b) -> b
+deserializeRational bytes k = deserializeString bytes (k . fromRational . read)
hunk ./compiler/utils/Serialized.hs 175
+
+
}

Context:

[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] 
[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
] 
[removed Data.Generics.Basics, added Data.Data
'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082808] 
[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] 
[Fix parsing of -ignore-package flag.
Bertram Felgenhauer <int-e@gmx.de>**20080925053820] 
[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>
] 
[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] 
Patch bundle hash:
33bc121a485cb82b8d51deff964beae6c6552c69
