Ticket #971: libpatch

File libpatch, 36.2 KB (added by josef, 9 years ago)

The patch for adding Data.List.intercalate

Line 
1
2New patches:
3
4[Add intercalate to Data.List (ticket #971)
5Josef Svenningsson <[email protected]>**20061102122052] {
6hunk ./Data/List.hs 38
7+   , intercalate       -- :: [a] -> [[a]] -> [a]
8hunk ./Data/List.hs 400
9+-- | 'intercalate' @xs xss@ is equivalent to @('concat' ('intersperse' xs xss))@.
10+-- It inserts the list @xs@ in between the lists in @xss@ and concatenates the
11+-- result.
12+intercalate :: [a] -> [[a]] -> [a]
13+intercalate xs xss = concat (intersperse xs xss)
14+
15}
16
17Context:
18
19[Add intercalate and split to Data.List
20Josef Svenningsson <[email protected]>*-20061024172357]
21[Data.Generics.Basics is GHC-only
22Ross Paterson <[email protected]>**20061102111736]
23[#ifdef around non-portable Data.Generics.Basics
24[email protected]**20061102103445]
25[Add deriving Data to Complex
26simonpj@microsoft**20061101102059]
27[minor clarification of RandomGen doc
28Ross Paterson <[email protected]>**20061030230842]
29[rearrange docs a bit
30Ross Paterson <[email protected]>**20061030161223]
31[Add intercalate and split to Data.List
32Josef Svenningsson <[email protected]>**20061024172357]
33[Export pseq from Control.Parallel, and use it in Control.Parallel.Strategies
34Simon Marlow <[email protected]>**20061027150141]
35[`par` should be infixr 0
36Simon Marlow <[email protected]>**20061027130800
37 Alas, I didn't spot this due to lack of testing, and the symptom is
38 that an expression like x `par` y `seq z will have exactly the wrong
39 parallelism properties.  The workaround is to add parantheses.
40 
41 I think we could push this to the 6.6 branch.
42]
43[fix example in comment
44Ross Paterson <[email protected]>**20061023163925]
45[Use the new Any type for dynamics (GHC only)
46simonpj@microsoft**20061019160408]
47[add Data.Sequence to nhc98 build
48[email protected]**20061012135200]
49[Remove Data.FiniteMap, add Control.Applicative, Data.Traversable, and
50[email protected]**20061012095605
51 Data.Foldable to the nhc98 build.
52]
53[STM invariants
54[email protected]**20061007123253]
55[Inline shift in GHC's Bits instances for {Int,Word}{,8,16,32,64}
56Samuel Bronson <[email protected]>**20061009020906]
57[Don't create GHC.Prim when bootstrapping; we can't, and we don't need it
58Ian Lynagh <[email protected]>**20061004165355]
59[Data.ByteString: fix lazyness of take, drop & splitAt
60Don Stewart <[email protected]>**20061005011703
61 
62 ByteString.Lazy's take, drop and splitAt were too strict when demanding
63 a byte string. Spotted by Einar Karttunen. Thanks to him and to Bertram
64 Felgenhauer for explaining the problem and the fix.
65 
66]
67[Fix syntax error that prevents building Haddock documentation on Windows
68[email protected]**20060917013530]
69[Hugs only: unbreak typeRepKey
70Ross Paterson <[email protected]>**20060929102743]
71[make hGetBufNonBlocking do something on Windows w/ -threaded
72Simon Marlow <[email protected]>**20060927145811
73 hGetBufNonBlocking will behave the same as hGetBuf on Windows now, which
74 is better than just crashing (which it did previously).
75]
76[add typeRepKey :: TypeRep -> IO Int
77Simon Marlow <[email protected]>**20060927100342
78 See feature request #880
79]
80[fix header comment
81Ross Paterson <[email protected]>**20060926135843]
82[Add strict versions of insertWith and insertWithKey (Data.Map)
83[email protected]**20060910162443]
84[doc tweaks, including more precise equations for evaluate
85Ross Paterson <[email protected]>**20060910115259]
86[Sync Data.ByteString with stable branch
87Don Stewart <[email protected]>**20060909050111
88 
89 This patch:
90     * hides the LPS constructor (its in .Base if you need it)
91     * adds functions to convert between strict and lazy bytestrings
92     * and adds readInteger
93 
94]
95[Typeable1 instances for STM and TVar
96Ross Paterson <[email protected]>**20060904231425]
97[remove obsolete Hugs stuff
98Ross Paterson <[email protected]>**20060904223944]
99[Cleaner isInfixOf suggestion from Ross Paterson
100John Goerzen <[email protected]>**20060901143654]
101[New function isInfixOf that searches a list for a given sublist
102John Goerzen <[email protected]>**20060831151556
103 
104 Example:
105 
106 isInfixOf "Haskell" "I really like Haskell." -> True
107 isInfixOf "Ial" "I really like Haskell." -> False
108 
109 This function was first implemented in MissingH as MissingH.List.contains
110]
111[Better doc on Data.Map.lookup: explain what the monad is for
112[email protected]**20060903133440]
113[fix hDuplicateTo on Windows
114Simon Marlow <[email protected]>**20060901150016
115 deja vu - I'm sure I remember fixing this before...
116]
117[Improve documentation of atomically
118simonpj@microsoft**20060714120207]
119[Add missing method genRange for StdGen (fixes #794)
120simonpj@microsoft**20060707151901
121 
122        MERGE TO STABLE
123 
124 Trac #794 reports (correctly) that the implementation of StdGen
125 only returns numbers in the range (0..something) rather than
126 (minBound, maxBound), which is what StdGen's genRange claims.
127 
128 This commit fixes the problem, by implementing genRange for StdGen
129 (previously it just used the default method).
130 
131 
132]
133[mark nhc98 import hack
134Ross Paterson <[email protected]>**20060831125219]
135[remove some outdated comments
136Simon Marlow <[email protected]>**20060831104200]
137[import Control.Arrow.ArrowZero to help nhc98's type checker
138[email protected]**20060831101105]
139[remove Text.Regex(.Posix) from nhc98 build
140[email protected]**20060831101016]
141[add Data.Foldable.{msum,asum}, plus tweaks to comments
142Ross Paterson <[email protected]>**20060830163521]
143[fix doc typo
144Ross Paterson <[email protected]>**20060830134123]
145[add Data.Foldable.{for_,forM_} and Data.Traversable.{for,forM}
146Ross Paterson <[email protected]>**20060830133805
147 
148 generalizing Control.Monad.{forM_,forM}
149]
150[Make length a good consumer
151simonpj@microsoft*-20060508142726
152 
153 Make length into a good consumer.  Fixes Trac bug #707.
154 
155 (Before length simply didn't use foldr.)
156 
157]
158[Add Control.Monad.forM and forM_
159Don Stewart <[email protected]>**20060824081118
160 
161 flip mapM_ is more and more common, I find. Several suggestions have
162 been made to add this, as foreach or something similar. This patch
163 does just that:
164 
165     forM  :: (Monad m) => [a] -> (a -> m b) -> m [b]
166     forM_ :: (Monad m) => [a] -> (a -> m b) -> m ()
167 
168 So we can write:
169     
170     Prelude Control.Monad> forM_ [1..4] $ \x -> print x
171     1
172     2
173     3
174     4
175 
176]
177[Hide internal module from haddock in Data.ByteString
178Don Stewart <[email protected]>**20060828011515]
179[add advice on avoiding import ambiguities
180Ross Paterson <[email protected]>**20060827170407]
181[expand advice on importing these modules
182Ross Paterson <[email protected]>**20060827164044]
183[add Haddock marker
184Ross Paterson <[email protected]>**20060827115140]
185[Clarify how one hides Prelude.catch
186Don Stewart <[email protected]>**20060826124346
187 
188 User feedback indicated that an example was required, of how to hide
189 Prelude.catch, so add such an example to the docs
190 
191]
192[Workaround for OSes that don't have intmax_t and uintmax_t
193Ian Lynagh <[email protected]>**20060825134936
194 OpenBSD (and possibly others) do not have intmax_t and uintmax_t types:
195     http://www.mail-archive.com/[email protected]/msg01548.html
196 so substitute (unsigned) long long if we have them, otherwise
197 (unsigned) long.
198 
199]
200[add docs for par
201Simon Marlow <[email protected]>**20060825110610]
202[document minimal complete definition for Bits
203Ross Paterson <[email protected]>**20060824140504]
204[C regex library bits have moved to the regex-posix package
205Simon Marlow <[email protected]>**20060824132311]
206[Add shared Typeable support (ghc only)
207Esa Ilari Vuokko <[email protected]>**20060823003126]
208[this should have been removed with the previous patch
209Simon Marlow <[email protected]>**20060824121223]
210[remove Text.Regx & Text.Regex.Posix
211Simon Marlow <[email protected]>**20060824094615
212 These are subsumed by the new regex-base, regex-posix and regex-compat
213 packages.
214]
215[explicitly tag Data.ByteString rules with the FPS prefix.
216Don Stewart <[email protected]>**20060824041326]
217[Add spec rules for sections in Data.ByteString
218Don Stewart <[email protected]>**20060824012611]
219[Sync Data.ByteString with current stable branch, 0.7
220Don Stewart <[email protected]>**20060823143338]
221[add notes about why copyFile doesn't remove the target
222Simon Marlow <[email protected]>**20060823095059]
223[copyFile: try removing the target file before opening it for writing
224Simon Marlow <[email protected]>*-20060822121909]
225[copyFile: try removing the target file before opening it for writing
226Simon Marlow <[email protected]>**20060822121909]
227[add alternative functors and extra instances
228Ross Paterson <[email protected]>**20060821152151
229 
230 * Alternative class, for functors with a monoid
231 * instances for Const
232 * instances for arrows
233]
234[generate Haddock docs on all platforms
235Simon Marlow <[email protected]>**20060821131612]
236[remove extra comma from import
237Ross Paterson <[email protected]>**20060819173954]
238[fix docs for withC(A)StringLen
239Ross Paterson <[email protected]>**20060818170328]
240[use Haskell'98 compliant indentation in do blocks
241[email protected]**20060818130810]
242[use correct names of IOArray operations for nhc98
243[email protected]**20060818130714]
244[add mapMaybe and mapEither, plus WithKey variants
245Ross Paterson <[email protected]>**20060817235041]
246[remove Text.Html from nhc98 build
247[email protected]**20060817135502]
248[eliminate more HOST_OS tests
249Ross Paterson <[email protected]>**20060815190609]
250[Hugs only: disable unused process primitives
251Ross Paterson <[email protected]>**20060813184435
252 
253 These were the cause of Hugs bug #30, I think, and weren't used by Hugs anyway.
254]
255[markup fix to Data.HashTable
256Ross Paterson <[email protected]>**20060812103835]
257[revert removal of ghcconfig.h from package.conf.in
258Ross Paterson <[email protected]>**20060812082702
259 
260 as it's preprocessed with -undef (pointed out by Esa Ilari Vuokko)
261]
262[fix Data.HashTable for non-GHC
263Ross Paterson <[email protected]>**20060811231521]
264[remove deprecated 'withObject'
265Simon Marlow <[email protected]>**20060811152350]
266[Jan-Willem Maessen's improved implementation of Data.HashTable
267Simon Marlow <[email protected]>**20060811151024
268 Rather than incrementally enlarging the hash table, this version
269 just does it in one go when the table gets too full.
270]
271[Warning police: Make some prototypes from the RTS known
272[email protected]**20060811144629]
273[Warning police: Removed useless catch-all clause
274[email protected]**20060811142208]
275[reduce dependency on ghcconfig.h
276Ross Paterson <[email protected]>**20060811124030
277 
278 The only remaining use is in cbits/dirUtils.h, which tests solaris2_HOST_OS
279 
280 (Also System.Info uses ghcplatform.h and several modules import MachDeps.h
281 to get SIZEOF_* and ALIGNMENT_* from ghcautoconf.h)
282]
283[(non-GHC only) track MArray interface change
284Ross Paterson <[email protected]>**20060810182902]
285[move Text.Html to a separate package
286Simon Marlow <[email protected]>**20060810113017]
287[bump version to 2.0
288Simon Marlow <[email protected]>**20060810112833]
289[Remove deprecated Data.FiniteMap and Data.Set interfaces
290Simon Marlow <[email protected]>**20060809153810]
291[move altzone test from ghc to base package
292Ross Paterson <[email protected]>**20060809124259]
293[remove unnecessary #include "ghcconfig.h"
294Ross Paterson <[email protected]>**20060809123812]
295[Change the API of MArray to allow resizable arrays
296Simon Marlow <[email protected]>**20060809100548
297 See #704
298 
299 The MArray class doesn't currently allow a mutable array to change its
300 size, because of the pure function
301 
302   bounds :: (HasBounds a, Ix i) => a i e -> (i,i)
303 
304 This patch removes the HasBounds class, and adds
305 
306   getBounds :: (MArray a e m, Ix i) => a i e -> m (i,i)
307 
308 to the MArray class, and
309 
310   bounds :: (IArray a e, Ix i) => a i e -> (i,i)
311 
312 to the IArray class.
313 
314 The reason that bounds had to be incorporated into the IArray class is
315 because I couldn't make DiffArray work without doing this.  DiffArray
316 acts as a layer converting an MArray into an IArray, and there was no
317 way (that I could find) to define an instance of HasBounds for
318 DiffArray.
319]
320[deprecate this module.
321Simon Marlow <[email protected]>**20060808100708]
322[add traceShow (see #474)
323Simon Marlow <[email protected]>**20060807155545]
324[remove spurious 'extern "C" {'
325Simon Marlow <[email protected]>**20060724160258]
326[Fix unsafeIndex for large ranges
327Simon Marlow <[email protected]>**20060721100225]
328[disambiguate uses of foldr for nhc98 to compile without errors
329[email protected]**20060711161614]
330[make Control.Monad.Instances compilable by nhc98
331[email protected]**20060711160941]
332[breakpointCond
333Lemmih <[email protected]>**20060708055528]
334[UNDO: Merge "unrecognized long opt" fix from 6.4.2
335Simon Marlow <[email protected]>**20060705142537
336 This patch undid the previous patch, "RequireOrder: do not collect
337 unrecognised options after a non-opt".  I asked Sven to revert it, but
338 didn't get an answer.
339 
340 See bug #473.
341]
342[Avoid strictness in accumulator for unpackFoldr
343Don Stewart <[email protected]>**20060703091806
344 
345 The seq on the accumulator for unpackFoldr will break in the presence of
346 head/build rewrite rules. The empty list case will be forced, producing
347 an exception. This is a known issue with seq and rewrite rules that we
348 just stumbled on to.
349 
350]
351[Disable unpack/build fusion
352Don Stewart <[email protected]>**20060702083913
353 
354 unpack/build on bytestrings seems to trigger a bug when interacting with
355 head/build fusion in GHC.List. The bytestring001 testcase catches it.
356 
357 I'll investigate further, but best to disable this for now (its not
358 often used anyway).
359 
360 Note that with -frules-off or ghc 6.4.2 things are fine. It seems to
361 have emerged with the recent rules changes.
362 
363]
364[Import Data.ByteString.Lazy, improve ByteString Fusion, and resync with FPS head
365Don Stewart <[email protected]>**20060701084345
366 
367 This patch imports the Data.ByteString.Lazy module, and its helpers,
368 providing a ByteString implemented as a lazy list of strict cache-sized
369 chunks. This type allows the usual lazy operations to be written on
370 bytestrings, including lazy IO, with much improved space and time over
371 the [Char] equivalents.
372 
373]
374[Wibble in docs for new ForeignPtr functionsn
375Don Stewart <[email protected]>**20060609075924]
376[comments for Applicative and Traversable
377Ross Paterson <[email protected]>**20060622170436]
378[default to NoBuffering on Windows for a read/write text file
379Simon Marlow <[email protected]>**20060622144446
380 Fixes (works around) #679
381]
382[remove dead code
383Simon Marlow <[email protected]>**20060622144433]
384[clarify and expand docs
385Simon Marlow <[email protected]>**20060622112911]
386[Add minView and maxView to Map and Set
387[email protected]**20060616180121]
388[add signature for registerDelay
389Ross Paterson <[email protected]>**20060614114456]
390[a few doc comments
391Ross Paterson <ross@soi.city.ac.uk>**20060613142704]
392[Optimised foreign pointer representation, for heap-allocated objects
393Don Stewart <dons@cse.unsw.edu.au>**20060608015011]
394[Add the inline function, and many comments
395simonpj@microsoft.com**20060605115814
396 
397 This commit adds the 'inline' function described in the
398 related patch in the compiler.
399 
400 I've also added comments about the 'lazy' function.
401 
402]
403[small intro to exceptions
404Ross Paterson <ross@soi.city.ac.uk>**20060525111604]
405[export breakpoint
406Simon Marlow <simonmar@microsoft.com>**20060525090456]
407[Merge in changes from fps head. Highlights:
408Don Stewart <dons@cse.unsw.edu.au>**20060525065012
409 
410     Wed May 24 15:49:38 EST 2006  sjanssen@cse.unl.edu
411       * instance Monoid ByteString
412 
413     Wed May 24 15:04:04 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
414       * Rearange export lists for the .Char8 modules
415 
416     Wed May 24 14:59:56 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
417       * Implement mapAccumL and reimplement mapIndexed using loopU
418 
419     Wed May 24 14:47:32 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
420       * Change the implementation of the unfoldr(N) functions.
421       Use a more compact implementation for unfoldrN and change it's behaviour
422       to only return Just in the case that it actually 'overflowed' the N, so
423       the boundary case of unfolding exactly N gives Nothing.
424       Implement unfoldr and Lazy.unfoldr in terms of unfoldrN. Use fibonacci
425       growth for the chunk size in unfoldr
426 
427     Wed May 24 08:32:29 EST 2006  sjanssen@cse.unl.edu
428       * Add unfoldr to ByteString and .Char8
429       A preliminary implementation of unfoldr.
430 
431     Wed May 24 01:39:41 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
432       * Reorder the export lists to better match the Data.List api
433 
434     Tue May 23 14:04:32 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
435       * pack{Byte,Char} -> singleton. As per fptools convention
436 
437     Tue May 23 14:00:51 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
438       * elemIndexLast -> elemIndexEnd
439 
440     Tue May 23 13:57:34 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
441       * In the search for a more orthogonal api, we kill breakFirst/breakLast,
442         which were of dubious value
443 
444     Tue May 23 12:24:09 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
445       * Abolish elems. It's name implied it was unpack, but its type didn't. it made no sense
446 
447     Tue May 23 10:42:09 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
448       * Minor doc tidyup. Use haddock markup better.
449 
450     Tue May 23 11:00:31 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
451       * Simplify the join() implementation. Spotted by Duncan.
452 
453]
454[add a way to ask the IO manager thread to exit
455Simon Marlow <simonmar@microsoft.com>**20060524121823]
456[Sync with FPS head, including the following patches:
457Don Stewart <dons@cse.unsw.edu.au>**20060520030436
458         
459     Thu May 18 15:45:46 EST 2006  sjanssen@cse.unl.edu
460       * Export unsafeTake and unsafeDrop
461 
462     Fri May 19 11:53:08 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
463       * Add foldl1'
464 
465     Fri May 19 13:41:24 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
466       * Add fuseable scanl, scanl1 + properties
467 
468     Fri May 19 18:20:40 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
469       * Spotted another chance to use unsafeTake,Drop (in groupBy)
470 
471     Thu May 18 09:24:25 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
472       * More effecient findIndexOrEnd based on the impl of findIndex
473 
474     Thu May 18 09:22:49 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
475       * Eliminate special case in findIndex since it's handled anyway.
476 
477     Thu May 18 09:19:08 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
478       * Add unsafeTake and unsafeDrop
479       These versions assume the n is in the bounds of the bytestring, saving
480       two comparison tests. Then use them in varous places where we think this
481       holds. These cases need double checking (and there are a few remaining
482       internal uses of take / drop that might be possible to convert).
483       Not exported for the moment.
484 
485     Tue May 16 23:15:11 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
486       * Handle n < 0 in drop and splitAt. Spotted by QC.
487 
488     Tue May 16 22:46:22 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
489       * Handle n <= 0 cases for unfoldr and replicate. Spotted by QC
490 
491     Tue May 16 21:34:11 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
492       * mapF -> map', filterF -> filter'
493 
494]
495[haddock fix
496Ross Paterson <ross@soi.city.ac.uk>**20060518154723]
497[simplify indexing in Data.Sequence
498Ross Paterson <ross@soi.city.ac.uk>**20060518154316]
499[Move Eq, Ord, Show instances for ThreadId to GHC.Conc
500Simon Marlow <simonmar@microsoft.com>**20060518113339
501 Eliminates orphans.
502]
503[Better error handling in the IO manager thread
504Simon Marlow <simonmar@microsoft.com>**20060518113303
505 In particular, handle EBADF just like rts/posix/Select.c, by waking up
506 all the waiting threads.  Other errors are thrown, instead of just
507 being ignored.
508]
509[#define _REENTRANT 1  (needed to get the right errno on some OSs)
510Simon Marlow <simonmar@microsoft.com>**20060518104151
511 Part 2 of the fix for threaded RTS problems on Solaris and possibly
512 *BSD (Part 1 was the same change in ghc/includes/Rts.h).
513]
514[copyCString* should be in IO. Spotted by Tomasz Zielonka
515Don Stewart <dons@cse.unsw.edu.au>**20060518012154]
516[add import Prelude to get dependencies right for Data/Fixed.hs
517Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060517222044
518 Hopefully this fixes parallel builds.
519]
520[Fix negative index handling in splitAt, replicate and unfoldrN. Move mapF, filterF -> map', filter' while we're here
521Don Stewart <dons@cse.unsw.edu.au>**20060517020150]
522[Use our own realloc. Thus reduction functions (like filter) allocate on the Haskell heap. Makes around 10% difference.
523Don Stewart <dons@cse.unsw.edu.au>**20060513051736]
524[Last two CInt fixes for 64 bit, and bracket writeFile while we're here
525Don Stewart <dons@cse.unsw.edu.au>**20060512050750]
526[Some small optimisations, generalise the type of unfold
527Don Stewart <dons@cse.unsw.edu.au>**20060510043309
528 
529     Tue May  9 22:36:29 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
530       * Surely the error function should not be inlined.
531 
532     Tue May  9 22:35:53 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
533       * Reorder memory writes for better cache locality.
534 
535     Tue May  9 23:28:09 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
536       * Generalise the type of unfoldrN
537       
538       The type of unfoldrN was overly constrained:
539       unfoldrN :: Int -> (Word8 -> Maybe (Word8, Word8)) -> Word8 -> ByteString
540       
541       if we compare that to unfoldr:
542       unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
543       
544       So we can generalise unfoldrN to this type:
545       unfoldrN :: Int -> (a -> Maybe (Word8, a)) -> a -> ByteString
546       
547       and something similar for the .Char8 version. If people really do want to
548       use it a lot with Word8/Char then perhaps we should add a specialise pragma.
549 
550     Wed May 10 13:26:40 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
551       * Add foldl', and thus a fusion rule for length . {map,filter,fold},
552       that avoids creating an array at all if the end of the pipeline is a 'length' reduction
553 
554 **END OF DESCRIPTION***
555 
556 Place the long patch description above the ***END OF DESCRIPTION*** marker.
557 The first line of this file will be the patch name.
558 
559 
560 This patch contains the following changes:
561 
562 M ./Data/ByteString.hs -8 +38
563 M ./Data/ByteString/Char8.hs -6 +12
564]
565[portable implementation of WordPtr/IntPtr for non-GHC
566Ross Paterson <ross@soi.city.ac.uk>**20060510001826
567 
568 plus much tweaking of imports to avoid cycles
569]
570[add WordPtr and IntPtr types to Foreign.Ptr, with associated conversions
571Simon Marlow <simonmar@microsoft.com>**20060509092606
572 
573 As suggested by John Meacham. 
574 
575 I had to move the Show instance for Ptr into GHC.ForeignPtr to avoid
576 recursive dependencies.
577]
578[add CIntPtr, CUIntPtr, CIntMax, CUIntMax types
579Simon Marlow <simonmar@microsoft.com>**20060509092427]
580[add GHC.Dynamic
581Simon Marlow <simonmar@microsoft.com>**20060509082739]
582[Two things. #if defined(__GLASGOW_HASKELL__) on INLINE [n] pragmas (for jhc). And careful use of INLINE on words/unwords halves runtime for those functions
583Don Stewart <dons@cse.unsw.edu.au>**20060509023425]
584[Make length a good consumer
585simonpj@microsoft**20060508142726
586 
587 Make length into a good consumer.  Fixes Trac bug #707.
588 
589 (Before length simply didn't use foldr.)
590 
591]
592[Trim imports
593simonpj@microsoft**20060508142557]
594[Make unsafePerformIO lazy
595simonpj@microsoft**20060508142507
596 
597 The stricteness analyser used to have a HACK which ensured that NOINLNE things
598 were not strictness-analysed.  The reason was unsafePerformIO. Left to itself,
599 the strictness analyser would discover this strictness for unsafePerformIO:
600        unsafePerformIO:  C(U(AV))
601 But then consider this sub-expression
602        unsafePerformIO (\s -> let r = f x in
603                               case writeIORef v r s of (# s1, _ #) ->
604                               (# s1, r #)
605 The strictness analyser will now find that r is sure to be eval'd,
606 and may then hoist it out.  This makes tests/lib/should_run/memo002
607 deadlock.
608 
609 Solving this by making all NOINLINE things have no strictness info is overkill.
610 In particular, it's overkill for runST, which is perfectly respectable.
611 Consider
612        f x = runST (return x)
613 This should be strict in x.
614 
615 So the new plan is to define unsafePerformIO using the 'lazy' combinator:
616 
617        unsafePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r)
618 
619 Remember, 'lazy' is a wired-in identity-function Id, of type a->a, which is
620 magically NON-STRICT, and is inlined after strictness analysis.  So
621 unsafePerformIO will look non-strict, and that's what we want.
622 
623]
624[Sync with FPS head.
625Don Stewart <dons@cse.unsw.edu.au>**20060508122322
626 
627 Mon May  8 10:40:14 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
628   * Fix all uses for Int that should be CInt or CSize in ffi imports.
629   Spotted by Igloo, dcoutts
630 
631 Mon May  8 16:09:41 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
632   * Import nicer loop/loop fusion rule from ghc-ndp
633 
634 Mon May  8 17:36:07 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
635   * Fix stack leak in split on > 60M strings
636 
637 Mon May  8 17:50:13 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
638   * Try same fix for stack overflow in elemIndices
639 
640]
641[Fix all uses for Int that should be CInt or CSize in ffi imports. Spotted by Duncan and Ian
642Don Stewart <dons@cse.unsw.edu.au>**20060508010311]
643[Fixed import list syntax
644Sven Panne <sven.panne@aedion.de>**20060507155008]
645[Faster filterF, filterNotByte
646dons@cse.unsw.edu.au**20060507042301]
647[Much faster find, findIndex. Hint from sjanssen
648dons@cse.unsw.edu.au**20060507033048]
649[Merge "unrecognized long opt" fix from 6.4.2
650Sven Panne <sven.panne@aedion.de>**20060506110519]
651[
652dons@cse.unsw.edu.au**20060506061029
653 Sat May  6 13:01:34 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
654   * Do loopU realloc on the Haskell heap. And add a really tough stress test
655 
656 Sat May  6 12:28:58 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
657   * Use simple, 3x faster concat. Plus QC properties. Suggested by sjanssen and dcoutts
658 
659 Sat May  6 15:59:31 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
660   * dcoutt's packByte bug squashed
661   
662   With inlinePerformIO, ghc head was compiling:
663   
664    packByte 255 `compare` packByte 127
665   
666   into roughly
667   
668    case mallocByteString 2 of
669        ForeignPtr f internals ->
670             case writeWord8OffAddr# f 0 255 of _ ->
671             case writeWord8OffAddr# f 0 127 of _ ->
672             case eqAddr# f f of
673                    False -> case compare (GHC.Prim.plusAddr# f 0)
674                                          (GHC.Prim.plusAddr# f 0)
675   
676   which is rather stunning. unsafePerformIO seems to prevent whatever
677   magic inlining was leading to this. Only affected the head.
678   
679]
680[Add array fusion versions of map, filter and foldl
681dons@cse.unsw.edu.au**20060505060858
682 
683 This patch adds fusable map, filter and foldl, using the array fusion
684 code for unlifted, flat arrays, from the Data Parallel Haskell branch,
685 after kind help from Roman Leshchinskiy,
686 
687 Pipelines of maps, filters and folds should now need to walk the
688 bytestring once only, and intermediate bytestrings won't be constructed.
689 
690]
691[fix for non-GHC
692Ross Paterson <ross@soi.city.ac.uk>**20060504093044]
693[use bracket in appendFile (like writeFile)
694Ross Paterson <ross@soi.city.ac.uk>**20060504091528]
695[writeFile: close the file on error
696Simon Marlow <simonmar@microsoft.com>**20060504084505
697 Suggested by Ross Paterson, via Neil Mitchell
698 
699]
700[Sync with FPS head
701dons@cse.unsw.edu.au**20060503105259
702 
703 This patch brings Data.ByteString into sync with the FPS head.
704 The most significant of which is the new Haskell counting sort.
705 
706 Changes:
707 
708 Sun Apr 30 18:16:29 EST 2006  sjanssen@cse.unl.edu
709   * Fix foldr1 in Data.ByteString and Data.ByteString.Char8
710 
711 Mon May  1 11:51:16 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
712   * Add group and groupBy. Suggested by conversation between sjanssen and petekaz on #haskell
713 
714 Mon May  1 16:42:04 EST 2006  sjanssen@cse.unl.edu
715   * Fix groupBy to match Data.List.groupBy.
716 
717 Wed May  3 15:01:07 EST 2006  sjanssen@cse.unl.edu
718   * Migrate to counting sort.
719   
720   Data.ByteString.sort used C's qsort(), which is O(n log n).  The new algorithm
721   is O(n), and is faster for strings larger than approximately thirty bytes.  We
722   also reduce our dependency on cbits!
723 
724]
725[improve performance of Integer->String conversion
726Simon Marlow <simonmar@microsoft.com>**20060503113306
727 See
728  http://www.haskell.org//pipermail/libraries/2006-April/005227.html
729 
730 Submitted by: bertram.felgenhauer@googlemail.com
731 
732 
733]
734[inline withMVar, modifyMVar, modifyMVar_
735Simon Marlow <simonmar@microsoft.com>**20060503111152]
736[Fix string truncating in hGetLine -- it was a pasto from Simon's code
737Simon Marlow <simonmar@microsoft.com>**20060503103504
738 (from Don Stewart)
739]
740[Merge in Data.ByteString head. Fixes ByteString+cbits in hugs
741Don Stewart <dons@cse.unsw.edu.au>**20060429040733]
742[Import Data.ByteString from fps 0.5.
743Don Stewart <dons@cse.unsw.edu.au>**20060428130718
744 Fast, packed byte vectors, providing a better PackedString.
745 
746]
747[fix previous patch
748Ross Paterson <ross@soi.city.ac.uk>**20060501154847]
749[fixes for non-GHC
750Ross Paterson <ross@soi.city.ac.uk>**20060501144322]
751[fix imports for mingw32 && !GHC
752Ross Paterson <ross@soi.city.ac.uk>**20060427163248]
753[RequireOrder: do not collect unrecognised options after a non-opt
754Simon Marlow <simonmar@microsoft.com>**20060426121110
755 The documentation for RequireOrder says "no option processing after
756 first non-option", so it doesn't seem right that we should process the
757 rest of the arguments to collect the unrecognised ones.  Presumably
758 the client wants to know about the unrecognised options up to the
759 first non-option, and will be using a different option parser for the
760 rest of the command line.
761 
762 eg. before:
763 
764 Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"]
765 ([],["bar","--foo"],["--foo"],[])
766 
767 after:
768 
769 Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"]
770 ([],["bar","--foo"],[],[])
771]
772[fix for Haddock 0.7
773Ashley Yakeley <ashley@semantic.org>**20060426072521]
774[add Data.Fixed module
775Ashley Yakeley <ashley@semantic.org>**20060425071853]
776[add instances
777Ross Paterson <ross@soi.city.ac.uk>**20060424102146]
778[add superclasses to Applicative and Traversable
779Ross Paterson <ross@soi.city.ac.uk>**20060411144734
780 
781 Functor is now a superclass of Applicative, and Functor and Foldable
782 are now superclasses of Traversable.  The new hierarchy makes clear the
783 inclusions between the classes, but means more work in defining instances.
784 Default definitions are provided to help.
785]
786[add Functor and Monad instances for Prelude types
787Ross Paterson <ross@soi.city.ac.uk>**20060410111443]
788[GHC.Base.breakpoint
789Lemmih <lemmih@gmail.com>**20060407125827]
790[Track the GHC source tree reorganisation
791Simon Marlow <simonmar@microsoft.com>**20060407041631]
792[in the show instance for Exception, print the type of dynamic exceptions
793Simon Marlow <simonmar@microsoft.com>**20060406112444
794 Unfortunately this requires some recursve module hackery to get at
795 the show instance for Typeable.
796]
797[implement ForeignEnvPtr, newForeignPtrEnv, addForeignPtrEnv for GHC
798Simon Marlow <simonmar@microsoft.com>**20060405155448]
799[add  forkOnIO :: Int -> IO () -> IO ThreadId
800Simon Marlow <simonmar@microsoft.com>**20060327135018]
801[Rework previous: not a gcc bug after all
802Simon Marlow <simonmar@microsoft.com>**20060323161229
803 It turns out that we were relying on behaviour that is undefined in C,
804 and undefined behaviour in C means "the compiler can do whatever the
805 hell it likes with your entire program".  So avoid that.
806]
807[work around a gcc 4.1.0 codegen bug in -O2 by forcing -O1 for GHC.Show
808Simon Marlow <simonmar@microsoft.com>**20060323134514
809 See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26824
810]
811[commit mysteriously missing parts of "runIOFastExit" patch
812Simon Marlow <simonmar@microsoft.com>**20060321101535]
813[add runIOFastExit :: IO a -> IO a
814Simon Marlow <simonmar@microsoft.com>**20060320124333
815 Similar to runIO, but calls stg_exit() directly to exit, rather than
816 shutdownHaskellAndExit().  Needed for running GHCi in the test suite.
817]
818[Fix a broken invariant
819Simon Marlow <simonmar@microsoft.com>**20060316134151
820 Patch from #694,  for the problem "empty is an identity for <> and $$" is
821 currently broken by eg. isEmpty (empty<>empty)"
822]
823[Add unsafeSTToIO :: ST s a -> IO a
824Simon Marlow <simonmar@microsoft.com>**20060315160232
825 Implementation for Hugs is missing, but should be easy.  We need this
826 for the forthcoming nested data parallelism implementation.
827]
828[Added 'alter'
829jeanphilippe.bernardy@gmail.com**20060315143539
830 Added 'alter :: (Maybe a -> Maybe a) -> k -> Map k a -> Map k a' to IntMap and Map
831 This addresses ticket #665
832]
833[deprecate FunctorM in favour of Foldable and Traversable
834Ross Paterson <ross@soi.city.ac.uk>**20060315092942
835 as discussed on the libraries list.
836]
837[Simplify Eq, Ord, and Show instances for UArray
838Simon Marlow <simonmar@microsoft.com>**20060313142701
839 The Eq, Ord, and Show instances of UArray were written out longhand
840 with one instance per element type.  It is possible to condense these
841 into a single instance for each class, at the expense of using more
842 extensions (non-std context on instance declaration).
843 
844 Suggestion by: Frederik Eaton <frederik@ofb.net>
845 
846]
847[Oops typo in intSet notMember
848jeanphilippe.bernardy@gmail.com**20060311224713]
849[IntMap lookup now returns monad instead of Maybe.
850jeanphilippe.bernardy@gmail.com**20060311224502]
851[Added notMember to Data.IntSet and Data.IntMap
852jeanphilippe.bernardy@gmail.com**20060311085221]
853[add Data.Set.notMember and Data.Map.notMember
854John Meacham <john@repetae.net>**20060309191806]
855[addToClockTime: handle picoseconds properly
856Simon Marlow <simonmar@microsoft.com>**20060310114532
857 fixes #588
858]
859[make head/build rule apply to all types, not just Bool.
860John Meacham <john@repetae.net>**20060303045753]
861[Avoid overflow when normalising clock times
862Ian Lynagh <igloo@earth.li>**20060210144638]
863[Years have 365 days, not 30*365
864Ian Lynagh <igloo@earth.li>**20060210142853]
865[declare blkcmp() static
866Simon Marlow <simonmar@microsoft.com>**20060223134317]
867[typo in comment in Foldable class
868Ross Paterson <ross@soi.city.ac.uk>**20060209004901]
869[simplify fmap
870Ross Paterson <ross@soi.city.ac.uk>**20060206095048]
871[update ref in comment
872Ross Paterson <ross@soi.city.ac.uk>**20060206095139]
873[Give -foverlapping-instances to Data.Typeable
874simonpj@microsoft**20060206133439
875 
876 For some time, GHC has made -fallow-overlapping-instances "sticky":
877 any instance in a module compiled with -fallow-overlapping-instances
878 can overlap when imported, regardless of whether the importing module
879 allows overlap.  (If there is an overlap, both instances must come from
880 modules thus compiled.)
881 
882 Instances in Data.Typeable might well want to be overlapped, so this
883 commit adds the flag to Data.Typeable (with an explanatory comment)
884 
885 
886]
887[Add -fno-bang-patterns to modules using both bang and glasgow-exts
888simonpj@microsoft.com**20060203175759]
889[When splitting a bucket, keep the contents in the same order
890Simon Marlow <simonmar@microsoft.com>**20060201130427
891 To retain the property that multiple inserts shadow each other
892 (see ticket #661, test hash001)
893]
894[add foldr/build optimisation for take and replicate
895Simon Marlow <simonmar@microsoft.com>**20060126164603
896 This allows take to be deforested, and improves performance of
897 replicate and replicateM/replicateM_.  We have a separate problem that
898 means expressions involving [n..m] aren't being completely optimised
899 because eftIntFB isn't being inlined but otherwise the results look
900 good. 
901 
902 Sadly this has invalidated a number of the nofib benchmarks which were
903 erroneously using take to duplicate work in a misguided attempt to
904 lengthen their runtimes (ToDo).
905]
906[Generate PrimopWrappers.hs with Haddock docs
907Simon Marlow <simonmar@microsoft.com>**20060124131121
908 Patch originally from Dinko Tenev <dinko.tenev@gmail.com>, modified
909 to add log message by me.
910]
911[[project @ 2006-01-19 14:47:15 by ross]
912ross**20060119144715
913 backport warning avoidance from Haddock
914]
915[[project @ 2006-01-18 11:45:47 by malcolm]
916malcolm**20060118114547
917 Fix import of Ix for nhc98.
918]
919[[project @ 2006-01-17 09:38:38 by ross]
920ross**20060117093838
921 add Ix instance for GeneralCategory.
922]
923[TAG Initial conversion from CVS complete
924John Goerzen <jgoerzen@complete.org>**20060112154126]
925Patch bundle hash:
9267fbaeb139f9682eb40b71c00cda9264b66ebca59