Ticket #3693: StackTraces-Base.dpatch

File StackTraces-Base.dpatch, 34.3 KB (added by batterseapower, 5 years ago)
Line 
1Thu Apr 22 11:14:52 BST 2010  Max Bolingbroke <[email protected]>
2  * Stack trace support
3
4New patches:
5
6[Stack trace support
7Max Bolingbroke <[email protected]>**20100422101452
8 Ignore-this: 3aa10b136d43ee6e0a75dd887c8ec495
9] {
10hunk ./GHC/Conc.lhs 97
11         , setUncaughtExceptionHandler      -- :: (Exception -> IO ()) -> IO ()
12         , getUncaughtExceptionHandler      -- :: IO (Exception -> IO ())
13 
14-        , reportError, reportStackOverflow
15+        , reportError, reportStackOverflow, reportStack
16         ) where
17 
18 import System.Posix.Types
19hunk ./GHC/Conc.lhs 116
20 #endif
21 import Control.Monad
22 import Data.Maybe
23+import Data.List (init, unlines)
24 
25 import GHC.Base
26 #ifndef mingw32_HOST_OS
27hunk ./GHC/Conc.lhs 1312
28 
29 #endif
30 
31+-- TODO: replace this with an implementation that calls into the RTS?
32+reportStack :: [String] -> IO ()
33+reportStack stk = do
34+  (hFlush stdout) `catchAny` (\ _ -> return ())
35+  withCString "%s" $ \cfmt ->
36+    withCString (init $ unlines $ "Backtrace:" : map (\x -> ' ':' ':x) stk) $ \cmsg ->
37+      errorBelch cfmt cmsg
38+
39 reportStackOverflow :: IO ()
40 reportStackOverflow = callStackOverflowHook
41 
42hunk ./GHC/Exts.hs 47
43         Down(..), groupWith, sortWith, the,
44 
45         -- * Event logging
46-        traceEvent
47+        traceEvent,
48 
49        ) where
50 
51hunk ./GHC/IO.hs 29
52 
53     FilePath,
54 
55-    catchException, catchAny, throwIO,
56+    catchException, catchExceptionWithStack,
57+    catchAny, catchAnyWithStack,
58+    throwIO,
59     block, unblock, blocked,
60     onException, finally, evaluate
61   ) where
62hunk ./GHC/IO.hs 43
63 
64 import {-# SOURCE #-} GHC.IO.Exception ( userError )
65 
66+#include "MachDeps.h"
67+#include "HsBaseConfig.h"
68+
69 -- ---------------------------------------------------------------------------
70 -- The IO Monad
71 
72hunk ./GHC/IO.hs 244
73 
74 Now catch# has type
75 
76-    catch# :: IO a -> (b -> IO a) -> IO a
77+    catch# :: IO a -> (b -> ByteArray# {- reified stack -} -> IO a) -> IO a
78 
79 (well almost; the compiler doesn't know about the IO newtype so we
80 have to work around that in the definition of catchException below).
81hunk ./GHC/IO.hs 251
82 -}
83 
84 catchException :: Exception e => IO a -> (e -> IO a) -> IO a
85-catchException (IO io) handler = IO $ catch# io handler'
86-    where handler' e = case fromException e of
87-                       Just e' -> unIO (handler e')
88-                       Nothing -> raise# e
89+catchException io handler = catchExceptionWithStack io handler'
90+    where handler' e _stk = handler e
91+
92+catchExceptionWithStack :: Exception e => IO a -> (e -> [String] -> IO a) -> IO a
93+catchExceptionWithStack (IO io) handler = IO $ catch# io handler'
94+    where handler' e stk = case fromException e of
95+                       Just e' -> unIO (handler e' (reifyStack stk))
96+                       Nothing -> raiseWithStack# e stk
97 
98 catchAny :: IO a -> (forall e . Exception e => e -> IO a) -> IO a
99hunk ./GHC/IO.hs 261
100-catchAny (IO io) handler = IO $ catch# io handler'
101-    where handler' (SomeException e) = unIO (handler e)
102+catchAny io handler = catchAnyWithStack io handler'
103+    where handler' e _stk = handler e
104+
105+catchAnyWithStack :: IO a -> (forall e . Exception e => e -> [String] -> IO a) -> IO a
106+catchAnyWithStack (IO io) handler = IO $ catch# io handler'
107+    where
108+      handler' (SomeException e) stk = unIO (handler e (reifyStack stk))
109+
110+reifyStack :: ByteArray# -> [String]
111+reifyStack ba = go 0#
112+  where
113+    !last_i = sizeofByteArray# ba `quotInt#` SIZEOF_HSPTR#
114+    go i | i ==# last_i = []
115+         | otherwise    = unpackCStringUtf8# (indexAddrArray# ba i) : go (i +# 1#)
116 
117 -- | A variant of 'throw' that can only be used within the 'IO' monad.
118 --
119hunk ./GHC/TopHandler.lhs 66
120       a <- main
121       cleanUp
122       return a
123-    `catch`
124+    `catchExceptionWithStack`
125       topHandler
126 
127 install_interrupt_handler :: IO () -> IO ()
128hunk ./GHC/TopHandler.lhs 115
129 -- program.
130 --
131 runIO :: IO a -> IO a
132-runIO main = catch main topHandler
133+runIO main = catchExceptionWithStack main topHandler
134 
135 -- | Like 'runIO', but in the event of an exception that causes an exit,
136 -- we don't shut down the system cleanly, we just exit.  This is
137hunk ./GHC/TopHandler.lhs 130
138 -- safeExit.  There is a race to shut down between the main and child threads.
139 --
140 runIOFastExit :: IO a -> IO a
141-runIOFastExit main = catch main topHandlerFastExit
142+runIOFastExit main = catchExceptionWithStack main topHandlerFastExit
143         -- NB. this is used by the testsuite driver
144 
145 -- | The same as 'runIO', but for non-IO computations.  Used for
146hunk ./GHC/TopHandler.lhs 138
147 -- are used to export Haskell functions with non-IO types.
148 --
149 runNonIO :: a -> IO a
150-runNonIO a = catch (a `seq` return a) topHandler
151+runNonIO a = catchExceptionWithStack (a `seq` return a) topHandler
152 
153hunk ./GHC/TopHandler.lhs 140
154-topHandler :: SomeException -> IO a
155-topHandler err = catch (real_handler safeExit err) topHandler
156+topHandler :: SomeException -> [String] -> IO a
157+topHandler err stk = catchExceptionWithStack (real_handler safeExit err stk) topHandler
158 
159hunk ./GHC/TopHandler.lhs 143
160-topHandlerFastExit :: SomeException -> IO a
161-topHandlerFastExit err =
162-  catchException (real_handler fastExit err) topHandlerFastExit
163+topHandlerFastExit :: SomeException -> [String] -> IO a
164+topHandlerFastExit err stk =
165+  catchExceptionWithStack (real_handler fastExit err stk) topHandlerFastExit
166 
167 -- Make sure we handle errors while reporting the error!
168 -- (e.g. evaluating the string passed to 'error' might generate
169hunk ./GHC/TopHandler.lhs 151
170 --  another error, etc.)
171 --
172-real_handler :: (Int -> IO a) -> SomeException -> IO a
173-real_handler exit se@(SomeException exn) =
174+real_handler :: (Int -> IO a) -> SomeException -> [String] -> IO a
175+real_handler exit se@(SomeException exn) stk =
176   cleanUp >>
177   case cast exn of
178       Just StackOverflow -> do
179hunk ./GHC/TopHandler.lhs 157
180            reportStackOverflow
181+           reportStack stk
182            exit 2
183 
184       Just UserInterrupt  -> exitInterrupted
185hunk ./GHC/TopHandler.lhs 174
186                               ioe_handle = Just hdl }
187                    | Errno ioe == ePIPE, hdl == stdout -> exit 0
188                 _ -> do reportError se
189+                        reportStack stk
190                         exit 1
191           
192 
193}
194
195Context:
196
197[remove old/wrong comment
198Simon Marlow <[email protected]>**20100325161403
199 Ignore-this: e6e377d44af48c4162d17d55bdf3f821
200]
201[withThread: block asynchronous exceptions before installing exception handler.
202Bas van Dijk <[email protected]>**20100329131624
203 Ignore-this: be5aeb47dbd73807b5f94df11afbb81c
204 Note that I don't unblock the given io computation. Because AFAICS
205 withThread is only called with 'waitFd' which only performs an FFI
206 call which can't receive asynchronous exceptions anyway.
207]
208[runInUnboundThread: block asynchronous exceptions before installing exception handler
209Bas van Dijk <[email protected]>**20100329131549
210 Ignore-this: a00c5e32fe3981ff87bedd367a69051e
211]
212[fix the deprecation message (GHC.IO.Handle.Base -> GHC.IO.Handle)
213Simon Marlow <[email protected]>**20100330121137
214 Ignore-this: 4ca8500a01ac93454507aa8f9dd001f9
215]
216[Make SampleVar an abstract newtype
217Bas van Dijk <[email protected]>**20100318200349
218 Ignore-this: 27939e2a064b75e71cb146117346be30
219]
220[Fix bugs regarding asynchronous exceptions and laziness in Control.Concurrent.SampleVar
221Bas van Dijk <[email protected]>**20100318200104
222 Ignore-this: 7376b2a3afe155daf233a8f1ddc0a7a
223  - Block asynchronous exceptions at the right places
224  - Force thunks before putting them in a MVar
225]
226[Write the thunk 'next' to the MVar
227Bas van Dijk <[email protected]>**20100319125951
228 Ignore-this: dd25636cf220131385ff2fd32493d456
229]
230[change to use STM, fixing 4 things
231Simon Marlow <[email protected]>**20100318104436
232 Ignore-this: 551d30280a7941c08f5c3b14576bdd70
233   1. there was no async exception protection
234   2. there was a space leak (now new value is strict)
235   3. using atomicModifyIORef would be slightly quicker, but can
236      suffer from adverse scheduling issues (see #3838)
237   4. also, the STM version is faster.
238]
239[Tweak docs
240Ian Lynagh <[email protected]>**20100312214129]
241[Fixed dead links in documentation of forkIO
242Bas van Dijk <[email protected]>**20100308222415
243 Ignore-this: 7deb8fd064c867fbede2a6b2e9da4f15
244]
245[Documentation fixes in Control.Exception
246Bas van Dijk <[email protected]>**20100301220442
247 Ignore-this: 761fcba401cbd1f47276ddfc9b5b80f2
248]
249[Plug two race conditions that could lead to deadlocks in the IO manager
250Simon Marlow <[email protected]>**20100225120255
251 Ignore-this: e6983d6b953104d370278ab3e4617e8b
252]
253[FIX #3866: improve documentation of Data.Data.Constr
254[email protected]**20100224125506
255 Ignore-this: 3818c5d8fee012a3cf322fb455b6e5dc
256]
257[UNDO: Handle NaN, -Infinity and Infinity in the toRational for Float/Double (#3676)
258Simon Marlow <[email protected]>**20100223101603
259 Ignore-this: 78becb2d39b3cd9a1a473a5811ca7d92
260]
261[Put the complexity in the length docs. Fixes trac #3680
262Ian Lynagh <[email protected]>**20100221191425]
263[nhc98 should build Data.Functor.
264[email protected]**20100221163218]
265[Update the exitWith docs
266Ian Lynagh <[email protected]>**20100213140004
267 Error pointed out by Volker Wysk <[email protected]>
268]
269[Handle NaN, -Infinity and Infinity in the toRational for Float/Double (#3676)
270Simon Marlow <[email protected]>**20100211101955
271 Ignore-this: 261415363303efca265e80290eac5f28
272]
273[For nhc98, import unsafeInterleaveIO rather than defining it here.
274[email protected]**20100204171021]
275[Stifle warning about unused return value
276[email protected]**20100203025537]
277[fix #3832: use the locale encoding in openTempFile
278Simon Marlow <[email protected]>**20100120211830
279 Ignore-this: df4f778cc5fefb32290c798db722632c
280 Also while I was here fix an XXX: the Handle contained an
281 uninformative string like <fd: 4> for error messages rather than the
282 real file path.
283]
284[Fix the build: export void, so it doesn't give an unused binding warning
285Ian Lynagh <[email protected]>**20100116174451]
286[hIsEOF: don't do any decoding (#3808)
287Simon Marlow <[email protected]>**20100112230317
288 Ignore-this: 6a384dd2d547ffe3ad3762920e5c1671
289]
290[Control.Monad: +void :: f a -> f ()
291[email protected]**20100108214455
292 Ignore-this: 4dc07452315f2d1b4941903ff42fc45f
293 See http://hackage.haskell.org/trac/ghc/ticket/3292
294 Turns m a -> m (). Lets one call functions for their side-effects without
295 having to get rid of their return values with '>> return ()'. Very useful
296 in many contexts (parsing, IO etc.); particularly good for 'forkIO' and 'forM_',
297 as they demand return types of 'IO ()' though most interesting IO functions
298 return non-().
299]
300[Replace the implementation of mergesort with a 2x faster one.
301[email protected]**20091224152014
302 See ticket http://hackage.haskell.org/trac/ghc/ticket/2143.
303]
304[Restore previous Data.Typeable.typeOf*Default implementations for non-ghc.
305[email protected]**20091223142625
306 Not all compilers have ScopedTypeVariables.
307]
308[Add comments about double bounds-checking, and fast paths for rectangular arrays
309[email protected]**20091218165655
310 Ignore-this: ea0849419dc00927aba4bd410b1cc58d
311 
312 See Note [Double bounds-checking of index values] for the details.
313 
314 The fast paths omit the doubled checks for cases we know about
315]
316[Fix Trac #3245: memoising typeOf
317[email protected]**20091218155117
318 Ignore-this: 5a178a7f2222293c5ee0c3c43bd1b625
319 
320 The performance bug in #3245 was caused by computing the typeRep
321 once for each call of typeOf, rather than once for each dictionary
322 contruction.  (Computing TypeReps is reasonably expensive, because
323 of the hash-consing machinery.)
324 
325 This is readily fixed by putting the TypeRep construction outside
326 the lambda.  (Arguably GHC might have worked that out itself,
327 but it involves floating something between a type lambda and a
328 value lambda, which GHC doesn't currently do. If it happens a lot
329 we could fix that.)
330]
331[Mark 'index' as INLINE in GHC.Arr
332[email protected]**20091216170441
333 Ignore-this: a4df9d8acf496c8e0e9ce5a520509a2a
334 
335 This makes indexing much faster. See Trac #1216
336]
337[Comment the remaining orphan instance modules
338Ian Lynagh <[email protected]>**20091206125021]
339[De-orphan Eq/Ord Float/Double
340Ian Lynagh <[email protected]>**20091205181238]
341[Add comments to "OPTIONS_GHC -fno-warn-orphans" pragmas
342Ian Lynagh <[email protected]>**20091205165854]
343[Data.Either.partitionEithers was insufficiently lazy.
344[email protected]**20091202032807
345 Ignore-this: 77e1b3288f66608c71458d8a91bcbe12
346 Spotted by Daniel Fischer.
347]
348[fix the docs regarding finalizer guarantees
349Simon Marlow <[email protected]>**20091130144409
350 Ignore-this: d1ab9532c74a002b8075ff60febcbe2d
351]
352[x86_64 requires more stack
353[email protected]**20091201033745]
354[check for size < 0 in mallocForeignPtrBytes and friends (#3514)
355Simon Marlow <[email protected]>**20091125143822
356 Ignore-this: 91077d01da2bbe1dfed5155e8b40da9
357]
358[hGetContents: close the handle properly on error
359Simon Marlow <[email protected]>**20091125123435
360 Ignore-this: bc37ff678acc6e547dc390285e056eb9
361 
362 When hGetContents caught an error it was closing the handle and then
363 throwing the exception, without updating the handle with the new
364 closed state.  This lead to a double-closed, which was the cause of
365 
366 *** glibc detected *** ./Setup: double free or corruption
367 
368 when iconv_close was called twice on the decoder.
369 
370 See http://hackage.haskell.org/trac/hackage/ticket/609
371]
372[Fix arities of mapFB and zipFB
373Roman Leshchinskiy <[email protected]>**20091126232219
374 Ignore-this: c4e14cd0a92622549c86e67237a40865
375]
376[Remove an unnecessary -fno-warn-orphans flag
377Ian Lynagh <[email protected]>**20091126123404]
378[Tweak layout to work with alternative layout rule
379Ian Lynagh <[email protected]>**20091125232349]
380[Tweak layout to be accepted by the alternative layout rul
381Ian Lynagh <[email protected]>**20091125194147]
382[Make sure zipWithFB has arity 2
383Roman Leshchinskiy <[email protected]>**20091125010003
384 Ignore-this: 4cf60c55666f03d22a9f5a6e07f52d36
385 
386 It gets 2 arguments in the "zipWith" rule but its arity was higher and the new
387 inliner didn't inline it sometimes, for instance here:
388 
389 mpp ::  [Double] -> [Double] -> [Double] -> [Double] -> [Double]
390 mpp as bs cs ds = zipWith (*) (zipWith (+) as bs) (zipWith (+) cs ds)
391 
392 This was a regression vs. 6.10.
393]
394[Remove an old comment
395Ian Lynagh <[email protected]>**20091124134647]
396[De-orphan the Eq/Ord Integer instances
397Ian Lynagh <[email protected]>**20091124133639]
398[Whitespace only
399Ian Lynagh <[email protected]>**20091124133421]
400[Derive some more instances, rather than writing them by hand
401Ian Lynagh <[email protected]>**20091124011747]
402[We can now derive Ord ()
403Ian Lynagh <[email protected]>**20091124011416]
404[De-orphan tuple Eq/Ord instances
405Ian Lynagh <[email protected]>**20091123233343]
406[Control.Exception.Base no longer has any orphans
407Ian Lynagh <[email protected]>**20091123224905]
408[De-orphan the MonadFix ST instance for GHC
409Ian Lynagh <[email protected]>**20091123223544]
410[Rearrange the contents of Control.Monad.ST; no functionality changes
411Ian Lynagh <[email protected]>**20091123222702]
412[De-orphan the Eq/Ord [a] instances
413Ian Lynagh <[email protected]>**20091123215635]
414[De-orphan the Eq/Ord Char instances
415Ian Lynagh <[email protected]>**20091123202253]
416[De-orphan the Eq/Ord Bool instances
417Ian Lynagh <[email protected]>**20091123201817]
418[Move Eq/Ord Ordering instances to de-orphan them
419Ian Lynagh <[email protected]>**20091123194310]
420[Remove ffi warnings for nhc98.
421[email protected]**20091123063743]
422[Second attempt to fix #1185 (forkProcess and -threaded)
423Simon Marlow <[email protected]>**20091111151915
424 Ignore-this: fa5f5d5e4e080d4b612a37244f937f9c
425 
426 Patch 2/2: first patch is to ghc
427 
428 This time without dynamic linker hacks, instead I've expanded the
429 existing rts/Globals.c to cache more CAFs, specifically those in
430 GHC.Conc.  We were already using this trick for signal handlers, I
431 should have realised before.
432 
433 It's still quite unsavoury, but we can do away with rts/Globals.c in
434 the future when we switch to a dynamically-linked GHCi.
435]
436[Rollback #1185 fix
437Simon Marlow <[email protected]>**20091106140629
438 Ignore-this: cd5667e8474e37e01ba26a1984274811
439 
440 rolling back:
441 
442 Tue Nov  3 16:05:40 GMT 2009  Simon Marlow <[email protected]>
443   * Fix #1185: restart the IO manager after fork()
444   
445   This is the libraries/base part of the patch; there is a corresponding
446   patch to GHC itself.
447   
448   The main change is that we now keep track of the IO manager's ThreadId
449   in a top-level MVar, and ensureIOManagerIsRunning checks whether a
450   previous IO manager thread is alive before starting one.  In the child
451   of fork(), we can hence call ensureIOManagerIsRunning to restart the
452   IO manager.
453 
454     M ./GHC/Conc.lhs -46 +44
455 
456 Wed Nov  4 17:49:45 GMT 2009  Ian Lynagh <[email protected]>
457   * Fix the build on Windows
458 
459     M ./GHC/Conc.lhs -6 +4
460]
461[Fix the build on Windows
462Ian Lynagh <[email protected]>**20091104174945]
463[Fix #1185: restart the IO manager after fork()
464Simon Marlow <[email protected]>**20091103160540
465 Ignore-this: 6dc05464f1500104554637f4759738cc
466 
467 This is the libraries/base part of the patch; there is a corresponding
468 patch to GHC itself.
469 
470 The main change is that we now keep track of the IO manager's ThreadId
471 in a top-level MVar, and ensureIOManagerIsRunning checks whether a
472 previous IO manager thread is alive before starting one.  In the child
473 of fork(), we can hence call ensureIOManagerIsRunning to restart the
474 IO manager.
475]
476[improve the documentation for throwErrnoIfRetry
477Simon Marlow <[email protected]>**20091016112404
478 Ignore-this: b77275cacf730e15757946027168f63e
479]
480[Don't inline unpackFoldrCString ever
481[email protected]**20091029135350
482 Ignore-this: 85d672649b1b776efc7e97500b05d4f9
483]
484[Inline more default methods
485[email protected]**20091029135330
486 Ignore-this: 289c44b0afd6d5631c2a4e0664275ca9
487 
488 Namely Monad: (>>)
489        Eq:    (==), (/=)
490        Num:   (-), negate
491        Real:  quot, rem, div, mod, recip, (/), truncate
492        Float: (**), logBase, sqrt, tan, tanh
493]
494[Move error messages out of INLINEd default methods
495[email protected]**20091029135118
496 Ignore-this: 9e35dc947f94827a3529eb53a41575fd
497 
498 No need to duplicate the error generation!
499]
500[Exploit now-working default-method INLINE pragmas for Data.Bits
501[email protected]**20091029135041
502 Ignore-this: 8adf225f31ca7a3181ee087e9e4fe535
503 
504 * Add INLINE pragmas to default methods for class Bits
505 
506 * Remove redundant instance methods elsewhere, now that
507   the default method will do the job
508]
509[Tidy up and comment imports
510[email protected]**20091029134414
511 Ignore-this: bf2be31035de975d8995e988933cc940
512]
513[Inline foldr and (.) when applied to two arguments not three
514[email protected]**20091029134335
515 Ignore-this: fccb6f3e90e15f44cb465814be85ede2
516 
517 The new INLINE story is (by design) arity-sensitive, so we must
518 put fewer argument on the LHS for foldr and (.)
519]
520[dirUtils.c no longer available
521[email protected]**20091013093833]
522[Make hGetContents throw an exception if an error is encountered
523Simon Marlow <[email protected]>**20091012152955
524 Ignore-this: 9f7a7176193eab25c9daaacd9261f2de
525 
526 Strictly speaking this breaks Haskell 98 compatibility, which requires
527 hGetContents to just end the lazy stream silently if an error is
528 encountered.  However, for a few reasons we think it will make
529 everyone's life a bit easier if we make this change
530 
531  1. Errors will be a lot more common in GHC 6.12.1, in the form
532     of Unicode decoding errors.
533 
534  2. When Haskell 98 was designed, we didn't know how to throw
535     exceptions from inside lazy I/O, but now we do.
536 
537  3. If anyone is actually relying on the previous behaviour, their
538     code is arguably broken.
539]
540[Re-instate System.Console.Getopt for nhc98 builds.
541[email protected]**20091013092843
542 Although it was split out of base a while back, that change was
543 reverted for ghc soon afterwards, but nhc98 never noticed.
544]
545[Roll back "Another instance of nhc98's strange import semantics."
546Ian Lynagh <[email protected]>**20091009185618
547 Fri Oct  9 14:50:51 BST 2009  [email protected]
548 GHC (correctly) warns about the unused import, which breaks the validate
549 build.
550]
551[Roll back "Cope with nhc98's (occasionally-strange) import semantics"
552Ian Lynagh <[email protected]>**20091009184704
553 Fri Oct  9 14:43:51 BST 2009  [email protected]
554 GHC (correctly) warns about the unused import, which breaks the validate
555 build.
556]
557[It seems that nhc98 needs defaulting in Data.Fixed.
558[email protected]**20091009135242]
559[Another instance of nhc98's strange import semantics.
560[email protected]**20091009135051]
561[Make Data.Functor compatible with non-GHC compilers.
562[email protected]**20091009134821]
563[Cope with nhc98's (occasionally-strange) import semantics.
564[email protected]**20091009134351]
565[Fix gratuitous breakage of nhc98 in System.IO.
566[email protected]**20091009134001]
567[Fix gratuitous breakage of nhc98 in Control.Exception.Base.
568[email protected]**20091009133615]
569[Fix gratuitous breakage of non-GHC in Data.Fixed.
570[email protected]**20091009133330]
571[Fix gratuitous breakage for non-GHC in Data.Bits.
572[email protected]**20091009133257]
573[Use UTF-32LE instead of UTF32LE
574Simon Marlow <[email protected]>**20091006100207
575 Ignore-this: 7f881e36543d250ef848c9f60d67655a
576 The latter is not recognised by some iconv implementations.
577]
578[Strip any Byte Order Mark (BOM) from the front of decoded streams.
579[email protected]*-20090930084229
580 Ignore-this: d0d0c3ae87b31d71ef1627c8e1786445
581 When decoding to UTF-32, Solaris iconv inserts a BOM at the front
582 of the stream, but Linux iconv doesn't.
583]
584[use UTF32BE/UTF32LE instead of UCS-4/UCS-4LE
585Simon Marlow <[email protected]>**20091005101554
586 Ignore-this: 2aef5e9bec421e714953b7aa1bdfc1b3
587]
588[Strip any Byte Order Mark (BOM) from the front of decoded streams.
589[email protected]**20090930084229
590 Ignore-this: d0d0c3ae87b31d71ef1627c8e1786445
591 When decoding to UTF-32, Solaris iconv inserts a BOM at the front
592 of the stream, but Linux iconv doesn't.
593]
594[Add traceEvent :: String -> IO ()
595Simon Marlow <[email protected]>**20090925141257
596 Ignore-this: 8b1888bbf9682ffba13f815b6000e4b1
597 For emitting an event via the RTS tracing framework
598]
599[Fix the error message when flushing the read buffer of a non-seekable Handle
600Simon Marlow <[email protected]>**20090923090536
601 Ignore-this: 4342026df93759d99480f4e13f80a492
602]
603[Fix #3534: No need to flush the byte buffer when setting binary mode
604Simon Marlow <[email protected]>**20090923090445
605 Ignore-this: 625817ed7ae2c12291eb993a99dc640a
606]
607[Use let !y = x in .. x .. instead of seq in $! and evaluate (#2273)
608Simon Marlow <[email protected]>**20090916140454]
609[make some Applicative functions into methods, and split off Data.Functor (proposal #3335)
610Ross Paterson <[email protected]>**20090915173109
611 Ignore-this: a0cff4de6dfdbcbd56a66101bc4855a9
612 
613 The following functions
614 
615     (<$) :: Functor f => a -> f b -> f a
616     (*>) :: Applicative f => f a -> f b -> f b
617     (<*) :: Applicative f => f a -> f b -> f a
618     some :: Alternative f => f a -> f [a]
619     many :: Alternative f => f a -> f [a]
620 
621 are moved into the corresponding classes, with the existing implementations
622 as default definitions.  This gives people creating instances the option of
623 defining specialized implementations of these functions, though they should
624 be equivalent to the default definitions.
625 
626 Although (<$) is now a method of the Functor class, it is hidden in the
627 re-export by the Prelude, Control.Monad and Monad.  The new module
628 Data.Functor exposes the full class, plus the function (<$>).  These are
629 also re-exported by Control.Applicative.
630]
631[On Windows, use the console code page for text file encoding/decoding.
632Judah Jacobson <[email protected]>**20090913022126
633 Ignore-this: 86c2f2db8ef92b751599795d3195187b
634 
635 We keep all of the code page tables in the module
636 GHC.IO.Encoding.CodePage.Table.  That file was generated automatically
637 by running codepages/MakeTable.hs; more details are in the comments at the
638 start of that script.
639 
640 Storing the lookup tables adds about 40KB to each statically linked executable;
641 this only increases the size of a "hello world" program by about 7%.
642 
643 Currently we do not support double-byte encodings (Chinese/Japanese/Korean), since
644 including those codepages would increase the table size to 400KB.  It will be
645 straightforward to implement them once the work on library DLLs is finished.
646]
647[Fix "init" docs: the input list need not be finite. Fixes trac #3465
648Ian Lynagh <[email protected]>**20090911210437]
649[Bump base version to 4.2.0.0
650Ian Lynagh <[email protected]>**20090911153913]
651[Address #3310
652Simon Marlow <[email protected]>**20090830152850
653 Ignore-this: 40c7f7c171ee299a83092fd360a952b7
654 
655  - Rename BlockedOnDeadMVar   -> BlockedIndefinitelyOnMVar
656  - Rename BlockedIndefinitely -> BlockedIndefinitelyOnSTM
657  - instance Show BlockedIndefinitelyOnMVar is now
658      "blocked indefinitely in an MVar operation"
659  - instance Show BlockedIndefinitelyOnSTM is now
660      "blocked indefinitely in an STM transaction"
661 
662 clients using Control.OldException will be unaffected (the new
663 exceptions are mapped to the old names).  However, for base4-compat
664 we'll need to make a version of catch/try that does a similar
665 mapping.
666]
667[Fix unicode conversion for MSB architectures
668Ben.Lippmeier@anu.edu.au**20090830130028
669 This fixes the SPARC/Solaris build.
670]
671[Fix #3441: detect errors in partial sequences
672Simon Marlow <marlowsd@gmail.com>**20090830075909
673 Ignore-this: d12a75d95e0cae5eb1555266810ec281
674]
675[Fix hWaitForInput
676Simon Marlow <marlowsd@gmail.com>**20090827152116
677 Ignore-this: 2550e911f1a4d4357a5aa8d1764238ce
678 It was erroneously waiting when there were bytes to decode waiting in
679 the byte buffer.
680]
681[fix debugging code
682Simon Marlow <marlowsd@gmail.com>**20090827150628
683 Ignore-this: e1c82fdc19a22e247cd69ff6fa11921d
684]
685[Allow for configurable iconv include and library locations.
686Matthias Kilian <kili@outback.escape.de>**20090826154406
687 Ignore-this: be95fab611a5534cf184b508964ed498
688 This should help to fix the build on OpenBSD.
689]
690[typo in comment
691Simon Marlow <marlowsd@gmail.com>**20090826085252
692 Ignore-this: 1903ee0f354157a6ed3871c100f6b1b9
693]
694[un-hide some modules from the Haddock docs
695Simon Marlow <marlowsd@gmail.com>**20090825152457
696 Ignore-this: dce6606f93cf977fb24ebe99082dfa62
697]
698[Apply fix for #1548, from squadette@gmail.com
699Simon Marlow <marlowsd@gmail.com>**20090819120700
700 Ignore-this: 31c237c46a6445f588ed4b8c51bb6231
701]
702[improvements to Data.Fixed: instances for Typeable and Data, more predefined types
703Ashley Yakeley <ashley@semantic.org>**20090812055058
704 Ignore-this: feeece36d5632f02a05d137d2a39ab78
705]
706[Fix "Cabal check" warnings
707Ian Lynagh <igloo@earth.li>**20090811215856]
708[Add a GHC.Constants module; fixes trac #3094
709Ian Lynagh <igloo@earth.li>**20090809183252]
710[Apply proposal #3393
711Ian Lynagh <igloo@earth.li>**20090809134717
712 Add openTempFileWithDefaultPermissions and
713 openBinaryTempFileWithDefaultPermissions.
714]
715[Add some more C wrappers; patch from Krister Walfridsson
716Ian Lynagh <igloo@earth.li>**20090807200631
717 Fixes 21 testsuite errors on NetBSD 5.99.
718]
719[Fixing configure for autoconf 2.64
720Alexander Dunlap <alexander.dunlap@gmail.com>**20090805060748
721 Ignore-this: 992ab91ae3d68c12dbb265776e33e243
722]
723[add INLINE toList
724Ross Paterson <ross@soi.city.ac.uk>**20090806142853
725 Ignore-this: aba16aabb17d5dca44f15d188945680e
726 
727 In anticipation of the fixing of #2353.
728]
729[fix a copyright
730Simon Marlow <marlowsd@gmail.com>**20090805134045
731 Ignore-this: b0ffbdd38fbba121e8bcba37c4082a60
732]
733[Tweak the BufferedIO class to enable a memory-mapped file implementation
734Simon Marlow <marlowsd@gmail.com>**20090805134036
735 Ignore-this: ec67d7a0a6d977438deaa342503f77e0
736 We have to eliminate the assumption that an empty write buffer can be
737 constructed by setting the buffer pointers to zero: this isn't
738 necessarily the case when the buffer corresponds to a memory-mapped
739 file, or other in-memory device implementation.
740]
741[Deprecate Control.OldException
742Ian Lynagh <igloo@earth.li>**20090804143910]
743[Windows build fix, following RTS tidyup
744Simon Marlow <marlowsd@gmail.com>**20090803131121
745 Ignore-this: ce862fb91c2b234211a8757f98690778
746]
747[Updates to follow the RTS tidyup
748Simon Marlow <marlowsd@gmail.com>**20090801220743
749 Ignore-this: 6e92412df93a66c12d75344053d5634
750 C functions like isDoubleNaN moved here (primFloat.c)
751]
752[Add integer-simple as a build option
753Ian Lynagh <igloo@earth.li>**20090722013151]
754[Use shift[LR]Integer in the Bits Integer instance
755Ian Lynagh <igloo@earth.li>**20090721222440]
756[depend directly on integer-gmp, rather than indirecting through integer
757Ian Lynagh <igloo@earth.li>**20090721185228]
758[Move the instances of Functor and Monad IO to GHC.Base, to avoid orphans
759Simon Marlow <marlowsd@gmail.com>**20090722102130
760 Ignore-this: a7d85ac0025d559674249de0108dbcf4
761]
762[move "instance Exception Dynamic" so it isn't an orphan
763Simon Marlow <marlowsd@gmail.com>**20090721093854
764 Ignore-this: 5ede91ecfec2112c91b699d4de87cd02
765]
766[Improve the index checking for array accesses; fixes #2120 #2669
767Ian Lynagh <igloo@earth.li>**20090719153228
768 As well as checking that offset we are reading is actually inside the
769 array, we now also check that it is "in range" as defined by the Ix
770 instance. This fixes confusing behaviour (#2120) and improves some error
771 messages (#2669).
772]
773[Make chr say what its argument was, if it's a bad argument
774Ian Lynagh <igloo@earth.li>**20090718151049]
775[remove unused warning
776Simon Marlow <marlowsd@gmail.com>**20090715124416
777 Ignore-this: 31f613654089d0f4a44363946087b41e
778]
779[warning fix: -fno-implicit-prelude -> -XNoImplicitPrelude
780Simon Marlow <marlowsd@gmail.com>**20090715122839
781 Ignore-this: dc8957249731d5bcb71c01899e5adf2b
782]
783[Add hGetEncoding :: Handle -> IO (Maybe TextEncoding)
784Simon Marlow <marlowsd@gmail.com>**20090715122519
785 Ignore-this: 14c3eff996db062da1199739781e4708
786 as suggested during the discussion on the libraries list
787]
788[Add more documentation to mkTextEncoding
789Simon Marlow <marlowsd@gmail.com>**20090715122414
790 Ignore-this: 97253b2624267df3a246a18121e8ea81
791 noting that "//IGNORE" and "//TRANSLIT" suffixes can be used with GNU
792 iconv.
793]
794[Add the utf8_bom codec
795Simon Marlow <marlowsd@gmail.com>**20090715122257
796 Ignore-this: 1c9396cd805201fe873a39382ced79c7
797 as suggested during the discussion on the libraries list.
798]
799[Export Unicode and newline functionality from System.IO; update Haddock docs
800Simon Marlow <marlowsd@gmail.com>**20090713113104
801 Ignore-this: c3f017a555335aa55d106253393f72e2
802]
803[add a comment about the non-workingness of CHARBUF_UTF16
804Simon Marlow <marlowsd@gmail.com>**20090707124406
805 Ignore-this: 98d00411b68d688b3b4cffc9507b1f35
806]
807[Fix build on Windows
808Ian Lynagh <igloo@earth.li>**20090711004351]
809[Fix some "warn-unused-do-bind" warnings where we want to ignore the value
810Ian Lynagh <igloo@earth.li>**20090710204513]
811[Use throwErrnoIfMinus1_ when calling getrusage
812Ian Lynagh <igloo@earth.li>**20090710204221]
813[Remove an unused import
814Ian Lynagh <igloo@earth.li>**20090710153345]
815[reportStackOverflow now returns IO ()
816Ian Lynagh <igloo@earth.li>**20090710153257
817 It used to do "return undefined" to return IO a.
818]
819[GHC.Conc.reportError now returns IO ()
820Ian Lynagh <igloo@earth.li>**20090710152646
821 It used to return IO a, by "return undefined".
822]
823[Fix some "warn-unused-do-bind" warnings where we want to ignore the value
824Ian Lynagh <igloo@earth.li>**20090710152526]
825[Minor SampleVar refactoring
826Ian Lynagh <igloo@earth.li>**20090710151438]
827[Fix "warn-unused-do-bind" warnings in GHC/IO/Handle/Text.hs
828Ian Lynagh <igloo@earth.li>**20090710122905]
829[Fix some "warn-unused-do-bind" warnings where we just want to ignore the result
830Ian Lynagh <igloo@earth.li>**20090710005638]
831[Use the result of writeCharBuf in GHC/IO/Encoding/Latin1.hs too
832Ian Lynagh <igloo@earth.li>**20090710004032]
833[Minor code tidyups in GHC.Conc
834Ian Lynagh <igloo@earth.li>**20090710003801]
835[Fix "warn-unused-do-bind" warning in GHC.Conc
836Ian Lynagh <igloo@earth.li>**20090710003530
837 If we fail to communicate with the IO manager then we print a warning
838 using debugErrLn from the ghc-prim package.
839]
840[Fix "warn-unused-do-bind" warnings in System.Posix.Internals
841Ian Lynagh <igloo@earth.li>**20090709164546]
842[Fix "warn-unused-do-bind" warnings where we really do want to ignore the result
843Ian Lynagh <igloo@earth.li>**20090709163912]
844[Add back imports needed on Windows
845Ian Lynagh <igloo@earth.li>**20090707181924]
846[Remove unused imports
847Ian Lynagh <igloo@earth.li>**20090707115810]
848[Remove unused imports from base
849simonpj@microsoft.com**20090706111842
850 Ignore-this: f9b5f353e3bb820f787c56d615b28765
851 
852 These unused imports are detected by the new unused-import code
853 
854]
855[Use the result of writeCharBuf
856Simon Marlow <marlowsd@gmail.com>**20090706133303
857 Ignore-this: 52288dd559bf4c4f313df6197091d935
858   
859 This only makes a difference when CHARBUF_UTF16 is in use, which it
860 normally isn't.  I suspect CHARBUF_UTF16 doesn't currently work for
861 other reasons (CHARBUF_UTF16 was an experiment before I wrote the
862 GHC.IO.Encoding.UTF* codecs), but this patch at least makes it
863 slightly closer to working.
864]
865[Remove some cruft from Data.HashTable
866Ian Lynagh <igloo@earth.li>**20090706181630]
867[Add 'eof' to Text.ParserCombinators.ReadP
868simonpj@microsoft.com**20090706111801
869 Ignore-this: 2aea7b848e00c894761bc4011adaa95d
870 
871 Add a ReadP parser that succeeds at the end of input. Very useful!
872 
873]
874[Don't export CLDouble for GHC; fixes trac #2793
875Ian Lynagh <igloo@earth.li>**20090705155120
876 We never really supported CLDouble (it was a plain old double underneath),
877 and pretending that we do does more harm than good.
878]
879[a byte between 0x80 and 0xBF is illegal immediately (#3341)
880Simon Marlow <marlowsd@gmail.com>**20090702081415
881 Ignore-this: dc19ef59a1a21118d5a7dd38aa2f611c
882]
883[avoid a warning
884Simon Marlow <marlowsd@gmail.com>**20090630084134
885 Ignore-this: c92a45ee216faf01327feae9fe06d6e2
886]
887[Add a wrapper for libiconv.
888Matthias Kilian <kili@outback.escape.de>**20090629183634
889 Ignore-this: 23c6047c0d71b745b495cc223574a47f
890]
891[#include <sys/times.h> if we have it (should fix build problems)
892Simon Marlow <marlowsd@gmail.com>**20090629085351
893 Ignore-this: a35e93b37ca9595c73460243180f4b9d
894]
895[set binary mode for existing FDs on Windows (fixes some GHCi test failures)
896Simon Marlow <marlowsd@gmail.com>**20090626120522
897 Ignore-this: 580cf636e9c77d8427aff6861d089481
898]
899[Move directory-related stuff to the unix package
900Simon Marlow <marlowsd@gmail.com>**20090625120325
901 Ignore-this: b997b3cbce0a46ca87ad825bbdc0a411
902 now that it isn't used on Windows any more.
903]
904[TAG 2009-06-25
905Ian Lynagh <igloo@earth.li>**20090625160056]
906Patch bundle hash:
9075c0b5c1a51285be08b4bd6c2f0b96ccec0cf401b