Ticket #3324: prelude_explicit_methods.patch

File prelude_explicit_methods.patch, 50.9 KB (added by YitzGale, 8 years ago)

Additional explicit method implementations in the Foldable and Traversable ins tances for Prelude types

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