Ticket #3988: LANGUAGE-Compiler.dpatch

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