Ticket #3693: StackTraces.dpatch

File StackTraces.dpatch, 144.1 KB (added by batterseapower, 5 years ago)
Line 
1Thu Apr 22 10:59:29 BST 2010  Max Bolingbroke <[email protected]>
2  * STG-based stack traces
3
4New patches:
5
6[STG-based stack traces
7Max Bolingbroke <[email protected]>**20100422095929
8 Ignore-this: f7b1e67e89f6697ad6320d9a940bc2c1
9] {
10hunk ./compiler/cmm/Cmm.hs 181
11                         --               Nothing: a 1-word gap
12                        -- Start of list is the *young* end
13       C_SRT
14+      (Maybe RetDescription)
15 
16 data CmmReturnInfo = CmmMayReturn
17                    | CmmNeverReturns
18hunk ./compiler/cmm/Cmm.hs 192
19 type ClosureLayout = (StgHalfWord, StgHalfWord) -- ptrs, nptrs
20 type ConstrTag = StgHalfWord
21 type ConstrDescription = CmmLit
22+type RetDescription = CmmLit -- Description of return point, for use in user-visible stack traces
23 type FunArity = StgHalfWord
24 type SlowEntry = CmmLit
25   -- We would like this to be a CLabel but
26hunk ./compiler/cmm/CmmBuildInfoTables.hs 425
27             (FunInfo    c s a d e)  -> FunInfo c (toSrt s) a d e
28             (ThunkInfo  c s)        -> ThunkInfo c (toSrt s)
29             (ThunkSelectorInfo x s) -> ThunkSelectorInfo x (toSrt s)
30-            (ContInfo v s)          -> ContInfo (toVars v) (toSrt s)
31+            (ContInfo v s d)        -> ContInfo (toVars v) (toSrt s) d
32 updInfoTbl _ _ t@(CmmInfo _ _ CmmNonInfoTable) = t
33   
34 -- Lower the CmmTopForInfoTables type down to good old CmmTopZ
35hunk ./compiler/cmm/CmmCPS.hs 277
36     where
37       -- User written continuations
38       selectContinuationFormat' (Continuation
39-                          (Right (CmmInfo _ _ (CmmInfoTable _ _ _ (ContInfo format _))))
40+                          (Right (CmmInfo _ _ (CmmInfoTable _ _ _ (ContInfo format _ _))))
41                           label formals _ _) =
42           (formals, Just label, format)
43       -- Either user written non-continuation code
44hunk ./compiler/cmm/CmmCPS.hs 385
45 -- User written continuations
46 applyContinuationFormat formats
47    (Continuation (Right (CmmInfo gc update_frame
48-                             (CmmInfoTable clos prof tag (ContInfo _ srt))))
49+                             (CmmInfoTable clos prof tag (ContInfo _ srt descr))))
50                  label formals is_gc blocks) =
51hunk ./compiler/cmm/CmmCPS.hs 387
52-    Continuation (CmmInfo gc update_frame (CmmInfoTable clos prof tag (ContInfo format srt)))
53+    Continuation (CmmInfo gc update_frame (CmmInfoTable clos prof tag (ContInfo format srt descr)))
54                  label formals is_gc blocks
55     where
56       format = continuation_stack $ maybe unknown_block id $ lookup label formats
57hunk ./compiler/cmm/CmmCPS.hs 401
58 -- CPS generated continuations
59 applyContinuationFormat formats (Continuation
60                           (Left srt) label formals is_gc blocks) =
61-    Continuation (CmmInfo gc Nothing (CmmInfoTable undefined prof tag (ContInfo (continuation_stack $ format) srt)))
62+    Continuation (CmmInfo gc Nothing (CmmInfoTable undefined prof tag (ContInfo (continuation_stack $ format) srt Nothing)))
63                  label formals is_gc blocks
64     where
65       gc = Nothing -- Generated continuations never need a stack check
66hunk ./compiler/cmm/CmmInfo.hs 35
67 emptyContInfoTable :: CmmInfo
68 emptyContInfoTable =
69   CmmInfo Nothing Nothing (CmmInfoTable False (ProfilingInfo zero zero) rET_SMALL
70-                                              (ContInfo [] NoC_SRT))
71+                                              (ContInfo [] NoC_SRT Nothing))
72     where zero = CmmInt 0 wordWidth
73 
74 cmmToRawCmm :: [Cmm] -> IO [RawCmm]
75hunk ./compiler/cmm/CmmInfo.hs 135
76                 std_info = mkStdInfoTable ty_prof' cl_prof' type_tag 0 (mkWordCLit offset)
77 
78           -- A continuation/return-point.
79-          ContInfo stack_layout srt ->
80+          ContInfo stack_layout srt mb_descr ->
81               liveness_data ++
82hunk ./compiler/cmm/CmmInfo.hs 137
83-              mkInfoTableAndCode info_label std_info srt_label entry_label
84+              mkInfoTableAndCode info_label std_info (descr_lit : srt_label) entry_label
85                                  arguments blocks
86               where
87                 std_info = mkStdInfoTable ty_prof' cl_prof' maybe_big_type_tag srt_bitmap
88hunk ./compiler/cmm/CmmInfo.hs 148
89                                      then liveness_tag
90                                      else type_tag
91                 (srt_label, srt_bitmap) = mkSRTLit info_label srt
92+                dummy_relative_ref = CmmLabelDiffOff info_label info_label 0 -- Value of the right width, with sentinel value 0
93+                descr_lit = maybe dummy_relative_ref (makeRelativeRefTo info_label) mb_descr
94 
95 -- Generate a bare info table, not attached to any procedure.
96 mkBareInfoTable :: CLabel -> Unique -> CmmInfoTable -> [CmmTopZ]
97hunk ./compiler/cmm/CmmParse.y 324
98                   do let infoLabel = mkCmmInfoLabel pkg $3
99                      return (mkCmmRetLabel pkg $3,
100                        CmmInfoTable False (ProfilingInfo zeroCLit zeroCLit) (fromIntegral $5)
101-                                    (ContInfo [] NoC_SRT),
102+                                    (ContInfo [] NoC_SRT Nothing),
103                        []) }
104 
105        | 'INFO_TABLE_RET' '(' NAME ',' INT ',' formals_without_hints0 ')'
106hunk ./compiler/cmm/CmmParse.y 333
107                   do live <- sequence (map (liftM Just) $7)
108                      return (mkCmmRetLabel pkg $3,
109                        CmmInfoTable False (ProfilingInfo zeroCLit zeroCLit) (fromIntegral $5)
110-                                    (ContInfo live NoC_SRT),
111+                                    (ContInfo live NoC_SRT Nothing),
112                        live) }
113 
114 body   :: { ExtCode }
115hunk ./compiler/cmm/PprCmm.hs 196
116 pprTypeInfo (ThunkSelectorInfo offset srt) =
117     vcat [ptext (sLit "ptrs: ") <> integer (toInteger offset),
118           ptext (sLit "srt: ") <> ppr srt]
119-pprTypeInfo (ContInfo stack srt) =
120+pprTypeInfo (ContInfo stack srt mb_descr) =
121     vcat [ptext (sLit "stack: ") <> ppr stack,
122hunk ./compiler/cmm/PprCmm.hs 198
123-          ptext (sLit "srt: ") <> ppr srt]
124+          ptext (sLit "srt: ") <> ppr srt,
125+          ptext (sLit "descr: ") <> maybe (ptext (sLit "<none>")) pprLit mb_descr]
126 
127 -- Temp Jan08
128 argDescrType :: ArgDescr -> StgHalfWord
129hunk ./compiler/codeGen/CgInfoTbls.hs 43
130 import StaticFlags
131 
132 import Constants
133+import FastString
134 import Util
135 import Outputable
136 
137hunk ./compiler/codeGen/CgInfoTbls.hs 142
138 emitReturnTarget name stmts
139   = do { srt_info   <- getSRTInfo
140        ; blks <- cgStmtsToBlocks stmts
141+        ; stk_lit <- getStackLabel
142         ; frame <- mkStackLayout
143hunk ./compiler/codeGen/CgInfoTbls.hs 144
144-        ; let info = CmmInfo
145+        ; let ret_descr = makeRelativeRefTo info_lbl stk_lit
146+              info = CmmInfo
147                        gc_target
148                        Nothing
149                        (CmmInfoTable False
150hunk ./compiler/codeGen/CgInfoTbls.hs 151
151                         (ProfilingInfo zeroCLit zeroCLit)
152                         rET_SMALL -- cmmToRawCmm may convert it to rET_BIG
153-                        (ContInfo frame srt_info))
154+                        (ContInfo frame srt_info (Just ret_descr)))
155         ; emitInfoTableAndCode (infoLblToEntryLbl info_lbl) info args blks
156        ; return info_lbl }
157   where
158hunk ./compiler/codeGen/CgMonad.lhs 35
159        EndOfBlockInfo(..),
160        setEndOfBlockInfo, getEndOfBlockInfo,
161 
162+       setStackLabel, getStackLabel,
163        setSRT, getSRT,
164        setSRTLabel, getSRTLabel,
165        setTickyCtrLabel, getTickyCtrLabel,
166hunk ./compiler/codeGen/CgMonad.lhs 102
167 \begin{code}
168 data CgInfoDownwards   -- information only passed *downwards* by the monad
169   = MkCgInfoDown {
170-       cgd_dflags  :: DynFlags,
171-       cgd_mod     :: Module,          -- Module being compiled
172-       cgd_statics :: CgBindings,      -- [Id -> info] : static environment
173-       cgd_srt_lbl :: CLabel,          -- label of the current SRT
174-        cgd_srt     :: SRT,            -- the current SRT
175-       cgd_ticky   :: CLabel,          -- current destination for ticky counts
176-       cgd_eob     :: EndOfBlockInfo   -- Info for stuff to do at end of basic block:
177+       cgd_dflags    :: DynFlags,
178+       cgd_mod       :: Module,                -- Module being compiled
179+       cgd_stack_lbl :: FCode CmmLit,             -- Human-readable label on enclosing binder, for insertion into backtraces
180+       cgd_statics   :: CgBindings,    -- [Id -> info] : static environment
181+       cgd_srt_lbl   :: CLabel,                -- label of the current SRT
182+        cgd_srt       :: SRT,          -- the current SRT
183+       cgd_ticky     :: CLabel,                -- current destination for ticky counts
184+       cgd_eob       :: EndOfBlockInfo -- Info for stuff to do at end of basic block:
185   }
186 
187 initCgInfoDown :: DynFlags -> Module -> CgInfoDownwards
188hunk ./compiler/codeGen/CgMonad.lhs 114
189 initCgInfoDown dflags mod
190-  = MkCgInfoDown {     cgd_dflags  = dflags,
191-                       cgd_mod     = mod,
192-                       cgd_statics = emptyVarEnv,
193-                       cgd_srt_lbl = error "initC: srt_lbl",
194-                       cgd_srt     = error "initC: srt",
195-                       cgd_ticky   = mkTopTickyCtrLabel,
196-                       cgd_eob     = initEobInfo }
197+  = MkCgInfoDown {     cgd_dflags    = dflags,
198+                       cgd_mod       = mod,
199+                       cgd_stack_lbl = error "initC: cgd_stack_lbl",
200+                       cgd_statics   = emptyVarEnv,
201+                       cgd_srt_lbl   = error "initC: srt_lbl",
202+                       cgd_srt       = error "initC: srt",
203+                       cgd_ticky     = mkTopTickyCtrLabel,
204+                       cgd_eob       = initEobInfo }
205 
206 data CgState
207   = MkCgState {
208hunk ./compiler/codeGen/CgMonad.lhs 841
209        info <- getInfoDown
210        return (cgd_eob info)
211 
212+-- ----------------------------------------------------------------------------
213+-- Get/set the binder used for stack traces
214+
215+getStackLabel :: FCode CmmLit
216+getStackLabel = join $ liftM cgd_stack_lbl getInfoDown
217+
218+setStackLabel :: FCode CmmLit -> FCode a -> FCode a
219+setStackLabel stack_lbl code
220+  = do info <- getInfoDown
221+       withInfoDown code (info { cgd_stack_lbl = stack_lbl })
222+
223 -- ----------------------------------------------------------------------------
224 -- Get/set the current SRT label
225 
226hunk ./compiler/codeGen/CodeGen.lhs 48
227 import Module
228 import ErrUtils
229 import Panic
230+import Outputable
231+import SrcLoc
232 \end{code}
233 
234 \begin{code}
235hunk ./compiler/codeGen/CodeGen.lhs 319
236 cgTopRhs bndr (StgRhsCon _cc con args)
237   = forkStatics (cgTopRhsCon bndr con args)
238 
239-cgTopRhs bndr (StgRhsClosure cc bi fvs upd_flag srt args body)
240-  = ASSERT(null fvs)    -- There should be no free variables
241-    setSRTLabel (mkSRTLabel (idName bndr) (idCafInfo bndr)) $
242-    setSRT srt $
243-    forkStatics (cgTopRhsClosure bndr cc bi upd_flag args body)
244+cgTopRhs bndr (StgRhsClosure cc bi fvs upd_flag srt args body) = do
245+    -- pkg <- getThisPackage -- :: PackageId
246+   
247+    -- Construct a monadic action which is able to build a label for the
248+    -- stack-trace functionality.
249+    -- TODO: thread more useful information through to this string?
250+    -- TODO: common up the strings if it is needed in several places?
251+    md <- getModuleName
252+    let name = getName bndr
253+        name_span = nameSrcSpan name
254+        name_doc = ppr (getOccName bndr) <> (if isSystemName name then char '_' <> ppr (nameUnique name) else empty)
255+        loc_doc = if isGoodSrcSpan name_span then ppr name_span else empty
256+        stack_str = showSDoc $ pprModule md <> char '.' <> name_doc <+> loc_doc
257+        cstr = mkStringCLit stack_str
258+   
259+    ASSERT(null fvs)    -- There should be no free variables
260+      setSRTLabel (mkSRTLabel (idName bndr) (idCafInfo bndr)) $
261+      setSRT srt $
262+      setStackLabel cstr $
263+      forkStatics (cgTopRhsClosure bndr cc bi upd_flag args body)
264 \end{code}
265 
266 
267hunk ./compiler/prelude/primops.txt.pp 1135
268 
269 primop  CatchOp "catch#" GenPrimOp
270           (State# RealWorld -> (# State# RealWorld, a #) )
271-       -> (b -> State# RealWorld -> (# State# RealWorld, a #) )
272+       -> (b -> ByteArray# -> State# RealWorld -> (# State# RealWorld, a #) )
273        -> State# RealWorld
274        -> (# State# RealWorld, a #)
275    with
276hunk ./compiler/prelude/primops.txt.pp 1153
277       -- NB: result is bottom
278    out_of_line = True
279 
280+primop  RaiseWithStackOp "raiseWithStack#" GenPrimOp
281+   a -> ByteArray# -> b
282+   with
283+   strictness  = { \ _arity -> mkStrictSig (mkTopDmdType [lazyDmd, lazyDmd] BotRes) }
284+      -- NB: result is bottom
285+   out_of_line = True
286+
287 -- raiseIO# needs to be a primop, because exceptions in the IO monad
288 -- must be *precise* - we don't want the strictness analyser turning
289 -- one kind of bottom into another, as it is allowed to do in pure code.
290hunk ./compiler/simplCore/Simplify.lhs 21
291 import MkId            ( mkImpossibleExpr, seqId )
292 import Var
293 import IdInfo
294-import Name            ( mkSystemVarName, isExternalName )
295+import Name            ( mkSystemVarName, isExternalName, getOccName )
296+import OccName          ( occNameFS )
297 import Coercion
298 import OptCoercion     ( optCoercion )
299 import FamInstEnv       ( topNormaliseType )
300hunk ./compiler/simplCore/Simplify.lhs 445
301 prepareRhs top_lvl env id (Cast rhs co)    -- Note [Float coercions]
302   | (ty1, _ty2) <- coercionKind co       -- Do *not* do this if rhs has an unlifted type
303   , not (isUnLiftedType ty1)            -- see Note [Float coercions (unlifted)]
304-  = do  { (env', rhs') <- makeTrivialWithInfo top_lvl env sanitised_info rhs
305+  = do  { (env', rhs') <- makeTrivialWithInfo top_lvl (Just (occNameFS (getOccName id))) env sanitised_info rhs
306         ; return (env', Cast rhs' co) }
307   where
308     sanitised_info = vanillaIdInfo `setStrictnessInfo` strictnessInfo info
309hunk ./compiler/simplCore/Simplify.lhs 452
310                                    `setDemandInfo`     demandInfo info
311     info = idInfo id
312 
313-prepareRhs top_lvl env0 _ rhs0
314+prepareRhs top_lvl env0 id rhs0
315   = do  { (_is_exp, env1, rhs1) <- go 0 env0 rhs0
316         ; return (env1, rhs1) }
317   where
318hunk ./compiler/simplCore/Simplify.lhs 465
319     go n_val_args env (App fun arg)
320         = do { (is_exp, env', fun') <- go (n_val_args+1) env fun
321              ; case is_exp of
322-                True -> do { (env'', arg') <- makeTrivial top_lvl env' arg
323+                True -> do { (env'', arg') <- makeTrivial top_lvl (Just (occNameFS (getOccName id) `appendFS` fsLit "_arg")) env' arg
324                            ; return (True, env'', App fun' arg') }
325                 False -> return (False, env, App fun arg) }
326     go n_val_args env (Var fun)
327hunk ./compiler/simplCore/Simplify.lhs 532
328 
329 
330 \begin{code}
331-makeTrivial :: TopLevelFlag -> SimplEnv -> OutExpr -> SimplM (SimplEnv, OutExpr)
332+makeTrivial :: TopLevelFlag -> Maybe FastString -> SimplEnv -> OutExpr -> SimplM (SimplEnv, OutExpr)
333 -- Binds the expression to a variable, if it's not trivial, returning the variable
334hunk ./compiler/simplCore/Simplify.lhs 534
335-makeTrivial top_lvl env expr = makeTrivialWithInfo top_lvl env vanillaIdInfo expr
336+makeTrivial top_lvl mb_name_hint env expr = makeTrivialWithInfo top_lvl mb_name_hint env vanillaIdInfo expr
337 
338hunk ./compiler/simplCore/Simplify.lhs 536
339-makeTrivialWithInfo :: TopLevelFlag -> SimplEnv -> IdInfo
340+makeTrivialWithInfo :: TopLevelFlag -> Maybe FastString -> SimplEnv -> IdInfo
341                     -> OutExpr -> SimplM (SimplEnv, OutExpr)
342 -- Propagate strictness and demand info to the new binder
343 -- Note [Preserve strictness when floating coercions]
344hunk ./compiler/simplCore/Simplify.lhs 541
345 -- Returned SimplEnv has same substitution as incoming one
346-makeTrivialWithInfo top_lvl env info expr
347+makeTrivialWithInfo top_lvl mb_name_hint env info expr
348   | exprIsTrivial expr                                 -- Already trivial
349   || not (bindingOk top_lvl expr expr_ty)      -- Cannot trivialise
350                                                --   See Note [Cannot trivialise]
351hunk ./compiler/simplCore/Simplify.lhs 548
352   = return (env, expr)
353   | otherwise           -- See Note [Take care] below
354   = do  { uniq <- getUniqueM
355-        ; let name = mkSystemVarName uniq (fsLit "a")
356+        ; let name = mkSystemVarName uniq (mb_name_hint `orElse` fsLit "a")
357               var = mkLocalIdWithInfo name expr_ty info
358         ; env' <- completeNonRecX top_lvl env False var var expr
359        ; expr' <- simplVar env' var
360hunk ./compiler/simplCore/Simplify.lhs 1938
361 mkDupableCont env (StrictArg info cci cont)
362         -- See Note [Duplicating StrictArg]
363   = do { (env', dup, nodup) <- mkDupableCont env cont
364-       ; (env'', args')     <- mapAccumLM (makeTrivial NotTopLevel) env' (ai_args info)
365+       ; (env'', args')     <- mapAccumLM (makeTrivial NotTopLevel Nothing) env' (ai_args info)
366        ; return (env'', StrictArg (info { ai_args = args' }) cci dup, nodup) }
367 
368 mkDupableCont env (ApplyTo _ arg se cont)
369hunk ./compiler/simplCore/Simplify.lhs 1948
370         --              in [...hole...] a
371     do  { (env', dup_cont, nodup_cont) <- mkDupableCont env cont
372         ; arg' <- simplExpr (se `setInScope` env') arg
373-        ; (env'', arg'') <- makeTrivial NotTopLevel env' arg'
374+        ; (env'', arg'') <- makeTrivial NotTopLevel Nothing env' arg'
375         ; let app_cont = ApplyTo OkToDup arg'' (zapSubstEnv env'') dup_cont
376         ; return (env'', app_cont, nodup_cont) }
377 
378hunk ./includes/Cmm.h 525
379 #define TICK_SLOW_CALL_p()             TICK_BUMP(SLOW_CALL_p_ctr)
380 #define TICK_SLOW_CALL_pv()            TICK_BUMP(SLOW_CALL_pv_ctr)
381 #define TICK_SLOW_CALL_pp()            TICK_BUMP(SLOW_CALL_pp_ctr)
382+#define TICK_SLOW_CALL_ppv()           TICK_BUMP(SLOW_CALL_ppv_ctr)
383 #define TICK_SLOW_CALL_ppp()           TICK_BUMP(SLOW_CALL_ppp_ctr)
384 #define TICK_SLOW_CALL_pppp()                  TICK_BUMP(SLOW_CALL_pppp_ctr)
385 #define TICK_SLOW_CALL_ppppp()         TICK_BUMP(SLOW_CALL_ppppp_ctr)
386hunk ./includes/rts/storage/InfoTables.h 304
387 
388 typedef struct {
389 #if defined(TABLES_NEXT_TO_CODE)
390-    OFFSET_FIELD( srt_offset );        /* offset to the SRT table */
391+    OFFSET_FIELD( srt_offset );         /* offset to the SRT table */
392+    OFFSET_FIELD( ret_desc_offset );    /* offset to the name of the return point as: Package:Module.Name */
393     StgInfoTable i;
394 #else
395     StgInfoTable i;
396hunk ./includes/rts/storage/InfoTables.h 309
397-    StgSRT      *srt;  /* pointer to the SRT table */
398+    char        *ret_desc;  /* pointer to the name of the return point as: Package:Module.Name */
399+    StgSRT      *srt;       /* pointer to the SRT table */
400 #endif
401 } StgRetInfoTable;
402 
403hunk ./includes/rts/storage/InfoTables.h 373
404 #define GET_SRT(info) ((info)->srt)
405 #endif
406 
407+/*
408+ * GET_RET_DESC(info)
409+ * info must be a StgRetInfoTable*.
410+ */
411+#ifdef TABLES_NEXT_TO_CODE
412+#define GET_RET_DESC(info) (((info)->ret_desc_offset != 0) ? (char *)((StgWord)((info)+1) + (info->ret_desc_offset)) : 0)
413+#else
414+#define GET_RET_DESC(info) ((info)->ret_desc)
415+#endif
416+
417 /*
418  * GET_CON_DESC(info)
419  * info must be a StgConInfoTable*.
420hunk ./rts/Adjustor.c 220
421 stgAllocStable(size_t size_in_bytes, StgStablePtr *stable)
422 {
423   StgArrWords* arr;
424-  nat data_size_in_words, total_size_in_words;
425   
426hunk ./rts/Adjustor.c 221
427-  /* round up to a whole number of words */
428-  data_size_in_words  = (size_in_bytes + sizeof(W_) + 1) / sizeof(W_);
429-  total_size_in_words = sizeofW(StgArrWords) + data_size_in_words;
430
431-  /* allocate and fill it in */
432-  arr = (StgArrWords *)allocate(total_size_in_words);
433-  SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, data_size_in_words);
434+  /* allocate unfilled array */
435+  arr = stgAllocArrWords(size_in_bytes);
436 
437   /* obtain a stable ptr */
438   *stable = getStablePtr((StgPtr)arr);
439hunk ./rts/Exception.cmm 359
440   jump stg_raisezh;
441 }
442 
443+INFO_TABLE_RET(stg_raiseWithStack_ret, RET_SMALL, P_ arg1, P_ arg2)
444+{
445+  R1 = Sp(1);
446+  R2 = Sp(2);
447+  Sp = Sp + WDS(3);
448+  W_[no_break_on_exception] = 1; 
449+  jump stg_raiseWithStackzh;
450+}
451+
452 stg_raisezh
453 {
454hunk ./rts/Exception.cmm 370
455+    W_ reified_stack;
456+    /* args : R1 :: Exception */
457+   
458+    ("ptr" reified_stack) = foreign "C" reifyStack (MyCapability() "ptr", Sp "ptr") [];
459+    R2 = reified_stack;
460+    jump stg_raiseWithStackzh;
461+}
462+
463+stg_raiseWithStackzh
464+{
465     W_ handler;
466     W_ frame_type;
467     W_ exception;
468hunk ./rts/Exception.cmm 383
469-    /* args : R1 :: Exception */
470+    W_ reified_stack;
471+    /* args : R1 :: Exception, R2 :: stack */
472 
473    exception = R1;
474hunk ./rts/Exception.cmm 387
475+   reified_stack = R2;
476 
477 #if defined(PROFILING)
478     /* Debugging tool: on raising an  exception, show where we are. */
479hunk ./rts/Exception.cmm 459
480             // be per-thread.
481             CInt[rts_stop_on_exception] = 0;
482             ("ptr" ioAction) = foreign "C" deRefStablePtr (W_[rts_breakpoint_io_action] "ptr") [];
483-            Sp = Sp - WDS(7);
484+            Sp = Sp - WDS(8);
485+            Sp(7) = reified_stack;
486             Sp(6) = exception;
487hunk ./rts/Exception.cmm 462
488-            Sp(5) = stg_raise_ret_info;
489+            Sp(5) = stg_raiseWithStack_ret_info;
490             Sp(4) = stg_noforceIO_info;    // required for unregisterised
491             Sp(3) = exception;             // the AP_STACK
492             Sp(2) = ghczmprim_GHCziBool_True_closure; // dummy breakpoint info
493hunk ./rts/Exception.cmm 478
494         * We will leave the stack in a GC'able state, see the stg_stop_thread
495         * entry code in StgStartup.cmm.
496         */
497+       
498+        /* TODO: print the reified_stack, since we've run out of catch frames */
499+       
500        Sp = CurrentTSO + TSO_OFFSET_StgTSO_stack
501                + WDS(TO_W_(StgTSO_stack_size(CurrentTSO))) - WDS(2);
502        Sp(1) = exception;      /* save the exception */
503hunk ./rts/Exception.cmm 533
504     StgTSO_flags(CurrentTSO) = %lobits32(
505        TO_W_(StgTSO_flags(CurrentTSO)) | TSO_BLOCKEX | TSO_INTERRUPTIBLE);
506 
507-    /* Call the handler, passing the exception value and a realworld
508+    /* Call the handler, passing the exception value, stack, and a realworld
509      * token as arguments.
510      */
511hunk ./rts/Exception.cmm 536
512-    Sp_adj(-1);
513+    Sp_adj(-2);
514+    Sp(1) = reified_stack;
515     Sp(0) = exception;
516     R1 = handler;
517     Sp_adj(-1);
518hunk ./rts/Exception.cmm 542
519     TICK_UNKNOWN_CALL();
520-    TICK_SLOW_CALL_pv();
521-    jump RET_LBL(stg_ap_pv);
522+    TICK_SLOW_CALL_ppv();
523+    jump RET_LBL(stg_ap_ppv);
524 }
525 
526 stg_raiseIOzh
527hunk ./rts/RtsUtils.c 257
528 }
529 
530 /* -----------------------------------------------------------------------------
531+   Allocating simple arrays.
532+   -------------------------------------------------------------------------- */
533+
534+StgArrWords *
535+stgAllocArrWords(Capability *cap, size_t size_in_bytes)
536+{
537+    StgArrWords* arr;
538+    nat data_size_in_words, total_size_in_words;
539+
540+    /* round up to a whole number of words */
541+    data_size_in_words  = (size_in_bytes + sizeof(W_) - 1) / sizeof(W_);
542+    total_size_in_words = sizeofW(StgArrWords) + data_size_in_words;
543+
544+    /* allocate and fill it in */
545+    arr = (StgArrWords *)allocate(cap, total_size_in_words);
546+    SET_ARR_HDR(arr, &stg_ARR_WORDS_info, CCCS, data_size_in_words);
547+   
548+    return arr;
549+}
550+
551+/* -----------------------------------------------------------------------------
552    Stack overflow
553   
554    Not sure if this belongs here.
555hunk ./rts/RtsUtils.h 35
556  * Misc other utilities
557  * -------------------------------------------------------------------------- */
558 
559+StgArrWords *stgAllocArrWords(Capability *cap, size_t size_in_bytes);
560+
561 void heapOverflow(void);
562 
563 char *time_str(void);
564hunk ./rts/Schedule.c 2440
565     }
566 }
567 
568+/* -----------------------------------------------------------------------------
569+   reifyStack
570+   
571+   This function is called by the raise# primitve, to reify the STG stack as a
572+   null-termiante array of pointers to C strings.
573+   -------------------------------------------------------------------------- */
574+
575+
576+StgArrWords *
577+reifyStack( Capability *cap, StgPtr sp )
578+{
579+    const StgRetInfoTable* ret_info;
580+    nat framecount;
581+    StgArrWords* reified;
582+    char **reified_payload;
583+    StgPtr orig_sp;
584+   
585+    framecount = 0;
586+    orig_sp = sp;
587+   
588+    // 1) Determine the length of the array we need to allocate to store the stack frame pointer array
589+    for (; ret_info = get_ret_itbl((StgClosure *)sp), ret_info->i.type != STOP_FRAME; sp += stack_frame_sizeW((StgClosure *)sp)) {
590+        if (GET_RET_DESC(ret_info)) {
591+            framecount++;
592+        }
593+    }
594+   
595+    // 2) Allocate array of that size. The length will be stored in the StgArrWords, so we don't need any terminators
596+    reified = stgAllocArrWords(cap, framecount * sizeof(char *));
597+    reified_payload = (char**)(&(reified->payload));
598+   
599+    // 3) Crawl the stack again, but this time filling in the newly-allocated array
600+    for (sp = orig_sp; ret_info = get_ret_itbl((StgClosure *)sp), ret_info->i.type != STOP_FRAME; sp += stack_frame_sizeW((StgClosure *)sp)) {
601+        if (GET_RET_DESC(ret_info)) {
602+            *reified_payload = GET_RET_DESC(ret_info);
603+            reified_payload++;
604+        }
605+    }
606+   
607+    // 4) Return
608+    return reified;
609+}
610+
611 
612 /* -----------------------------------------------------------------------------
613    findRetryFrameHelper
614hunk ./rts/Schedule.h 46
615 /* raiseExceptionHelper */
616 StgWord raiseExceptionHelper (StgRegTable *reg, StgTSO *tso, StgClosure *exception);
617 
618+/* reifyStack */
619+StgArrWords *reifyStack( Capability* cap, StgPtr sp );
620+
621 /* findRetryFrameHelper */
622 StgWord findRetryFrameHelper (StgTSO *tso);
623 
624}
625
626Context:
627
628[Handle IND_STATIC in isRetainer
629Ian Lynagh <[email protected]>**20100409104207
630 IND_STATIC used to be an error, but at the moment it can happen
631 as isAlive doesn't look through IND_STATIC as it ignores static
632 closures. See trac #3956 for a program that hit this error.
633]
634[Add Data and Typeable instances to HsSyn
635David Waern <[email protected]>**20100330011020
636 Ignore-this: c3f2717207b15539fea267c36b686e6a
637 
638 The instances (and deriving declarations) have been taken from the ghc-syb
639 package.
640]
641[Fix for derefing ThreadRelocated TSOs in MVar operations
642Simon Marlow <[email protected]>**20100407092824
643 Ignore-this: 94dd7c68a6094eda667e2375921a8b78
644]
645[sanity check fix
646Simon Marlow <[email protected]>**20100407092746
647 Ignore-this: 9c18cd5f5393e5049015ca52e62a1269
648]
649[get the reg liveness right in the putMVar# heap check
650Simon Marlow <[email protected]>**20100407092724
651 Ignore-this: b1ba07a59ecfae00e9a1f8391741abc
652]
653[initialise the headers of MSG_BLACKHOLE objects properly
654Simon Marlow <[email protected]>**20100407081712
655 Ignore-this: 183dcd0ca6a395d08db2be12b02bdd79
656]
657[initialise the headers of MVAR_TSO_QUEUE objects properly
658Simon Marlow <[email protected]>**20100407081514
659 Ignore-this: 4b4a2f30cf2fb69ca4128c41744687bb
660]
661[undo debugging code
662Simon Marlow <[email protected]>**20100406142740
663 Ignore-this: 323c2248f817b6717c19180482fc4b00
664]
665[putMVar#: fix reg liveness in the heap check
666Simon Marlow <[email protected]>**20100406135832
667 Ignore-this: cddd2c7807ac7612c9b2c4c0d384d284
668]
669[account for the new BLACKHOLEs in the GHCi debugger
670Simon Marlow <[email protected]>**20100406133406
671 Ignore-this: 4d4aeb4bbada3f50dc1fb0123f565e8f
672]
673[don't forget to deRefTSO() in tryWakeupThread()
674Simon Marlow <[email protected]>**20100406130411
675 Ignore-this: 171d57c4f8653835dec0b69f9be9881c
676]
677[Fix bug in popRunQueue
678Simon Marlow <[email protected]>**20100406091453
679 Ignore-this: 9d3cec8f18f5c5cbd51751797386eb6f
680]
681[fix bug in migrateThread()
682Simon Marlow <[email protected]>**20100401105840
683 Ignore-this: 299bcf0d1ea0f8865f3e845eb93d2ad3
684]
685[Remove the IND_OLDGEN and IND_OLDGEN_PERM closure types
686Simon Marlow <[email protected]>**20100401093519
687 Ignore-this: 95f2480c8a45139835eaf5610217780b
688 These are no longer used: once upon a time they used to have different
689 layout from IND and IND_PERM respectively, but that is no longer the
690 case since we changed the remembered set to be an array of addresses
691 instead of a linked list of closures.
692]
693[Change the representation of the MVar blocked queue
694Simon Marlow <[email protected]>**20100401091605
695 Ignore-this: 20a35bfabacef2674df362905d7834fa
696 
697 The list of threads blocked on an MVar is now represented as a list of
698 separately allocated objects rather than being linked through the TSOs
699 themselves.  This lets us remove a TSO from the list in O(1) time
700 rather than O(n) time, by marking the list object.  Removing this
701 linear component fixes some pathalogical performance cases where many
702 threads were blocked on an MVar and became unreachable simultaneously
703 (nofib/smp/threads007), or when sending an asynchronous exception to a
704 TSO in a long list of thread blocked on an MVar.
705 
706 MVar performance has actually improved by a few percent as a result of
707 this change, slightly to my surprise.
708 
709 This is the final cleanup in the sequence, which let me remove the old
710 way of waking up threads (unblockOne(), MSG_WAKEUP) in favour of the
711 new way (tryWakeupThread and MSG_TRY_WAKEUP, which is idempotent).  It
712 is now the case that only the Capability that owns a TSO may modify
713 its state (well, almost), and this simplifies various things.  More of
714 the RTS is based on message-passing between Capabilities now.
715]
716[eliminate some duplication with a bit of CPP
717Simon Marlow <[email protected]>**20100330154355
718 Ignore-this: 838f7d341f096ca14c86ab9c81193e36
719]
720[Make ioManagerDie() idempotent
721Simon Marlow <[email protected]>**20100401100705
722 Ignore-this: a5996b43cdb2e2d72e6e971d7ea925fb
723 Avoids screeds of "event buffer overflowed; event dropped" in
724 conc059(threaded1).
725]
726[Move a thread to the front of the run queue when another thread blocks on it
727Simon Marlow <[email protected]>**20100329144521
728 Ignore-this: c518ff0d41154680edc811d891826a29
729 This fixes #3838, and was made possible by the new BLACKHOLE
730 infrastructure.  To allow reording of the run queue I had to make it
731 doubly-linked, which entails some extra trickiness with regard to
732 GC write barriers and suchlike.
733]
734[remove non-existent MUT_CONS symbols
735Simon Marlow <[email protected]>**20100330152600
736 Ignore-this: 885628257a9d03f2ece2a754d993014a
737]
738[change throwTo to use tryWakeupThread rather than unblockOne
739Simon Marlow <[email protected]>**20100329144613
740 Ignore-this: 10ad4965e6c940db71253f1c72218bbb
741]
742[tiny GC optimisation
743Simon Marlow <[email protected]>**20100329144551
744 Ignore-this: 9e095b9b73fff0aae726f9937846ba92
745]
746[New implementation of BLACKHOLEs
747Simon Marlow <[email protected]>**20100329144456
748 Ignore-this: 96cd26793b4e6ab9ddd0d59aae5c2f1d
749 
750 This replaces the global blackhole_queue with a clever scheme that
751 enables us to queue up blocked threads on the closure that they are
752 blocked on, while still avoiding atomic instructions in the common
753 case.
754 
755 Advantages:
756 
757  - gets rid of a locked global data structure and some tricky GC code
758    (replacing it with some per-thread data structures and different
759    tricky GC code :)
760 
761  - wakeups are more prompt: parallel/concurrent performance should
762    benefit.  I haven't seen anything dramatic in the parallel
763    benchmarks so far, but a couple of threading benchmarks do improve
764    a bit.
765 
766  - waking up a thread blocked on a blackhole is now O(1) (e.g. if
767    it is the target of throwTo).
768 
769  - less sharing and better separation of Capabilities: communication
770    is done with messages, the data structures are strictly owned by a
771    Capability and cannot be modified except by sending messages.
772 
773  - this change will utlimately enable us to do more intelligent
774    scheduling when threads block on each other.  This is what started
775    off the whole thing, but it isn't done yet (#3838).
776 
777 I'll be documenting all this on the wiki in due course.
778 
779]
780[Fix warnings (allow pushOnRunQueue() to not be inlined)
781Simon Marlow <[email protected]>**20100401114559
782 Ignore-this: f40bfbfad70a5165a946d11371605b7d
783]
784[remove out of date comment
785Simon Marlow <[email protected]>**20100401105853
786 Ignore-this: 26af88dd418ee0bcda7223b3b7e4e8d2
787]
788[tidy up spacing in stderr traces
789Simon Marlow <[email protected]>**20100326163122
790 Ignore-this: 16558b0433a274be217d4bf39aa4946
791]
792[Fix an assertion that was not safe when running in parallel
793Simon Marlow <[email protected]>**20100325143656
794 Ignore-this: cad08fb8900eb3a475547af0189fcc47
795]
796[Never jump directly to a thunk's entry code, even if it is single-entry
797Simon Marlow <[email protected]>**20100325114847
798 Ignore-this: 938da172c06a97762ef605c8fccfedf1
799 I don't think this fixes any bugs as we don't have single-entry thunks
800 at the moment, but it could cause problems for parallel execution if
801 we ever did re-introduce update avoidance.
802]
803[Rename forgotten -dverbose-simpl to -dverbose-core2core in the docs.
804Milan Straka <[email protected]>**20100331153626
805 Ignore-this: 2da58477fb96e1cfb80f37dddd7c422c
806]
807[Add -pa and -V to the documentation of time profiling options.
808Milan Straka <[email protected]>**20100329191121
809 Ignore-this: be74d216481ec5a19e5f40f85e6e3d65
810]
811[Keep gcc 4.5 happy
812Simon Marlow <[email protected]>**20100330120425
813 Ignore-this: 7811878cc2bd1ce9cfbb5bf102fe3454
814]
815[Fix warning compiling Linker.c for PPC Mac
816[email protected]**20100403182355
817 Ignore-this: e2d2448770c9714ce17dd6cf3e297063
818 The warning message eliminated is:
819 > rts/Linker.c:4756:0:
820 >      warning: nested extern declaration of 'symbolsWithoutUnderscore'
821]
822[Fix error compiling AsmCodeGen.lhs for PPC Mac (mkRtsCodeLabel)
823[email protected]**20100403181656
824 Ignore-this: deb7524ea7852a15a2ac0849c8c82f74
825 The error messages eliminated are:
826 > compiler/nativeGen/AsmCodeGen.lhs:875:31:
827 >     Not in scope: `mkRtsCodeLabel'
828 > compiler/nativeGen/AsmCodeGen.lhs:879:31:
829 >     Not in scope: `mkRtsCodeLabel'
830 > compiler/nativeGen/AsmCodeGen.lhs:883:31:
831 >     Not in scope: `mkRtsCodeLabel'
832]
833[Fix error compiling AsmCodeGen.lhs for PPC Mac (DestBlockId)
834[email protected]**20100403180643
835 Ignore-this: 71e833e94ed8371b2ffabc2cf80bf585
836 The error message eliminated is:
837 > compiler/nativeGen/AsmCodeGen.lhs:637:16:
838 >     Not in scope: data constructor `DestBlockId'
839]
840[Fix boot-pkgs's sed usage to work with Solaris's sed
841Ian Lynagh <[email protected]>**20100401153441]
842[Pass "-i org.haskell.GHC" to packagemaker when building the OS X installer
843Ian Lynagh <[email protected]>**20100331144707
844 This seems to fix this failure:
845 [...]
846 ** BUILD SUCCEEDED **
847 rm -f -f GHC-system.pmdoc/*-contents.xml
848 /Developer/usr/bin/packagemaker -v --doc GHC-system.pmdoc\
849              -o /Users/ian/to_release/ghc-6.12.1.20100330/GHC-6.12.1.20100330-i386.pkg
850 2010-03-31 15:08:15.695 packagemaker[13909:807] Setting to : 0 (null)
851 2010-03-31 15:08:15.709 packagemaker[13909:807] Setting to : 0 org.haskell.glasgowHaskellCompiler.ghc.pkg
852 2010-03-31 15:08:15.739 packagemaker[13909:807] relocate: (null) 0
853 2010-03-31 15:08:15.740 packagemaker[13909:807] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSXMLDocument initWithXMLString:options:error:]: nil argument'
854 2010-03-31 15:08:15.741 packagemaker[13909:807] Stack: (
855     2511962091,
856     2447007291,
857     2511961547,
858     2511961610,
859     2432803204,
860     453371,
861     447720,
862     436209,
863     435510,
864     9986,
865     9918
866 )
867 make[1]: *** [framework-pkg] Trace/BPT trap
868 make: *** [framework-pkg] Error 2
869]
870[Use machdepCCOpts when compiling the file to toggle -(no-)rtsopts
871Ian Lynagh <[email protected]>**20100331161302
872 Should fix toggling on OS X "Snow Leopard". Diagnosed by Roman Leshchinskiy.
873]
874[Avoid a non-portable use of tar reported by Roman Leshchinskiy
875Ian Lynagh <[email protected]>**20100330145802]
876[Don't install EXTRA_PACKAGES by default
877Simon Marlow <[email protected]>**20100330142714
878 Ignore-this: d4cc8f87a6de8d9d1d6dc9b77130b3
879]
880[fix a non-portable printf format
881Simon Marlow <[email protected]>**20100330134437
882 Ignore-this: d41c23c54ec29654cb2049de1e588570
883]
884[avoid single quote in #error
885Simon Marlow <[email protected]>**20100330120346
886 Ignore-this: 663f39e7a27fead2f648fbf22d345bb4
887]
888[use FMT_Word64 instead of locally-defined version
889Simon Marlow <[email protected]>**20100330114650
890 Ignore-this: 82697b8095dffb3a8e196c687006ece0
891]
892[remove old/unused DotnetSupport and GhcLibsWithUnix
893Simon Marlow <[email protected]>**20100330123732
894 Ignore-this: c68814868b3671abdc369105bbeafe6c
895]
896[fix return type cast in f.i.wrapper when using libffi (#3516)
897Simon Marlow <[email protected]>**20100329154220
898 Ignore-this: f898eb8c9ae2ca2009e539735b92c438
899 
900 Original fix submitted by
901   Sergei Trofimovich <[email protected]>
902 modified by me:
903  - exclude 64-bit types
904  - compare uniques, not strings
905  - #include "ffi.h" is conditional
906]
907[libffi: install 'ffitarget.h' header as sole 'ffi.h' is unusable
908Simon Marlow <[email protected]>**20100329135734
909 Ignore-this: f9b555ea289d8df1aa22cb6faa219a39
910 Submitted by: Sergei Trofimovich <[email protected]>
911 Re-recorded against HEAD.
912]
913[avoid a fork deadlock (see comments)
914Simon Marlow <[email protected]>**20100329132329
915 Ignore-this: 3377f88b83bb3b21e42d7fc5f0d866f
916]
917[tidy up the end of the all_tasks list after forking
918Simon Marlow <[email protected]>**20100329132253
919 Ignore-this: 819d679875be5f344e816210274d1c29
920]
921[Add a 'setKeepCAFs' external function (#3900)
922Simon Marlow <[email protected]>**20100329110036
923 Ignore-this: ec532a18cad4259a09847b0b9ae2e1d2
924]
925[Explicitly check whether ar supports the @file syntax
926Ian Lynagh <[email protected]>**20100329123325
927 rather than assuming that all GNU ar's do.
928 Apparently OpenBSD's older version doesn't.
929]
930[Fix the format specifier for Int64/Word64 on Windows
931Ian Lynagh <[email protected]>**20100327182126
932 mingw doesn't understand %llu/%lld - it treats them as 32-bit rather
933 than 64-bit. We use %I64u/%I64d instead.
934]
935[Fix the ghci startmenu item
936Ian Lynagh <[email protected]>**20100326235934
937 I'm not sure what changed, but it now doesn't work for me without
938 the "Start in" field being set.
939]
940[Fix paths to docs in "Start Menu" entries in Windows installer; fixes #3847
941Ian Lynagh <[email protected]>**20100326155917]
942[Add a licence file for the Windows installer to use
943Ian Lynagh <[email protected]>**20100326155130]
944[Add gcc-g++ to the inplace mingw installation; fixes #3893
945Ian Lynagh <[email protected]>**20100326154714]
946[Add the licence file to the Windows installer. Fixes #3934
947Ian Lynagh <[email protected]>**20100326152449]
948[Quote the paths to alex and happy in configure
949Ian Lynagh <[email protected]>**20100325143449
950 Ignore-this: d6d6e1a250f88985bbeea760e63a79db
951]
952[Use </> rather than ++ "/"
953Ian Lynagh <[email protected]>**20100325133237
954 This stops us generating paths like
955     c:\foo\/ghc460_0/ghc460_0.o
956 which windres doesn't understand.
957]
958[Append $(exeext) to utils/ghc-pkg_dist_PROG
959Ian Lynagh <[email protected]>**20100324233447
960 Fixes bindist creation
961]
962[A sanity check
963Simon Marlow <[email protected]>**20100325110500
964 Ignore-this: 3b3b76d898c822456857e506b7531e65
965]
966[do_checks: do not set HpAlloc if the stack check fails
967Simon Marlow <[email protected]>**20100325110328
968 Ignore-this: 899ac8c29ca975d03952dbf4608d758
969 
970 This fixes a very rare heap corruption bug, whereby
971 
972  - a context switch is requested, which sets HpLim to zero
973    (contextSwitchCapability(), called by the timer signal or
974    another Capability).
975 
976  - simultaneously a stack check fails, in a code fragment that has
977    both a stack and a heap check.
978 
979 The RTS then assumes that a heap-check failure has occurred and
980 subtracts HpAlloc from Hp, although in fact it was a stack-check
981 failure and retreating Hp will overwrite valid heap objects.  The bug
982 is that HpAlloc should only be set when Hp has been incremented by the
983 heap check.  See comments in rts/HeapStackCheck.cmm for more details.
984 
985 This bug is probably incredibly rare in practice, but I happened to be
986 working on a test that triggers it reliably:
987 concurrent/should_run/throwto001, compiled with -O -threaded, args 30
988 300 +RTS -N2, run repeatedly in a loop.
989]
990[comments and formatting only
991Simon Marlow <[email protected]>**20100325104617
992 Ignore-this: c0a211e15b5953bb4a84771bcddd1d06
993]
994[Change how perl scripts get installed; partially fixes #3863
995Ian Lynagh <[email protected]>**20100324171422
996 We now regenerate them when installing, which means the path for perl
997 doesn't get baked in
998]
999[Pass the location of gcc in the ghc wrapper script; partially fixes #3863
1000Ian Lynagh <[email protected]>**20100324171408
1001 This means we don't rely on baking a path to gcc into the executable
1002]
1003[Quote the ar path in configure
1004Ian Lynagh <[email protected]>**20100324162043]
1005[Remove unused cUSER_WAY_NAMES cUSER_WAY_OPTS
1006Ian Lynagh <[email protected]>**20100324145048]
1007[Remove unused cCONTEXT_DIFF
1008Ian Lynagh <[email protected]>**20100324145013]
1009[Remove unused cEnableWin32DLLs
1010Ian Lynagh <[email protected]>**20100324144841]
1011[Remove unused cGHC_CP
1012Ian Lynagh <[email protected]>**20100324144656]
1013[Fix the build for non-GNU-ar
1014Ian Lynagh <[email protected]>**20100324132907]
1015[Tweak the Makefile code for making .a libs; fixes trac #3642
1016Ian Lynagh <[email protected]>**20100323221325
1017 The main change is that, rather than using "xargs ar" we now put
1018 all the filenames into a file, and do "ar @file". This means that
1019 ar adds all the files at once, which works around a problem where
1020 files with the same basename in a later invocation were overwriting
1021 the existing file in the .a archive.
1022]
1023[Enable shared libraries on Windows; fixes trac #3879
1024Ian Lynagh <[email protected]>**20100320231414
1025 Ignore-this: c93b35ec5b7a7fa6ddb286d17a616216
1026]
1027[Add the external core PDF to the new build system
1028Ian Lynagh <[email protected]>**20100321161909]
1029[Allow specifying $threads directly when validating
1030Ian Lynagh <[email protected]>**20100321112835]
1031[Remove LazyUniqFM; fixes trac #3880
1032Ian Lynagh <[email protected]>**20100320213837]
1033[UNDO: slight improvement to scavenging ...
1034Simon Marlow <[email protected]>**20100319153413
1035 Ignore-this: f0ab581c07361f7b57eae02dd6ec893c
1036 
1037 Accidnetally pushed this patch which, while it validates, isn't
1038 correct.
1039 
1040 rolling back:
1041 
1042 Fri Mar 19 11:21:27 GMT 2010  Simon Marlow <[email protected]>
1043   * slight improvement to scavenging of update frames when a collision has occurred
1044 
1045     M ./rts/sm/Scav.c -19 +15
1046]
1047[slight improvement to scavenging of update frames when a collision has occurred
1048Simon Marlow <[email protected]>**20100319112127
1049 Ignore-this: 6de2bb9614978975f17764a0f259d9bf
1050]
1051[Don't install the utf8-string package
1052Ian Lynagh <[email protected]>**20100317212709]
1053[Don't use -Bsymbolic when linking the RTS
1054Ian Lynagh <[email protected]>**20100316233357
1055 This makes the RTS hooks work when doing dynamic linking
1056]
1057[Fix Trac #3920: Template Haskell kinds
1058[email protected]**20100317123519
1059 Ignore-this: 426cac7920446e04f3cc30bd1d9f76e2
1060 
1061 Fix two places where we were doing foldl instead of foldr
1062 after decomposing a Kind.  Strange that the same bug appears
1063 in two quite different places!
1064]
1065[copy_tag_nolock(): fix write ordering and add a write_barrier()
1066Simon Marlow <[email protected]>**20100316143103
1067 Ignore-this: ab7ca42904f59a0381ca24f3eb38d314
1068 
1069 Fixes a rare crash in the parallel GC.
1070 
1071 If we copy a closure non-atomically during GC, as we do for all
1072 immutable values, then before writing the forwarding pointer we better
1073 make sure that the closure itself is visible to other threads that
1074 might follow the forwarding pointer.  I imagine this doesn't happen
1075 very often, but I just found one case of it: in scavenge_stack, the
1076 RET_FUN case, after evacuating ret_fun->fun we then follow it and look
1077 up the info pointer.
1078]
1079[Add sliceP mapping to vectoriser builtins
1080[email protected]**20100316060517
1081 Ignore-this: 54c3cafff584006b6fbfd98124330aa3
1082]
1083[Comments only
1084[email protected]**20100311064518
1085 Ignore-this: d7dc718cc437d62aa5b1b673059a9b22
1086]
1087[TAG 2010-03-16
1088Ian Lynagh <[email protected]>**20100316005137
1089 Ignore-this: 234e3bc29e2f26cc59d7b03d780cc352
1090]
1091[When saying RTS options are disabled, also say how to enable them
1092Ian Lynagh <[email protected]>**20100315173541]
1093[Fix profiling build following removal of specific STM object types
1094Simon Marlow <[email protected]>**20100315093256
1095 Ignore-this: b04fd7f984cc0cc38bcf291e400489fd
1096]
1097[When compiling with GHC >= 6.13, use -rtsopts
1098Ian Lynagh <[email protected]>**20100314172018]
1099[Document the new RTS linker flags
1100Ian Lynagh <[email protected]>**20100314140847]
1101[Don't enable RTS options by default
1102Ian Lynagh <[email protected]>**20100314133648]
1103[Add a -with-rtsopts link-time flag
1104Ian Lynagh <[email protected]>**20100313231342
1105 You can now link with
1106     -with-rtsopts="-H128m -K1m"
1107]
1108[Rename a variable
1109Ian Lynagh <[email protected]>**20100313224852]
1110[Add a link-time flag to en/disable the RTS options
1111Ian Lynagh <[email protected]>**20100313154555
1112 If RTS options are disabled then:
1113 * The ghc_rts_opts C code variable is processed as normal
1114 * The GHCRTS environment variable is ignored and, if it is defined, a
1115   warning is emitted
1116 * The +RTS flag gives an error and terminates the program
1117]
1118[Fix a couple of bugs in the throwTo handling, exposed by conc016(threaded2)
1119Simon Marlow <[email protected]>**20100311123705
1120 Ignore-this: 80110295e50fcb71d4137c60c2451acd
1121]
1122[Use message-passing to implement throwTo in the RTS
1123Simon Marlow <[email protected]>**20100311095744
1124 Ignore-this: 2aeec25282b7a7dfe1132573a8170e2a
1125 
1126 This replaces some complicated locking schemes with message-passing
1127 in the implementation of throwTo. The benefits are
1128 
1129  - previously it was impossible to guarantee that a throwTo from
1130    a thread running on one CPU to a thread running on another CPU
1131    would be noticed, and we had to rely on the GC to pick up these
1132    forgotten exceptions. This no longer happens.
1133 
1134  - the locking regime is simpler (though the code is about the same
1135    size)
1136 
1137  - threads can be unblocked from a blocked_exceptions queue without
1138    having to traverse the whole queue now.  It's a rare case, but
1139    replaces an O(n) operation with an O(1).
1140 
1141  - generally we move in the direction of sharing less between
1142    Capabilities (aka HECs), which will become important with other
1143    changes we have planned.
1144 
1145 Also in this patch I replaced several STM-specific closure types with
1146 a generic MUT_PRIM closure type, which allowed a lot of code in the GC
1147 and other places to go away, hence the line-count reduction.  The
1148 message-passing changes resulted in about a net zero line-count
1149 difference.
1150 
1151]
1152[fix bug in discardTasksExcept() that broke forkProcess
1153Simon Marlow <[email protected]>**20100311093632
1154 Ignore-this: a38d49b177c4f14ca15a50702c41ae9c
1155]
1156[disable a false assertion, add a comment to explain why
1157Simon Marlow <[email protected]>**20091123110416
1158 Ignore-this: 30f45e1cae917259248a2253630e2871
1159]
1160[Fix Trac #1954: newtype deriving caused 'defined but not used' error
1161[email protected]**20100309173555
1162 Ignore-this: d403d3c8ae585f604c139d42d43270d
1163 
1164 We were getting a bogus claim that a newtype "data constructor" was
1165 unused.  The fix is easy, although I had to add a field to the constructor
1166 TcEnv.NewTypeDerived
1167 
1168 See Note [Newtype deriving and unused constructors] in TcDeriv
1169]
1170[Rule binders shouldn't have IdInfo
1171simonpj@microsoft.com**20100309173327
1172 Ignore-this: 4f788da0258235cc872a4645de0f969e
1173 
1174 While I was looking at the rule binders generated in DsBinds for specialise pragmas,
1175 I also looked at Specialise.  It too was "cloning" the dictionary binders including
1176 their IdInfo. In this case they should not have any, but its seems better to make
1177 them completely fresh rather than substitute in existing (albeit non-existent) IdInfo.
1178]
1179[Add comment
1180simonpj@microsoft.com**20100309173120
1181 Ignore-this: c04217e40c2eade3e2b28d7919e11de6
1182]
1183[Rule binders shouldn't have DFun pragmas
1184simonpj@microsoft.com**20100309173100
1185 Ignore-this: 3298919f2fc8502e367113326f0848
1186 
1187 When DsBinds deals with a SPECIALISE pragma, it makes up the binders
1188 for a RULE. These binders should be very vanilla: no IdInfo of any sort.
1189 But the way it was before they could have DFun pragmas, which led to
1190 Bad Joss downstream.  (Actually to cause a downstream *error* was itself
1191 a bug, which I've fixed, but it's clearly wrong for them to be DFuns!)
1192]
1193[A bug in isClosedUnfolding
1194simonpj@microsoft.com**20100309172842
1195 Ignore-this: e030b521cd58f0bfa52c56dd56f12fb5
1196 
1197 isClosedUnfolding should say False for DFUnUnfolding!
1198]
1199[Comments only
1200simonpj@microsoft.com**20100309172814
1201 Ignore-this: 426455ef147c0b3640ce22ec6c74d8dd
1202]
1203[Comments and type signatures only
1204simonpj@microsoft.com**20100309172756
1205 Ignore-this: c31538dd34b35a947a95d2b7258eb3aa
1206]
1207[Comments only
1208simonpj@microsoft.com**20100309172743
1209 Ignore-this: 3679f154d68dbb48076d9f5b9b9b7712
1210]
1211[Tidy up pretty-printing of InlinePragma
1212simonpj@microsoft.com**20100309172730
1213 Ignore-this: aa75135296ba4de96a704dd41b1ff4d0
1214 
1215 We were getting "INLINEALWAYS" printed out here and there.
1216 Now there are always brackets around the activation, thus "INLINE[ALWAYS]"
1217]
1218[Split part of the Task struct into a separate struct InCall
1219Simon Marlow <marlowsd@gmail.com>**20100309143111
1220 Ignore-this: 5dc47acc7b8180ff49fab14de64c99c4
1221 
1222 The idea is that this leaves Tasks and OSThread in one-to-one
1223 correspondence.  The part of a Task that represents a call into
1224 Haskell from C is split into a separate struct InCall, pointed to by
1225 the Task and the TSO bound to it.  A given OSThread/Task thus always
1226 uses the same mutex and condition variable, rather than getting a new
1227 one for each callback.  Conceptually it is simpler, although there are
1228 more types and indirections in a few places now.
1229 
1230 This improves callback performance by removing some of the locks that
1231 we had to take when making in-calls.  Now we also keep the current Task
1232 in a thread-local variable if supported by the OS and gcc (currently
1233 only Linux).
1234]
1235[add a note
1236Simon Marlow <marlowsd@gmail.com>**20100309133721
1237 Ignore-this: e25f24904066dfcdc42a289a830ff67a
1238]
1239[Fix a rare deadlock when the IO manager thread is slow to start up
1240Simon Marlow <marlowsd@gmail.com>**20100309095831
1241 Ignore-this: dc2377d587ac681b213fc3b26831958e
1242 This fixes occasional failures of ffi002(threaded1) on a loaded
1243 machine.
1244]
1245[When BUILD_DOCBOOK_HTML is NO, keep the rules, just omit the target
1246simonpj@microsoft.com**20100305173004
1247 Ignore-this: bbef93db58c56b62ccff0f21bf6fc57f
1248 
1249   (and similarly for PS and PDF)
1250 
1251 The previous setup nuked the rules for making the documentation when
1252 BUILD_DOCBOOK_HTML=NO.  This meant that "make html" didn't work.
1253 
1254 There isn't any reason to nuke the rules (so far as Simon and I know).
1255]
1256[Fix Trac #3736: do not preInlineUnconditionally with INLINE
1257simonpj@microsoft.com**20100305172759
1258 Ignore-this: 29ea0f14333604e5e21eeef95cc46d9e
1259 
1260 preInlineUnconditionally was, in effect, nuking an INLINE pragma, with
1261 very bad effect on runtime in this program.  Fortunately the fix is
1262 very simple.
1263 
1264 See Note [InlineRule and preInlineUnconditionally] in SimplUtils.
1265]
1266[Comments only
1267simonpj@microsoft.com**20100304125930
1268 Ignore-this: 79ef68388f9b3b4b25bb7744a69e511e
1269]
1270[Comments only
1271simonpj@microsoft.com**20100304125402
1272 Ignore-this: 2c0006e7d26fd7c1f6a89d029eb0e23b
1273]
1274[Refactor part of the renamer to fix Trac #3901
1275simonpj@microsoft.com**20100304125337
1276 Ignore-this: 345833048844421020d0a178acee54d9
1277 
1278 This one was bigger than I anticipated!  The problem was that were
1279 were gathering the binders from a pattern before renaming -- but with
1280 record wild-cards we don't know what variables are bound by C {..}
1281 until after the renamer has filled in the "..".
1282 
1283 So this patch does the following
1284 
1285 * Change all the collect-X-Binders functions in HsUtils so that
1286   they expect to only be called *after* renaming.  That means they
1287   don't need to return [Located id] but just [id].  Which turned out
1288   to be a very worthwhile simplification all by itself.
1289 
1290 * Refactor the renamer, and in ptic RnExpr.rnStmt, so that it
1291   doesn't need to use collectLStmtsBinders on pre-renamed Stmts.
1292 
1293 * This in turn required me to understand how GroupStmt and
1294   TransformStmts were renamed.  Quite fiddly. I rewrote most of it;
1295   result is much shorter.
1296 
1297 * In doing so I flattened HsExpr.GroupByClause into its parent
1298   GroupStmt, with trivial knock-on effects in other files.
1299 
1300 Blargh.
1301]
1302[Minor refactoring of placeHolderPunRhs
1303simonpj@microsoft.com**20100304124113
1304 Ignore-this: 717a7b412946f4eda5ec56aa72459bd4
1305]
1306[Make `mkFunTy` associate to the right, as it should
1307simonpj@microsoft.com**20100304124029
1308 Ignore-this: 3df1f02c28272c5da37836161f8538a9
1309]
1310[Add fmapMaybeM and fmapEitherM
1311simonpj@microsoft.com**20100304124004
1312 Ignore-this: ba780d5d14a6766378502e58c4d7ae0f
1313]
1314[Comments only
1315simonpj@microsoft.com**20100304123939
1316 Ignore-this: b2c75384418e49bfeb847c089b8639e2
1317]
1318[Two things to do with -dsuppress-uniques
1319simonpj@microsoft.com**20100304123822
1320 Ignore-this: ebe626cb50230f6d2da165dea7f4a1b3
1321 
1322 a) Even with -dsuppress-uniques, don't suppress them when outputing
1323    code, else the assembler falls over bleating
1324 
1325 b) Do suppress uniques in names generated by TH.  It's a bit grungy
1326    to do this: see Note [Suppressing uniques in OccNames].  But
1327    it's only needed for test de-wobblification so the grunge isn't
1328    really important.
1329]
1330[fix the Windows build some more
1331Simon Marlow <marlowsd@gmail.com>**20100304092119
1332 Ignore-this: b6f0ef572f6c8f263a02bc802c9ff328
1333]
1334[Add comments to darcs-all and packages
1335simonpj@microsoft.com**20100303215948
1336 Ignore-this: c84876f3bdf976a4d8716451c3ea49c7
1337]
1338[Add the implicit 'import Prelude' in getImports
1339Simon Marlow <marlowsd@gmail.com>**20100303112242
1340 Ignore-this: 6c5e7ed21c29e9ffb362db63f8c69e2f
1341 This makes things more consistent, and avoids a strange "Prelude is
1342 not loaded" error when there is a Prelude.hs on the search path.
1343]
1344[fix Windows build
1345Simon Marlow <marlowsd@gmail.com>**20100302144719
1346 Ignore-this: fac21f11a8bd010f7e3cb242b908146f
1347]
1348[sdist: Haddock.Interface.{Lex,Parse} moved to Haddock.{Lex,Parse}
1349Simon Marlow <marlowsd@gmail.com>**20100302094338
1350 Ignore-this: beeb4887522e051d178774af20c6a7e8
1351]
1352[Add handling for | to the transitional alternative layout rule
1353Ian Lynagh <igloo@earth.li>**20100302205815]
1354[Tweak alternative layout rule
1355Ian Lynagh <igloo@earth.li>**20100302205105
1356 Now not only is if/then a bracketting pair, but then/else is too
1357]
1358[Add transitional rules for the alternative layout rule
1359Ian Lynagh <igloo@earth.li>**20100302202035
1360 If enabled, these accept more layout, but give warnings
1361]
1362[Fix the alternative layout rule to handle explicit let/in
1363Ian Lynagh <igloo@earth.li>**20100302165119
1364 It used to break on
1365     let {x = 'a'} in x
1366 as the 'in' token would keep closing contexts looking for an implicit
1367 'let' layout.
1368]
1369[expand comments for #2578 fix
1370Simon Marlow <marlowsd@gmail.com>**20100301095525
1371 Ignore-this: 720ce0cafd155bfdef0516900568276
1372]
1373[a faster appendFS
1374ich@christoph-bauer.net**20100227211659
1375 Ignore-this: e0e45620b3a901291621e34953384a27
1376]
1377[Implement a smart constructor mkUnsafeCoercion, and use it
1378simonpj@microsoft.com**20100301111744
1379 Ignore-this: 88906e30bf14b025ffa2fa9a4355e436
1380 
1381 This just ensures that an unsafe coercion is as localised as possible.
1382 For example, instead of
1383     UnsafeCo (Int -> t1) (Int -> t2)
1384 use
1385     Int -> UnsafeCo t1 t2
1386]
1387[Suggest -XGeneralizedNewtypeDeriving (fix Trac #3888)
1388simonpj@microsoft.com**20100301111555
1389 Ignore-this: 9edbf63ef5506aba2fafb83c1c365d4b
1390 
1391 If we can't derive a type, but it's a reasonable possibility that
1392 newtype deriving would do the job, suggest it.
1393 
1394 A little refactoring too, moving non_iso_class to top level,
1395 and putting it with std_class_via_iso.
1396]
1397[Tidy up AnyTyCon stuff
1398simonpj@microsoft.com**20100301111401
1399 Ignore-this: 6ea0a0c793f9c6b812bc5c6fb0d392a1
1400 
1401 If we find ourselves making up an AnyTyCon of kind '??', say,
1402 then default it to liftedTypeKind.  And similarly for any sub-kind
1403 of LiftedTypeKind.
1404 
1405 This is just a tidy-up.
1406]
1407[Fix pretty-printing of IfaceAnyTc (fixes Trac #3883)
1408simonpj@microsoft.com**20100301111040
1409 Ignore-this: 6a059d5f9b895a0b709837c2584742be
1410 
1411 The panic message in ifaceTyConName on IfaceAnyTc
1412 called the pretty-printer, called ifaceTyConName again,
1413 which caused an infinite regress.  Stupid.
1414 
1415 See
1416  * Note [The Name of an IfaceAnyTc], and
1417  * The Outputable instance for IfaceTyCon
1418]
1419[Omit unnecessary parens when pretty-printing IfaceExpr
1420simonpj@microsoft.com**20100301110748
1421 Ignore-this: ccb00190892a4b2ff62c45d583018a70
1422]
1423[Comments only
1424simonpj@microsoft.com**20100225174112
1425 Ignore-this: d0fc0ca9dbeca3c17b11733d6e8cb022
1426]
1427[Add comment
1428simonpj@microsoft.com**20100225174048
1429 Ignore-this: 9e93edacc2424ca0e8a0f0a7d1992736
1430]
1431[Change pretty printing of InlinePrag slightly
1432simonpj@microsoft.com**20100225174028
1433 Ignore-this: 7348baeb43926d3c746a39cb4e67f1a3
1434]
1435[Add -no-auto-link-packages docs to the user guide; fixes trac #3759
1436Ian Lynagh <igloo@earth.li>**20100228191837]
1437[Whitespace only in docs/users_guide/packages.xml
1438Ian Lynagh <igloo@earth.li>**20100228182945]
1439[Add a LICENSE file to libraries/bin-package-db
1440Ian Lynagh <igloo@earth.li>**20100227205626
1441 Silences a (harmless) error from tar when making bindists
1442]
1443[Have separate rules to generate tags and TAGS
1444Ian Lynagh <igloo@earth.li>**20100227202517
1445 This works around the two filenames being the same on case-insensitive
1446 file systems.
1447]
1448[Fix trac #2578
1449Ian Lynagh <igloo@earth.li>**20100227173951
1450 We define empty datatypes as not being enumerations, which means the
1451 empty blocks aren't generated.
1452]
1453[Fix the build with GHC < 6.12
1454Ian Lynagh <igloo@earth.li>**20100226223931]
1455[update the docs to reflect changes in the tracing flags
1456Simon Marlow <marlowsd@gmail.com>**20100226111205
1457 Ignore-this: 3396e95f52abbb4a022391ca8709085b
1458]
1459[Tweak the tracing flags slightly, and clean up error handling and diagnostics
1460Simon Marlow <marlowsd@gmail.com>**20100226110608
1461 Ignore-this: c227b6b8d65c06f299c5588c84e0eef9
1462 
1463 Tracing flags are now:
1464 
1465    -l[flags]  Log events in binary format to the file <program>.eventlog
1466    -v[flags]  Log events to stderr
1467               where [flags] can contain:
1468                  s    scheduler events
1469                  t    add time stamps (only useful with -v)
1470 
1471 and there are more helpful error messages when using flags that are
1472 only available in particular variants of the RTS:
1473 
1474  the flag -v requires the program to be built with -debug
1475  the flag -Ds requires the program to be built with -debug
1476  the flag -p requires the program to be built with -prof
1477  the flag -N requires the program to be built with -threaded
1478  the flag -v requires the program to be built with -debug
1479 
1480 Also, I fixed the crash reported in #3874, with +RTS -ls -v.
1481]
1482[Fix crash when using printf format specifiers in traceEvent (#3874)
1483Simon Marlow <marlowsd@gmail.com>**20100226093215
1484 Ignore-this: d21701cec90e9f5f2d9e7148490b9ced
1485]
1486[hack to make the docs build again in a lndir build tree (see comments)
1487Simon Marlow <marlowsd@gmail.com>**20100225131616
1488 Ignore-this: 4d9a66364222b51a750d33fbce5f8f36
1489]
1490[Force encoding to UTF-8 when writing individual .conf files
1491Simon Marlow <marlowsd@gmail.com>**20100224152519
1492 Ignore-this: 8707c55c74108570cd9d60a4cb43c561
1493]
1494[Fix build for non-x86 arches again.
1495Ben.Lippmeier@anu.edu.au**20100222075144]
1496[Fix the link to the ghc docs in libraries/prologue.txt
1497Ian Lynagh <igloo@earth.li>**20100223181644]
1498[Fix more library links in the user guide
1499Ian Lynagh <igloo@earth.li>**20100223164551]
1500[Fix the links to the base docs from the user guide
1501Ian Lynagh <igloo@earth.li>**20100223150522]
1502[Remove old, unused release notes
1503Ian Lynagh <igloo@earth.li>**20100223150327]
1504[Fix #3875: Crash in parallel GC, wrong pointer was being tested.
1505Ben.Lippmeier@anu.edu.au**20100222031627]
1506[Add utils/ghctags/ghc.mk
1507Ian Lynagh <igloo@earth.li>**20100221185200]
1508[Make "make tags" work in the new build system
1509Ian Lynagh <igloo@earth.li>**20100221164432]
1510[Remove the old hstags util
1511Ian Lynagh <igloo@earth.li>**20100220235909]
1512[Check for suitable versions of make in bindists; fixes trac #3860
1513Ian Lynagh <igloo@earth.li>**20100220211157
1514 We already had a check in configure of the actual build. This patch
1515 adds it to the configure of the bindists too.
1516]
1517[Fix build on Windows
1518Ian Lynagh <igloo@earth.li>**20100219134222]
1519[Use the shared C wrapper code in ghci.c too
1520Ian Lynagh <igloo@earth.li>**20100218171716]
1521[Refactor gcc.c, pulling out the reusable code
1522Ian Lynagh <igloo@earth.li>**20100218170931]
1523[Fix a recompilation checking bug when a package dependency changes
1524Simon Marlow <marlowsd@gmail.com>**20100217133250
1525 Ignore-this: afea726c69145f08ea66053230a85bff
1526 
1527 We weren't forcing enough recompilationg when package dependencies
1528 changed, with the result that bumping a package version could lead to
1529 linking failures or other problems later.
1530 
1531 The problem/solutation are described on the wiki:
1532 
1533 http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/RecompilationAvoidance#Packageversionchanges
1534]
1535[darcs-all --extra get: gets a few extra packages
1536Simon Marlow <marlowsd@gmail.com>**20100217104634
1537 Ignore-this: 9a025b387e5a09b4cde7ac5a52c95268
1538 currently deepseq, parallel, stm.
1539]
1540[Allow extra packages to be added to the build, by setting $(EXTRA_PACKAGES)
1541Simon Marlow <marlowsd@gmail.com>**20100217103134
1542 Ignore-this: 434abc03d82316e8248a76ae23f673b8
1543]
1544[Beef up cmmMiniInline a tiny bit
1545Simon Marlow <marlowsd@gmail.com>**20100216150506
1546 Ignore-this: 94513491cd20d21e3a6b0b6f9c579ca4
1547 Allow a temporary assignment to be pushed past an assignment to a
1548 global if the global is not mentioned in the rhs of the assignment we
1549 are inlining.
1550 
1551 This fixes up some bad code.  We should make sure we're doing
1552 something equivalent in the new backend in due course.
1553]
1554[Write the binary cache file atomically
1555Simon Marlow <marlowsd@gmail.com>**20100216134841
1556 Ignore-this: 8b1a26beb04dbfcb15786461c8f35f12
1557 Should fix an occasional build error of the form
1558  ghc-pkg: too few bytes. Failed reading at byte position 8
1559]
1560[disable a false assertion, with a comment to explain why
1561Simon Marlow <marlowsd@gmail.com>**20100216123544
1562 Ignore-this: 2be07076eed3c203543025e61ec69838
1563]
1564[Fix a bug that can lead to noDuplicate# not working sometimes.
1565Simon Marlow <marlowsd@gmail.com>**20100216123411
1566 Ignore-this: 1ff0b235d915ca4d0531df6326828901
1567 
1568 The symptom is that under some rare conditions when running in
1569 parallel, an unsafePerformIO or unsafeInterleaveIO computation might
1570 be duplicated, so e.g. lazy I/O might give the wrong answer (the
1571 stream might appear to have duplicate parts or parts missing).
1572 
1573 I have a program that demonstrates it -N3 or more, some lazy I/O, and
1574 a lot of shared mutable state.  See the comment with stg_noDuplicatezh
1575 in PrimOps.cmm that explains the problem and the fix.  This took me
1576 about a day to find :-(
1577]
1578[Represent the free register set using Word64 on x86-64 (fixes ffi009)
1579Simon Marlow <marlowsd@gmail.com>**20100215130102
1580 Ignore-this: b75fe873a9d32c56dc43b2f30d3382fb
1581 Following recent changes to the numbering of registers, we overflowed
1582 Word32 on x86-64, with the result that xmm8 and later we not being
1583 allocated.
1584]
1585[fix lost context switches in GHCi (fixes test 3429(ghci))
1586Simon Marlow <marlowsd@gmail.com>**20100215093205
1587 Ignore-this: 5a2cf725a83da1067a299fccc63aeb9f
1588]
1589[Fix build for non-x86 architectures
1590Ben.Lippmeier@anu.edu.au**20100215014719]
1591[Add comments about the ForceSpecConstr mechanism
1592Roman Leshchinskiy <rl@cse.unsw.edu.au>**20100215030103
1593 Ignore-this: 8f0c3c4e65ce22b04e511d51d7795896
1594]
1595[Spot ForceSpecConstr arguments in polymorphic loops
1596Roman Leshchinskiy <rl@cse.unsw.edu.au>**20100215025308
1597 Ignore-this: c3160d51fdb44bfaa600491423257d0b
1598]
1599[Don't rely on tar supporting -z; trac #3841
1600Ian Lynagh <igloo@earth.li>**20100214220450]
1601[don't constant fold division that would result in negative zero (#3676)
1602Simon Marlow <marlowsd@gmail.com>**20100211131543
1603 Ignore-this: 9ccba7389ec0de33ec7f376ae39f34fb
1604]
1605[Improve error dump in TcEnv
1606simonpj@microsoft.com**20100210145210
1607 Ignore-this: 97c0390699f8ec70e8904e86730a1d5c
1608]
1609[Keep track of explicit kinding in HsTyVarBndr; plus fix Trac #3845
1610simonpj@microsoft.com**20100210145155
1611 Ignore-this: ff7e42280909d340dd3d043d89c702ba
1612 
1613 To print HsTypes correctly we should remember whether the Kind on
1614 a HsTyVarBndr came from type inference, or was put there by the
1615 user.  See Note [Printing KindedTyVars] in HsTypes.  So instead of
1616 changing a UserTyVar to a KindedTyVar during kind checking, we
1617 simply add a PostTcKind to the UserTyVar.
1618 
1619 The change was provoked by Trac #3830, although other changes
1620 mean that #3830 gets a diferent and better error message now.
1621 So this patch is simply doing the Right Thing for the future.
1622 
1623 This patch also fixes Trac #3845, which was caused by a *type splice*
1624 not remembering the free *term variables* mentioned in it.  Result
1625 was that we build a 'let' when it should have been 'letrec'.
1626 Hence a new FreeVars field in HsSpliceTy.
1627 
1628 While I was at it, I got rid of HsSpliceTyOut and use a PostTcKind
1629 on HsSpliceTy instead, just like on the UserTyVar.
1630]
1631[Documentation for changes to Template Haskell and quasi-quotation
1632simonpj@microsoft.com**20100210114213
1633 Ignore-this: 24684cbf43c50eecc36f3e98882df1e4
1634]
1635[Remove redundant import
1636simonpj@microsoft.com**20100208165756
1637 Ignore-this: f1cc1331507452422e0db8f8f5f80ad
1638]
1639[Stop fruitless ANF-ing
1640simonpj@microsoft.com**20100210094733
1641 Ignore-this: 1c1251c462f3fd8ae7665a1869c0e18a
1642 
1643 The simplifier is taking more iterations than it should, because we
1644 were fruitlessly ANF-ing a top-level declaration of form
1645 
1646    x = Ptr "foo"#
1647 
1648 to get
1649 
1650    x = let v = "foo"# in Ptr v
1651 
1652 and then inlining v again.  This patch makes Simplify.makeTrivial
1653 top-level aware, so that it doesn't ANF if it's going to be undone.
1654]
1655[Comments only
1656simonpj@microsoft.com**20100210094537
1657 Ignore-this: dab7a4e7fad9f424d3ab2590c3eeef3f
1658]
1659[Simplify syntax for quasi-quotation
1660simonpj@microsoft.com**20100210094419
1661 Ignore-this: ffc1e483942a7506d4a541300908bcd
1662 
1663 After some discussion we decided to make a quasi-quote look like
1664 
1665    [pads| ...blah... |]
1666 
1667 rather than
1668 
1669    [$pads| ...blah... |]
1670 
1671 as before. The new syntax is quieter, although it does not signal
1672 quite as clearly that there is a splice going on.
1673]
1674[Several TH/quasiquote changes
1675simonpj@microsoft.com**20100210093910
1676 Ignore-this: f12d3703f10a377e57f1af854905c6aa
1677 
1678 a) Added quasi-quote forms for
1679       declarations
1680       types
1681    e.g.   f :: [$qq| ... |]
1682 
1683 b) Allow Template Haskell pattern quotes (but not splices)
1684    e.g.  f x = [p| Int -> $x |]
1685 
1686 c) Improve pretty-printing for HsPat to remove superfluous
1687    parens.  (This isn't TH related really, but it affects
1688    some of the same code.)
1689 
1690 
1691 A consequence of (a) is that when gathering and grouping declarations
1692 in RnSource.findSplice, we must expand quasiquotes as we do so.
1693 Otherwise it's all fairly straightforward.  I did a little bit of
1694 refactoring in TcSplice.
1695 
1696 User-manual changes still to come.
1697]
1698[generate slightly better code for ccall argument-pushing on x86
1699Simon Marlow <marlowsd@gmail.com>**20100209101114
1700 Ignore-this: a41b366d7266b8fc31a099308c318597
1701]
1702[--lazy overrides --partial too
1703Simon Marlow <marlowsd@gmail.com>**20100209093927
1704 Ignore-this: 5d67c45af67f0122d93965ea9d0cbb12
1705 At least until we switch to --lazy being the default
1706]
1707[Fix Trac #3850
1708simonpj@microsoft.com**20100208163751
1709 Ignore-this: ed77f179dafe3f2d32971364e604e518
1710 
1711 This patch simply avoids a needless difference in behaviour from
1712 6.10, and one that happens to affect HList. See Note [Stupid theta].
1713]
1714[Fix a bug introduced in the SSE2 support: callClobberedRegs was wrong
1715Simon Marlow <marlowsd@gmail.com>**20100205112938
1716 Ignore-this: 4a7989284af27a607aae08f27c222515
1717]
1718[Implement SSE2 floating-point support in the x86 native code generator (#594)
1719Simon Marlow <marlowsd@gmail.com>**20100204104849
1720 Ignore-this: 7290454bf6b2f3612b933c4f23e8a471
1721 
1722 The new flag -msse2 enables code generation for SSE2 on x86.  It
1723 results in substantially faster floating-point performance; the main
1724 reason for doing this was that our x87 code generation is appallingly
1725 bad, and since we plan to drop -fvia-C soon, we need a way to generate
1726 half-decent floating-point code.
1727 
1728 The catch is that SSE2 is only available on CPUs that support it (P4+,
1729 AMD K8+).  We'll have to think hard about whether we should enable it
1730 by default for the libraries we ship.  In the meantime, at least
1731 -msse2 should be an acceptable replacement for "-fvia-C
1732 -optc-ffast-math -fexcess-precision".
1733 
1734 SSE2 also has the advantage of performing all operations at the
1735 correct precision, so floating-point results are consistent with other
1736 platforms.
1737 
1738 I also tweaked the x87 code generation a bit while I was here, now
1739 it's slighlty less bad than before.
1740]
1741[add libraries/binary
1742Simon Marlow <marlowsd@gmail.com>**20100203135421
1743 Ignore-this: b9249fd05feb6b29fa7729edcdc2472
1744]
1745[add comment for srt_bitmap field
1746Simon Marlow <marlowsd@gmail.com>**20100203103431
1747 Ignore-this: 1b76ed3dceed40c3fc6040c90f577997
1748]
1749[Use bash to run boot-pkgs, the default Solaris shell doesn't support the -ot test flag
1750benl@cse.unsw.edu.au**20100203030748]
1751[Disable -Wcast-align when building the rts
1752benl@cse.unsw.edu.au**20100203024605
1753 This flag seems buggy on GCC 4.1.2, which is the only GCC version we
1754 have that can bootstrap the SPARC build. We end up with lots of supurious
1755 warnings of the form "cast increases required alignment of target type".
1756 Some legitimate warnings can be fixed by adding an intermediate cast to
1757 (void*), but we get others in rts/sm/GCUtils.c concerning the gct var
1758 that look innocuous to me. We could enable this again once we deprecate
1759 support for registerised builds on this arch.
1760]
1761[Stifle warning about printf format strings
1762benl@cse.unsw.edu.au**20100203023124]
1763[Cast to (void*) to stifle warning about signedness
1764benl@cse.unsw.edu.au**20100203023029]
1765[Add missing import sm_mutex, which fixes the -fvia-c build
1766benl@cse.unsw.edu.au**20100202051451]
1767[Fix typo in error message (#3848)
1768Simon Marlow <marlowsd@gmail.com>**20100130094628
1769 Ignore-this: f0713035828123805b2a237e8896315b
1770]
1771[Fix Trac #3831: blowup in SpecConstr
1772simonpj@microsoft.com**20100201002420
1773 Ignore-this: adbf1e249f472cbc8d2d7cc1f70ae1fd
1774 
1775 It turned out that there were two bugs.  First, we were getting an
1776 exponential number of specialisations when we had a deep nest of
1777 join points.  See Note [Avoiding exponential blowup]. I fixed this
1778 by dividing sc_count (in ScEnv) by the number of specialisations
1779 when recursing.  Crude but effective.
1780 
1781 Second, when making specialisations I was looking at the result of
1782 applying specExpr to the RHS of the function, whereas I should have
1783 been looking at the original RHS.  See Note [Specialise original
1784 body].
1785 
1786 
1787 There's a tantalising missed opportunity here, though.  In this
1788 example (recorded as a test simplCore/should_compile/T3831), each join
1789 point has *exactly one* call pattern, so we should really just
1790 specialise for that alone, in which case there's zero code-blow-up.
1791 In particular, we don't need the *original* RHS at all.  I need to think
1792 more about how to exploit this.
1793 
1794 But the blowup is now limited, so compiling terminfo with -O2 works again.
1795]
1796[Re-read pragmas after preprocessing (#2464, #3674, #3457)
1797Simon Marlow <marlowsd@gmail.com>**20100129114050
1798 Ignore-this: 1acf43a0bd924f9cc89f98b291569517
1799 This was a lot easier than I imagined.
1800]
1801[tweak the totally-bogus arbitrary stack-squeezing heuristic to fix #2797
1802Simon Marlow <marlowsd@gmail.com>**20100128124454
1803 Ignore-this: 330f39d1fc17280c6264443cba35538b
1804 In #2797, a program that ran in constant stack space when compiled
1805 needed linear stack space when interpreted.  It turned out to be
1806 nothing more than stack-squeezing not happening.  We have a heuristic
1807 to avoid stack-squeezing when it would be too expensive (shuffling a
1808 large amount of memory to save a few words), but in some cases even
1809 expensive stack-squeezing is necessary to avoid linear stack usage.
1810 One day we should implement stack chunks, which would make this less
1811 expensive.
1812]
1813[fix warning on Windows
1814Simon Marlow <marlowsd@gmail.com>**20100127162954
1815 Ignore-this: 9aeca7b0d6bfdf758ab9b2004c998b2b
1816]
1817[fix Windows build (GHC.Conc.runHandlers is Unix-only)
1818Simon Marlow <marlowsd@gmail.com>**20100127145718
1819 Ignore-this: 9e683bfbc236beb7aa6fc29cddea4e46
1820]
1821[Don't Terminate the ticker thread (#3748)
1822Simon Marlow <marlowsd@gmail.com>**20100127135430
1823 Ignore-this: c4834d02397eb3404818142964f296e4
1824]
1825[Win32 yieldThread(): use SwitchToThread() instead of Sleep(0)
1826Simon Marlow <marlowsd@gmail.com>**20100127133106
1827 Ignore-this: cbc8c00fd4b7de7d191dae8f21f4f012
1828]
1829[fix warnings
1830Simon Marlow <marlowsd@gmail.com>**20100127133040
1831 Ignore-this: 1038f5f85bd3f795ad10380d7b78457f
1832]
1833[catch SIGHUP and SIGTERM and raise an exception (#3656)
1834Simon Marlow <marlowsd@gmail.com>**20100127140438
1835 Ignore-this: a6163c4563d67daab632db2ab2cc7155
1836]
1837[define INFINITY and NAN if they don't exist (#2929)
1838Simon Marlow <marlowsd@gmail.com>**20100127133632
1839 Ignore-this: 488fa62a65c0d8a2e0b9ca4c6dd844a
1840]
1841[remove suspicious whitespace-only lines
1842Simon Marlow <marlowsd@gmail.com>**20100127133008
1843 Ignore-this: dc99b80bca5d9510d651c9afb0cd4fda
1844]
1845[addCoverageTicksToBinds: tolerate a non-existent .hs file (#3803)
1846Simon Marlow <marlowsd@gmail.com>**20100127113205
1847 Ignore-this: c65cd3962a1e1bba7b7a5b6ff723dc9c
1848]
1849[avoid using non-standard %zd format specifier (#3804)
1850Simon Marlow <marlowsd@gmail.com>**20100126163322
1851 Ignore-this: fc5f69ec8af42138f930177f8c48d3e6
1852]
1853[Fix signal segfaults on Solaris (#3790)
1854Simon Marlow <marlowsd@gmail.com>**20100126155449]
1855[comment-out an incorrect assertion
1856Simon Marlow <marlowsd@gmail.com>**20100126150103
1857 Ignore-this: d4dcb06f5c4cbfd826033cd7f7170fc6
1858]
1859[Fix a deadlock, and possibly other problems
1860Simon Marlow <marlowsd@gmail.com>**20100126150037
1861 Ignore-this: e461e2a5495850cb0a43544004bbe994
1862 After a bound thread had completed, its TSO remains in the heap until
1863 it has been GC'd, although the associated Task is returned to the
1864 caller where it is freed and possibly re-used. 
1865 
1866 The bug was that GC was following the pointer to the Task and updating
1867 the TSO field, meanwhile the Task had already been recycled (it was
1868 being used by exitScheduler()). Confusion ensued, leading to a very
1869 occasional deadlock at shutdown, but in principle it could result in
1870 other crashes too.
1871 
1872 The fix is to remove the link between the TSO and the Task when the
1873 TSO has completed and the call to schedule() has returned; see
1874 comments in Schedule.c.
1875]
1876[When acquiring a spinlock, yieldThread() every 1000 spins (#3553, #3758)
1877Simon Marlow <marlowsd@gmail.com>**20100122164911
1878 Ignore-this: 2dc6a7affdb5081a4dc649bcac95c31d
1879 
1880 This helps when the thread holding the lock has been descheduled,
1881 which is the main cause of the "last-core slowdown" problem.  With
1882 this patch, I get much better results with -N8 on an 8-core box,
1883 although some benchmarks are still worse than with 7 cores.
1884 
1885 I also added a yieldThread() into the any_work() loop of the parallel
1886 GC when it has no work to do. Oddly, this seems to improve performance
1887 on the parallel GC benchmarks even when all the cores are busy.
1888 Perhaps it is due to reducing contention on the memory bus.
1889]
1890['store' should be static (#3835)
1891Simon Marlow <marlowsd@gmail.com>**20100122164834
1892 Ignore-this: 65fab4644badc58ce284c3ca5c29f88a
1893]
1894[Add some missing getStablePtr()s for CAFs that the RTS refers to
1895Simon Marlow <marlowsd@gmail.com>**20100122143658
1896 Ignore-this: 7bf37917d5052a6feb3b8ffeaad0ab4c
1897 
1898 A recent patch ("Refactor CoreArity a bit") changed the arity of
1899 GHC.Conc.runSparks such that it became a CAF, and the RTS was not
1900 explicitly retaining it, which led to a crash when the CAF got GC'd.
1901 While fixing this I found a couple of other closures that the RTS
1902 refers to which weren't getting the correct CAF treatment.
1903]
1904[Remove an out-of-date comment
1905Ian Lynagh <igloo@earth.li>**20100122130853]
1906[fix build on Windows
1907Simon Marlow <marlowsd@gmail.com>**20100122121016
1908 Ignore-this: cd690a8eff71ca4f87fe67a41a20f493
1909]
1910[fix warning on Windows
1911Simon Marlow <marlowsd@gmail.com>**20100122120328
1912 Ignore-this: 507a91e356a667dcecf8bec621fd2b95
1913]
1914[Fix docs for sizeofByteArray#/sizeofMutableByteArray# (#3800)
1915Simon Marlow <marlowsd@gmail.com>**20100119103825
1916 Ignore-this: c5b7c2edb30fb0917ec08e74f26e9b9e
1917 In 6.14.1 we'll switch these primops to return the exact byte size,
1918 but for 6.12.2 we need to fix the docs.
1919]
1920[Include regex.h in Linker.c on OS X too
1921Ian Lynagh <igloo@earth.li>**20100120201958]
1922[We no longer need a prototype for __eprintf
1923Ian Lynagh <igloo@earth.li>**20100120195024
1924 It looks like it was only needed on OSX, but it has a prototype in
1925 assert.h which now gets #included.
1926]
1927[Fix build
1928Ian Lynagh <igloo@earth.li>**20100120163101
1929 Remove a prototype of a function that wasn't defined
1930]
1931[FIX #2615 (linker scripts in .so files)
1932howard_b_golden@yahoo.com**20091216185155
1933 Ignore-this: e470cb78dc7cc9f39cba209e594c6283
1934 This patch does not apply to Windows. It only applies to systems with
1935 ELF binaries.
1936 
1937 This is a patch to rts/Linker.c to recognize linker scripts in .so
1938 files and find the real target .so shared library for loading.
1939]
1940[Fix Trac #3813: unused variables in GHCi bindings
1941simonpj@microsoft.com**20100120094533
1942 Ignore-this: 22da9bc22ecde0056f7235b3cf86ba8e
1943 
1944 In a GHCi stmt we don't want to report unused variables,
1945 because we don't know the scope of the binding, eg
1946 
1947        Prelude> x <- blah
1948 
1949 Fixing this needed a little more info about the context of the stmt,
1950 thus the new constructor GhciStmt in the HsStmtContext type.
1951]
1952[Fix Trac #3823, plus warning police in TcRnDriver
1953simonpj@microsoft.com**20100120094221
1954 Ignore-this: 8856cf1ab48733180d0cfa800b535317
1955 
1956 The immediate reason for this patch is to fix #3823. This was
1957 rather easy: all the work was being done but I was returning
1958 type_env2 rather than type_env3. 
1959 
1960 An unused-veriable warning would have shown this up, so I fixed all
1961 the other warnings in TcRnDriver.  Doing so showed up at least two
1962 genuine lurking bugs.  Hurrah.
1963]
1964[Change how RTS libraries get installed; fixes trac #3794
1965Ian Lynagh <igloo@earth.li>**20100119232623]
1966[Escape some more $s in makefiles, for consistency
1967Ian Lynagh <igloo@earth.li>**20100119225533]
1968[Escape some $s in makefiles for consistency
1969Ian Lynagh <igloo@earth.li>**20100119221440]
1970[Allow GNU-standard --host, --build, --target configure options (#3637)
1971Simon Marlow <marlowsd@gmail.com>**20100119102819
1972 Ignore-this: 3fd7c644658321f97c34e20305e9b458
1973 Patch contributed by asuffield@suffields.me.uk
1974]
1975[Update some comments about how autoconf/configure works
1976Ian Lynagh <igloo@earth.li>**20100118145959]
1977[Fix a warning message
1978Ian Lynagh <igloo@earth.li>**20100118142020
1979 We were printing the wrong value, so getting confusing messages like:
1980     Function `$wa{v s17LO} [lid]'
1981         has 2 call pattterns, but the limit is 3
1982]
1983[Teach the alternative layout rule about mdo and rec
1984Ian Lynagh <igloo@earth.li>**20100116215545]
1985[Teach the alternative layout rule about $( ... )
1986Ian Lynagh <igloo@earth.li>**20100116213941
1987 It thought the ) needed to close something, but the $( hadn't
1988 opened anything.
1989]
1990[Fix typo
1991Ian Lynagh <igloo@earth.li>**20100116134915]
1992[Remove declaration of non-existent mark_splim
1993Simon Marlow <marlowsd@gmail.com>**20091231104241
1994 Ignore-this: 33ad68a3f12360a51d60df47d748f31e
1995]
1996[fix a comment
1997Simon Marlow <marlowsd@gmail.com>**20091230150852
1998 Ignore-this: 776891008d34de6bf1f89d74d516bce0
1999]
2000[remove an unnecessary debug trace, duplicated by a traceSchedEvent
2001Simon Marlow <marlowsd@gmail.com>**20091230150832
2002 Ignore-this: 2768ab3555fee6dbe2a0ac2c0349f83d
2003]
2004[hide modules properly with haddock
2005Simon Marlow <marlowsd@gmail.com>**20100113210311
2006 Ignore-this: e928241534a934008d050b387cb1cfe4
2007]
2008[fix for HSCOLOUR_SRCS=NO
2009Simon Marlow <marlowsd@gmail.com>**20100113191555
2010 Ignore-this: d952b550d8597a4029e674da24cbaef3
2011]
2012[Do some recompilation avoidance in GHC.loadModule
2013Simon Marlow <marlowsd@gmail.com>**20100112225853
2014 Ignore-this: d5f04baa437a307544c4a7cf87931e92
2015 GHC.loadModule compiles a module after it has been parsed and
2016 typechecked explicity. If we are compiling to object code and there is
2017 a valid object file already on disk, then we can skip the compilation
2018 step. This is useful in Haddock, when processing a package that uses
2019 Template Haskell and hence needs actual compilation, and the package
2020 has already been compiled.
2021 
2022 As usual, the recomp avoidance can be disabled with -fforce-recomp.
2023]
2024[Invoke Haddock directly from the build system, instead of via Cabal
2025Simon Marlow <marlowsd@gmail.com>**20100112225548
2026 Ignore-this: 1d30babfb13c2d110f79ce6c98cd2142
2027 
2028 Partly this is cleaner as we only have to preprocess the source files
2029 once, but also it is necessary to avoid Haddock recompiling source
2030 files when Template Haskell is in use, saving some time in validate
2031 and fixing a problem whereby when HADDOCK_DOCS=YES, make always
2032 re-haddocks the DPH packages.  This also needs an additional fix to
2033 GHC.
2034 
2035 HsColour support still uses Cabal, and hence preprocesses the source
2036 files again. We could move this into the build system too, but there
2037 is a version dependency that would mean adding extra autoconf stuff.
2038]
2039[refactoring while I try to make sense of the hsc interface
2040Simon Marlow <marlowsd@gmail.com>**20100104112833
2041 Ignore-this: 2504fbfa92a7bfa393a62cb40782d288
2042]
2043[Fix running in-place gen_contents_index; trac #3716
2044Ian Lynagh <igloo@earth.li>**20100108133416
2045 It was making incorrect URLs due to a shell script error.
2046]
2047[Respect SPECIALISE pragmas even for apparently-non-overloaded things
2048simonpj@microsoft.com**20100108084547
2049 Ignore-this: 206abe8175904a9512198f34e8aa81e
2050 
2051 This is an implementation matter really (the key word is "apparently"!). 
2052 See Note [Specialising in no-dict case] in DsBinds.
2053 
2054 It showed up when compiling GHC.Float.
2055]
2056[Comment out debug warnings; they are fine
2057simonpj@microsoft.com**20100108084428
2058 Ignore-this: 4d0901ca3bd903f07578183cc3b0b69d
2059]
2060[Improve error locations
2061simonpj@microsoft.com**20100107153234
2062 Ignore-this: 505f3d32355c68841c3d8118863997b
2063 
2064 More on Trac #597
2065]
2066[Spelling error in comment
2067simonpj@microsoft.com**20100107151127
2068 Ignore-this: bcc83729352bb1636727207abdd21335
2069]
2070[A little refactoring, plus improve error locations
2071simonpj@microsoft.com**20100107151113
2072 Ignore-this: c7da9f3df315a580d3e5ac2b412307ba
2073 
2074 Fixes some sub-items of Trac #597
2075]
2076[Clarify error message (Trac #3805)
2077simonpj@microsoft.com**20100107151002
2078 Ignore-this: f5300f64a6e01764d1a671c6bfe13704
2079]
2080[Comments only
2081simonpj@microsoft.com**20100107150939
2082 Ignore-this: d1760073cbd91798e1e5f2941bfd21aa
2083]
2084[SpecConstr: Remove -fspec-inline-join-points, and add let-binding specialisation
2085simonpj@microsoft.com**20100106165251
2086 Ignore-this: afdc78550d4a20f0a41807970e2c9a8b
2087 
2088 The -fspec-inline-join-point thing was a gross hack intended to help
2089 Roman play around, but he's not using it and it was a terribly blunt
2090 instrument so I've nuked it. 
2091 
2092 Instead I've re-instated the let-binding specialiser.
2093 See Note [Local let bindings]
2094]
2095[Make SpecConstr more informative output when there are too many specialisations
2096simonpj@microsoft.com**20100106161026
2097 Ignore-this: 9526c38858763f2378a5184ed73df32f
2098 
2099 It now says something like
2100 
2101   SpecConstr
2102     Function `happyDoAction'
2103       has 17 call pattterns, but the limit is 3
2104     Use -fspec-constr-count=n to set the bound
2105     Use -dppr-debug to see specialisations
2106 
2107 Previously it just silently did no specialisation
2108]
2109[Make view patterns right-associate
2110simonpj@microsoft.com**20100106160642
2111 Ignore-this: c91c4041cfb5da190fca17ef3c131584
2112 
2113 So that you can write
2114 
2115    f (v1 -> v2 -> pat)
2116]
2117[Improve the handling of default methods
2118simonpj@microsoft.com**20100106160603
2119 Ignore-this: e7f7534579e2329616f6efe67777e91
2120 
2121 See the long Note [INLINE and default methods]. 
2122 
2123 This patch changes a couple of data types, with a knock-on effect on
2124 the format of interface files.  A lot of files get touched, but is a
2125 relatively minor change.  The main tiresome bit is the extra plumbing
2126 to communicate default methods between the type checker and the
2127 desugarer.
2128]
2129[Patch for shared libraries support on FreeBSD
2130Ian Lynagh <igloo@earth.li>**20100106185321
2131 From Maxime Henrion <mhenrion@gmail.com>
2132]
2133[Following Simon M's "take newCAF() out from sm_mutex" patch
2134dias@cs.tufts.edu**20100105211543
2135 Ignore-this: 9a94ac919479160167724f717813532c
2136]
2137[Very minor refactoring
2138simonpj@microsoft.com**20100105101833
2139 Ignore-this: f09724cc01e64968a35be6685eaa0ec2
2140]
2141[Undo the fix for Trac #3772 and do it a new way
2142simonpj@microsoft.com**20100105101600
2143 Ignore-this: 4495159621267e7b95e2c2ea54cb11e3
2144 
2145 The main idea is that I'm now treating a single-method dictionary very
2146 much like a multi-method dictionary.  In particular, it respond to
2147 exprIsConApp_maybe, even though newtypes aren't *really* proper
2148 constructors.
2149 
2150 See long comments with Note [Single-method classes] for why
2151 this slight hack is justified.
2152]
2153[Fix warnings
2154simonpj@microsoft.com**20100105100945
2155 Ignore-this: 23123788ec2b782c4491c0687bc51bf1
2156]
2157[Improve error message (idea in Trac #3805)
2158simonpj@microsoft.com**20100105095532
2159 Ignore-this: 109f041bb2a3be3beafc536aa5b8d9f
2160 
2161 If we see
2162 
2163    foreign export ccall foo :: ...blah...
2164 
2165 we now use the "foreign" to suggest -XForeignFunctionInterface
2166]
2167[Comments only
2168simonpj@microsoft.com**20100105095356
2169 Ignore-this: f61734a530c6c2cdd38643829a918f23
2170]
2171[Continue refactoring the core-to-core pipeline
2172simonpj@microsoft.com**20091224154643
2173 Ignore-this: 23451f6ec98081c82197b20486d8e47d
2174 
2175 This patch mainly concerns the plumbing for running
2176 the passes and printing intermediate output
2177]
2178[A bunch of stuff relating to substitutions on core
2179simonpj@microsoft.com**20091224153949
2180 Ignore-this: aff1cc9ef94a41b334a3493bfd894292
2181 
2182 * I was debugging so I added some call-site info
2183   (that touches a lot of code)
2184 
2185 * I used substExpr a bit less in Simplify, hoping to
2186   make the simplifier a little faster and cleaner
2187]
2188[Refactor CoreArity a bit
2189simonpj@microsoft.com**20091224153448
2190 Ignore-this: 70acb5f535ffdc1a82bc18214bb3a6e8
2191 
2192 I was experimenting with making coercions opaque to
2193 arity.  I think this is ultimately the right thing to do
2194 but I've left the functionality unchanged for now.
2195]
2196[Wibbles to inlining for small functions
2197simonpj@microsoft.com**20091222162731
2198 Ignore-this: a4de5d1dfb414cab4d16df59a2248701
2199 
2200 See Note [INLINE for small functions]
2201]
2202[Print out a bit more info with the "arity decrease" waring
2203simonpj@microsoft.com**20091222162606
2204 Ignore-this: 26eb76dfafe51ff74d5f7799069b4ed0
2205]
2206[Move isDictTy from TcType to Type
2207simonpj@microsoft.com**20091222162550
2208 Ignore-this: 85ed4466f1e3d296845f914be79c7a54
2209]
2210[Allow instance heads to use infix syntax
2211simonpj@microsoft.com**20091222162325
2212 Ignore-this: 54da2aa4208ee6757a80fa916c4afd6c
2213 
2214   class C a b
2215   instance Int `C` Bool
2216 
2217 This was accidentally disallowed before.
2218]
2219[Fix pretty-printer
2220simonpj@microsoft.com**20091222162130
2221 Ignore-this: 64957ca5ae58ddade799355dd14f30e1
2222]
2223[Fix Trac #3792: check for qualified names in import items
2224simonpj@microsoft.com**20100104215950
2225 Ignore-this: 12ff8d232e1ecf02b56bb8c03265bc53
2226]
2227[Fix bugs in STG Lint
2228simonpj@microsoft.com**20100104214659
2229 Ignore-this: c10cbfdbbb9ea44d408cd5d2237b46b1
2230 
2231 The Stg Lint failure reported in Trac #3789 were bogus.
2232 This patch fixes STG Lint, which must have been unused
2233 for ages.
2234]
2235[Refactor PackageTarget back into StaticTarget
2236Ben.Lippmeier@anu.edu.au**20100104031506
2237 Ignore-this: 14de03e800ae6e16ac952656817dce1c
2238]
2239[Follow PackageTarget changes in pprCEntity
2240Ben.Lippmeier@anu.edu.au**20100102235053
2241 Ignore-this: db33b178fa1488a6132d9074abb91a50
2242]
2243[Assume CmmLabels have dynamic linkage on non-Windows
2244Ben.Lippmeier.anu.edu.au**20100102100334
2245 Ignore-this: ed53fac02ebdd83e0e1b80fd8c211f19
2246]
2247[Follow PackageTarget change in byte code generator
2248Ben.Lippmeier@anu.edu.au**20100102093046
2249 Ignore-this: ca6311be11ad22bdecb567cec4f395d8
2250]
2251[When compiling viac, don't need to emit prototypes for symbols in the RTS
2252Ben.Lippmeier@anu.edu.au**20100102092957
2253 Ignore-this: 666616c2094070705dfb8d982f8ddfd8
2254]
2255[Follow ForeignLabel changes in PPC NCG
2256Ben.Lippmeier@anu.edu.au**20100102062315
2257 Ignore-this: fdc42b45d134c542c5df0a86c660fd0d
2258]
2259[Tag ForeignCalls with the package they correspond to
2260Ben.Lippmeier@anu.edu.au**20100102053754]
2261[Nicer panic message
2262Ben.Lippmeier@anu.edu.au**20091229103518]
2263[Typo in comment
2264Ben.Lippmeier@anu.edu.au**20091229051858]
2265[Windows DLLs: use DLL aware runSparks_closure instead of base_GHCziConc_runSparks_closure directly
2266Ben.Lippmeier@anu.edu.au**20091123051510]
2267[locateOneObj: don't look for dynamic libs in static mode
2268Simon Marlow <marlowsd@gmail.com>**20100103223637
2269 Ignore-this: 47e5d5eb1b27073b9afa1d804c83c7cd
2270 also replace picIsOn with isDynamicGhcLib, as __PIC__ is not the
2271 correct test for whether the GHC library is dynamically linked.
2272]
2273[Substantial improvements to coercion optimisation
2274simonpj@microsoft.com**20100104082155
2275 Ignore-this: 376f5cc54c399c4910c21ba2be353655
2276 
2277 The main purpose of this patch is to add a bunch of new rules
2278 to the coercion optimiser.  They are documented in the (revised)
2279 Appendix of the System FC paper. 
2280 
2281 Some code has moved about:
2282 
2283 - OptCoercion is now a separate module, mainly because it
2284   now uses tcMatchTy, which is defined in Unify, so OptCoercion
2285   must live higehr up in the hierarchy
2286 
2287 - Functions that manipulate Kinds has moved from
2288   Type.lhs to Coercion.lhs.  Reason: the function typeKind
2289   now needs to call coercionKind.  And in any case, a Kind is
2290   a flavour of Type, so it builds on top of Type; indeed Coercions
2291   and Kinds are both flavours of Type.
2292 
2293   This change required fiddling with a number of imports, hence
2294   the one-line changes to otherwise-unrelated modules
2295 
2296 - The representation of CoTyCons in TyCon has changed.   Instead of
2297   an extensional representation (a kind checker) there is now an
2298   intensional representation (namely TyCon.CoTyConDesc).  This was
2299   needed for one of the new coercion optimisations.
2300]
2301[Whitespace only
2302Ian Lynagh <igloo@earth.li>**20100102220556]
2303[Use a shell script, rather than perl script, to make flags.xsl
2304Ian Lynagh <igloo@earth.li>**20091231155004]
2305[Rolling back: Make FastString thread-safe.
2306Simon Marlow <marlowsd@gmail.com>**20091231164651
2307 Ignore-this: 8f21b256b0c86d167f8f6984d2b27a87
2308     
2309 This patch was the cause of the compile-time performance regression in
2310 #3796.  My guess is that it is due to the use of unsafePerformIO which
2311 traverses the stack up to the first update frame, and perhaps we have
2312 a deep stack when reading the dictionary from a .hi file.  In any
2313 case, since we're not relying on thread safety for FastStrings, I
2314 think the safest thing to do is back this out until we can investigate
2315 further.
2316]
2317[take newCAF() out from sm_mutex; use the capability-local mut list instead
2318Simon Marlow <marlowsd@gmail.com>**20091231160223
2319 Ignore-this: 81a9a0a1e279dea805a4ffd9cf124c90
2320]
2321[Use local mut lists in UPD_IND(), also clean up Updates.h
2322Simon Marlow <marlowsd@gmail.com>**20091231113435
2323 Ignore-this: a4659d4d24f8c6626fa8403314c6a2e4
2324]
2325[use local mut lists rather than global mut lists in sequential GC
2326Simon Marlow <marlowsd@gmail.com>**20091231113118
2327 Ignore-this: 782239ddca2a0ec5c928c310b1fad4e9
2328]
2329[Allow throwTo() to be called without a source thread
2330Simon Marlow <marlowsd@gmail.com>**20091218163200
2331 Ignore-this: cb7265bc6c1c75f0dd49501c1bb74f64
2332 Returns false if the exception could not be thrown becuase the tartget
2333 thread was running.  Not used yet, but might come in handy later.
2334]
2335[If ACTIVITY_INACTIVE is set, wait for GC before resetting it
2336Simon Marlow <marlowsd@gmail.com>**20091213201246
2337 Ignore-this: a3cd1a3aacbd68789ccc191e3b8d7778
2338 I don't think this fixes any real bugs, but there's a small
2339 possibility that when the RTS is woken up for an idle-time GC, the IO
2340 manager thread might be pre-empted which would prevent the idle GC
2341 from happening; this change ensures that the idle GC happens anyway.
2342]
2343[Fix rules/build-dependencies.mk on OS X
2344Ian Lynagh <igloo@earth.li>**20091230185239
2345 Also more comments on why we have the sed rules that we do.
2346]
2347[Copying Simon M's fix for 650 to the new codegen
2348dias@cs.tufts.edu**20091222222017
2349 Ignore-this: 4bd46e6ef23debc39c7c10aea3dfdf5c
2350]
2351[Better error checking and code cleanup
2352dias@cs.tufts.edu**20091222221946
2353 Ignore-this: 16e89f4115cb392ebbb0899c081157ed
2354]
2355[Add comments to darcs-all
2356simonpj@microsoft.com**20091221160511
2357 Ignore-this: 5a369a030785aec6ef0169e36757bba4
2358 
2359 The comments explain how darcs-all decides what repo to use
2360]
2361[Fix Trac #3772: dict funs for single-field classes
2362simonpj@microsoft.com**20091221160431
2363 Ignore-this: 808f1a0633c600689653ab4763dc8628
2364 
2365 This patch fixes a bug that meant that INLINE pragamas on
2366 a method of a single-field class didn't work properly.
2367 
2368 See Note [Single-method classes] in TcInstDcls, and Trac #3772
2369]
2370[Comments only (about implementing SPECIALISE pragmas)
2371simonpj@microsoft.com**20091221155745
2372 Ignore-this: c8c98b061c162a4585ff1141b65ea91a
2373]
2374[A bit of refactoring, plus a sanity check
2375simonpj@microsoft.com**20091221155632
2376 Ignore-this: ba3efed78ce0b752f26891179d6b3987
2377 
2378 Check that a bottoming rhs does indeed get exposed with bottoming strictness
2379 Almost all the changed lines reflect some refactoring of tidyTopIdInfo.
2380]
2381[Fix Trac #3776
2382simonpj@microsoft.com**20091221155509
2383 Ignore-this: 69607bdc7208775a305a5f39a575f0e2
2384 
2385 An easy fix.  See Note [Usage for sub-bndrs] in RnEnv.
2386]
2387[Move all the CoreToDo stuff into CoreMonad
2388simonpj@microsoft.com**20091218164521
2389 Ignore-this: 57b3f63c1faa82f7246ca46e4c9a4412
2390 
2391 This patch moves a lot of code around, but has zero functionality change.
2392 The idea is that the types
2393 
2394     CoreToDo
2395     SimplifierSwitch   
2396     SimplifierMode
2397     FloatOutSwitches
2398 
2399 and
2400 
2401     the main core-to-core pipeline construction
2402 
2403 belong in simplCore/, and *not* in DynFlags.
2404]
2405[Always expose the unfolding of something with an InlineRule
2406simonpj@microsoft.com**20091218164316
2407 Ignore-this: 4f952f423848b8840fab69d63ee81d8f
2408 
2409 Previously a bottoming function with a strictness wrapper
2410 had a hidden inlining, and that was Very Bad, because in
2411     f x = if ... then bot_fun x else x+1
2412 we really want to pass the *unboxed* x to bot_fun. This
2413 happens quite a bit in error handling code, eg for array
2414 indexing.
2415]
2416[Comments only
2417simonpj@microsoft.com**20091218164119
2418 Ignore-this: b4731841b036e614385cadbdfeda70b0
2419]
2420[Move loop-breaker info from original function to worker in work/wrap
2421simonpj@microsoft.com**20091218164107
2422 Ignore-this: cc5c062f02577834baa5031e25497c57
2423 
2424 When doing a w/w split, if the original function is a loop breaker
2425 then the worker (not the wrapper) becomes one instead.
2426 
2427 This isn't very important, because loop breaker information is
2428 recalculated afresh by the occurrence analyser, but it seems more
2429 kosher.  And Lint was bleating piteously about things with InlineRules
2430 that were loop breakers.
2431]
2432[Make -ddump-inlinings and -ddump-rule-firings less noisy
2433simonpj@microsoft.com**20091218163742
2434 Ignore-this: aea0634c569afd5486de9c6e7dad2ae2
2435 
2436 By default, these two now print *one line* per inlining or rule-firing.
2437 
2438 If you want the previous (voluminous) behaviour, use -dverbose-core2core.
2439]
2440[Make warning printing a bit less noisy
2441simonpj@microsoft.com**20091218163549
2442 Ignore-this: 86bc5d020b077b6c9d666d3e4d93bd1e
2443 
2444 Use -dppr-debug to make it noisy again
2445]
2446[Set fixity (left-assoc) for setIdOccInfo
2447simonpj@microsoft.com**20091218163513
2448 Ignore-this: 6de9c34824e7713d120c889fc019a72a
2449]
2450[Comments only
2451simonpj@microsoft.com**20091218105434
2452 Ignore-this: 48a8ed9e9703b412a7dd3201f22cf92d
2453]
2454[Add an extra heading in the output for count_lines
2455simonpj@microsoft.com**20091218105403
2456 Ignore-this: 9e4e91930aba49ad6a247aa1d38297cd
2457]
2458[Fixes to account for the new layout of MUT_ARR_PTRS (see #650)
2459Simon Marlow <marlowsd@gmail.com>**20091221115249
2460 Ignore-this: ca4a58628707b362dccedb74e81ef052
2461]
2462[Partial support for Haiku (#3727)
2463Simon Marlow <marlowsd@gmail.com>**20091221110250
2464 Ignore-this: 5d4a3104c1bd50b7eae64780cb73071d
2465]
2466[Fix #3751, also fix some lexical error SrcLocs
2467Simon Marlow <marlowsd@gmail.com>**20091217132658
2468 Ignore-this: 63e11a7a64bb0c98e793e4cc883f051d
2469]
2470[kill some old GRAN/PARALLEL_HASKELL code
2471Simon Marlow <marlowsd@gmail.com>**20091217103816
2472 Ignore-this: 9bcfe3e62c556074a6f9396385ba1cf4
2473]
2474[improve panic messages for srcLocLine, srcLocCol
2475Simon Marlow <marlowsd@gmail.com>**20091217103801
2476 Ignore-this: f58623a39bcc65201f150ce9560739d1
2477]
2478[Tweak the build-dependencies rule, and add comments for it
2479Ian Lynagh <igloo@earth.li>**20091219145808]
2480[When removing $(TOP) with sed, do so case insensitively
2481Ian Lynagh <igloo@earth.li>**20091219135339
2482 This avoids problems on Windows, where drive letters may not be the
2483 case we expect.
2484]
2485[Fix a braino in a comment
2486Ian Lynagh <igloo@earth.li>**20091218213541]
2487[Avoid a failing shell command when cleaning
2488Ian Lynagh <igloo@earth.li>**20091218201146
2489 It wasn't fatal, but better to avoid it anyway
2490]
2491[Fix another sed problem on Solaris
2492Ian Lynagh <igloo@earth.li>**20091217000421]
2493[unused named variables
2494dias@cs.tufts.edu**20091218195430
2495 Ignore-this: c2d56a21a039bb73023c54883a8c1fa3
2496]
2497[missed a case in a previous fix
2498dias@cs.tufts.edu**20091217210443
2499 Ignore-this: ff40b8516a3de3fc36a55534620e4f50
2500 
2501 Here's the obscure problem:
2502 -- However, we also want to allow an assignment to be generated
2503 -- in the case when the types are compatible, because this allows
2504 -- some slightly-dodgy but occasionally-useful casts to be used,
2505 -- such as in RtClosureInspect where we cast an HValue to a MutVar#
2506 -- so we can print out the contents of the MutVar#.  If we generate
2507 -- code that enters the HValue, then we'll get a runtime panic, because
2508 -- the HValue really is a MutVar#.  The types are compatible though,
2509 -- so we can just generate an assignment.
2510 
2511]
2512[Fix #650: use a card table to mark dirty sections of mutable arrays
2513Simon Marlow <marlowsd@gmail.com>**20091217224228
2514 Ignore-this: 75c354682c9ad1b71b68b5bc4cedd6de
2515 The card table is an array of bytes, placed directly following the
2516 actual array data.  This means that array reading is unaffected, but
2517 array writing needs to read the array size from the header in order to
2518 find the card table.
2519 
2520 We use a bytemap rather than a bitmap, because updating the card table
2521 must be multi-thread safe.  Each byte refers to 128 entries of the
2522 array, but this is tunable by changing the constant
2523 MUT_ARR_PTRS_CARD_BITS in includes/Constants.h.
2524]
2525[Fix build with Solaris sed
2526Ian Lynagh <igloo@earth.li>**20091216204354
2527 Rather than trying to handle tabs with sed portably, we just use tr to
2528 remove them before we start.
2529]
2530[Build and install inplace the count_lines and compareSizes utils
2531Ian Lynagh <igloo@earth.li>**20091216165608]
2532[Adjust Activations for specialise and work/wrap, and better simplify in InlineRules
2533simonpj@microsoft.com**20091216145205
2534 Ignore-this: 2606cf9b00f2172097332b8b25b0553c
2535 
2536 This patch does two main things:
2537 
2538 1. Adjusts the way we set the Activation for
2539 
2540    a) The wrappers generated by the strictness analyser
2541       See Note [Wrapper activation] in WorkWrap
2542 
2543    b) The RULEs generated by Specialise and SpecConstr
2544       See Note [Auto-specialisation and RULES] in Specialise
2545           Note [Transfer activation] in SpecConstr
2546 
2547 2. Refines how we set the phase when simplifying the right
2548    hand side of an InlineRule.  See
2549    Note [Simplifying inside InlineRules] in SimplUtils.
2550 
2551 Most of the extra lines are comments! 
2552 
2553 The merit of (2) is that a bit more stuff happens inside InlineRules,
2554 and that in turn allows better dead-code elimination.
2555]
2556[Comments only
2557simonpj@microsoft.com**20091216144908
2558 Ignore-this: 3dae7793802ded696b01f891a77aaf8
2559]
2560[fix up libm detection and use (#3724)
2561Simon Marlow <marlowsd@gmail.com>**20091216113652
2562 Ignore-this: 6bbdd7302b262ac3b8ddc5c852dc538
2563]
2564[configure.ac: fix libm checks (Trac #3730)
2565Sergei Trofimovich <slyfox@inbox.ru>**20091204214012
2566 Ignore-this: f3372535a68f3833247f679b023745c8
2567 
2568 libbfd pulled libm as dependency and broke LIBM= detection.
2569 
2570 Patch moves libm in library tests as early as possible.
2571 Thanks to asuffield for suggesting such a simple fix.
2572 Thanks to Roie Kerstein and Renato Gallo for finding
2573 and tracking down the issue.
2574]
2575[#include <sys/select.h> if we have it (#3760)
2576Simon Marlow <marlowsd@gmail.com>**20091216095501
2577 Ignore-this: 7c00991a67ae6715e16c6458bf0b78af
2578]
2579[add a couple of assertions
2580Simon Marlow <marlowsd@gmail.com>**20091123101918
2581 Ignore-this: e631da990055fd28156a6c887e1468ca
2582]
2583[Add comments
2584simonpj@microsoft.com**20091216090344
2585 Ignore-this: 6468afc939ab795d5a0eb9fd5dc08a48
2586]
2587[Refactor to combine two eqExpr functions
2588simonpj@microsoft.com**20091216085033
2589 Ignore-this: 925dec0fc9af1e0a9359226359627ae7
2590 
2591 I'd forgotten that Rules.lhs already has an eqExpr function.  This
2592 patch combines Rules.eqExpr with the (recent) CoreUtils.eqExpr.
2593 
2594 I also did a little refactoring by defining CoreSyn.expandUnfolding_maybe
2595 (see Note [Expanding variables] in Rules.lhs), and using it in
2596      a) CoreUnfold.exprIsConApp_maybe
2597      b) Rule matching
2598]
2599[Two improvements to optCoercion
2600simonpj@microsoft.com**20091216084706
2601 Ignore-this: 699d2deb1b1bf0c7bd7afb809bee26d2
2602 
2603 * Fix a bug that meant that
2604      (right (inst (forall tv.co) ty))
2605   wasn't getting optimised.  This showed up in the
2606   compiled code for ByteCodeItbls
2607 
2608 * Add a substitution to optCoercion, so that it simultaneously
2609   substitutes and optimises.  Both call sites wanted this, and
2610   optCoercion itself can use it, so it seems a win all round.
2611]
2612[Comments only
2613simonpj@microsoft.com**20091216084558
2614 Ignore-this: e5fc7949893dbbdc756d0616647a999b
2615]
2616[Make setInlineActivation left-associative
2617simonpj@microsoft.com**20091216084536
2618 Ignore-this: 4d166f158c79c819ac73a0368e52473c
2619]
2620[Fix a long-standing infelicity in the type pretty printer
2621simonpj@microsoft.com**20091216084513
2622 Ignore-this: 2d99f8733f6642671fcb88f2179e91e9
2623 
2624 We weren't parenthesising
2625    List (C Int)
2626 correctly, when (C Int) is a PredTy
2627]
2628[Deal with warnings in Coercion.lhs
2629simonpj@microsoft.com**20091216084053
2630 Ignore-this: 8f5a0537c76ed366003253e1f550d4f5
2631]
2632[Fix a bug in the in-scope set that led to some lookupIdSubst errors
2633simonpj@microsoft.com**20091215160216
2634 Ignore-this: ed89f1bf6ece2c1e1cd135f11b130786
2635]
2636[Fix Trac #3717: exprOkForSpeculation should look through case expressions
2637simonpj@microsoft.com**20091215160124
2638 Ignore-this: 1b848137f7fb81b2c1f72cc903f1c008
2639 
2640 See Note [exprOkForSpeculation: case expressions] in CoreUtils
2641]
2642[Add a size-comparison util
2643Ian Lynagh <igloo@earth.li>**20091215202636]
2644[Just make C dependencies once, rather than each way
2645Ian Lynagh <igloo@earth.li>**20091215135350
2646 This makes generating C dependencies for the RTS take 3 seconds, rather
2647 than 30.
2648]
2649[Make addCFileDeps quieter
2650Ian Lynagh <igloo@earth.li>**20091215134033
2651 Move a comment out of the definition, so it doesn't get printed as
2652 a shell command every time we call the definition
2653]
2654[Don't make C deps for compiler/parser/cutils.c in stage1
2655Ian Lynagh <igloo@earth.li>**20091215123757
2656 CPP finds the Rts.h, RtsFlags.h etc from the tree, rather than the
2657 bootstrapping compiler, and then fails because it doesn't think
2658 RtsFlags.h should be used any more.
2659]
2660[Tidy up computation of result discounts in CoreUnfold
2661simonpj@microsoft.com**20091214134647
2662 Ignore-this: 351076027f8e9cb8aa44db6d60798c47
2663 
2664 Mostly this patch is a tidy-up, but it did reveal one inconsistency
2665 that I fixed.  When computing result discounts for case expressions,
2666 we were *adding* result-discounts for cases on non-arguments, but
2667 *picking the one for the max-size branch* for arguments. I think you
2668 could argue the toss, but it seems neater (and the code is nicer)
2669 to be consistent (ie always add).  See Note [addAltSize result discounts].
2670 
2671 The nofib results seem fine
2672 
2673         Program           Size    Allocs   Runtime   Elapsed
2674 --------------------------------------------------------------------------------
2675           boyer          -0.8%     -4.8%      0.06      0.07
2676          sphere          -0.7%     -2.5%      0.15      0.16
2677 --------------------------------------------------------------------------------
2678             Min          -0.8%     -4.8%    -19.1%    -24.8%
2679             Max          -0.5%     +0.0%     +3.4%   +127.1%
2680  Geometric Mean          -0.7%     -0.1%     -4.3%     -1.3%
2681 
2682 The +127% elapsed is a timing error; I re-ran the same binary and it's
2683 unchanged from the baseline.
2684]
2685[Use full equality for CSE
2686simonpj@microsoft.com**20091211173920
2687 Ignore-this: c6d73febf652aa34dc1197a49e599ee
2688 
2689 In CSE we were getting lots of apprarently-unequal expressions with
2690 the same hash code.  In fact they were perfectly equal -- but we were
2691 using a cheap-and-cheerful equality tests for CoreExpr that said False
2692 for any lambda expression!
2693 
2694 This patch adds a proper equality test for Core, with alpha-renaming.
2695 It's easy to do, and will avoid silly cases of CSE failing to fire.
2696 
2697 We should get less of this:
2698   WARNING: file compiler/simplCore/CSE.lhs line 326
2699   extendCSEnv: long list, length 18
2700 from a compiler built with -DDEBUG
2701]
2702[Improve strictness analysis for bottoming functions
2703simonpj@microsoft.com**20091211162324
2704 Ignore-this: dd5ef03a1b4728c25a2333f59024dc9c
2705 
2706 I found the following results from strictness analyis:
2707   f x = error (fst x)      -- Strictness U(SA)b
2708   g x = error ('y':fst x)  -- Strictness Tb
2709 
2710 Surely 'g' is no less strict on 'x' than 'f' is!  The fix turned out
2711 be to very nice and simple.  See Note [Bottom demands] in DmdAnal.
2712]
2713[Bottom extraction: float out bottoming expressions to top level
2714simonpj@microsoft.com**20091211161928
2715 Ignore-this: a1a96b36dc982d83f5c01a4259518b
2716   
2717 The idea is to float out bottoming expressions to top level,
2718 abstracting them over any variables they mention, if necessary.  This
2719 is good because it makes functions smaller (and more likely to
2720 inline), by keeping error code out of line.
2721 
2722 See Note [Bottoming floats] in SetLevels.
2723 
2724 On the way, this fixes the HPC failures for cg059 and friends.
2725 
2726 I've been meaning to do this for some time.  See Maessen's paper 1999
2727 "Bottom extraction: factoring error handling out of functional
2728 programs" (unpublished I think).
2729 
2730 Here are the nofib results:
2731 
2732 
2733         Program           Size    Allocs   Runtime   Elapsed
2734 --------------------------------------------------------------------------------
2735             Min          +0.1%     -7.8%    -14.4%    -32.5%
2736             Max          +0.5%     +0.2%     +1.6%    +13.8%
2737  Geometric Mean          +0.4%     -0.2%     -4.9%     -6.7%
2738 
2739 Module sizes
2740         -1 s.d.                -----           -2.6%
2741         +1 s.d.                -----           +2.3%
2742         Average                -----           -0.2%
2743 
2744 Compile times:
2745         -1 s.d.                -----          -11.4%
2746         +1 s.d.                -----           +4.3%
2747         Average                -----           -3.8%
2748 
2749 I'm think program sizes have crept up because the base library
2750 is bigger -- module sizes in nofib decrease very slightly.  In turn
2751 I think that may be because the floating generates a call where
2752 there was no call before.  Anyway I think it's acceptable.
2753 
2754 
2755 The main changes are:
2756 
2757 * SetLevels floats out things that exprBotStrictness_maybe
2758   identifies as bottom.  Make sure to pin on the right
2759   strictness info to the newly created Ids, so that the
2760   info ends up in interface files.
2761 
2762   Since FloatOut is run twice, we have to be careful that we
2763   don't treat the function created by the first float-out as
2764   a candidate for the second; this is what worthFloating does.
2765 
2766   See SetLevels Note [Bottoming floats]
2767                 Note [Bottoming floats: eta expansion]
2768 
2769 * Be careful not to inline top-level bottoming functions; this
2770   would just undo what the floating transformation achieves.
2771   See CoreUnfold Note [Do not inline top-level bottoming functions
2772 
2773   Ensuring this requires a bit of extra plumbing, but nothing drastic..
2774 
2775 * Similarly pre/postInlineUnconditionally should be
2776   careful not to re-inline top-level bottoming things!
2777   See SimplUtils Note [Top-level botomming Ids]
2778                  Note [Top level and postInlineUnconditionally]
2779]
2780[Expose all EventLog events as DTrace probes
2781Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20091212100809
2782 Ignore-this: 2c5ef30b1ff7fb2ea5fba8cf0a187d45
2783 - Defines a DTrace provider, called 'HaskellEvent', that provides a probe
2784   for every event of the eventlog framework.
2785 - In contrast to the original eventlog, the DTrace probes are available in
2786   all flavours of the runtime system (DTrace probes have virtually no
2787   overhead if not enabled); when -DTRACING is defined both the regular
2788   event log as well as DTrace probes can be used.
2789 - Currently, Mac OS X only.  User-space DTrace probes are implemented
2790   differently on Mac OS X than in the original DTrace implementation.
2791   Nevertheless, it shouldn't be too hard to enable these probes on other
2792   platforms, too.
2793 - Documentation is at http://hackage.haskell.org/trac/ghc/wiki/DTrace
2794]
2795[Fix two related bugs in u_tys
2796simonpj@microsoft.com**20091211120122
2797 Ignore-this: 25e826e0915c6f6267cadff96f1d7ca6
2798 
2799 When we normalise a type family application we must recursively call
2800 uTys, *not* 'go', because the latter loop is only there to look
2801 through type synonyms.  This bug made the type checker generate
2802 ill-typed coercions, which were rejected by Core Lint.
2803 
2804 A related bug only affects the size of coercions.  If faced with
2805   (m a) ~ (F b c)
2806 where F has arity 1, we want to decompose to
2807    m ~ F Int,  a ~ c
2808 rather than deferring.  The application decomposition was being
2809 tried last, so we were missing this opportunity.
2810 
2811 Thanks to Roman for an example that showed all this up.
2812]
2813[Fix spelling in comment
2814simonpj@microsoft.com**20091211115744
2815 Ignore-this: bd02fc0eb67efc7404536f1ee96d4d1f
2816]
2817[Make -ddump-simpl-stats a bit more informative by default
2818simonpj@microsoft.com**20091208175445
2819 Ignore-this: 1bbe3f4c4b727a3b1580236c1f9c2583
2820 
2821 This mades -ddump-simpl-stats print out per-rule and per-id
2822 information by default, rather than requiring -dppr-debug.
2823 On the whole that is what you want.  The -dppr-debug flag
2824 now just controls printing of the log.
2825]
2826[Improve dumping for rules, and documentation of same
2827simonpj@microsoft.com**20091208105556
2828 Ignore-this: 4b09e56f953d130d5cb2807cf9da7303
2829 
2830 Inspired by Trac #3703
2831]
2832[Fix #3741, simplifying things in the process
2833Simon Marlow <marlowsd@gmail.com>**20091210160909
2834 Ignore-this: 8a668af4eb9e1aa71b4764b84f148dac
2835 The problem in #3741 was that we had confused column numbers with byte
2836 offsets, which fails in the case of UTF-8 (amongst other things).
2837 Fortunately we're tracking correct column offsets now, so we didn't
2838 have to make a calculation based on a byte offset.  I got rid of two
2839 fields from the PState (last_line_len and last_offs).and one field
2840 from the AI (alex input) constructor.
2841]
2842[Allow spaces at either end of the C import spec (#3742)
2843Simon Marlow <marlowsd@gmail.com>**20091210124537
2844 Ignore-this: 840424ea49d5e81ab8f8ce3209d5eedf
2845]
2846[Put README and INSTALL into bindists
2847Ian Lynagh <igloo@earth.li>**20091209174305
2848 Also tidied up the way configure.ac gets into bindists
2849]
2850[Fix typo
2851Ian Lynagh <igloo@earth.li>**20091209152223]
2852[Fix the stage1 version number munging
2853Ian Lynagh <igloo@earth.li>**20091209151715
2854 It was munging 6.12.1 into 62
2855]
2856[Add a comment about why $(CPP) is defined the way it is in config.mk.in
2857Ian Lynagh <igloo@earth.li>**20091209131917]
2858[add a missing unlockTSO()
2859Simon Marlow <marlowsd@gmail.com>**20091209124113
2860 Ignore-this: 9ff0aedcb6d62e5b4bd2fab30bfce105
2861]
2862[Eliminate mkdependC
2863Ian Lynagh <igloo@earth.li>**20091209123929
2864 We now just call gcc to get the dependencies directly
2865]
2866[Change some HC_OPTS to CC_OPTS, so they are used when making dependencies
2867Ian Lynagh <igloo@earth.li>**20091208200315]
2868[Add -Iincludes to hp2ps's CC_OPTS
2869Ian Lynagh <igloo@earth.li>**20091208175718
2870 Making C deps for hp2ps always failed, but we used to carry on regardless
2871]
2872[add locking in mkWeakForeignEnv#
2873Simon Marlow <marlowsd@gmail.com>**20091208101229
2874 Ignore-this: 3902631687fc252c0e6794d58641371b
2875]
2876[declare g0 (fixes compilation failure with -fvia-C)
2877Simon Marlow <marlowsd@gmail.com>**20091208100925]
2878[simplify weak pointer processing
2879Simon Marlow <marlowsd@gmail.com>**20091208094822
2880 Ignore-this: d88091b23860eeba6cd971282b05c2e6
2881]
2882[simplification/optimisation: update tso->bound->tso when scavenging the TSO
2883Simon Marlow <marlowsd@gmail.com>**20091208085739
2884 Ignore-this: 401e2c67e42de9671191ba9d18c3fcf7
2885]
2886[threadStackUnderflow: fix recently introduced bug (conc068(threaded1) failure)
2887Simon Marlow <marlowsd@gmail.com>**20091207170127
2888 Ignore-this: cab7b66b3b1478d44ad5272eeec84004
2889 
2890 bug introduced by "threadStackUnderflow: put the new TSO on the mut
2891 list if necessary"
2892]
2893[need locking around use of weak_ptr_list in mkWeak#
2894Simon Marlow <marlowsd@gmail.com>**20091207145213
2895 Ignore-this: 9c7d506c30652de4dd5c47d1989022c1
2896]
2897[remove global 'total_allocated', seems to be the same as 'GC_tot_alloc'
2898Simon Marlow <marlowsd@gmail.com>**20091207115359
2899 Ignore-this: d174f167a2be6864bbab672f3d5b7c5
2900]
2901[Add some explanation about overlapping instances
2902simonpj@microsoft.com**20091207153915
2903 Ignore-this: 627db39187f0ed8a10fe46e667a849a
2904 
2905 Trac #3734 suggested addding some extra guidance about
2906 incoherence and overlap; now done
2907]
2908[Tidy up deriving error messages
2909simonpj@microsoft.com**20091207130850
2910 Ignore-this: 4e134f6b62814ea6f361df7525c25a2d
2911 
2912 I did this in response to a suggestion in Trac #3702
2913]
2914[Fix profiling build
2915Simon Marlow <marlowsd@gmail.com>**20091207092314
2916 Ignore-this: eb397ec713cb7a8f6e56f409e0663ffe
2917]
2918[Minor refactoring to remove redundant code
2919simonpj@microsoft.com**20091207083312
2920 Ignore-this: 3203447fa823823ae27565f53d39bd10
2921]
2922[Fix a nasty (and long-standing) FloatOut performance bug
2923simonpj@microsoft.com**20091207083246
2924 Ignore-this: a64b98992fa4ced434d1edf0b89842ec
2925 
2926 The effect was that, in deeply-nested applications, FloatOut would
2927 take quadratic time.  A good example was compiling
2928     programs/barton-mangler-bug/Expected.hs
2929 in which FloatOut had a visible pause of a couple of seconds!
2930 Profiling showed that 40% of the entire compile time was being
2931 consumbed by the single function partitionByMajorLevel.
2932 
2933 The bug was that the floating bindings (type FloatBinds) was kept
2934 as a list, which was partitioned at each binding site.  In programs
2935 with deeply nested lists, such as
2936        e1 : e2 : e3 : .... : e5000 : []
2937 this led to quadratic behaviour.
2938 
2939 The solution is to use a proper finite-map representation;
2940 see the new definition of FloatBinds near the bottom of FloatOut.
2941]
2942[Add a new to-do to cmm-notes
2943simonpj@microsoft.com**20091207081130
2944 Ignore-this: fc835da15dd8a206c2c1bdc6c7053c5b
2945]
2946[Comments only, principally about IfaceDeclExtras
2947simonpj@microsoft.com**20091207081108
2948 Ignore-this: 1004303ab0df7802295d67c613c4ab24
2949]
2950[Comments only, about RULE plumbing
2951simonpj@microsoft.com**20091207080442
2952 Ignore-this: 1a559744f6ad75e151afbfb2281bceb4
2953]
2954[Add splitUFM to UniqFM (used in a forthcoming patch)
2955simonpj@microsoft.com**20091204160820
2956 Ignore-this: 332aa029f25ec3f22e4f195ecd44b40b
2957 
2958 splitUFM :: Uniquable key => UniqFM elt -> key -> (UniqFM elt, Maybe elt, UniqFM elt)
2959    -- Splits a UFM into things less than, equal to, and greater than the key
2960]
2961[Add lengthBag to Bag (using in forthcoming patch)
2962simonpj@microsoft.com**20091204155055
2963 Ignore-this: 5af0f45d6b51bc77e54c5cb0e2b1e607
2964]
2965[Use addToUFM_Acc where appropriate
2966simonpj@microsoft.com**20091204155036
2967 Ignore-this: 38e768c4a9f00d7870a631a9472e6edc
2968 
2969 This way of extending a UniqFM has existed for some time, but
2970 we weren't really using it.
2971 
2972 addToUFM_Acc   :: Uniquable key =>
2973                              (elt -> elts -> elts)     -- Add to existing
2974                           -> (elt -> elts)             -- New element
2975                           -> UniqFM elts               -- old
2976                           -> key -> elt                -- new
2977                           -> UniqFM elts               -- result
2978]
2979[Add comments to "OPTIONS_GHC -fno-warn-orphans" pragmas
2980Ian Lynagh <igloo@earth.li>**20091205165721]
2981[Add some missing exports back for GHC package users; fixes trac #3715
2982Ian Lynagh <igloo@earth.li>**20091205153532]
2983[Add some comments on the alternative layout rule state
2984Ian Lynagh <igloo@earth.li>**20091205152039]
2985[Tweak layout for alternative layout rule
2986Ian Lynagh <igloo@earth.li>**20091203164424]
2987[Link all dynamic libraries with the correct install_name on Mac OS/X.
2988Ian Lynagh <igloo@earth.li>**20091204143614
2989 This is a rerecord of
2990     Stephen Blackheath <oversensitive.pastors.stephen@blacksapphire.com>**20090930222855
2991 to avoid conflicts.
2992]
2993[Document the new -dylib-install-name option in the user's guide.
2994Stephen Blackheath <oversensitive.pastors.stephen@blacksapphire.com>**20091001051637
2995 Ignore-this: 568f6ad423f737ccda3a79f2d8efdb97
2996]
2997[Add -dylib-install-name option to GHC so the install name can be set for dynamic libs on Mac OS/X.
2998Stephen Blackheath <oversensitive.pastors.stephen@blacksapphire.com>**20090930223708
2999 Ignore-this: 2323929595c0dc03a2e2ea802477a930
3000]
3001[Force -fPIC when linking against dynamic libraries on Mac OS/X.
3002Stephen Blackheath <oversensitive.pastors.stephen@blacksapphire.com>**20090928203800
3003 Ignore-this: 465433af2349779b510f500dc79768f3
3004 Otherwise you get
3005 /tmp/ghc7602_0/ghc7602_0.s:207:0:
3006    non-relocatable subtraction expression, "___stginit_Lib_dyn" minus "L1x2;4"
3007 /tmp/ghc7602_0/ghc7602_0.s:207:0:
3008    symbol: "___stginit_Lib_dyn" can't be undefined in a subtraction expression
3009]
3010[evaluate_large: evaluate large objects to bd->dest rather than gen->to
3011Simon Marlow <marlowsd@gmail.com>**20091204111037
3012 Ignore-this: 6c77407750d4a6178851aeb79ded20d1
3013 This fixes aging of large objects in the new scheme.  Bug found by
3014 perf/space_leaks/space_leak_001.  Yay perf regressions tests.
3015]
3016[Correction to the allocation stats following earlier refactoring
3017Simon Marlow <marlowsd@gmail.com>**20091204110839
3018 Ignore-this: 7ac497c67706bedd29c79091c100d22f
3019]
3020[export g0
3021Simon Marlow <marlowsd@gmail.com>**20091203165209
3022 Ignore-this: 69b5445beb91ac99bb018b9806de90a
3023]
3024[GC refactoring, remove "steps"
3025Simon Marlow <marlowsd@gmail.com>**20091203150728
3026 Ignore-this: 5360b8bf30c6847ccb7ffa8c431e81ff
3027 
3028 The GC had a two-level structure, G generations each of T steps.
3029 Steps are for aging within a generation, mostly to avoid premature
3030 promotion. 
3031 
3032 Measurements show that more than 2 steps is almost never worthwhile,
3033 and 1 step is usually worse than 2.  In theory fractional steps are
3034 possible, so the ideal number of steps is somewhere between 1 and 3.
3035 GHC's default has always been 2.
3036 
3037 We can implement 2 steps quite straightforwardly by having each block
3038 point to the generation to which objects in that block should be
3039 promoted, so blocks in the nursery point to generation 0, and blocks
3040 in gen 0 point to gen 1, and so on.
3041 
3042 This commit removes the explicit step structures, merging generations
3043 with steps, thus simplifying a lot of code.  Performance is
3044 unaffected.  The tunable number of steps is now gone, although it may
3045 be replaced in the future by a way to tune the aging in generation 0.
3046]
3047[fix error message on Windows (fixes rtsflags001)
3048Simon Marlow <marlowsd@gmail.com>**20091202141135
3049 Ignore-this: 239fed52f7f5358b034acd6512d26ef4
3050]
3051[Fix loading of annotations
3052Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091204024259
3053 Ignore-this: 5750856feecbf9c6aeebfec012b1a1fd
3054 
3055 The problem was that we collected all annotations we knew about once when the
3056 simplifier started and threaded them through the CoreM monad. If new interface
3057 files were loaded during simplification, their annotations would not be
3058 visible to the simplifier.
3059 
3060 Now, we rebuild the annotation list at the start of every simplifier pass that
3061 needs it (which is only SpecConstr at the moment). This ensures that we see
3062 all annotations that have been loaded so far. This is somewhat similar to how
3063 RULES are handled.
3064]
3065[Add new ForceSpecConstr annotation
3066Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091203065455
3067 Ignore-this: ca5327f85d9d40c78d95e8bfe3e7fab1
3068 
3069 Annotating a type with {-# ANN type T ForceSpecConstr #-} makes SpecConstr
3070 ignore -fspec-constr-threshold and -fspec-constr-count for recursive functions
3071 that have arguments of type T. Such functions will be specialised regardless
3072 of their size and there is no upper bound on the number of specialisations
3073 that can be generated. This also works if T is embedded in other types such as
3074 Maybe T (but not T -> T).
3075 
3076 T should not be a product type because it could be eliminated by the
3077 worker/wrapper transformation. For instance, in
3078 
3079 data T = T Int Int
3080 
3081 foo :: T -> Int
3082 foo (T m n) = ... foo (T m' n') ...
3083 
3084 SpecConstr will never see the T because w/w will get rid of it. I'm still
3085 thinking about whether fixing this is worthwhile.
3086]
3087[Generate INLINE pragmas for PA methods
3088Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091203031452
3089 Ignore-this: 3435044aec2737ba58d269aeff915fbd
3090]
3091[Add a GHC layout extension to the alternative layout rule
3092Ian Lynagh <igloo@earth.li>**20091203155708]
3093[Fix HPC column numbers, following the column number changes in GHC
3094Ian Lynagh <igloo@earth.li>**20091203135520]
3095[Whitespace only
3096Ian Lynagh <igloo@earth.li>**20091203132259]
3097[Fix column numbers used when highlighting :list output
3098Ian Lynagh <igloo@earth.li>**20091203130328]
3099[add a missing lock around allocGroup()
3100Simon Marlow <marlowsd@gmail.com>**20091203110209
3101 Ignore-this: 5898b3de4010e16789b628b004aa77db
3102]
3103[remove unused cap->in_gc flag
3104Simon Marlow <marlowsd@gmail.com>**20091202154240
3105 Ignore-this: db2ef6c957c8d32233bbcc344e3c06b6
3106]
3107[Refactoring only
3108Simon Marlow <marlowsd@gmail.com>**20091202123806
3109 Ignore-this: 95a93f6e330f2c609c197194412cac75
3110]
3111[move sanity checking code from Storage.c to Sanity.c
3112Simon Marlow <marlowsd@gmail.com>**20091202121141
3113 Ignore-this: 216d434c3c3d2250effac22b37bc2b4d
3114]
3115[stg_ap_0_fast: sanity-check only the topmost frame, not the whole stack
3116Simon Marlow <marlowsd@gmail.com>**20091202115109
3117 Ignore-this: ad45e07c26aa961913d367d7c53efb75
3118 Sanity checking was getting too slow in some cases, this returns it to
3119 a constant-factor overhead.
3120]
3121[Fix profiling build
3122Simon Marlow <marlowsd@gmail.com>**20091203085930
3123 Ignore-this: ff3de527cbf7703e8bac4a48933cd8ba
3124]
3125[More work on the simplifier's inlining strategies
3126simonpj@microsoft.com**20091202174256
3127 Ignore-this: 5840392a95d9a47f37c3074f7394f2c2
3128 
3129 This patch collects a small raft of related changes
3130 
3131 * Arrange that during
3132      (a) rule matching and
3133      (b) uses of exprIsConApp_maybe
3134   we "look through" unfoldings only if they are active
3135   in the phase. Doing this for (a) required a bit of
3136   extra plumbing in the rule matching code, but I think
3137   it's worth it.
3138 
3139   One wrinkle is that even if inlining is off (in the 'gentle'
3140   phase of simplification) during rule matching we want to
3141   "look through" things with inlinings. 
3142    See SimplUtils.activeUnfInRule.
3143 
3144   This fixes a long-standing bug, where things that were
3145   supposed to be (say) NOINLINE, could still be poked into
3146   via exprIsConApp_maybe.
3147 
3148 * In the above cases, also check for (non-rule) loop breakers;
3149   we never look through these.  This fixes a bug that could make
3150   the simplifier diverge (and did for Roman). 
3151   Test = simplCore/should_compile/dfun-loop
3152 
3153 * Try harder not to choose a DFun as a loop breaker. This is
3154   just a small adjustment in the OccurAnal scoring function
3155 
3156 * In the scoring function in OccurAnal, look at the InlineRule
3157   unfolding (if there is one) not the actual RHS, beause the
3158   former is what'll be inlined. 
3159 
3160 * Make the application of any function to dictionary arguments
3161   CONLIKE.  Thus (f d1 d2) is CONLIKE. 
3162   Encapsulated in CoreUtils.isExpandableApp
3163   Reason: see Note [Expandable overloadings] in CoreUtils
3164 
3165 * Make case expressions seem slightly smaller in CoreUnfold.
3166   This reverses an unexpected consequences of charging for
3167   alternatives.
3168 
3169 Refactorings
3170 ~~~~~~~~~~~~
3171 * Signficantly refactor the data type for Unfolding (again).
3172   The result is much nicer. 
3173 
3174 * Add type synonym BasicTypes.CompilerPhase = Int
3175   and use it
3176 
3177 Many of the files touched by this patch are simply knock-on
3178 consequences of these two refactorings.
3179]
3180[Fix Trac #3100: reifyType
3181simonpj@microsoft.com**20091130175204
3182 Ignore-this: ad1578c3d2e3da6128cd5052c8b64dc
3183 
3184 A type without any leading foralls may still have constraints
3185    eg:  ?x::Int => Int -> Int
3186 
3187 But reifyType was failing in this case.
3188 
3189 Merge to 6.12.
3190]
3191[Fix Trac #3102: pre-matching polytypes
3192simonpj@microsoft.com**20091130174441
3193 Ignore-this: 3e3fa97e0de28b005a1aabe9e5542b32
3194 
3195 When *pre-matching* two types
3196      forall a. C1 => t1  ~  forall a. C2 => t2
3197 we were matching t1~t2, but totally ignoring C1,C2
3198 That's utterly wrong when pre-matching
3199        (?p::Int) => String  ~  a
3200 because we emerge with a:=String!
3201 
3202 All this is part of the impredicative story, which is about
3203 to go away, but still.
3204 
3205 Worth merging this to 6.12
3206]
3207[threadStackUnderflow: put the new TSO on the mut list if necessary
3208Simon Marlow <marlowsd@gmail.com>**20091202144549
3209 Ignore-this: 839e7ad7893b3d7ea6481030ce7c6fe6
3210]
3211[don't sanity check the whole stack when switching interp<->compiled
3212Simon Marlow <marlowsd@gmail.com>**20091202134121
3213 Ignore-this: 999b44d4dd096eceda81dda65f65a2df
3214]
3215[fix to sanity checking for ThreadRelocated TSOs
3216Simon Marlow <marlowsd@gmail.com>**20091202134041
3217 Ignore-this: 52364f29041e6909b550956087649220
3218]
3219[sanity check the top stack frame, not the whole stack
3220Simon Marlow <marlowsd@gmail.com>**20091202134020
3221 Ignore-this: c4c9b58c13299eecf7ec8cb79e34dc1f
3222]
3223[Make allocatePinned use local storage, and other refactorings
3224Simon Marlow <marlowsd@gmail.com>**20091201160321
3225 Ignore-this: ec1334a9a5ec0de2567aa81d74b715ba
3226 
3227 This is a batch of refactoring to remove some of the GC's global
3228 state, as we move towards CPU-local GC. 
3229 
3230   - allocateLocal() now allocates large objects into the local
3231     nursery, rather than taking a global lock and allocating
3232     then in gen 0 step 0.
3233 
3234   - allocatePinned() was still allocating from global storage and
3235     taking a lock each time, now it uses local storage.
3236     (mallocForeignPtrBytes should be faster with -threaded).
3237     
3238   - We had a gen 0 step 0, distinct from the nurseries, which are
3239     stored in a separate nurseries[] array.  This is slightly strange.
3240     I removed the g0s0 global that pointed to gen 0 step 0, and
3241     removed all uses of it.  I think now we don't use gen 0 step 0 at
3242     all, except possibly when there is only one generation.  Possibly
3243     more tidying up is needed here.
3244 
3245   - I removed the global allocate() function, and renamed
3246     allocateLocal() to allocate().
3247 
3248   - the alloc_blocks global is gone.  MAYBE_GC() and
3249     doYouWantToGC() now check the local nursery only.
3250]
3251[Free full_prog_argv at exit, closing a memory leak
3252Simon Marlow <marlowsd@gmail.com>**20091201122801
3253 Ignore-this: 8fdb41e09bfc318821c427d2f22af737
3254]
3255[free cap->saved_mut_lists too
3256Simon Marlow <marlowsd@gmail.com>**20091201113448
3257 Ignore-this: 973e1de140e104c126fe4a213791ba86
3258 fixes some memory leakage at shutdown
3259]
3260[exitScheduler: move boundTaskExiting call outside #ifdef THREADED_RTS
3261Simon Marlow <marlowsd@gmail.com>**20091201113352
3262 Ignore-this: d913df43b14054f73c0fa06d0205952c
3263 Fixes a little leaked memory at shutdown in non-threaded RTS
3264]
3265[Use dlltool from the in-tree mingw installation
3266Ian Lynagh <igloo@earth.li>**20091201190544
3267 We only use dlltool on Windows, and this way we don't require that
3268 the user has it installed.
3269]
3270[Fix Commentary link in the HACKING file; trac #3706
3271Ian Lynagh <igloo@earth.li>**20091201150149]
3272[Add an entry fo the ghci command :run to the user guide
3273Ian Lynagh <igloo@earth.li>**20091201173339]
3274[Fix typo in docs
3275Ian Lynagh <igloo@earth.li>**20091201170550]
3276[Delay expansion of some makefile variables until they are available
3277Ian Lynagh <igloo@earth.li>**20091201133609]
3278[Call $(SED) rather than sed
3279Ian Lynagh <igloo@earth.li>**20091201131123]
3280[Look for sed as gsed first
3281Ian Lynagh <igloo@earth.li>**20091201130741
3282 Solaris's sed apparently doesn't understand [:space:]
3283]
3284[Avoid running empty for loops; fixes trac #3683
3285Ian Lynagh <igloo@earth.li>**20091201125927
3286 Solaris's sh gives
3287     /bin/sh: syntax error at line 1: `;' unexpected
3288 when faced with something like
3289     for x in ; do ...; done
3290 Patch from Christian Maeder.
3291]
3292[Fix PS file generation
3293Simon Marlow <marlowsd@gmail.com>**20091201154254
3294 Ignore-this: 7b7122208e845b029a8b7215149fd203
3295 (the image doesn't work, but at least db2latex doesn't fall over)
3296]
3297[Implement a new heap-tuning option: -H
3298Simon Marlow <marlowsd@gmail.com>**20091130151836
3299 Ignore-this: 2089b9dfaf6c095dc0460cef39e9d586
3300 
3301 -H alone causes the RTS to use a larger nursery, but without exceeding
3302 the amount of memory that the application is already using.  It trades
3303 off GC time against locality: the default setting is to use a
3304 fixed-size 512k nursery, but this is sometimes worse than using a very
3305 large nursery despite the worse locality.
3306 
3307 Not all programs get faster, but some programs that use large heaps do
3308 much better with -H.  e.g. this helps a lot with #3061 (binary-trees),
3309 though not as much as specifying -H<large>.  Typically using -H<large>
3310 is better than plain -H, because the runtime doesn't know ahead of
3311 time how much memory you want to use.
3312 
3313 Should -H be on by default?  I'm not sure, it makes some programs go
3314 slower, but others go faster.
3315]
3316[Store a destination step in the block descriptor
3317Simon Marlow <marlowsd@gmail.com>**20091129164251
3318 Ignore-this: c406550acfe10141fcc38d3949d67490
3319 At the moment, this just saves a memory reference in the GC inner loop
3320 (worth a percent or two of GC time).  Later, it will hopefully let me
3321 experiment with partial steps, and simplifying the generation/step
3322 infrastructure.
3323]
3324[Fix the prof_scc.png image in the profiling section (#3694)
3325Simon Marlow <marlowsd@gmail.com>**20091130132703
3326 Ignore-this: 9774bad70187274e3dd283d66703004
3327]
3328[document 'recache' command in the help output (#3684)
3329Simon Marlow <marlowsd@gmail.com>**20091130122040
3330 Ignore-this: 95a51f76e66055af27cdfc7b5ad7deb3
3331]
3332[Check whether the main function is actually exported (#414)
3333Simon Marlow <marlowsd@gmail.com>**20091130112327
3334 Ignore-this: 1afaa18d8c0c9e1d029531ac9d4865bb
3335]
3336[Avoid using non-standard GNU tar option --force-local
3337Simon Marlow <marlowsd@gmail.com>**20091130112605
3338 Ignore-this: ac066722b15eb93e752d4f63391c9e3c
3339]
3340[Reorder ALL_RTS_LIBS
3341Matthias Kilian <kili@outback.escape.de>**20091115175405
3342 Ignore-this: 795cfd5215ec73eea729aa2b3097817e
3343 
3344 ALL_RTS_LIBS is (ab)used for linking ghc when BootingFromHc=Yes,
3345 which needs libHSrtsmain.a before libHSrts.a.
3346 
3347]
3348[Update dependencies
3349Ian Lynagh <igloo@earth.li>**20091129165534]
3350[Follow Cabal changes
3351Ian Lynagh <igloo@earth.li>**20091129165141]
3352[Tweak layout to work with alternative layout rule
3353Ian Lynagh <igloo@earth.li>**20091129163044]
3354[Tweak the alternative layout rule: {} contains commas
3355Ian Lynagh <igloo@earth.li>**20091129155454]
3356[Correct the advanceSrcLoc calculation for tabs
3357Ian Lynagh <igloo@earth.li>**20091129153933
3358 It was off-by-one
3359]
3360[Tweak alternative layout rule
3361Ian Lynagh <igloo@earth.li>**20091129152323]
3362[Make the alternative layout rule cope with file pragmas
3363Ian Lynagh <igloo@earth.li>**20091129145840]
3364[Give more informative error messages
3365Ian Lynagh <igloo@earth.li>**20091129031029
3366 We used to just get
3367     ghc: panic! (the 'impossible' happened)
3368       (GHC version 6.13.20091128 for x86_64-unknown-linux):
3369         too few bytes. Failed reading at byte position 32753
3370 with no indication of what was being parsed.
3371]
3372[Teach advanceSrcLoc about tab characters
3373Ian Lynagh <igloo@earth.li>**20091128151204]
3374[Whitespace only
3375Ian Lynagh <igloo@earth.li>**20091128150731]
3376[Columns now start at 1, as lines already did
3377Ian Lynagh <igloo@earth.li>**20091127224050
3378 Also corrected a couple of line 0's to line 1
3379]
3380[Remove configure tests on tarballs that no longer exist
3381Ian Lynagh <igloo@earth.li>**20091127150101]
3382[Implement non-decreasing do indentation in the alternative layout rule
3383Ian Lynagh <igloo@earth.li>**20091127011932]
3384[add docs for Unicode entities in #2978
3385Simon Marlow <marlowsd@gmail.com>**20091125153649
3386 Ignore-this: f3d1561ef8f55606d9022ab7243e3800
3387]
3388[Apply patch from #2978: add more Unicode syntax
3389Simon Marlow <marlowsd@gmail.com>**20090918130333
3390 Ignore-this: 1393009fdf2383ca43046ba0767a51e0
3391]
3392[Use UTF-8 explicitly for InstalledPackageInfo
3393Simon Marlow <marlowsd@gmail.com>**20091125141730
3394 Ignore-this: 45be1506dd5c3339fb229a44aa958235
3395 So ghc-pkg register/update takes input in UTF-8, and ghc-pkg dump
3396 outputs in UTF-8.  Textual package config files in the package DB are
3397 assumed to be in UTF-8.
3398]
3399[Comments only, esp about RecStmts
3400simonpj@microsoft.com**20091126163241
3401 Ignore-this: 6fb05bd70b1d0cbb55fb01cf1f17ea77
3402]
3403[Fix a bug in alternative layout rule
3404Ian Lynagh <igloo@earth.li>**20091125231901]
3405[Fix a bug in alternative layout
3406Ian Lynagh <igloo@earth.li>**20091125230616
3407 And make the code simpler in the process!
3408]
3409[Bug fix for alternative layout rule
3410Ian Lynagh <igloo@earth.li>**20091125205809]
3411[Tweak alternative layout rule
3412Ian Lynagh <igloo@earth.li>**20091125193854]
3413[Add unboxed parentheses to the alternative layout rule
3414Ian Lynagh <igloo@earth.li>**20091125182421]
3415[Tweak the warning suppression flags used in Lexer
3416Ian Lynagh <igloo@earth.li>**20091125171815]
3417[Implement the alternative layout rule
3418Ian Lynagh <igloo@earth.li>**20091125171656
3419 Caution: Largely untested
3420]
3421[Fix some warning in Lexer
3422Ian Lynagh <igloo@earth.li>**20091124233726]
3423[threadStackOverflow: check whether stack squeezing released some stack (#3677)
3424Simon Marlow <marlowsd@gmail.com>**20091125125917
3425 Ignore-this: d35089eb93f5b367b7d1c445bda79232
3426 
3427 In a stack overflow situation, stack squeezing may reduce the stack
3428 size, but we don't know whether it has been reduced enough for the
3429 stack check to succeed if we try again.  Fortunately stack squeezing
3430 is idempotent, so all we need to do is record whether *any* squeezing
3431 happened.  If we are at the stack's absolute -K limit, and stack
3432 squeezing happened, then we try running the thread again.
3433 
3434 We also want to avoid enlarging the stack if squeezing has already
3435 released some of it.  However, we don't want to get into a
3436 pathalogical situation where a thread has a nearly full stack (near
3437 its current limit, but not near the absolute -K limit), keeps
3438 allocating a little bit, squeezing removes a little bit, and then it
3439 runs again.  So to avoid this, if we squeezed *and* there is still
3440 less than BLOCK_SIZE_W words free, then we enlarge the stack anyway.
3441]
3442[add a comment to TSO_MARKED
3443Simon Marlow <marlowsd@gmail.com>**20091125104954
3444 Ignore-this: 7111281a443533dc453dbf9481dba519
3445]
3446[Pass --no-user-package-conf to ghc-pkg in bindisttest
3447Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091125115953]
3448[Add a note saying what Haddock relies on about Instance.is_dfun
3449David Waern <david.waern@gmail.com>**20091124210308]
3450[Treat () as an enumeration tycon
3451Ian Lynagh <igloo@earth.li>**20091124011313
3452 This fixes deriving Ord (), which previously failed with
3453   ghc-stage1: panic! (the 'impossible' happened)
3454     (GHC version 6.13.20091123 for x86_64-unknown-linux):
3455           TcGenDeriv:mk_FunBind
3456]
3457[Whitespace only
3458Ian Lynagh <igloo@earth.li>**20091124003221]
3459[inline has moved to GHC.Magic
3460Ian Lynagh <igloo@earth.li>**20091123200308]
3461[Use the ghc-perl tarball on Windows, instead of the msys one
3462Ian Lynagh <igloo@earth.li>**20091120153953]
3463[Install perl on Windows
3464Ian Lynagh <igloo@earth.li>**20091120223830]
3465[Remove cprAnalysis directory from hs-source-dirs
3466simonpj@microsoft.com**20091120161911
3467 Ignore-this: e7d3707794979e45b43136137c939af1
3468]
3469[Remove -fasm from mk/validate-settings.mk
3470Ian Lynagh <igloo@earth.li>**20091120125656
3471 Makes it easier to do unregisterised validate runs
3472]
3473[Fix some dependencies in bindists
3474Ian Lynagh <igloo@earth.li>**20091120125342
3475 We can't depend on sources in a bindist, because we don't have the sources.
3476]
3477[Add a rule to allow us to sdist libraries easily
3478Ian Lynagh <igloo@earth.li>**20091119160527]
3479[Check upper/lower bounds on various RTS flags (#3633)
3480Simon Marlow <marlowsd@gmail.com>**20091119142422
3481 Ignore-this: 8cbbb3f0f2c46711967491d5c028a410
3482 
3483 Also, make K mean 1024 rather than 1000, in RTS flags (similarly for M
3484 and G).  The main reason I want to change it is that otherwise this
3485 might be confusing:
3486   
3487 exp3_8: error in RTS option -H4k: size outside allowed range (4096 - 18446744073709551615)
3488 
3489 And I think the original reason for using 1000 instead of 1024,
3490 worries about direct-mapped caches, is not an issue in this context
3491 (even if you can find a direct-mapped cache these days).
3492]
3493[define HS_WORD_MAX
3494Simon Marlow <marlowsd@gmail.com>**20091119140143
3495 Ignore-this: ed27e7c7ac0bd03cddcd745ae7053a74
3496]
3497[Print the prog name in errorBelch() even if prog_argv is not set yet
3498Simon Marlow <marlowsd@gmail.com>**20091119135230
3499 Ignore-this: ec42e7a4f344ebc34befddfc3d74a946
3500 This means we get the prog name in error messages from the flag parser
3501]
3502[Remove dead code
3503Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091112070455
3504 Ignore-this: d30b668cb3c396fe21e5e4cd9b8be151
3505]
3506[Remove the (very) old strictness analyser
3507simonpj@microsoft.com**20091119154347
3508 Ignore-this: 5d49f66b0baad989ca66c53fde8f2d23
3509 
3510 I finally got tired of the #ifdef OLD_STRICTNESS stuff.  I had been
3511 keeping it around in the hope of doing old-to-new comparisions, but
3512 have failed to do so for many years, so I don't think it's going to
3513 happen.  This patch deletes the clutter.
3514]
3515[Make INLINE warning more precise
3516simonpj@microsoft.com**20091119132711
3517 Ignore-this: f1494494f37c5e618e639912ff82a7f5
3518]
3519[Implement -fexpose-all-unfoldings, and fix a non-termination bug
3520simonpj@microsoft.com**20091119125711
3521 Ignore-this: 54d029014659959151d1681842210cde
3522 
3523 The -fexpose-all-unfoldings flag arranges to put unfoldings for *everything*
3524 in the interface file.  Of course,  this makes the file a lot bigger, but
3525 it also makes it complete, and that's great for supercompilation; or indeed
3526 any whole-program work.
3527 
3528 Consequences:
3529   * Interface files need to record loop-breaker-hood.  (Previously,
3530     loop breakers were never exposed, so that info wasn't necessary.)
3531     Hence a small interface file format change.
3532 
3533   * When inlining, must check loop-breaker-hood. (Previously, loop
3534     breakers didn't have an unfolding at all, so no need to check.)
3535 
3536   * Ditto in exprIsConApp_maybe.  Roman actually tripped this bug,
3537     because a DFun, which had an unfolding, was also a loop breaker
3538 
3539   * TidyPgm.tidyIdInfo must be careful to preserve loop-breaker-hood
3540 
3541 So Id.idUnfolding checks for loop-breaker-hood and returns NoUnfolding
3542 if so. When you want the unfolding regardless of loop-breaker-hood,
3543 use Id.realIdUnfolding.
3544 
3545 I have not documented the flag yet, because it's experimental.  Nor
3546 have I tested it thoroughly.  But with the flag off (the normal case)
3547 everything should work.
3548]
3549[Re-implement the binder-swap stuff in OccurAnal
3550simonpj@microsoft.com**20091119124524
3551 Ignore-this: 662ed559e161be958b1eff1a49d750a3
3552 
3553 This is a pretty big patch, but it has a very local effect.
3554 It affects only the binder-swap mechanism in OccurAnal, which
3555 was not working well becuase it's more subtle than I'd realised
3556 (See Note [getProxies is subtle]).  I think this does a much
3557 better job.
3558]
3559[Try harder not to make DFuns into loop breakers
3560simonpj@microsoft.com**20091119124127
3561 Ignore-this: 922d9a2b3406a3dbbfc5a42d1a286e2a
3562 
3563 See Note [DFuns should not be loop breakers]
3564]
3565[Extend the GHCi FAQ slightly
3566simonpj@microsoft.com**20091117132308
3567 Ignore-this: 8257aaf06ff32904a91121a0734d1c4
3568]
3569[Add gnutar to the list of names we use when looking for GNU tar
3570Ian Lynagh <igloo@earth.li>**20091119144927]
3571[Add support for the man page to the new build system
3572Ian Lynagh <igloo@earth.li>**20091119140811]
3573[Refactor case-merging and identical-alternative optimisations
3574simonpj@microsoft.com**20091119123704
3575 Ignore-this: db12d31395ed99c2341cc4d7d5dca1e
3576 
3577 These two optimisations were originally done by SimplUtils.mkCase
3578 *after* all the pieces have been simplified.  Some while ago I
3579 moved them *before*, so they were done by SimplUtils.prepareAlts.
3580 It think the reason was that I couldn't rely on the dead-binder
3581 information on OutIds, and that info is useful in these optimisations.
3582 
3583 However,
3584  (a) Other changes (notably moving case-binder-swap to OccurAnal)
3585      have meant that dead-binder information is accurate in
3586      OutIds
3587 
3588  (b) When there is a cascade of case-merges, they happen in
3589      one sweep if you do it after, but in many sweeps if you
3590      do it before.  Reason: doing it after means you are looking
3591      at nice simplified Core.
3592]
3593[Fix a nasty infelicity in the size computation of CoreUnfold
3594simonpj@microsoft.com**20091119115736
3595 Ignore-this: ecff5289ab14c0df572135bf0b5179d6
3596 
3597 The size computation was treating gigantic case expressions as
3598 practically free, which they really aren't.  It was exacerbated by
3599 recent decisions to charge 0 for naked variables and constructors, so
3600 the RHS of the case might look free too.  A good example was
3601 Foreign.C.Error.errnoToIOError, which hsa lots of join points
3602 that were getting inlined way to vigorously, so we had:
3603 
3604   *** Simplifier Phase 2 [main]:
3605       Result size = 2983
3606   *** Core Linted result of Simplifier mode 2 [main], iteration 1 out of 4:
3607       Result size = 640327
3608   *** Core Linted result of Simplifier mode 2 [main], iteration 2 out of 4:
3609       Result size = 1659
3610 
3611 Notice that gigantic intermediate!
3612 
3613 This patch adds a small charge for each *alternative*.  Of course,
3614 that'll also mean that there's a bit less inling of things involving
3615 case expressions.
3616]
3617[Comments and white space only
3618simonpj@microsoft.com**20091119115122
3619 Ignore-this: dc8f9a72d6d57378d83154877b1d1126
3620]
3621[Fix splitAppTys
3622Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091119102639
3623 Ignore-this: e669950c7d151c8a67910cd4bbac9cd6
3624]
3625[Windows DLLs: Slurp across the actually static version of libffi
3626Ben.Lippmeier@anu.edu.au**20091119000239]
3627[Windows DLLs: Don't rely on stg/DLL.h being included in RtsAPI.h
3628Ben.Lippmeier@anu.edu.au**20091118110548
3629 Ignore-this: 7dce0ede283974d7834fe12af3f71bd5
3630]
3631[Fix warnings about unused imports
3632Ben.Lippmeier@anu.edu.au**20091118110525
3633 Ignore-this: 93841770eadabf5bd3b9f859ca2de7eb
3634]
3635[Windows DLLs: stifle more warnings about auto imported symbols
3636Ben.Lippmeier@anu.edu.au**20091118090105]
3637[Windows DLLs: stifle warnings about symbols being auto imported from DLLs
3638Ben.Lippmeier@anu.edu.au**20091118051526]
3639[Windows DLLs: add #ifdefery to turn off DLL import of libffi when building statically.
3640Ben.Lippmeier@anu.edu.au**20091118043901]
3641[Windows DLLs: disable extra shutdownHaskell() when unloading the RTS DLL
3642Ben.Lippmeier@anu.edu.au**20091117050648]
3643[Windows DLLs: remove dup symbol from def file
3644Ben.Lippmeier@anu.edu.au**20091117043851]
3645[Use opt_PIC not #defined __PIC__ in compiler source.
3646Ben.Lippmeier@anu.edu.au**20091117043716]
3647[Windows DLLs: CHARLIKE_closure and INTLIKE_closure aren't defined in this way.
3648Ben.Lippmeier@anu.edu.au**20091114063240]
3649[If a comment says "Is this correct?", it's not.
3650Ben.Lippmeier@anu.edu.au**20091114063157]
3651[Windows DLLs: gmp is in the integer-gmp package now.
3652Ben.Lippmeier@anu.edu.au**20091114063046]
3653[Use DLL aware runIO_closure instead of base_GHCziTopHandler_runIO_closure directly
3654Ben.Lippmeier@anu.edu.au**20091114061559]
3655[RTS also uses runSparks_closure from base
3656Ben.Lippmeier@anu.edu.au**20091114061445]
3657[Provide extralibs when linking Windows DLLs
3658Ben.Lippmeier@anu.edu.au**20091114061109]
3659[Don't share low valued Int and Char closures with Windows DLLs
3660Ben.Lippmeier@anu.edu.au**20091114060455]
3661[Windows DLLs: use one import lib for each DLL the RTS needs.
3662Ben.Lippmeier@anu.edu.au**20091111014821]
3663[Add autoconf code to locate dlltool on Windows
3664Ben.Lippmeier@anu.edu.au**20091110051257]
3665[Break recursive imports between the RTS and base library on Windows.
3666Ben.Lippmeier@anu.edu.au**20091106062732
3667 
3668 The file rts/win32/libHSbase.def contains a list of all the
3669 symbols from the base library that the RTS needs.
3670 
3671 When building the RTS into a DLL on Windows, we want to link the DLL
3672 for the RTS before we link the DLL for the base library. We use
3673 libHSbase.def to make the "import library" libHSbase.so.a, which
3674 contains stubs for each of the symbols from the base library that
3675 the RTS needs.
3676]
3677[Add the msysCORE*.tar.gz tarball to the list of tarballs we unpack
3678Ian Lynagh <igloo@earth.li>**20091118195523]
3679[Put the libffi files to be installed into a dist directory
3680Ian Lynagh <igloo@earth.li>**20091118150508
3681 This meakes it easier to correctly clean libffi
3682]
3683[Add ghc-tarballs to the list of directories that go into an sdist
3684Ian Lynagh <igloo@earth.li>**20091118131047]
3685[Remove redundant libffi/tarball directory
3686Ian Lynagh <igloo@earth.li>**20091118124102
3687 We now use the tarball in the ghc-tarballs repo
3688]
3689[Fix gen_contents_index on MSYS
3690Ian Lynagh <igloo@earth.li>**20091117223556
3691 On MSYS
3692     sed 's/.*[ \t]//'
3693 wasn't matching
3694     version:<tab>1.0
3695 so I've switched to
3696     's/.*[[:space:]]//'
3697 which works on Linux, cygwin and MSYS.
3698]
3699[include the GHC package docs in a bindist
3700Simon Marlow <marlowsd@gmail.com>**20091117151133
3701 Ignore-this: c4a10221b1a2a4778494018bca7d2169
3702]
3703[exclude some haddock-related rules during BINDIST
3704Simon Marlow <marlowsd@gmail.com>**20091117151123
3705 Ignore-this: 20b4194b26766d6ab701683af520a7d4
3706]
3707[Add an install-docs target that emits a helpful diagnostic (#3662)
3708Simon Marlow <marlowsd@gmail.com>**20091116120137
3709 Ignore-this: 1c5414730614b205c67919f3ea363c00
3710]
3711[fix install_docs dependencies, and add a missing $(INSTALL_DIR)
3712Simon Marlow <marlowsd@gmail.com>**20091116115630
3713 Ignore-this: 21230df54e79f12f61e9c82a0ae02fad
3714]
3715[Tweak to the directory-building rule
3716Simon Marlow <marlowsd@gmail.com>**20091113125719
3717 Ignore-this: b9e1fe6bcbfd4ff56905517f32b646f7
3718 So we don't try to recreate directories just because they are older
3719 than mkdirhier, since mkdirhier won't touch them.
3720]
3721[exprIsHNF should "look through" lets
3722simonpj@microsoft.com**20091117125526
3723 Ignore-this: 3e77d029c0f314c53171f0378939b496
3724 
3725 I can't quite remember when I spotted this, but exprIsHNF (and
3726 similarly exprIsConLike) should ignore enclosing let-bindings,
3727 since they don't affect termination.
3728]
3729[Improvement to typecheck higher-rank rules better
3730simonpj@microsoft.com**20091117125417
3731 Ignore-this: c5791cbe9540376b9ff46e2a6563bcc2
3732 
3733 See Note [Typechecking rules] in TcRules. 
3734 Suggested by Roman
3735]
3736[Apply RULES to simplified arguments
3737simonpj@microsoft.com**20091117104437
3738 Ignore-this: 9a3475a9871f45ffa115dec44e376e3c
3739 
3740 See Note [RULEs apply to simplified arguments] in Simplify.lhs
3741 A knock-on effect is that rules apply *after* we try inlining
3742 (which uses un-simplified arguments), but that seems fine.
3743]
3744[Improvements to pretty-printing of Core
3745simonpj@microsoft.com**20091117103626
3746 Ignore-this: ad386865644b4dbcd98adab409d7c523
3747]
3748[Fix formatting of module deprecation/warning messages
3749Duncan Coutts <duncan@well-typed.com>**20091115155617
3750 Ignore-this: a41444bdda003aee4412eb56a0e7d052
3751 It was accidentally using list syntax. Fixes #3303 again.
3752]
3753[Wibble to comment
3754simonpj@microsoft.com**20091113145944
3755 Ignore-this: 730f7cad452ac96d59ee2e74a855c19d
3756]
3757[TAG 2009-11-15
3758Ian Lynagh <igloo@earth.li>**20091115155059]
3759Patch bundle hash:
3760ed191f28e8103036d4895f969e5528c5414af732