Ticket #3292: ignore.dpatch

File ignore.dpatch, 38.2 KB (added by guest, 5 years ago)

Patch adding ignore to base

Line 
1Thu Jun 11 21:29:53 EDT 2009  gwern0@gmail.com
2  * Control.Monad: add 'ignore' function
3  Turns m a -> m (). Lets one call functions for their side-effects without
4  having to get rid of their return values with '>> return ()'. Very useful
5  in many contexts (parsing, IO etc.).
6-----BEGIN PGP SIGNED MESSAGE-----
7Hash: SHA512
8
9
10New patches:
11
12[Control.Monad: add 'ignore' function
13gwern0@gmail.com**20090612012953
14 Ignore-this: 427b39cba203a7414a1bdf0cdb83a0bc
15 Turns m a -> m (). Lets one call functions for their side-effects without
16 having to get rid of their return values with '>> return ()'. Very useful
17 in many contexts (parsing, IO etc.).
18] hunk ./Control/Monad.hs 193
19 forever     :: (Monad m) => m a -> m b
20 forever a   = a >> forever a
21 
22+-- | Convenience function. This is particularly good for 'forkIO' and 'forM_',
23+-- as they demand return types of 'IO ()', but most interesting IO functions
24+-- don't return void. So one can wrap them with 'ignore' (essentially a call to 'unit').
25+ignore :: Functor f => f a -> f ()
26+ignore = fmap (const ())
27+
28 -- -----------------------------------------------------------------------------
29 -- Other monad functions
30 
31
32Context:
33
34[Remove unused foreign imports of __encodeFloat/Double
35Duncan Coutts <duncan@well-typed.com>**20090611160100]
36[nhc98 must build dirUtils.c as well.
37Malcolm.Wallace@cs.york.ac.uk**20090605091730
38 Fixes this bootstrapping error:
39   Undefined symbols:
40   "___hscore_readdir", referenced from:
41       _FR_System_46Posix_46Internals_46readdir_35 in libHSbase.a(Internals.o)
42]
43[Remove unnecessary parens
44Ian Lynagh <igloo@earth.li>**20090602183608]
45[Fix validate (on Windows)
46Simon Marlow <marlowsd@gmail.com>**20090529130214
47 Ignore-this: ea31ee9b26cd69b81bb24ecf040dc196
48]
49[Make two type defaults explicit
50simonpj@microsoft.com**20090529083549
51 Ignore-this: 398a10db1612dbef1723b449bff26782
52 
53 Now that -Werror rejects programs that use silent type-class defaulting,
54 we must commit in the source code.
55 
56 I've used Double in CPUTime, which is the same as was picked automatically
57 before, but I expect Float would be ok.
58 
59    realToInteger :: Real a => a -> Integer
60    realToInteger ct = round (realToFrac ct :: Double)
61 
62 In GHC.Float I used Float (rather that than the auto-picked Double)
63 because I'm pretty certain it has enough precision.
64 
65        -- f :: Integer, log :: Float -> Float,
66         --               ceiling :: Float -> Int
67         ceiling ((log (fromInteger (f+1) :: Float) +
68 
69]
70[Fix #3257: document that exitWith in a forkIO'd thread does not exit the process
71Simon Marlow <marlowsd@gmail.com>**20090528123738
72 Ignore-this: cc5aff45a149acd1627bd7ee31aea4e9
73]
74[Increase the version number to that in the 6.10 branch
75Ian Lynagh <igloo@earth.li>**20090524155610]
76[Fix warnings
77Ian Lynagh <igloo@earth.li>**20090523224508]
78[Document that the initial quantity for QSem and QSemN must be >= 0
79Ian Lynagh <igloo@earth.li>**20090523200238]
80[add _O_NOINHERIT when opening files on Windows (see #2650)
81Simon Marlow <marlowsd@gmail.com>**20090520130926
82 Ignore-this: 6dfbdfe13e739cc339e627294e077ba6
83]
84[remove msvcrt and kernel32 from extra-libraries
85Simon Marlow <marlowsd@gmail.com>**20090520111626
86 Ignore-this: cd2e24a5144c6ca0efe03ceaea8f577b
87]
88[Add wrappers around fcntl
89Ian Lynagh <igloo@earth.li>**20090520175358
90 We need to do this as it has a (, ...) type, which we aren't allowed to
91 directly call with the FFI.
92]
93[Add more bang patterns, needed to fix the 32bit build
94Ian Lynagh <igloo@earth.li>**20090424160701]
95[Use a bang pattern when we where/let-bind values with unlifted types
96Ian Lynagh <igloo@earth.li>**20090424125320]
97[FIX #3171: make sure we have only one table of signal handlers
98Simon Marlow <marlowsd@gmail.com>**20090423112837
99 Ignore-this: 3d8039b47efac2629e73a7d7e7d58983
100]
101[Fix QSem and QSemN: Initial amount must be non-negative
102Ian Lynagh <igloo@earth.li>**20090410164013]
103[Don't inline enumDeltaToInteger until its rules have had a chance to fire
104simonpj@microsoft.com**20090403091750
105 Ignore-this: ab602bac65610e720065b097d46a6f52
106]
107[Import GHC.Err so we see bottoming functions properly
108simonpj@microsoft.com**20090403091118
109 Ignore-this: 913e3a4584e73e67ddf9bc3b6f11d11
110 
111 Before this patch, GHC/Err.lhs-boot exported divZeroError and overflowError,
112 as well as plain 'error'.  The latter has a wired-in defn in GHC (MkId.lhs),
113 but the former two do not.  As a result GHC doesn't see that overflowError
114 is a bottoming function at a crucial moment when compiling GHC.Real, and
115 that means that divMod wasn't getting the CPR property.
116 
117 The fix is easy:
118   - GHC/Err.lhs-boot should export only 'error'
119 
120   - GHC.Real, GHC.Int, and GHC.Word should import GHC.Err
121     directly.  They can do this nowadays without creating
122     a module loop, thanks to the new exception story
123 
124]
125[Don't inline unpackCString
126simonpj@microsoft.com**20090403090844
127 Ignore-this: 78f9660ffff55ae8bc4c41866d1ad80c
128 
129 There's no point in inlining unpackCString, so this patch adds a
130 NOINLINE pragma.  (Otherwise, it's just on the threshold.)
131 
132]
133[be sure to install Nhc98BaseConfig.h
134Malcolm.Wallace@cs.york.ac.uk**20090401122028]
135[Avoid unnecessarily using Integer when decoding Floats
136Ian Lynagh <igloo@earth.li>**20090330225241]
137[Add another Data.List.intersect example from Christian Maeder
138Ian Lynagh <igloo@earth.li>**20090327232118]
139[Remove some redundant fromInteger's
140Ian Lynagh <igloo@earth.li>**20090324145325]
141[Add an import needed in the new build system
142Ian Lynagh <igloo@earth.li>**20090322162241]
143[ghcconfig.h is __GLASGOW_HASKELL__ only
144Malcolm.Wallace@cs.york.ac.uk**20090316134532]
145[Fix layout to comply with H'98.
146Malcolm.Wallace@cs.york.ac.uk**20090316125651
147 Also, configure correctly for nhc98, to avoid win32 code.
148]
149[FIX #2189: re-enabled cooked mode for Console-connected Handles on Windows
150Simon Marlow <marlowsd@gmail.com>*-20090305113323
151 Patch from Sigbjorn Finne <sof@galois.com>
152]
153[avoid a space leak building up in the "prodding" IORef (part of #2992)
154Simon Marlow <marlowsd@gmail.com>**20090311093938]
155[Partial fix for #2917
156Simon Marlow <marlowsd@gmail.com>**20090305154153
157 Ignore-this: 3a06cd3ea09f1d6454d52031802a93fd
158 
159  - add newAlignedPinnedByteArray# for allocating pinned BAs with
160    arbitrary alignment
161 
162  - the old newPinnedByteArray# now aligns to 16 bytes
163 
164 Foreign.alloca will use newAlignedPinnedByteArray#, and so might end
165 up wasting less space than before (we used to align to 8 by default).
166 Foreign.allocaBytes and Foreign.mallocForeignPtrBytes will get 16-byte
167 aligned memory, which is enough to avoid problems with SSE
168 instructions on x86, for example.
169 
170 There was a bug in the old newPinnedByteArray#: it aligned to 8 bytes,
171 but would have failed if the header was not a multiple of 8
172 (fortunately it always was, even with profiling).  Also we
173 occasionally wasted some space unnecessarily due to alignment in
174 allocatePinned().
175 
176 I haven't done anything about Foreign.malloc/mallocBytes, which will
177 give you the same alignment guarantees as malloc() (8 bytes on
178 Linux/x86 here).
179]
180[Add config.guess, config.sub and install-sh
181Ian Lynagh <igloo@earth.li>**20090307153831]
182[add final newline; fix build (on Windows?)
183Simon Marlow <marlowsd@gmail.com>**20090305120426]
184[FIX #2189: re-enabled cooked mode for Console-connected Handles on Windows
185Simon Marlow <marlowsd@gmail.com>**20090305113323
186 Patch from Sigbjorn Finne <sof@galois.com>
187]
188[Rules to make genericLength strict for Int/Integer lengths, see #2962
189naur@post11.tele.dk**20090207181427]
190[#2759: Amend previous patch
191Jose Pedro Magalhaes <jpm@cs.uu.nl>**20090212132327]
192[ifdef out the definition of setCloseOnExec on Windows; fixes the build
193Ian Lynagh <igloo@earth.li>**20090220173041]
194[Fix warnings: put imports inside ifdefs
195Ian Lynagh <igloo@earth.li>**20090220173941]
196[ifdef out the syncIOManager export on Windows; fixes the build
197Ian Lynagh <igloo@earth.li>**20090220173414]
198[Set the IO manager pipe descriptors to FD_CLOEXEC
199Simon Marlow <marlowsd@gmail.com>**20090219114217
200 Ignore-this: ac670a45f8a4d06dd7831a2674d6c119
201 This pipe is an internal implementation detail, we don't really want
202 it to be exposed.
203]
204[Rewrite of signal-handling (base patch; see also ghc and unix patches)
205Simon Marlow <marlowsd@gmail.com>**20090219102203
206 Ignore-this: 2122e05eaaab184b9ef0f269ce4c9282
207 
208 The API is the same (for now).  The new implementation has the
209 capability to define signal handlers that have access to the siginfo
210 of the signal (#592), but this functionality is not exposed in this
211 patch.
212 
213 #2451 is the ticket for the new API.
214 
215 The main purpose of bringing this in now is to fix race conditions in
216 the old signal handling code (#2858).  Later we can enable the new
217 API in the HEAD.
218 
219 Implementation differences:
220 
221  - More of the signal-handling is moved into Haskell.  We store the
222    table of signal handlers in an MVar, rather than having a table of
223    StablePtrs in the RTS.
224 
225  - In the threaded RTS, the siginfo of the signal is passed down the
226    pipe to the IO manager thread, which manages the business of
227    starting up new signal handler threads.  In the non-threaded RTS,
228    the siginfo of caught signals is stored in the RTS, and the
229    scheduler starts new signal handler threads.
230]
231[Fix #2971: we had lost the non-blocking flag on Handles created by openFile
232Simon Marlow <marlowsd@gmail.com>**20090206165912
233 Ignore-this: 546f1a799b6e80f7b25c73ef642d8f9d
234 This code is a mess, fortunately the new IO library cleans it up.
235]
236[add some rules of thumb for catching exceptions, restructure the docs a bit
237Simon Marlow <marlowsd@gmail.com>**20090205150642
238 Ignore-this: 8294e58f247b2cc3f193991434d336de
239]
240[implement System.IO.Error more fully for nhc98
241Malcolm.Wallace@cs.york.ac.uk**20090206173314]
242[Make System.Posix.Internals buildable by nhc98.
243Malcolm.Wallace@cs.york.ac.uk**20090206111152]
244[Fix #2903: ensure CWStringLen contains the length of the array rather than the String
245Ross Paterson <ross@soi.city.ac.uk>**20090203011026]
246[OldException catches unknown exceptions as DynException
247Ian Lynagh <igloo@earth.li>**20090202151856
248 It's important that we put all exceptions into the old Exception
249 type somehow, or throwing a new exception wouldn't cause the
250 cleanup code for bracket, finally etc to happen.
251]
252[Update the Exception docs
253Ian Lynagh <igloo@earth.li>**20090131204845]
254[Require Cabal version >= 1.6
255Ian Lynagh <igloo@earth.li>**20090122011251]
256[Add "bug-reports" and "source-repository" info to the Cabal file
257Ian Lynagh <igloo@earth.li>**20090121182010]
258[Proposal #2875: remove StringRep and StringConstr
259Jose Pedro Magalhaes <jpm@cs.uu.nl>**20090116142617]
260[Fix #2759: add mkRealConstr and mkIntegralConstr, deprecate mkFloatConstr and mkIntConstr
261Jose Pedro Magalhaes <jpm@cs.uu.nl>**20090116140655]
262[Correct SYB's representation of Char
263Jose Pedro Magalhaes <jpm@cs.uu.nl>**20081211144716]
264[avoid `mappend` in monoid laws, because it doesn't work with haddock
265Ross Paterson <ross@soi.city.ac.uk>**20090118011508]
266[Make Data.Typeable imports and exports more explicit
267Ian Lynagh <igloo@earth.li>**20090114234512]
268[add Monoid laws
269Ross Paterson <ross@soi.city.ac.uk>**20090116151624]
270[Unbreak an import cycle caused by moving 'catch' definitions around.
271Malcolm.Wallace@cs.york.ac.uk**20090116110132
272 The new cycle was introduced for nhc98 only.
273]
274[make the Monoid docs more self-contained
275Ross Paterson <ross@soi.city.ac.uk>**20090115222441]
276[Move some catch definitions around to avoid an import loop
277Ian Lynagh <igloo@earth.li>**20090114211033
278 As suggested by simonpj in trac #2822.
279]
280[Add NoImplicitPrelude to the extensions used when building with GHC
281Ian Lynagh <igloo@earth.li>**20090114202810]
282[#2699: exit silently for EPIPE on stdout
283Simon Marlow <marlowsd@gmail.com>**20090114134612
284 Ignore-this: 4236560e8e9c1135129e9526355f11b4
285]
286[Fix build when we have HTYPE_TCFLAG_T
287Ian Lynagh <igloo@earth.li>**20090105102020]
288[Fix the build on Windows
289Ian Lynagh <igloo@earth.li>**20090105014625]
290[Add errno to the IOError type
291Ian Lynagh <igloo@earth.li>**20090104173018]
292[Fix typo (reqwests -> requests); trac #2908, spotted by bancroft
293Ian Lynagh <igloo@earth.li>**20090104154405]
294[More compact error messages for record selectors
295simonpj@microsoft.com**20090102145325
296 
297 Make recSelError generate the standard part of the record selector
298 error message (i.e. "No match in record selector") rather than have
299 that string duplicated for every record selector.
300 
301]
302[extra dependencies for the new build system
303Simon Marlow <marlowsd@gmail.com>**20081217104655]
304[warning fix: don't use -XPatternSignatures in GHC >= 6.10
305Simon Marlow <marlowsd@gmail.com>**20081217104637]
306[Rollback INLINE patches
307Simon Marlow <marlowsd@gmail.com>**20081216104143
308 
309 rolling back:
310 
311 Fri Dec  5 17:00:15 GMT 2008  simonpj@microsoft.com
312   * Update INLINE pragmas for new INLINE story
313   
314   - (.) and foldr should inline when applied to only two arguments
315   - Make unpackCString# NOINLINE; it inlines too much (with little gain)
316   
317 
318     M ./GHC/Base.lhs -10 +31
319]
320[FIX #1364: added support for C finalizers that run as soon as the value is no longer reachable.
321Ivan Tomac <tomac@pacific.net.au>**20081210150510
322 
323 Patch amended by Simon Marlow:
324   - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv#
325]
326[Fix #2760: deprecate mkNorepType, add mkNoRepType
327Jose Pedro Magalhaes <jpm@cs.uu.nl>**20081121141905]
328[Update INLINE pragmas for new INLINE story
329simonpj@microsoft.com**20081205170015
330 
331 - (.) and foldr should inline when applied to only two arguments
332 - Make unpackCString# NOINLINE; it inlines too much (with little gain)
333 
334]
335[Fix #2750: change Prelude.(,) to Prelude.(,,)
336Jose Pedro Magalhaes <jpm@cs.uu.nl>**20081201113411]
337[Fix typo (or out of date reference) in throwTo documentation.
338shelarcy <shelarcy@gmail.com>**20081129024639]
339[Add more description of what "round" does, from the H98 report
340Ian Lynagh <igloo@earth.li>**20081119143131]
341[re-instate the gcd/Integer and lcm/Integer RULES
342Simon Marlow <marlowsd@gmail.com>**20081120101826
343 Fixes a performance regression between 6.8.3 and 6.10.1
344]
345[Change an "undefined" into a more informative error; trac #2782
346Ian Lynagh <igloo@earth.li>**20081116160228]
347[updating Haddock documentation
348jpm@cs.uu.nl**20081111095023
349 
350 Fixed the broken link from Data.Generics to Data.Data.
351]
352[add GHC.Conc.runSparks (required by GHC patch "Run sparks in batches")
353Simon Marlow <marlowsd@gmail.com>**20081106095419]
354[FIX #2722: update RULES for the Category/Arrow split
355Ross Paterson <ross@soi.city.ac.uk>**20081104144515
356 
357 The rule
358 
359        arr id = id
360 
361 interacts unpleasantly with the advice to define
362 
363        id = arr id
364 
365 in instances of Category that are also instances of Arrow (#2722).
366 
367 Also changed a couple of >>>'s to .'s in later rules.
368]
369[Add AnnotationWrapper type so GHC can capture annotation dictionaries during compilation
370Max Bolingbroke <batterseapower@hotmail.com>**20081016122608]
371[docs about how exceptions are handled by forkIO'd threads (#2651)
372Simon Marlow <marlowsd@gmail.com>**20081016100410]
373[Import n_capabilities via import symbol when linking dynamically
374Clemens Fruhwirth <clemens@endorphin.org>**20081013161220]
375[add link to the new syb wiki
376jpm@cs.uu.nl**20081013111605]
377[changing haddock links
378jpm@cs.uu.nl**20081010095434]
379[add readTVarIO :: TVar a -> IO a
380Simon Marlow <marlowsd@gmail.com>**20081010113835]
381[removed (->) instance from Data.Data
382jpm@cs.uu.nl**20081006075254]
383[non-GHC: delete unnecessary imports
384Ross Paterson <ross@soi.city.ac.uk>**20081007134809]
385[added new module Data.Data
386'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002140535
387 
388 The new Data.Data module contains all of Data.Generics.Basics
389 and most of Data.Generics.Instances. The missing instances were
390 deemed dubious and moved to the syb package.
391]
392[add new Data.Data module
393'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082735]
394[restore Complex's derived Data instance
395'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082655]
396[update Data.Generics import
397'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082604]
398[Don't use ^(2::Int) in Data.Complex.magnitude; partially fixes trac #2450
399Ian Lynagh <igloo@earth.li>**20081004142651
400 We still might want to make a RULE for this, so the bug is not fully fixed.
401]
402[Restore the Haskell 98 behaviour of Show Ratio (#1920)
403Simon Marlow <simonmarhaskell@gmail.com>**20080923134949]
404[Pad version number to 4.0.0.0
405Ian Lynagh <igloo@earth.li>**20080920155801]
406[TAG 6.10 branch has been forked
407Ian Lynagh <igloo@earth.li>**20080919123437]
408[In nhc98, Word is a type synonym, so class instance is not possible.
409Malcolm.Wallace@cs.york.ac.uk**20080917075326]
410[Fix bugs in Text.Printf (#1548)
411Simon Marlow <marlowsd@gmail.com>**20080916133505]
412[We should be including Rts.h here, not Stg.h
413Simon Marlow <marlowsd@gmail.com>**20080912134901
414 Stg.h is for .hc files only, and it sets up various global register
415 variables.
416]
417[Generic functions that take integral arguments should work the same way as their prelude counterparts
418**20080822022755
419 
420 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.
421 
422]
423[Don't define __hscore_s_issock on Windows
424Ian Lynagh <igloo@earth.li>**20080904202845]
425[Unbreak the GHC build with older versions of gcc
426Ian Lynagh <igloo@earth.li>**20080904185122
427 Patch from kili@outback.escape.de, who says:
428   Stg.h must be included before HsBase.h, because the latter contains
429   function definitions causing older versions of gcc (3.3.5 in my
430   case) to bail out with "error: global register variable follows a
431   function definition" on Regs.h, which is included by Stg.h.
432]
433[Don't make S_ISSOCK use conditional
434Ian Lynagh <igloo@earth.li>**20080904164234
435 We were conditionally defining the C wrapper, but unconditionally using
436 it. So if it didn't exist then things would have broken anyway.
437]
438[Add missing files
439Ian Lynagh <igloo@earth.li>**20080904100951]
440[Remerge concurrent,unique,timeout,st,getopt into base
441Ian Lynagh <igloo@earth.li>**20080903201908]
442[remove 'pure' method from Arrow class (#2517)
443Ross Paterson <ross@soi.city.ac.uk>**20080903144436]
444[make Typeable instances for larger tuples available to non-GHC
445Ross Paterson <ross@soi.city.ac.uk>**20080903113543]
446[Don't look for actual OldException.Exception exceptions
447Ian Lynagh <igloo@earth.li>**20080902224730
448 We don't actually throw them (we throw the new Exception equivalents
449 instead), and looking for them was causing an infinite loop
450]
451[add include/CTypes.h to extra-source-files
452Ross Paterson <ross@soi.city.ac.uk>**20080902153029]
453[avoid relying on the implementation of SomeException
454Ross Paterson <ross@soi.city.ac.uk>**20080902080113
455 
456 This is because Hugs uses a different implementation.
457 No semantic change.
458]
459[non-GHC: leave out Belch functions
460Ross Paterson <ross@soi.city.ac.uk>**20080831180227]
461[non-GHC: add Typeable instance for ForeignPtr
462Ross Paterson <ross@soi.city.ac.uk>**20080831180048]
463[docs: mention that killThread on a completed thread is a no-op
464Simon Marlow <marlowsd@gmail.com>**20080902093126]
465[#2528: reverse the order of args to (==) in nubBy to match nub
466Simon Marlow <marlowsd@gmail.com>**20080902092950
467 This only makes a difference when the (==) definition is not
468 reflexive, but strictly speaking it does violate the report definition
469 of nubBy, so we should fix it.
470]
471[System.Timeout is no longer part of base
472Malcolm.Wallace@cs.york.ac.uk**20080901145738]
473[getopt is no longer part of base
474Malcolm.Wallace@cs.york.ac.uk**20080827145336]
475[Split syb off into its own package
476Ian Lynagh <igloo@earth.li>**20080825214144
477 I've also moved the Data (Complex a) instance into it, and made it
478 portable rather than GHC-only in the process.
479]
480[add extra-source-files field
481Ross Paterson <ross@soi.city.ac.uk>**20080825231317]
482[Fix warnings in PrelIOUtils.c
483Ian Lynagh <igloo@earth.li>**20080825141841]
484[Windows-only fixes for moving concurrent out of base
485Ian Lynagh <igloo@earth.li>**20080824164146]
486[Split off the concurrent hierarchy (concurrent, unique, timeout)
487Ian Lynagh <igloo@earth.li>**20080824123956]
488[Split getopt off into its own package
489Ian Lynagh <igloo@earth.li>**20080824020213]
490[Remove ST stuff that is now in the new st package
491Ian Lynagh <igloo@earth.li>**20080823223014]
492[Fix Windows-only warnings
493Ian Lynagh <igloo@earth.li>**20080823002249]
494[Fix Windows-only warnings in GHC.Conc
495Ian Lynagh <igloo@earth.li>**20080822234837]
496[Suppress some warnings that are hard to fix because of ifdefs
497Ian Lynagh <igloo@earth.li>**20080822233951]
498[Provide blockedOnDeadMVar, blockedIndefinitely for the RTS
499Ian Lynagh <igloo@earth.li>**20080821110723]
500[Fix more warnings
501Ian Lynagh <igloo@earth.li>**20080820233958]
502[Suppress a couple of warnings in GHC.PArr
503Ian Lynagh <igloo@earth.li>**20080820232018
504 The fix isn't immediately obvious to me
505]
506[Fix more warnings
507Ian Lynagh <igloo@earth.li>**20080820231937]
508[Fix warnings in Data.Generics.*
509Ian Lynagh <igloo@earth.li>**20080820230437]
510[Fix some more warnings
511Ian Lynagh <igloo@earth.li>**20080820223252]
512[Ignore some orphan warnings
513Ian Lynagh <igloo@earth.li>**20080820211901]
514[remove some functions that aren't used in base
515Simon Marlow <marlowsd@gmail.com>**20080821142339]
516[remove __hscore_renameFile, it is no longer uesd
517Simon Marlow <marlowsd@gmail.com>**20080818155950
518 System.Directory implements renameFile using unix/Win32 now.
519]
520[Rewrite the documentation for forkOS again
521Simon Marlow <marlowsd@gmail.com>**20080818132856
522 Try to make it clearer that forkOS is only necessary when calling
523 foreing libraries that use thread-local state, and it has nothing to
524 do with scheduling behaviour between Haskell threads.  I also added
525 something about the performance impact of forkOS, and mentioned that
526 the main thread is a bound thread.
527]
528[nhc only: expose Foldable and Traversable instances of Array
529Ross Paterson <ross@soi.city.ac.uk>**20080817002719
530 
531 These were turned off as a side-effect of a previous nhc-only fix for
532 #2176 that is no longer needed.  They should be fine for nhc now.
533]
534[Fix hReady (trac #1063)
535Ian Lynagh <igloo@earth.li>**20080816182715
536 We now throw an EOF exception when appropriate
537]
538[Fix oversight in Control.OldException
539Bertram Felgenhauer <int-e@gmx.de>**20080816132631
540 The NonTermination constructor slipped through in the Exception instance.
541]
542[Eliminate orphan rules and instances in the array package
543Ian Lynagh <igloo@earth.li>**20080816122253]
544[Control.OldException: Map exceptions to old exceptions and back properly.
545Ian Lynagh <igloo@earth.li>**20080814210219
546   * Control.OldException: Map exceptions to old exceptions and back properly.
547     
548 It's really necessary to map them back as well, or the RTS and base library
549 will not recognize exceptions that got caught and rethrown. (See #2508)
550 
551 Patch from Bertram Felgenhauer <int-e@gmx.de>
552]
553[add Traversable generalizations of mapAccumL and mapAccumR (#2461)
554Ross Paterson <ross@soi.city.ac.uk>**20080814162617]
555[simplify definition of Prelude.catch
556Ross Paterson <ross@soi.city.ac.uk>**20080814143650]
557[remove returns from void functions
558Ross Paterson <ross@soi.city.ac.uk>**20080814110841]
559[No reason for Handler and catches to exclude nhc98.
560Malcolm.Wallace@cs.york.ac.uk**20080813125850]
561[Must import ExitCode for its instance to be re-exported.
562Malcolm.Wallace@cs.york.ac.uk**20080813125710
563 The Cabal library depends on "instance Exception ExitCode", and expects
564 to import it from Control.Exception, not Control.Exception.Base.
565]
566[use New.catch instead of catchException in OldException
567Ross Paterson <ross@soi.city.ac.uk>**20080813071307]
568[use the Haskell 98 module Control.Exception.Base in the Concurrent modules
569Ross Paterson <ross@soi.city.ac.uk>**20080813000219]
570[export Control.Exception.Base
571Ross Paterson <ross@soi.city.ac.uk>**20080812233640]
572[use dummy implementation of timeout for all non-GHCs
573Ross Paterson <ross@soi.city.ac.uk>**20080812151602]
574[Hugs only: fix imports
575Ross Paterson <ross@soi.city.ac.uk>**20080812145654]
576[non-GHC: hide Prelude.catch
577Ross Paterson <ross@soi.city.ac.uk>**20080812145622]
578[add Control.Exception.Base to nhc98 build
579Malcolm.Wallace@cs.york.ac.uk**20080812174300]
580[bump to version 4.0
581Simon Marlow <marlowsd@gmail.com>**20080805153354]
582[Hugs only: don't import exception types -- their instances are now in Control.Exception.Base
583Ross Paterson <ross@soi.city.ac.uk>**20080812140433]
584[split most of Control.Exception into new Control.Exception.Base
585Ross Paterson <ross@soi.city.ac.uk>**20080812124912
586 
587 Move everything but catches/Handler into a new internal module.
588 This was needed to get the new exceptions working with Hugs, because Hugs
589 has the constraint that all Haskell 98 library modules, and everything
590 they include, must be Haskell 98.  This also involves a different
591 representation of SomeException for Hugs, so that type is exported
592 opaquely for Hugs.  Then Control.Exception.Base is Haskell 98 as far as
593 Hugs is concerned, but Control.Exception needs the extensions turned on.
594 
595 Control.Exception re-exports everything from Control.Exception.Base
596 except the functions used by the GHC runtime.
597]
598[remove kludges, now that Control.Exception is imported
599Ross Paterson <ross@soi.city.ac.uk>**20080811180328]
600[threadDelay and friends are GHC-only
601Ross Paterson <ross@soi.city.ac.uk>**20080811175039]
602[fix imports for non-GHC
603Malcolm.Wallace@cs.york.ac.uk**20080808092017]
604[Eq and Ord have moved into GHC.Classes
605Ian Lynagh <igloo@earth.li>**20080807095352]
606[Use the proper CInt type in GHC.Unicode
607Ian Lynagh <igloo@earth.li>**20080806232948]
608[Import wibbles
609Ian Lynagh <igloo@earth.li>**20080806232055]
610[Remove unnecessary Data/Dynamic.hs-boot
611Ian Lynagh <igloo@earth.li>**20080806230623]
612[Remove more redundant GHC.Float imports
613Ian Lynagh <igloo@earth.li>**20080806225411]
614[Remove an unnecessary import
615Ian Lynagh <igloo@earth.li>**20080806224742]
616[Move Int, Float and Double into ghc-prim:GHC.Types
617Ian Lynagh <igloo@earth.li>**20080806191554]
618[Put some explicit import lists in Data.Typeable
619Ian Lynagh <igloo@earth.li>**20080806190353]
620[Fix a couple of imports
621Ian Lynagh <igloo@earth.li>**20080806165549]
622[Remove unused conditional import
623Ian Lynagh <igloo@earth.li>**20080806124930]
624[Swap imports around to get GHC.ForeignPtr out of the base knot
625Ian Lynagh <igloo@earth.li>**20080806121313]
626[Move some bits around to stop Data.Either being in the base import knot
627Ian Lynagh <igloo@earth.li>**20080806120504]
628[Tweak an import
629Ian Lynagh <igloo@earth.li>**20080806000440]
630[Remove the DynIOError constructor of IOErrorType
631Ian Lynagh <igloo@earth.li>**20080805234720
632 As far as I can see it is never used or exported
633]
634[Move some internals around to simplify the import graph a bit
635Ian Lynagh <igloo@earth.li>**20080805221341]
636[Move the Char datatype into ghc-prim
637Ian Lynagh <igloo@earth.li>**20080805204009]
638[Remove an unnecessary import
639Ian Lynagh <igloo@earth.li>**20080805182336]
640[The [] definition has moved to ghc-prim
641Ian Lynagh <igloo@earth.li>**20080805182332]
642[Fix warnings
643Ian Lynagh <igloo@earth.li>**20080805150250]
644[Add a missing case to Show AsyncException
645Ian Lynagh <igloo@earth.li>**20080805142811]
646[Remove GHC.Dotnet
647Ian Lynagh <igloo@earth.li>**20080804215840]
648[Hide standalone deriving clauses from haddock
649Ian Lynagh <igloo@earth.li>**20080804211617]
650[Control.Exception doesn't need to export assertError
651Ian Lynagh <igloo@earth.li>**20080804161838]
652[Generalise the type of mapException; pointed out by Isaac Dupree
653Ian Lynagh <igloo@earth.li>**20080804160941]
654[Remove some unnecessary Data.Tuple imports
655Ian Lynagh <igloo@earth.li>**20080804155956]
656[The tuple datatype definitions have moved to ghc-prim
657Ian Lynagh <igloo@earth.li>**20080804155420]
658[make ExitCode an instance of Exception for nhc98
659Malcolm.Wallace@cs.york.ac.uk**20080805160330]
660[poke and peek come from Foreign.Storable
661Malcolm.Wallace@cs.york.ac.uk**20080804160616]
662[zipWithM_ comes from Control.Monad
663Malcolm.Wallace@cs.york.ac.uk**20080804160319]
664[Fix nhc98 code variations to use the extensible exception API.
665Malcolm.Wallace@cs.york.ac.uk**20080804155842
666 There is still only one real exception type in nhc98, so it is not truly
667 extensible.  But this is enough to get the base package building again.
668]
669[nhc98 needs the Prelude for this module
670Malcolm.Wallace@cs.york.ac.uk**20080804133853]
671[Change some imports and derive Show (Either a b)
672Ian Lynagh <igloo@earth.li>**20080804004147
673 rather than writing it by hand in GHC.Show
674]
675[Windows fixes
676Ian Lynagh <igloo@earth.li>**20080803180345]
677[Remove the duplicate definition of throwTo in Control.Exception
678Ian Lynagh <igloo@earth.li>**20080803141703
679 It now imports GHC.Conc, so it is no longer necessary
680]
681[Remove the only import of GHC.Exts
682Ian Lynagh <igloo@earth.li>**20080803141944]
683[Move assertError into GHC.IOBase
684Ian Lynagh <igloo@earth.li>**20080803141040]
685[Use onException rather than catchAny
686Ian Lynagh <igloo@earth.li>**20080803114104]
687[Generalise the type of onException
688Ian Lynagh <igloo@earth.li>**20080803003001
689 The type of the thing to do on an exception is now
690     IO b
691 rather than
692     IO ()
693 which better matches functions like bracket.
694]
695[Remove the dangerous Exception functions
696Ian Lynagh <igloo@earth.li>**20080802231358
697 Removed: catchAny, handleAny, ignoreExceptions
698 These make it easy to eat /any/ exception, which is rarely what you want.
699 Normally you either want to:
700 * only catch exceptions in a certain part of the hierarchy, e.g.
701   "file not found", in which case you should only catch exceptions
702   of the appropriate type,
703 or
704 * you want to do some cleanup when an exception happens, and then rethrow
705   the exception, in which case you should use onException, or one of the
706   bracketing functions.
707]
708[Remove an unused import
709Ian Lynagh <igloo@earth.li>**20080801230343]
710[Remove unused imports
711Ian Lynagh <igloo@earth.li>**20080801230059]
712[Remove unused imports in Control.Exception
713Ian Lynagh <igloo@earth.li>**20080801225847]
714[Get rid of some duplicate imports
715Ian Lynagh <igloo@earth.li>**20080801214933]
716[Remove the now-unused GHC/Conc.lhs-boot
717Ian Lynagh <igloo@earth.li>**20080801214707]
718[Make some more imports non-recursive
719Ian Lynagh <igloo@earth.li>**20080801214546]
720[Rejig some code so Control.Exception and GHC.Conc don't need recursive imports
721Ian Lynagh <igloo@earth.li>**20080801214208]
722[Remove the now-unused GHC/TopHandler.lhs-boot
723Ian Lynagh <igloo@earth.li>**20080801212105]
724[Reshuffle GHC.Conc/GHC.TopHandler a bit to remove a recursive import
725Ian Lynagh <igloo@earth.li>**20080801211801]
726[Don't import Control.Concurrent.MVar in GHC.TopHandler
727Ian Lynagh <igloo@earth.li>**20080801200123]
728[Export assertError from Control.Exception to make GHC happy
729Ian Lynagh <igloo@earth.li>**20080801111716
730 It's a wired-in name in GHC. We should possibly move it to another module.
731]
732[TopHandler now uses the new extensible exceptions
733Ian Lynagh <igloo@earth.li>**20080731153553]
734[Comment wibble
735Ian Lynagh <igloo@earth.li>**20080730202127]
736[Make numericEnumFrom more efficient
737Ian Lynagh <igloo@earth.li>**20080730202049]
738[Put in some parens to clarify how things parse
739Ian Lynagh <igloo@earth.li>**20080730201934]
740[applied patches to make enumFrom and friends strict in arguments as per the Report; closes ticket #1997
741Bart Massey <bart@cs.pdx.edu>**20080726080444]
742[Don't use "deriving Typeable" (for portability reasons)
743Ian Lynagh <igloo@earth.li>**20080730194434]
744[Add onException
745Ian Lynagh <igloo@earth.li>**20080730172014]
746[Fix whitespace
747Ian Lynagh <igloo@earth.li>**20080730171951
748 The space after "\begin{code}" was confusing haddock
749]
750[Re-add blocked; it got lost in the extensible exceptions patches
751Ian Lynagh <igloo@earth.li>**20080730145614]
752[Start to actually use extensible exceptions
753Ian Lynagh <igloo@earth.li>**20080730145115]
754[Rejig the extensible exceptions so there is less circular importing
755Ian Lynagh <igloo@earth.li>**20080730122539]
756[Define nonTermination for the RTS to use
757Ian Lynagh <igloo@earth.li>**20080621144420
758 We'll probably need to do the same for some other exceptions too
759]
760[Use extensible exceptions at the lowest level
761Ian Lynagh <igloo@earth.li>**20080621121501
762 Everything above is largely unchanged; just the type of catch and throw.
763]
764[add comment
765Simon Marlow <marlowsd@gmail.com>**20080730114559]
766[add some big warnings to the docs for unsafeIOToSTM (#2401)
767Simon Marlow <marlowsd@gmail.com>**20080730114554]
768[FIX #2376: inline shiftR
769Simon Marlow <marlowsd@gmail.com>**20080730103539
770 Duplicating the default definition for shiftR doesn't seem quite right
771 to me, but it gets the right results when compiling the example
772 program, and I couldn't find a better way to do it.
773]
774[Add instance Show Control.Exception.Exception for nhc98.
775Malcolm.Wallace@cs.york.ac.uk**20080728164537]
776[Extend nhc98's Exception type to resemble ghc's more closely
777Malcolm.Wallace@cs.york.ac.uk**20080728163445]
778[fix dummy async implementations for non-GHC
779Ross Paterson <ross@soi.city.ac.uk>**20080715125521]
780[Fix haddocking with older haddocks
781Ian Lynagh <igloo@earth.li>**20080710190855]
782[Add threadStatus :: ThreadId -> IO ThreadStatus
783Simon Marlow <marlowsd@gmail.com>**20080710151711
784 
785 -- | The current status of a thread
786 data ThreadStatus
787   = ThreadRunning
788         -- ^the thread is currently runnable or running
789   | ThreadFinished
790         -- ^the thread has finished
791   | ThreadBlocked  BlockReason
792         -- ^the thread is blocked on some resource
793   | ThreadDied
794         -- ^the thread received an uncaught exception
795   deriving (Eq,Ord,Show)
796 
797 data BlockReason
798   = BlockedOnMVar
799         -- ^blocked on on 'MVar'
800   | BlockedOnBlackHole
801         -- ^blocked on a computation in progress by another thread
802   | BlockedOnException
803         -- ^blocked in 'throwTo'
804   | BlockedOnSTM
805         -- ^blocked in 'retry' in an STM transaction
806   | BlockedOnForeignCall
807         -- ^currently in a foreign call
808   | BlockedOnOther
809         -- ^blocked on some other resource.  Without @-threaded@,
810         -- I/O and 'threadDelay' show up as 'BlockedOnOther', with @-threaded@
811         -- they show up as 'BlockedOnMVar'.
812   deriving (Eq,Ord,Show)
813 
814 This is useful for concurrency debugging.  I've left threadStatus in
815 GHC.Conc for now, since the ThreadStatus type is somewhat GHC-specific.
816]
817[forkOS: start the new thread in blocked mode iff the parent was (#1048)
818Simon Marlow <marlowsd@gmail.com>**20080709135558
819 This matches the behaviour of forkIO
820]
821[Add Control.Exception.blocked :: IO Bool
822Simon Marlow <marlowsd@gmail.com>**20080709133139
823 Tells you whether async exceptions are currently blocked or not.
824]
825[FIX BUILD (on Windows)
826Simon Marlow <marlowsd@gmail.com>**20080709123110]
827[check CONST_SIGINT
828Simon Marlow <marlowsd@gmail.com>**20080709122527]
829[Make threadWaitRead/threadWaitWrite partially useable on Windows
830Simon Marlow <marlowsd@gmail.com>**20080709111008
831 
832 They work with -threaded by calling fdReady() in a separate thread.
833 
834 "threadWaitRead 0" also works without -threaded (because we happen to
835 know it's virtually equivalent to "hWaitForInput stdin (-1)").
836]
837[FIX #1198: hWaitForInput on Windows
838Simon Marlow <marlowsd@gmail.com>**20080708134254
839 Now we do the appropriate magic in fdReady() to detect when there is
840 real input available, as opposed to uninteresting console events.
841]
842[FIX part of #2301
843Simon Marlow <marlowsd@gmail.com>**20080709094437
844   
845 Control-C now causes the new exception (AsyncException UserInterrupt)
846 to be raised in the main thread.  The signal handler is set up by
847 GHC.TopHandler.runMainIO, and can be overriden in the usual way by
848 installing a new signal handler.  The advantage is that now all
849 programs will get a chance to clean up on ^C.
850 
851 When UserInterrupt is caught by the topmost handler, we now exit the
852 program via kill(getpid(),SIGINT), which tells the parent process that
853 we exited as a result of ^C, so the parent can take appropriate action
854 (it might want to exit too, for example).
855 
856 One subtlety is that we have to use a weak reference to the ThreadId
857 for the main thread, so that the signal handler doesn't prevent the
858 main thread from being subject to deadlock detection.
859]
860[() has moved to ghc-prim:GHC.Unit, and the Eq and Ord instances to Data.Tuple
861Ian Lynagh <igloo@earth.li>**20080624144932]
862[Add GHC.Exts.maxTupleSize :: Int, the size of the largest tuple supported
863Ian Lynagh <igloo@earth.li>**20080622141559]
864[Remove code for older GHC versions
865Ian Lynagh <igloo@earth.li>**20080620194521]
866[Make the macros in Typeable.h add type signatures
867Ian Lynagh <igloo@earth.li>**20080619235808]
868[Fix #2363: getChar cannot be interrupted with -threaded
869Simon Marlow <marlowsd@gmail.com>**20080619141911
870 Now in -threaded mode, instead of just making a blocking call to
871 read(), we call select() first to make sure the read() won't block,
872 and if it would block, then we use threadWaitRead.
873 
874 The idea is that the current thread must be interruptible while it
875 blocks.  This is a little slower than before, but the overhead only
876 applies to blocking Handles (stdin/stdout/stderr, and those created by
877 System.Process).
878]
879[Remove -fglasgow-exts from pragmas and comments
880Ian Lynagh <igloo@earth.li>**20080616230727]
881[Avoid using deprecated flags
882Ian Lynagh <igloo@earth.li>**20080616145207]
883[delete __hscore_{mkstemp,getrlimit,setrlimit} (moved to unix)
884Ross Paterson <ross@soi.city.ac.uk>**20080615224413]
885[Update WCsubst.c for Unicode 5.1.0, and add a README.Unicode
886Ian Lynagh <igloo@earth.li>**20080613201754
887 README.Unicode describes how to do updates in the future.
888]
889[Fix ubconfc
890Ian Lynagh <igloo@earth.li>**20080613201456
891 The current code doesn't seem to be what was used to generate WCsubst.c,
892 so I'm not sure if it never worked, or if my tools work slightly
893 differently to those of the previous user.
894]
895['permutations' is now more lazy and also faster
896Twan van Laarhoven <twanvl@gmail.com>**20080102231712]
897['subsequences' is now more lazy and also faster
898Twan van Laarhoven <twanvl@gmail.com>**20080102231629]
899[Add 'subsequences' and 'permutations' to Data.List
900Twan van Laarhoven <twanvl@gmail.com>**20071218154950]
901[Tweak the definition of (^) again
902Ian Lynagh <igloo@earth.li>**20080601120759
903 This fixes trac #2306 (do the minimum number of (*)s), and also means
904 that we don't use the value of (1 :: a) which causes problems if the
905 Num a definition isn't complete.
906]
907[note about evaluation affecting StableNames
908Simon Marlow <marlowsd@gmail.com>**20080527110549]
909[TAG 2008-05-28
910Ian Lynagh <igloo@earth.li>**20080528003830]
911Patch bundle hash:
912b15da3d1ad5ef1d55ae9719cd334a1ae4999770a
913-----BEGIN PGP SIGNATURE-----
914Version: GnuPG v1.4.9 (GNU/Linux)
915
916iEYEAREKAAYFAkoxr50ACgkQvpDo5Pfl1oIENgCghtnmVp8pfTVQ5gjiUzR68mhG
9171vwAn0Er4ub042Nm/JKxwGuUnalRKG15
918=1rXh
919-----END PGP SIGNATURE-----