Ticket #3324: tuple_instances.patch

File tuple_instances.patch, 50.0 KB (added by YitzGale, 5 years ago)

Add Foldable and Traversable instances for ((,) a)

Line 
1Tue Jun 23 13:24:39 IDT 2009  Yitzchak Gale <gale@sefer.org>
2  * Add Foldable and Traversable instances for ((,) a).
3
4New patches:
5
6[Add Foldable and Traversable instances for ((,) a).
7Yitzchak Gale <gale@sefer.org>**20090623102439
8 Ignore-this: b1b874d3b954e047368deaa55af2573c
9] {
10hunk ./Data/Foldable.hs 158
11         foldr1 = Prelude.foldr1
12         foldl1 = Prelude.foldl1
13 
14+instance Foldable ((,) a) where
15+        foldMap f (_, y) = f y
16+        foldr f z (_, y) = f y z
17+        foldl f z (_, y) = f z y
18+        foldr1 _  (_, y) = y
19+        foldl1 _  (_, y) = y
20+
21 instance Ix i => Foldable (Array i) where
22         foldr f z = Prelude.foldr f z . elems
23 
24hunk ./Data/Traversable.hs 115
25 
26         mapM = Prelude.mapM
27 
28+instance Traversable ((,) a) where
29+        traverse f (x, y) = (,) x <$> f y
30+
31 instance Ix i => Traversable (Array i) where
32         traverse f arr = listArray (bounds arr) `fmap` traverse f (elems arr)
33 
34}
35
36Context:
37
38[Unconditionally make a (Show Ptr) instance
39Ian Lynagh <igloo@earth.li>**20090620204809
40 It used to only exist if (WORD_SIZE_IN_BITS == 32 || WORD_SIZE_IN_BITS == 64)
41]
42[Remove AC_C_CONST
43Ian Lynagh <igloo@earth.li>**20090615203240
44 It was breaking the build on Windows. The problem was that we included
45 stdio.h which gave a prototype for some functions (e.g. remove), then
46 the AC_C_CONST meant that we did
47     /* Define to empty if `const' does not conform to ANSI C. */
48     #define const /**/
49 and then we included io.h which gave prototypes that, due to const
50 being removed, conflicted with the earlier prototypes.
51]
52[Remove old Integer prototypes
53Ian Lynagh <igloo@earth.li>**20090615202444]
54[Redefine gcdInt to use gcdInteger rather than gcdInt# primop
55Duncan Coutts <duncan@well-typed.com>**20090612142951
56 The gcdInt# primop uses gmp internally, even though the interface is
57 just Int#. Since we want to get gmp out of the rts we cannot keep
58 gcdInt#, however it's also a bit odd for the integer package to export
59 something that doesn't actually use Integer in its interface. Using
60 gcdInteger is still not terribly satisfactory aesthetically. However
61 in the short-term it works and it is no slower since gcdInteger calls
62 gcdInt# for the special case of two small Integers.
63]
64[The IO type has moved to GHC.Types in ghc-prim
65Ian Lynagh <igloo@earth.li>**20090620155208]
66[Fix warnings in configure script
67Ian Lynagh <igloo@earth.li>**20090615214850]
68[Fix warnings in C programs generated by configure; fixes failures with -Werror
69Ian Lynagh <igloo@earth.li>**20090615201634]
70[Save and restore the codec state when re-decoding
71Simon Marlow <marlowsd@gmail.com>**20090614185332
72 Ignore-this: 62b247a51efc2eed65d933f982b06894
73 
74 We previously had an ugly hack to check for a BOM when re-decoding
75 some binary data in flushCharBuffer.  The hack was there essentially
76 because codecs like UTF-16 have a state, and we had not restored it.
77 This patch gives codecs an explicit state, and implemented
78 saving/restoring of the state as necessary.  Hence, the hack in
79 flushCharBuffer is replaced by a more general mechanism that works for
80 any codec with state.
81 
82 Unfortunately, iconv doesn't give us a way to save and restore the
83 state, so this is currently only implemented for the built-in codecs.
84]
85[Fix #3128: file descriptor leak when hClose fails
86Simon Marlow <marlowsd@gmail.com>**20090616110755
87 Ignore-this: 5b6a51fed9239c61d16d0151cb5b59d3
88]
89[Allow System.Posix.Internals to compile with nhc98 again.
90Malcolm.Wallace@cs.york.ac.uk**20090615155249
91 Also affects GHC.IO.Device, which is not very GHC-specific at all.
92]
93[Add iconv as an extra library on platform that need to link with it
94Ian Lynagh <igloo@earth.li>**20090612231307
95 For example, we need -liconv on OS X.
96]
97[Rewrite of the IO library, including Unicode support
98Simon Marlow <marlowsd@gmail.com>**20090612135631
99 Ignore-this: fbd43ec854ac5df442e7bf647de8ca5a
100 
101 Highlights:
102 
103 * Unicode support for Handle I/O:
104 
105   ** Automatic encoding and decoding using a per-Handle encoding.
106 
107   ** The encoding defaults to the locale encoding (only on Unix
108      so far, perhaps Windows later).
109 
110   ** Built-in UTF-8, UTF-16 (BE/LE), and UTF-32 (BE/LE) codecs.
111 
112   ** iconv-based codec for other encodings on Unix
113 
114 * Modularity: the low-level IO interface is exposed as a type class
115   (GHC.IO.IODevice) so you can build your own low-level IO providers and
116   make Handles from them.
117 
118 * Newline translation: instead of being Windows-specific wired-in
119   magic, the translation from \r\n -> \n and back again is available
120   on all platforms and is configurable for reading/writing
121   independently.
122 
123 
124 Unicode-aware Handles
125 ~~~~~~~~~~~~~~~~~~~~~
126 
127 This is a significant restructuring of the Handle implementation with
128 the primary goal of supporting Unicode character encodings.
129 
130 The only change to the existing behaviour is that by default, text IO
131 is done in the prevailing locale encoding of the system (except on
132 Windows [1]). 
133 
134 Handles created by openBinaryFile use the Latin-1 encoding, as do
135 Handles placed in binary mode using hSetBinaryMode.
136 
137 We provide a way to change the encoding for an existing Handle:
138 
139    GHC.IO.Handle.hSetEncoding :: Handle -> TextEncoding -> IO ()
140 
141 and various encodings (from GHC.IO.Encoding):
142 
143    latin1,
144    utf8,
145    utf16, utf16le, utf16be,
146    utf32, utf32le, utf32be,
147    localeEncoding,
148 
149 and a way to lookup other encodings:
150 
151    GHC.IO.Encoding.mkTextEncoding :: String -> IO TextEncoding
152 
153 (it's system-dependent whether the requested encoding will be
154 available).
155 
156 We may want to export these from somewhere more permanent; that's a
157 topic for a future library proposal.
158 
159 Thanks to suggestions from Duncan Coutts, it's possible to call
160 hSetEncoding even on buffered read Handles, and the right thing
161 happens.  So we can read from text streams that include multiple
162 encodings, such as an HTTP response or email message, without having
163 to turn buffering off (though there is a penalty for switching
164 encodings on a buffered Handle, as the IO system has to do some
165 re-decoding to figure out where it should start reading from again).
166 
167 If there is a decoding error, it is reported when an attempt is made
168 to read the offending character from the Handle, as you would expect.
169 
170 Performance varies.  For "hGetContents >>= putStr" I found the new
171 library was faster on my x86_64 machine, but slower on an x86.  On the
172 whole I'd expect things to be a bit slower due to the extra
173 decoding/encoding, but probabaly not noticeably.  If performance is
174 critical for your app, then you should be using bytestring and text
175 anyway.
176 
177 [1] Note: locale encoding is not currently implemented on Windows due
178 to the built-in Win32 APIs for encoding/decoding not being sufficient
179 for our purposes.  Ask me for details.  Offers of help gratefully
180 accepted.
181 
182 
183 Newline Translation
184 ~~~~~~~~~~~~~~~~~~~
185 
186 In the old IO library, text-mode Handles on Windows had automatic
187 translation from \r\n -> \n on input, and the opposite on output.  It
188 was implemented using the underlying CRT functions, which meant that
189 there were certain odd restrictions, such as read/write text handles
190 needing to be unbuffered, and seeking not working at all on text
191 Handles.
192 
193 In the rewrite, newline translation is now implemented in the upper
194 layers, as it needs to be since we have to perform Unicode decoding
195 before newline translation.  This means that it is now available on
196 all platforms, which can be quite handy for writing portable code.
197 
198 For now, I have left the behaviour as it was, namely \r\n -> \n on
199 Windows, and no translation on Unix.  However, another reasonable
200 default (similar to what Python does) would be to do \r\n -> \n on
201 input, and convert to the platform-native representation (either \r\n
202 or \n) on output.  This is called universalNewlineMode (below).
203 
204 The API is as follows.  (available from GHC.IO.Handle for now, again
205 this is something we will probably want to try to get into System.IO
206 at some point):
207 
208 -- | The representation of a newline in the external file or stream.
209 data Newline = LF    -- ^ "\n"
210              | CRLF  -- ^ "\r\n"
211              deriving Eq
212 
213 -- | Specifies the translation, if any, of newline characters between
214 -- internal Strings and the external file or stream.  Haskell Strings
215 -- are assumed to represent newlines with the '\n' character; the
216 -- newline mode specifies how to translate '\n' on output, and what to
217 -- translate into '\n' on input.
218 data NewlineMode
219   = NewlineMode { inputNL :: Newline,
220                     -- ^ the representation of newlines on input
221                   outputNL :: Newline
222                     -- ^ the representation of newlines on output
223                  }
224              deriving Eq
225 
226 -- | The native newline representation for the current platform
227 nativeNewline :: Newline
228 
229 -- | Map "\r\n" into "\n" on input, and "\n" to the native newline
230 -- represetnation on output.  This mode can be used on any platform, and
231 -- works with text files using any newline convention.  The downside is
232 -- that @readFile a >>= writeFile b@ might yield a different file.
233 universalNewlineMode :: NewlineMode
234 universalNewlineMode  = NewlineMode { inputNL  = CRLF,
235                                       outputNL = nativeNewline }
236 
237 -- | Use the native newline representation on both input and output
238 nativeNewlineMode    :: NewlineMode
239 nativeNewlineMode     = NewlineMode { inputNL  = nativeNewline,
240                                       outputNL = nativeNewline }
241 
242 -- | Do no newline translation at all.
243 noNewlineTranslation :: NewlineMode
244 noNewlineTranslation  = NewlineMode { inputNL  = LF, outputNL = LF }
245 
246 
247 -- | Change the newline translation mode on the Handle.
248 hSetNewlineMode :: Handle -> NewlineMode -> IO ()
249 
250 
251 
252 IO Devices
253 ~~~~~~~~~~
254 
255 The major change here is that the implementation of the Handle
256 operations is separated from the underlying IO device, using type
257 classes.  File descriptors are just one IO provider; I have also
258 implemented memory-mapped files (good for random-access read/write)
259 and a Handle that pipes output to a Chan (useful for testing code that
260 writes to a Handle).  New kinds of Handle can be implemented outside
261 the base package, for instance someone could write bytestringToHandle.
262 A Handle is made using mkFileHandle:
263 
264 -- | makes a new 'Handle'
265 mkFileHandle :: (IODevice dev, BufferedIO dev, Typeable dev)
266               => dev -- ^ the underlying IO device, which must support
267                      -- 'IODevice', 'BufferedIO' and 'Typeable'
268               -> FilePath
269                      -- ^ a string describing the 'Handle', e.g. the file
270                      -- path for a file.  Used in error messages.
271               -> IOMode
272                      -- ^ The mode in which the 'Handle' is to be used
273               -> Maybe TextEncoding
274                      -- ^ text encoding to use, if any
275               -> NewlineMode
276                      -- ^ newline translation mode
277               -> IO Handle
278 
279 This also means that someone can write a completely new IO
280 implementation on Windows based on native Win32 HANDLEs, and
281 distribute it as a separate package (I really hope somebody does
282 this!).
283 
284 This restructuring isn't as radical as previous designs.  I haven't
285 made any attempt to make a separate binary I/O layer, for example
286 (although hGetBuf/hPutBuf do bypass the text encoding and newline
287 translation).  The main goal here was to get Unicode support in, and
288 to allow others to experiment with making new kinds of Handle.  We
289 could split up the layers further later.
290 
291 
292 API changes and Module structure
293 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
294 
295 NB. GHC.IOBase and GHC.Handle are now DEPRECATED (they are still
296 present, but are just re-exporting things from other modules now).
297 For 6.12 we'll want to bump base to version 5 and add a base4-compat.
298 For now I'm using #if __GLASGOW_HASKEL__ >= 611 to avoid deprecated
299 warnings.
300 
301 I split modules into smaller parts in many places.  For example, we
302 now have GHC.IORef, GHC.MVar and GHC.IOArray containing the
303 implementations of IORef, MVar and IOArray respectively.  This was
304 necessary for untangling dependencies, but it also makes things easier
305 to follow.
306 
307 The new module structurue for the IO-relatied parts of the base
308 package is:
309 
310 GHC.IO
311    Implementation of the IO monad; unsafe*; throw/catch
312 
313 GHC.IO.IOMode
314    The IOMode type
315 
316 GHC.IO.Buffer
317    Buffers and operations on them
318 
319 GHC.IO.Device
320    The IODevice and RawIO classes.
321 
322 GHC.IO.BufferedIO
323    The BufferedIO class.
324 
325 GHC.IO.FD
326    The FD type, with instances of IODevice, RawIO and BufferedIO.
327 
328 GHC.IO.Exception
329    IO-related Exceptions
330 
331 GHC.IO.Encoding
332    The TextEncoding type; built-in TextEncodings; mkTextEncoding
333 
334 GHC.IO.Encoding.Types
335 GHC.IO.Encoding.Iconv
336 GHC.IO.Encoding.Latin1
337 GHC.IO.Encoding.UTF8
338 GHC.IO.Encoding.UTF16
339 GHC.IO.Encoding.UTF32
340    Implementation internals for GHC.IO.Encoding
341 
342 GHC.IO.Handle
343    The main API for GHC's Handle implementation, provides all the Handle
344    operations + mkFileHandle + hSetEncoding.
345 
346 GHC.IO.Handle.Types
347 GHC.IO.Handle.Internals
348 GHC.IO.Handle.Text
349    Implementation of Handles and operations.
350 
351 GHC.IO.Handle.FD
352    Parts of the Handle API implemented by file-descriptors: openFile,
353    stdin, stdout, stderr, fdToHandle etc.
354 
355]
356[Remove unused foreign imports of __encodeFloat/Double
357Duncan Coutts <duncan@well-typed.com>**20090611160100]
358[nhc98 must build dirUtils.c as well.
359Malcolm.Wallace@cs.york.ac.uk**20090605091730
360 Fixes this bootstrapping error:
361   Undefined symbols:
362   "___hscore_readdir", referenced from:
363       _FR_System_46Posix_46Internals_46readdir_35 in libHSbase.a(Internals.o)
364]
365[Remove unnecessary parens
366Ian Lynagh <igloo@earth.li>**20090602183608]
367[Fix validate (on Windows)
368Simon Marlow <marlowsd@gmail.com>**20090529130214
369 Ignore-this: ea31ee9b26cd69b81bb24ecf040dc196
370]
371[Make two type defaults explicit
372simonpj@microsoft.com**20090529083549
373 Ignore-this: 398a10db1612dbef1723b449bff26782
374 
375 Now that -Werror rejects programs that use silent type-class defaulting,
376 we must commit in the source code.
377 
378 I've used Double in CPUTime, which is the same as was picked automatically
379 before, but I expect Float would be ok.
380 
381    realToInteger :: Real a => a -> Integer
382    realToInteger ct = round (realToFrac ct :: Double)
383 
384 In GHC.Float I used Float (rather that than the auto-picked Double)
385 because I'm pretty certain it has enough precision.
386 
387        -- f :: Integer, log :: Float -> Float,
388         --               ceiling :: Float -> Int
389         ceiling ((log (fromInteger (f+1) :: Float) +
390 
391]
392[Fix #3257: document that exitWith in a forkIO'd thread does not exit the process
393Simon Marlow <marlowsd@gmail.com>**20090528123738
394 Ignore-this: cc5aff45a149acd1627bd7ee31aea4e9
395]
396[Increase the version number to that in the 6.10 branch
397Ian Lynagh <igloo@earth.li>**20090524155610]
398[Fix warnings
399Ian Lynagh <igloo@earth.li>**20090523224508]
400[Document that the initial quantity for QSem and QSemN must be >= 0
401Ian Lynagh <igloo@earth.li>**20090523200238]
402[add _O_NOINHERIT when opening files on Windows (see #2650)
403Simon Marlow <marlowsd@gmail.com>**20090520130926
404 Ignore-this: 6dfbdfe13e739cc339e627294e077ba6
405]
406[remove msvcrt and kernel32 from extra-libraries
407Simon Marlow <marlowsd@gmail.com>**20090520111626
408 Ignore-this: cd2e24a5144c6ca0efe03ceaea8f577b
409]
410[Add wrappers around fcntl
411Ian Lynagh <igloo@earth.li>**20090520175358
412 We need to do this as it has a (, ...) type, which we aren't allowed to
413 directly call with the FFI.
414]
415[Add more bang patterns, needed to fix the 32bit build
416Ian Lynagh <igloo@earth.li>**20090424160701]
417[Use a bang pattern when we where/let-bind values with unlifted types
418Ian Lynagh <igloo@earth.li>**20090424125320]
419[FIX #3171: make sure we have only one table of signal handlers
420Simon Marlow <marlowsd@gmail.com>**20090423112837
421 Ignore-this: 3d8039b47efac2629e73a7d7e7d58983
422]
423[Fix QSem and QSemN: Initial amount must be non-negative
424Ian Lynagh <igloo@earth.li>**20090410164013]
425[Don't inline enumDeltaToInteger until its rules have had a chance to fire
426simonpj@microsoft.com**20090403091750
427 Ignore-this: ab602bac65610e720065b097d46a6f52
428]
429[Import GHC.Err so we see bottoming functions properly
430simonpj@microsoft.com**20090403091118
431 Ignore-this: 913e3a4584e73e67ddf9bc3b6f11d11
432 
433 Before this patch, GHC/Err.lhs-boot exported divZeroError and overflowError,
434 as well as plain 'error'.  The latter has a wired-in defn in GHC (MkId.lhs),
435 but the former two do not.  As a result GHC doesn't see that overflowError
436 is a bottoming function at a crucial moment when compiling GHC.Real, and
437 that means that divMod wasn't getting the CPR property.
438 
439 The fix is easy:
440   - GHC/Err.lhs-boot should export only 'error'
441 
442   - GHC.Real, GHC.Int, and GHC.Word should import GHC.Err
443     directly.  They can do this nowadays without creating
444     a module loop, thanks to the new exception story
445 
446]
447[Don't inline unpackCString
448simonpj@microsoft.com**20090403090844
449 Ignore-this: 78f9660ffff55ae8bc4c41866d1ad80c
450 
451 There's no point in inlining unpackCString, so this patch adds a
452 NOINLINE pragma.  (Otherwise, it's just on the threshold.)
453 
454]
455[be sure to install Nhc98BaseConfig.h
456Malcolm.Wallace@cs.york.ac.uk**20090401122028]
457[Avoid unnecessarily using Integer when decoding Floats
458Ian Lynagh <igloo@earth.li>**20090330225241]
459[Add another Data.List.intersect example from Christian Maeder
460Ian Lynagh <igloo@earth.li>**20090327232118]
461[Remove some redundant fromInteger's
462Ian Lynagh <igloo@earth.li>**20090324145325]
463[Add an import needed in the new build system
464Ian Lynagh <igloo@earth.li>**20090322162241]
465[ghcconfig.h is __GLASGOW_HASKELL__ only
466Malcolm.Wallace@cs.york.ac.uk**20090316134532]
467[Fix layout to comply with H'98.
468Malcolm.Wallace@cs.york.ac.uk**20090316125651
469 Also, configure correctly for nhc98, to avoid win32 code.
470]
471[FIX #2189: re-enabled cooked mode for Console-connected Handles on Windows
472Simon Marlow <marlowsd@gmail.com>*-20090305113323
473 Patch from Sigbjorn Finne <sof@galois.com>
474]
475[avoid a space leak building up in the "prodding" IORef (part of #2992)
476Simon Marlow <marlowsd@gmail.com>**20090311093938]
477[Partial fix for #2917
478Simon Marlow <marlowsd@gmail.com>**20090305154153
479 Ignore-this: 3a06cd3ea09f1d6454d52031802a93fd
480 
481  - add newAlignedPinnedByteArray# for allocating pinned BAs with
482    arbitrary alignment
483 
484  - the old newPinnedByteArray# now aligns to 16 bytes
485 
486 Foreign.alloca will use newAlignedPinnedByteArray#, and so might end
487 up wasting less space than before (we used to align to 8 by default).
488 Foreign.allocaBytes and Foreign.mallocForeignPtrBytes will get 16-byte
489 aligned memory, which is enough to avoid problems with SSE
490 instructions on x86, for example.
491 
492 There was a bug in the old newPinnedByteArray#: it aligned to 8 bytes,
493 but would have failed if the header was not a multiple of 8
494 (fortunately it always was, even with profiling).  Also we
495 occasionally wasted some space unnecessarily due to alignment in
496 allocatePinned().
497 
498 I haven't done anything about Foreign.malloc/mallocBytes, which will
499 give you the same alignment guarantees as malloc() (8 bytes on
500 Linux/x86 here).
501]
502[Add config.guess, config.sub and install-sh
503Ian Lynagh <igloo@earth.li>**20090307153831]
504[add final newline; fix build (on Windows?)
505Simon Marlow <marlowsd@gmail.com>**20090305120426]
506[FIX #2189: re-enabled cooked mode for Console-connected Handles on Windows
507Simon Marlow <marlowsd@gmail.com>**20090305113323
508 Patch from Sigbjorn Finne <sof@galois.com>
509]
510[Rules to make genericLength strict for Int/Integer lengths, see #2962
511naur@post11.tele.dk**20090207181427]
512[#2759: Amend previous patch
513Jose Pedro Magalhaes <jpm@cs.uu.nl>**20090212132327]
514[ifdef out the definition of setCloseOnExec on Windows; fixes the build
515Ian Lynagh <igloo@earth.li>**20090220173041]
516[Fix warnings: put imports inside ifdefs
517Ian Lynagh <igloo@earth.li>**20090220173941]
518[ifdef out the syncIOManager export on Windows; fixes the build
519Ian Lynagh <igloo@earth.li>**20090220173414]
520[Set the IO manager pipe descriptors to FD_CLOEXEC
521Simon Marlow <marlowsd@gmail.com>**20090219114217
522 Ignore-this: ac670a45f8a4d06dd7831a2674d6c119
523 This pipe is an internal implementation detail, we don't really want
524 it to be exposed.
525]
526[Rewrite of signal-handling (base patch; see also ghc and unix patches)
527Simon Marlow <marlowsd@gmail.com>**20090219102203
528 Ignore-this: 2122e05eaaab184b9ef0f269ce4c9282
529 
530 The API is the same (for now).  The new implementation has the
531 capability to define signal handlers that have access to the siginfo
532 of the signal (#592), but this functionality is not exposed in this
533 patch.
534 
535 #2451 is the ticket for the new API.
536 
537 The main purpose of bringing this in now is to fix race conditions in
538 the old signal handling code (#2858).  Later we can enable the new
539 API in the HEAD.
540 
541 Implementation differences:
542 
543  - More of the signal-handling is moved into Haskell.  We store the
544    table of signal handlers in an MVar, rather than having a table of
545    StablePtrs in the RTS.
546 
547  - In the threaded RTS, the siginfo of the signal is passed down the
548    pipe to the IO manager thread, which manages the business of
549    starting up new signal handler threads.  In the non-threaded RTS,
550    the siginfo of caught signals is stored in the RTS, and the
551    scheduler starts new signal handler threads.
552]
553[Fix #2971: we had lost the non-blocking flag on Handles created by openFile
554Simon Marlow <marlowsd@gmail.com>**20090206165912
555 Ignore-this: 546f1a799b6e80f7b25c73ef642d8f9d
556 This code is a mess, fortunately the new IO library cleans it up.
557]
558[add some rules of thumb for catching exceptions, restructure the docs a bit
559Simon Marlow <marlowsd@gmail.com>**20090205150642
560 Ignore-this: 8294e58f247b2cc3f193991434d336de
561]
562[implement System.IO.Error more fully for nhc98
563Malcolm.Wallace@cs.york.ac.uk**20090206173314]
564[Make System.Posix.Internals buildable by nhc98.
565Malcolm.Wallace@cs.york.ac.uk**20090206111152]
566[Fix #2903: ensure CWStringLen contains the length of the array rather than the String
567Ross Paterson <ross@soi.city.ac.uk>**20090203011026]
568[OldException catches unknown exceptions as DynException
569Ian Lynagh <igloo@earth.li>**20090202151856
570 It's important that we put all exceptions into the old Exception
571 type somehow, or throwing a new exception wouldn't cause the
572 cleanup code for bracket, finally etc to happen.
573]
574[Update the Exception docs
575Ian Lynagh <igloo@earth.li>**20090131204845]
576[Require Cabal version >= 1.6
577Ian Lynagh <igloo@earth.li>**20090122011251]
578[Add "bug-reports" and "source-repository" info to the Cabal file
579Ian Lynagh <igloo@earth.li>**20090121182010]
580[Proposal #2875: remove StringRep and StringConstr
581Jose Pedro Magalhaes <jpm@cs.uu.nl>**20090116142617]
582[Fix #2759: add mkRealConstr and mkIntegralConstr, deprecate mkFloatConstr and mkIntConstr
583Jose Pedro Magalhaes <jpm@cs.uu.nl>**20090116140655]
584[Correct SYB's representation of Char
585Jose Pedro Magalhaes <jpm@cs.uu.nl>**20081211144716]
586[avoid `mappend` in monoid laws, because it doesn't work with haddock
587Ross Paterson <ross@soi.city.ac.uk>**20090118011508]
588[Make Data.Typeable imports and exports more explicit
589Ian Lynagh <igloo@earth.li>**20090114234512]
590[add Monoid laws
591Ross Paterson <ross@soi.city.ac.uk>**20090116151624]
592[Unbreak an import cycle caused by moving 'catch' definitions around.
593Malcolm.Wallace@cs.york.ac.uk**20090116110132
594 The new cycle was introduced for nhc98 only.
595]
596[make the Monoid docs more self-contained
597Ross Paterson <ross@soi.city.ac.uk>**20090115222441]
598[Move some catch definitions around to avoid an import loop
599Ian Lynagh <igloo@earth.li>**20090114211033
600 As suggested by simonpj in trac #2822.
601]
602[Add NoImplicitPrelude to the extensions used when building with GHC
603Ian Lynagh <igloo@earth.li>**20090114202810]
604[#2699: exit silently for EPIPE on stdout
605Simon Marlow <marlowsd@gmail.com>**20090114134612
606 Ignore-this: 4236560e8e9c1135129e9526355f11b4
607]
608[Fix build when we have HTYPE_TCFLAG_T
609Ian Lynagh <igloo@earth.li>**20090105102020]
610[Fix the build on Windows
611Ian Lynagh <igloo@earth.li>**20090105014625]
612[Add errno to the IOError type
613Ian Lynagh <igloo@earth.li>**20090104173018]
614[Fix typo (reqwests -> requests); trac #2908, spotted by bancroft
615Ian Lynagh <igloo@earth.li>**20090104154405]
616[More compact error messages for record selectors
617simonpj@microsoft.com**20090102145325
618 
619 Make recSelError generate the standard part of the record selector
620 error message (i.e. "No match in record selector") rather than have
621 that string duplicated for every record selector.
622 
623]
624[extra dependencies for the new build system
625Simon Marlow <marlowsd@gmail.com>**20081217104655]
626[warning fix: don't use -XPatternSignatures in GHC >= 6.10
627Simon Marlow <marlowsd@gmail.com>**20081217104637]
628[Rollback INLINE patches
629Simon Marlow <marlowsd@gmail.com>**20081216104143
630 
631 rolling back:
632 
633 Fri Dec  5 17:00:15 GMT 2008  simonpj@microsoft.com
634   * Update INLINE pragmas for new INLINE story
635   
636   - (.) and foldr should inline when applied to only two arguments
637   - Make unpackCString# NOINLINE; it inlines too much (with little gain)
638   
639 
640     M ./GHC/Base.lhs -10 +31
641]
642[FIX #1364: added support for C finalizers that run as soon as the value is no longer reachable.
643Ivan Tomac <tomac@pacific.net.au>**20081210150510
644 
645 Patch amended by Simon Marlow:
646   - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv#
647]
648[Fix #2760: deprecate mkNorepType, add mkNoRepType
649Jose Pedro Magalhaes <jpm@cs.uu.nl>**20081121141905]
650[Update INLINE pragmas for new INLINE story
651simonpj@microsoft.com**20081205170015
652 
653 - (.) and foldr should inline when applied to only two arguments
654 - Make unpackCString# NOINLINE; it inlines too much (with little gain)
655 
656]
657[Fix #2750: change Prelude.(,) to Prelude.(,,)
658Jose Pedro Magalhaes <jpm@cs.uu.nl>**20081201113411]
659[Fix typo (or out of date reference) in throwTo documentation.
660shelarcy <shelarcy@gmail.com>**20081129024639]
661[Add more description of what "round" does, from the H98 report
662Ian Lynagh <igloo@earth.li>**20081119143131]
663[re-instate the gcd/Integer and lcm/Integer RULES
664Simon Marlow <marlowsd@gmail.com>**20081120101826
665 Fixes a performance regression between 6.8.3 and 6.10.1
666]
667[Change an "undefined" into a more informative error; trac #2782
668Ian Lynagh <igloo@earth.li>**20081116160228]
669[updating Haddock documentation
670jpm@cs.uu.nl**20081111095023
671 
672 Fixed the broken link from Data.Generics to Data.Data.
673]
674[add GHC.Conc.runSparks (required by GHC patch "Run sparks in batches")
675Simon Marlow <marlowsd@gmail.com>**20081106095419]
676[FIX #2722: update RULES for the Category/Arrow split
677Ross Paterson <ross@soi.city.ac.uk>**20081104144515
678 
679 The rule
680 
681        arr id = id
682 
683 interacts unpleasantly with the advice to define
684 
685        id = arr id
686 
687 in instances of Category that are also instances of Arrow (#2722).
688 
689 Also changed a couple of >>>'s to .'s in later rules.
690]
691[Add AnnotationWrapper type so GHC can capture annotation dictionaries during compilation
692Max Bolingbroke <batterseapower@hotmail.com>**20081016122608]
693[docs about how exceptions are handled by forkIO'd threads (#2651)
694Simon Marlow <marlowsd@gmail.com>**20081016100410]
695[Import n_capabilities via import symbol when linking dynamically
696Clemens Fruhwirth <clemens@endorphin.org>**20081013161220]
697[add link to the new syb wiki
698jpm@cs.uu.nl**20081013111605]
699[changing haddock links
700jpm@cs.uu.nl**20081010095434]
701[add readTVarIO :: TVar a -> IO a
702Simon Marlow <marlowsd@gmail.com>**20081010113835]
703[removed (->) instance from Data.Data
704jpm@cs.uu.nl**20081006075254]
705[non-GHC: delete unnecessary imports
706Ross Paterson <ross@soi.city.ac.uk>**20081007134809]
707[added new module Data.Data
708'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002140535
709 
710 The new Data.Data module contains all of Data.Generics.Basics
711 and most of Data.Generics.Instances. The missing instances were
712 deemed dubious and moved to the syb package.
713]
714[add new Data.Data module
715'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082735]
716[restore Complex's derived Data instance
717'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082655]
718[update Data.Generics import
719'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082604]
720[Don't use ^(2::Int) in Data.Complex.magnitude; partially fixes trac #2450
721Ian Lynagh <igloo@earth.li>**20081004142651
722 We still might want to make a RULE for this, so the bug is not fully fixed.
723]
724[Restore the Haskell 98 behaviour of Show Ratio (#1920)
725Simon Marlow <simonmarhaskell@gmail.com>**20080923134949]
726[Pad version number to 4.0.0.0
727Ian Lynagh <igloo@earth.li>**20080920155801]
728[TAG 6.10 branch has been forked
729Ian Lynagh <igloo@earth.li>**20080919123437]
730[In nhc98, Word is a type synonym, so class instance is not possible.
731Malcolm.Wallace@cs.york.ac.uk**20080917075326]
732[Fix bugs in Text.Printf (#1548)
733Simon Marlow <marlowsd@gmail.com>**20080916133505]
734[We should be including Rts.h here, not Stg.h
735Simon Marlow <marlowsd@gmail.com>**20080912134901
736 Stg.h is for .hc files only, and it sets up various global register
737 variables.
738]
739[Generic functions that take integral arguments should work the same way as their prelude counterparts
740**20080822022755
741 
742 The Prelude functions drop, take, and splitAt are unfailing (never call error). This patch changes the Data.List generic versions to behave the same way. At present, they call error on negative arguments.
743 
744]
745[Don't define __hscore_s_issock on Windows
746Ian Lynagh <igloo@earth.li>**20080904202845]
747[Unbreak the GHC build with older versions of gcc
748Ian Lynagh <igloo@earth.li>**20080904185122
749 Patch from kili@outback.escape.de, who says:
750   Stg.h must be included before HsBase.h, because the latter contains
751   function definitions causing older versions of gcc (3.3.5 in my
752   case) to bail out with "error: global register variable follows a
753   function definition" on Regs.h, which is included by Stg.h.
754]
755[Don't make S_ISSOCK use conditional
756Ian Lynagh <igloo@earth.li>**20080904164234
757 We were conditionally defining the C wrapper, but unconditionally using
758 it. So if it didn't exist then things would have broken anyway.
759]
760[Add missing files
761Ian Lynagh <igloo@earth.li>**20080904100951]
762[Remerge concurrent,unique,timeout,st,getopt into base
763Ian Lynagh <igloo@earth.li>**20080903201908]
764[remove 'pure' method from Arrow class (#2517)
765Ross Paterson <ross@soi.city.ac.uk>**20080903144436]
766[make Typeable instances for larger tuples available to non-GHC
767Ross Paterson <ross@soi.city.ac.uk>**20080903113543]
768[Don't look for actual OldException.Exception exceptions
769Ian Lynagh <igloo@earth.li>**20080902224730
770 We don't actually throw them (we throw the new Exception equivalents
771 instead), and looking for them was causing an infinite loop
772]
773[add include/CTypes.h to extra-source-files
774Ross Paterson <ross@soi.city.ac.uk>**20080902153029]
775[avoid relying on the implementation of SomeException
776Ross Paterson <ross@soi.city.ac.uk>**20080902080113
777 
778 This is because Hugs uses a different implementation.
779 No semantic change.
780]
781[non-GHC: leave out Belch functions
782Ross Paterson <ross@soi.city.ac.uk>**20080831180227]
783[non-GHC: add Typeable instance for ForeignPtr
784Ross Paterson <ross@soi.city.ac.uk>**20080831180048]
785[docs: mention that killThread on a completed thread is a no-op
786Simon Marlow <marlowsd@gmail.com>**20080902093126]
787[#2528: reverse the order of args to (==) in nubBy to match nub
788Simon Marlow <marlowsd@gmail.com>**20080902092950
789 This only makes a difference when the (==) definition is not
790 reflexive, but strictly speaking it does violate the report definition
791 of nubBy, so we should fix it.
792]
793[System.Timeout is no longer part of base
794Malcolm.Wallace@cs.york.ac.uk**20080901145738]
795[getopt is no longer part of base
796Malcolm.Wallace@cs.york.ac.uk**20080827145336]
797[Split syb off into its own package
798Ian Lynagh <igloo@earth.li>**20080825214144
799 I've also moved the Data (Complex a) instance into it, and made it
800 portable rather than GHC-only in the process.
801]
802[add extra-source-files field
803Ross Paterson <ross@soi.city.ac.uk>**20080825231317]
804[Fix warnings in PrelIOUtils.c
805Ian Lynagh <igloo@earth.li>**20080825141841]
806[Windows-only fixes for moving concurrent out of base
807Ian Lynagh <igloo@earth.li>**20080824164146]
808[Split off the concurrent hierarchy (concurrent, unique, timeout)
809Ian Lynagh <igloo@earth.li>**20080824123956]
810[Split getopt off into its own package
811Ian Lynagh <igloo@earth.li>**20080824020213]
812[Remove ST stuff that is now in the new st package
813Ian Lynagh <igloo@earth.li>**20080823223014]
814[Fix Windows-only warnings
815Ian Lynagh <igloo@earth.li>**20080823002249]
816[Fix Windows-only warnings in GHC.Conc
817Ian Lynagh <igloo@earth.li>**20080822234837]
818[Suppress some warnings that are hard to fix because of ifdefs
819Ian Lynagh <igloo@earth.li>**20080822233951]
820[Provide blockedOnDeadMVar, blockedIndefinitely for the RTS
821Ian Lynagh <igloo@earth.li>**20080821110723]
822[Fix more warnings
823Ian Lynagh <igloo@earth.li>**20080820233958]
824[Suppress a couple of warnings in GHC.PArr
825Ian Lynagh <igloo@earth.li>**20080820232018
826 The fix isn't immediately obvious to me
827]
828[Fix more warnings
829Ian Lynagh <igloo@earth.li>**20080820231937]
830[Fix warnings in Data.Generics.*
831Ian Lynagh <igloo@earth.li>**20080820230437]
832[Fix some more warnings
833Ian Lynagh <igloo@earth.li>**20080820223252]
834[Ignore some orphan warnings
835Ian Lynagh <igloo@earth.li>**20080820211901]
836[remove some functions that aren't used in base
837Simon Marlow <marlowsd@gmail.com>**20080821142339]
838[remove __hscore_renameFile, it is no longer uesd
839Simon Marlow <marlowsd@gmail.com>**20080818155950
840 System.Directory implements renameFile using unix/Win32 now.
841]
842[Rewrite the documentation for forkOS again
843Simon Marlow <marlowsd@gmail.com>**20080818132856
844 Try to make it clearer that forkOS is only necessary when calling
845 foreing libraries that use thread-local state, and it has nothing to
846 do with scheduling behaviour between Haskell threads.  I also added
847 something about the performance impact of forkOS, and mentioned that
848 the main thread is a bound thread.
849]
850[nhc only: expose Foldable and Traversable instances of Array
851Ross Paterson <ross@soi.city.ac.uk>**20080817002719
852 
853 These were turned off as a side-effect of a previous nhc-only fix for
854 #2176 that is no longer needed.  They should be fine for nhc now.
855]
856[Fix hReady (trac #1063)
857Ian Lynagh <igloo@earth.li>**20080816182715
858 We now throw an EOF exception when appropriate
859]
860[Fix oversight in Control.OldException
861Bertram Felgenhauer <int-e@gmx.de>**20080816132631
862 The NonTermination constructor slipped through in the Exception instance.
863]
864[Eliminate orphan rules and instances in the array package
865Ian Lynagh <igloo@earth.li>**20080816122253]
866[Control.OldException: Map exceptions to old exceptions and back properly.
867Ian Lynagh <igloo@earth.li>**20080814210219
868   * Control.OldException: Map exceptions to old exceptions and back properly.
869     
870 It's really necessary to map them back as well, or the RTS and base library
871 will not recognize exceptions that got caught and rethrown. (See #2508)
872 
873 Patch from Bertram Felgenhauer <int-e@gmx.de>
874]
875[add Traversable generalizations of mapAccumL and mapAccumR (#2461)
876Ross Paterson <ross@soi.city.ac.uk>**20080814162617]
877[simplify definition of Prelude.catch
878Ross Paterson <ross@soi.city.ac.uk>**20080814143650]
879[remove returns from void functions
880Ross Paterson <ross@soi.city.ac.uk>**20080814110841]
881[No reason for Handler and catches to exclude nhc98.
882Malcolm.Wallace@cs.york.ac.uk**20080813125850]
883[Must import ExitCode for its instance to be re-exported.
884Malcolm.Wallace@cs.york.ac.uk**20080813125710
885 The Cabal library depends on "instance Exception ExitCode", and expects
886 to import it from Control.Exception, not Control.Exception.Base.
887]
888[use New.catch instead of catchException in OldException
889Ross Paterson <ross@soi.city.ac.uk>**20080813071307]
890[use the Haskell 98 module Control.Exception.Base in the Concurrent modules
891Ross Paterson <ross@soi.city.ac.uk>**20080813000219]
892[export Control.Exception.Base
893Ross Paterson <ross@soi.city.ac.uk>**20080812233640]
894[use dummy implementation of timeout for all non-GHCs
895Ross Paterson <ross@soi.city.ac.uk>**20080812151602]
896[Hugs only: fix imports
897Ross Paterson <ross@soi.city.ac.uk>**20080812145654]
898[non-GHC: hide Prelude.catch
899Ross Paterson <ross@soi.city.ac.uk>**20080812145622]
900[add Control.Exception.Base to nhc98 build
901Malcolm.Wallace@cs.york.ac.uk**20080812174300]
902[bump to version 4.0
903Simon Marlow <marlowsd@gmail.com>**20080805153354]
904[Hugs only: don't import exception types -- their instances are now in Control.Exception.Base
905Ross Paterson <ross@soi.city.ac.uk>**20080812140433]
906[split most of Control.Exception into new Control.Exception.Base
907Ross Paterson <ross@soi.city.ac.uk>**20080812124912
908 
909 Move everything but catches/Handler into a new internal module.
910 This was needed to get the new exceptions working with Hugs, because Hugs
911 has the constraint that all Haskell 98 library modules, and everything
912 they include, must be Haskell 98.  This also involves a different
913 representation of SomeException for Hugs, so that type is exported
914 opaquely for Hugs.  Then Control.Exception.Base is Haskell 98 as far as
915 Hugs is concerned, but Control.Exception needs the extensions turned on.
916 
917 Control.Exception re-exports everything from Control.Exception.Base
918 except the functions used by the GHC runtime.
919]
920[remove kludges, now that Control.Exception is imported
921Ross Paterson <ross@soi.city.ac.uk>**20080811180328]
922[threadDelay and friends are GHC-only
923Ross Paterson <ross@soi.city.ac.uk>**20080811175039]
924[fix imports for non-GHC
925Malcolm.Wallace@cs.york.ac.uk**20080808092017]
926[Eq and Ord have moved into GHC.Classes
927Ian Lynagh <igloo@earth.li>**20080807095352]
928[Use the proper CInt type in GHC.Unicode
929Ian Lynagh <igloo@earth.li>**20080806232948]
930[Import wibbles
931Ian Lynagh <igloo@earth.li>**20080806232055]
932[Remove unnecessary Data/Dynamic.hs-boot
933Ian Lynagh <igloo@earth.li>**20080806230623]
934[Remove more redundant GHC.Float imports
935Ian Lynagh <igloo@earth.li>**20080806225411]
936[Remove an unnecessary import
937Ian Lynagh <igloo@earth.li>**20080806224742]
938[Move Int, Float and Double into ghc-prim:GHC.Types
939Ian Lynagh <igloo@earth.li>**20080806191554]
940[Put some explicit import lists in Data.Typeable
941Ian Lynagh <igloo@earth.li>**20080806190353]
942[Fix a couple of imports
943Ian Lynagh <igloo@earth.li>**20080806165549]
944[Remove unused conditional import
945Ian Lynagh <igloo@earth.li>**20080806124930]
946[Swap imports around to get GHC.ForeignPtr out of the base knot
947Ian Lynagh <igloo@earth.li>**20080806121313]
948[Move some bits around to stop Data.Either being in the base import knot
949Ian Lynagh <igloo@earth.li>**20080806120504]
950[Tweak an import
951Ian Lynagh <igloo@earth.li>**20080806000440]
952[Remove the DynIOError constructor of IOErrorType
953Ian Lynagh <igloo@earth.li>**20080805234720
954 As far as I can see it is never used or exported
955]
956[Move some internals around to simplify the import graph a bit
957Ian Lynagh <igloo@earth.li>**20080805221341]
958[Move the Char datatype into ghc-prim
959Ian Lynagh <igloo@earth.li>**20080805204009]
960[Remove an unnecessary import
961Ian Lynagh <igloo@earth.li>**20080805182336]
962[The [] definition has moved to ghc-prim
963Ian Lynagh <igloo@earth.li>**20080805182332]
964[Fix warnings
965Ian Lynagh <igloo@earth.li>**20080805150250]
966[Add a missing case to Show AsyncException
967Ian Lynagh <igloo@earth.li>**20080805142811]
968[Remove GHC.Dotnet
969Ian Lynagh <igloo@earth.li>**20080804215840]
970[Hide standalone deriving clauses from haddock
971Ian Lynagh <igloo@earth.li>**20080804211617]
972[Control.Exception doesn't need to export assertError
973Ian Lynagh <igloo@earth.li>**20080804161838]
974[Generalise the type of mapException; pointed out by Isaac Dupree
975Ian Lynagh <igloo@earth.li>**20080804160941]
976[Remove some unnecessary Data.Tuple imports
977Ian Lynagh <igloo@earth.li>**20080804155956]
978[The tuple datatype definitions have moved to ghc-prim
979Ian Lynagh <igloo@earth.li>**20080804155420]
980[make ExitCode an instance of Exception for nhc98
981Malcolm.Wallace@cs.york.ac.uk**20080805160330]
982[poke and peek come from Foreign.Storable
983Malcolm.Wallace@cs.york.ac.uk**20080804160616]
984[zipWithM_ comes from Control.Monad
985Malcolm.Wallace@cs.york.ac.uk**20080804160319]
986[Fix nhc98 code variations to use the extensible exception API.
987Malcolm.Wallace@cs.york.ac.uk**20080804155842
988 There is still only one real exception type in nhc98, so it is not truly
989 extensible.  But this is enough to get the base package building again.
990]
991[nhc98 needs the Prelude for this module
992Malcolm.Wallace@cs.york.ac.uk**20080804133853]
993[Change some imports and derive Show (Either a b)
994Ian Lynagh <igloo@earth.li>**20080804004147
995 rather than writing it by hand in GHC.Show
996]
997[Windows fixes
998Ian Lynagh <igloo@earth.li>**20080803180345]
999[Remove the duplicate definition of throwTo in Control.Exception
1000Ian Lynagh <igloo@earth.li>**20080803141703
1001 It now imports GHC.Conc, so it is no longer necessary
1002]
1003[Remove the only import of GHC.Exts
1004Ian Lynagh <igloo@earth.li>**20080803141944]
1005[Move assertError into GHC.IOBase
1006Ian Lynagh <igloo@earth.li>**20080803141040]
1007[Use onException rather than catchAny
1008Ian Lynagh <igloo@earth.li>**20080803114104]
1009[Generalise the type of onException
1010Ian Lynagh <igloo@earth.li>**20080803003001
1011 The type of the thing to do on an exception is now
1012     IO b
1013 rather than
1014     IO ()
1015 which better matches functions like bracket.
1016]
1017[Remove the dangerous Exception functions
1018Ian Lynagh <igloo@earth.li>**20080802231358
1019 Removed: catchAny, handleAny, ignoreExceptions
1020 These make it easy to eat /any/ exception, which is rarely what you want.
1021 Normally you either want to:
1022 * only catch exceptions in a certain part of the hierarchy, e.g.
1023   "file not found", in which case you should only catch exceptions
1024   of the appropriate type,
1025 or
1026 * you want to do some cleanup when an exception happens, and then rethrow
1027   the exception, in which case you should use onException, or one of the
1028   bracketing functions.
1029]
1030[Remove an unused import
1031Ian Lynagh <igloo@earth.li>**20080801230343]
1032[Remove unused imports
1033Ian Lynagh <igloo@earth.li>**20080801230059]
1034[Remove unused imports in Control.Exception
1035Ian Lynagh <igloo@earth.li>**20080801225847]
1036[Get rid of some duplicate imports
1037Ian Lynagh <igloo@earth.li>**20080801214933]
1038[Remove the now-unused GHC/Conc.lhs-boot
1039Ian Lynagh <igloo@earth.li>**20080801214707]
1040[Make some more imports non-recursive
1041Ian Lynagh <igloo@earth.li>**20080801214546]
1042[Rejig some code so Control.Exception and GHC.Conc don't need recursive imports
1043Ian Lynagh <igloo@earth.li>**20080801214208]
1044[Remove the now-unused GHC/TopHandler.lhs-boot
1045Ian Lynagh <igloo@earth.li>**20080801212105]
1046[Reshuffle GHC.Conc/GHC.TopHandler a bit to remove a recursive import
1047Ian Lynagh <igloo@earth.li>**20080801211801]
1048[Don't import Control.Concurrent.MVar in GHC.TopHandler
1049Ian Lynagh <igloo@earth.li>**20080801200123]
1050[Export assertError from Control.Exception to make GHC happy
1051Ian Lynagh <igloo@earth.li>**20080801111716
1052 It's a wired-in name in GHC. We should possibly move it to another module.
1053]
1054[TopHandler now uses the new extensible exceptions
1055Ian Lynagh <igloo@earth.li>**20080731153553]
1056[Comment wibble
1057Ian Lynagh <igloo@earth.li>**20080730202127]
1058[Make numericEnumFrom more efficient
1059Ian Lynagh <igloo@earth.li>**20080730202049]
1060[Put in some parens to clarify how things parse
1061Ian Lynagh <igloo@earth.li>**20080730201934]
1062[applied patches to make enumFrom and friends strict in arguments as per the Report; closes ticket #1997
1063Bart Massey <bart@cs.pdx.edu>**20080726080444]
1064[Don't use "deriving Typeable" (for portability reasons)
1065Ian Lynagh <igloo@earth.li>**20080730194434]
1066[Add onException
1067Ian Lynagh <igloo@earth.li>**20080730172014]
1068[Fix whitespace
1069Ian Lynagh <igloo@earth.li>**20080730171951
1070 The space after "\begin{code}" was confusing haddock
1071]
1072[Re-add blocked; it got lost in the extensible exceptions patches
1073Ian Lynagh <igloo@earth.li>**20080730145614]
1074[Start to actually use extensible exceptions
1075Ian Lynagh <igloo@earth.li>**20080730145115]
1076[Rejig the extensible exceptions so there is less circular importing
1077Ian Lynagh <igloo@earth.li>**20080730122539]
1078[Define nonTermination for the RTS to use
1079Ian Lynagh <igloo@earth.li>**20080621144420
1080 We'll probably need to do the same for some other exceptions too
1081]
1082[Use extensible exceptions at the lowest level
1083Ian Lynagh <igloo@earth.li>**20080621121501
1084 Everything above is largely unchanged; just the type of catch and throw.
1085]
1086[add comment
1087Simon Marlow <marlowsd@gmail.com>**20080730114559]
1088[add some big warnings to the docs for unsafeIOToSTM (#2401)
1089Simon Marlow <marlowsd@gmail.com>**20080730114554]
1090[FIX #2376: inline shiftR
1091Simon Marlow <marlowsd@gmail.com>**20080730103539
1092 Duplicating the default definition for shiftR doesn't seem quite right
1093 to me, but it gets the right results when compiling the example
1094 program, and I couldn't find a better way to do it.
1095]
1096[Add instance Show Control.Exception.Exception for nhc98.
1097Malcolm.Wallace@cs.york.ac.uk**20080728164537]
1098[Extend nhc98's Exception type to resemble ghc's more closely
1099Malcolm.Wallace@cs.york.ac.uk**20080728163445]
1100[fix dummy async implementations for non-GHC
1101Ross Paterson <ross@soi.city.ac.uk>**20080715125521]
1102[Fix haddocking with older haddocks
1103Ian Lynagh <igloo@earth.li>**20080710190855]
1104[Add threadStatus :: ThreadId -> IO ThreadStatus
1105Simon Marlow <marlowsd@gmail.com>**20080710151711
1106 
1107 -- | The current status of a thread
1108 data ThreadStatus
1109   = ThreadRunning
1110         -- ^the thread is currently runnable or running
1111   | ThreadFinished
1112         -- ^the thread has finished
1113   | ThreadBlocked  BlockReason
1114         -- ^the thread is blocked on some resource
1115   | ThreadDied
1116         -- ^the thread received an uncaught exception
1117   deriving (Eq,Ord,Show)
1118 
1119 data BlockReason
1120   = BlockedOnMVar
1121         -- ^blocked on on 'MVar'
1122   | BlockedOnBlackHole
1123         -- ^blocked on a computation in progress by another thread
1124   | BlockedOnException
1125         -- ^blocked in 'throwTo'
1126   | BlockedOnSTM
1127         -- ^blocked in 'retry' in an STM transaction
1128   | BlockedOnForeignCall
1129         -- ^currently in a foreign call
1130   | BlockedOnOther
1131         -- ^blocked on some other resource.  Without @-threaded@,
1132         -- I/O and 'threadDelay' show up as 'BlockedOnOther', with @-threaded@
1133         -- they show up as 'BlockedOnMVar'.
1134   deriving (Eq,Ord,Show)
1135 
1136 This is useful for concurrency debugging.  I've left threadStatus in
1137 GHC.Conc for now, since the ThreadStatus type is somewhat GHC-specific.
1138]
1139[forkOS: start the new thread in blocked mode iff the parent was (#1048)
1140Simon Marlow <marlowsd@gmail.com>**20080709135558
1141 This matches the behaviour of forkIO
1142]
1143[Add Control.Exception.blocked :: IO Bool
1144Simon Marlow <marlowsd@gmail.com>**20080709133139
1145 Tells you whether async exceptions are currently blocked or not.
1146]
1147[FIX BUILD (on Windows)
1148Simon Marlow <marlowsd@gmail.com>**20080709123110]
1149[check CONST_SIGINT
1150Simon Marlow <marlowsd@gmail.com>**20080709122527]
1151[Make threadWaitRead/threadWaitWrite partially useable on Windows
1152Simon Marlow <marlowsd@gmail.com>**20080709111008
1153 
1154 They work with -threaded by calling fdReady() in a separate thread.
1155 
1156 "threadWaitRead 0" also works without -threaded (because we happen to
1157 know it's virtually equivalent to "hWaitForInput stdin (-1)").
1158]
1159[FIX #1198: hWaitForInput on Windows
1160Simon Marlow <marlowsd@gmail.com>**20080708134254
1161 Now we do the appropriate magic in fdReady() to detect when there is
1162 real input available, as opposed to uninteresting console events.
1163]
1164[FIX part of #2301
1165Simon Marlow <marlowsd@gmail.com>**20080709094437
1166   
1167 Control-C now causes the new exception (AsyncException UserInterrupt)
1168 to be raised in the main thread.  The signal handler is set up by
1169 GHC.TopHandler.runMainIO, and can be overriden in the usual way by
1170 installing a new signal handler.  The advantage is that now all
1171 programs will get a chance to clean up on ^C.
1172 
1173 When UserInterrupt is caught by the topmost handler, we now exit the
1174 program via kill(getpid(),SIGINT), which tells the parent process that
1175 we exited as a result of ^C, so the parent can take appropriate action
1176 (it might want to exit too, for example).
1177 
1178 One subtlety is that we have to use a weak reference to the ThreadId
1179 for the main thread, so that the signal handler doesn't prevent the
1180 main thread from being subject to deadlock detection.
1181]
1182[() has moved to ghc-prim:GHC.Unit, and the Eq and Ord instances to Data.Tuple
1183Ian Lynagh <igloo@earth.li>**20080624144932]
1184[Add GHC.Exts.maxTupleSize :: Int, the size of the largest tuple supported
1185Ian Lynagh <igloo@earth.li>**20080622141559]
1186[Remove code for older GHC versions
1187Ian Lynagh <igloo@earth.li>**20080620194521]
1188[Make the macros in Typeable.h add type signatures
1189Ian Lynagh <igloo@earth.li>**20080619235808]
1190[Fix #2363: getChar cannot be interrupted with -threaded
1191Simon Marlow <marlowsd@gmail.com>**20080619141911
1192 Now in -threaded mode, instead of just making a blocking call to
1193 read(), we call select() first to make sure the read() won't block,
1194 and if it would block, then we use threadWaitRead.
1195 
1196 The idea is that the current thread must be interruptible while it
1197 blocks.  This is a little slower than before, but the overhead only
1198 applies to blocking Handles (stdin/stdout/stderr, and those created by
1199 System.Process).
1200]
1201[Remove -fglasgow-exts from pragmas and comments
1202Ian Lynagh <igloo@earth.li>**20080616230727]
1203[Avoid using deprecated flags
1204Ian Lynagh <igloo@earth.li>**20080616145207]
1205[delete __hscore_{mkstemp,getrlimit,setrlimit} (moved to unix)
1206Ross Paterson <ross@soi.city.ac.uk>**20080615224413]
1207[Update WCsubst.c for Unicode 5.1.0, and add a README.Unicode
1208Ian Lynagh <igloo@earth.li>**20080613201754
1209 README.Unicode describes how to do updates in the future.
1210]
1211[Fix ubconfc
1212Ian Lynagh <igloo@earth.li>**20080613201456
1213 The current code doesn't seem to be what was used to generate WCsubst.c,
1214 so I'm not sure if it never worked, or if my tools work slightly
1215 differently to those of the previous user.
1216]
1217['permutations' is now more lazy and also faster
1218Twan van Laarhoven <twanvl@gmail.com>**20080102231712]
1219['subsequences' is now more lazy and also faster
1220Twan van Laarhoven <twanvl@gmail.com>**20080102231629]
1221[Add 'subsequences' and 'permutations' to Data.List
1222Twan van Laarhoven <twanvl@gmail.com>**20071218154950]
1223[Tweak the definition of (^) again
1224Ian Lynagh <igloo@earth.li>**20080601120759
1225 This fixes trac #2306 (do the minimum number of (*)s), and also means
1226 that we don't use the value of (1 :: a) which causes problems if the
1227 Num a definition isn't complete.
1228]
1229[note about evaluation affecting StableNames
1230Simon Marlow <marlowsd@gmail.com>**20080527110549]
1231[TAG 2008-05-28
1232Ian Lynagh <igloo@earth.li>**20080528003830]
1233Patch bundle hash:
12348564de29020e93251e121d8c9ba0d294ccb18d74