Ticket #1610: 1610.base.1.patch

File 1610.base.1.patch, 73.1 KB (added by igloo, 10 years ago)
2New patches:
4[Make arrays safer (e.g. trac #1046)
5Ian Lynagh <igloo@earth.li>**20070810144907] {
6hunk ./GHC/Arr.lhs 290
7-data Ix i => Array     i e = Array   !i !i (Array# e)
8+-- The Int is the number of elements in the Array.
9+data Ix i => Array i e
10+                 = Array !i         -- the lower bound, l
11+                         !i         -- the upper bound, u
12+                         !Int       -- a cache of (rangeSize (l,u))
13+                                    -- used to make sure an index is
14+                                    -- really in range
15+                         (Array# e) -- The actual elements
16hunk ./GHC/Arr.lhs 308
17-data         STArray s i e = STArray !i !i (MutableArray# s e)
18+data STArray s i e
19+         = STArray !i                  -- the lower bound, l
20+                   !i                  -- the upper bound, u
21+                   !Int                -- a cache of (rangeSize (l,u))
22+                                       -- used to make sure an index is
23+                                       -- really in range
24+                   (MutableArray# s e) -- The actual elements
25hunk ./GHC/Arr.lhs 320
26-    STArray _ _ arr1# == STArray _ _ arr2# =
27+    STArray _ _ _ arr1# == STArray _ _ _ arr2# =
28hunk ./GHC/Arr.lhs 375
29-array (l,u) ies = unsafeArray (l,u) [(index (l,u) i, e) | (i, e) <- ies]
30+array (l,u) ies
31+    = let n = safeRangeSize (l,u)
32+      in unsafeArray' (l,u) n
33+                      [(safeIndex (l,u) n i, e) | (i, e) <- ies]
34hunk ./GHC/Arr.lhs 382
35-unsafeArray (l,u) ies = runST (ST $ \s1# ->
36-    case rangeSize (l,u)                of { I# n# ->
37-    case newArray# n# arrEleBottom s1#  of { (# s2#, marr# #) ->
38-    foldr (fill marr#) (done l u marr#) ies s2# }})
39+unsafeArray b ies = unsafeArray' b (rangeSize b) ies
41+{-# INLINE unsafeArray' #-}
42+unsafeArray' :: Ix i => (i,i) -> Int -> [(Int, e)] -> Array i e
43+unsafeArray' (l,u) n@(I# n#) ies = runST (ST $ \s1# ->
44+    case newArray# n# arrEleBottom s1# of
45+        (# s2#, marr# #) ->
46+            foldr (fill marr#) (done l u n marr#) ies s2#)
47hunk ./GHC/Arr.lhs 398
48-done :: Ix i => i -> i -> MutableArray# s e -> STRep s (Array i e)
49-done l u marr# s1# =
50-    case unsafeFreezeArray# marr# s1#   of { (# s2#, arr# #) ->
51-    (# s2#, Array l u arr# #) }
52+done :: Ix i => i -> i -> Int -> MutableArray# s e -> STRep s (Array i e)
53+done l u n marr# s1# =
54+    case unsafeFreezeArray# marr# s1# of
55+        (# s2#, arr# #) -> (# s2#, Array l u n arr# #)
56hunk ./GHC/Arr.lhs 414
57-    case rangeSize (l,u)                of { I# n# ->
58+    case safeRangeSize (l,u)            of { n@(I# n#) ->
59hunk ./GHC/Arr.lhs 422
60-    done l u marr# s3# }}})
61+    done l u n marr# s3# }}})
62hunk ./GHC/Arr.lhs 427
63-arr@(Array l u _) ! i = unsafeAt arr (index (l,u) i)
64+arr@(Array l u n _) ! i = unsafeAt arr $ safeIndex (l,u) n i
66+{-# INLINE safeRangeSize #-}
67+safeRangeSize :: Ix i => (i, i) -> Int
68+safeRangeSize (l,u) = let r = rangeSize (l, u)
69+                      in if r < 0 then error "Negative range size"
70+                                  else r
72+{-# INLINE safeIndex #-}
73+safeIndex :: Ix i => (i, i) -> Int -> i -> Int
74+safeIndex (l,u) n i = let i' = unsafeIndex (l,u) i
75+                      in if i' < n then i'
76+                                   else error "Error in array index"
77hunk ./GHC/Arr.lhs 443
78-unsafeAt (Array _ _ arr#) (I# i#) =
79+unsafeAt (Array _ _ _ arr#) (I# i#) =
80hunk ./GHC/Arr.lhs 449
81-bounds (Array l u _) = (l,u)
82+bounds (Array l u _ _) = (l,u)
84+-- | The number of elements in the array.
85+{-# INLINE numElements #-}
86+numElements :: Ix i => Array i e -> Int
87+numElements (Array _ _ n _) = n
88hunk ./GHC/Arr.lhs 459
89-indices (Array l u _) = range (l,u)
90+indices (Array l u _ _) = range (l,u)
91hunk ./GHC/Arr.lhs 464
92-elems arr@(Array l u _) =
93-    [unsafeAt arr i | i <- [0 .. rangeSize (l,u) - 1]]
94+elems arr@(Array l u n _) =
95+    [unsafeAt arr i | i <- [0 .. n - 1]]
96hunk ./GHC/Arr.lhs 470
97-assocs arr@(Array l u _) =
98-    [(i, unsafeAt arr (unsafeIndex (l,u) i)) | i <- range (l,u)]
99+assocs arr@(Array l u _ _) =
100+    [(i, arr ! i) | i <- range (l,u)]
101hunk ./GHC/Arr.lhs 495
102-    unsafeAccumArray f init (l,u) [(index (l,u) i, e) | (i, e) <- ies]
103+    let n = safeRangeSize (l,u)
104+    in unsafeAccumArray' f init (l,u) n
105+                         [(safeIndex (l,u) n i, e) | (i, e) <- ies]
106hunk ./GHC/Arr.lhs 501
107-unsafeAccumArray f init (l,u) ies = runST (ST $ \s1# ->
108-    case rangeSize (l,u)                of { I# n# ->
109+unsafeAccumArray f init b ies = unsafeAccumArray' f init b (rangeSize b) ies
111+{-# INLINE unsafeAccumArray' #-}
112+unsafeAccumArray' :: Ix i => (e -> a -> e) -> e -> (i,i) -> Int -> [(Int, a)] -> Array i e
113+unsafeAccumArray' f init (l,u) n@(I# n#) ies = runST (ST $ \s1# ->
114hunk ./GHC/Arr.lhs 507
115-    foldr (adjust f marr#) (done l u marr#) ies s2# }})
116+    foldr (adjust f marr#) (done l u n marr#) ies s2# })
117hunk ./GHC/Arr.lhs 512
118-    case readArray# marr# i# s1#        of { (# s2#, old #) ->
119-    case writeArray# marr# i# (f old new) s2# of { s3# ->
120-    next s3# }}
121+    case readArray# marr# i# s1# of
122+        (# s2#, old #) ->
123+            case writeArray# marr# i# (f old new) s2# of
124+                s3# -> next s3#
125hunk ./GHC/Arr.lhs 530
126-arr@(Array l u _) // ies =
127-    unsafeReplace arr [(index (l,u) i, e) | (i, e) <- ies]
128+arr@(Array l u n _) // ies =
129+    unsafeReplace arr [(safeIndex (l,u) n i, e) | (i, e) <- ies]
130hunk ./GHC/Arr.lhs 535
131-unsafeReplace arr@(Array l u _) ies = runST (do
132-    STArray _ _ marr# <- thawSTArray arr
133-    ST (foldr (fill marr#) (done l u marr#) ies))
134+unsafeReplace arr ies = runST (do
135+    STArray l u n marr# <- thawSTArray arr
136+    ST (foldr (fill marr#) (done l u n marr#) ies))
137hunk ./GHC/Arr.lhs 547
138-accum f arr@(Array l u _) ies =
139-    unsafeAccum f arr [(index (l,u) i, e) | (i, e) <- ies]
140+accum f arr@(Array l u n _) ies =
141+    unsafeAccum f arr [(safeIndex (l,u) n i, e) | (i, e) <- ies]
142hunk ./GHC/Arr.lhs 552
143-unsafeAccum f arr@(Array l u _) ies = runST (do
144-    STArray _ _ marr# <- thawSTArray arr
145-    ST (foldr (adjust f marr#) (done l u marr#) ies))
146+unsafeAccum f arr ies = runST (do
147+    STArray l u n marr# <- thawSTArray arr
148+    ST (foldr (adjust f marr#) (done l u n marr#) ies))
149hunk ./GHC/Arr.lhs 558
150-amap f arr@(Array l u _) =
151-    unsafeArray (l,u) [(i, f (unsafeAt arr i)) | i <- [0 .. rangeSize (l,u) - 1]]
152+amap f arr@(Array l u n _) =
153+    unsafeArray' (l,u) n [(i, f (unsafeAt arr i)) | i <- [0 .. n - 1]]
154hunk ./GHC/Arr.lhs 570
155-    unsafeArray (l,u) [(unsafeIndex (l,u) i, arr ! f i) | i <- range (l,u)]
156+    array (l,u) [(i, arr ! f i) | i <- range (l,u)]
157hunk ./GHC/Arr.lhs 574
158-eqArray arr1@(Array l1 u1 _) arr2@(Array l2 u2 _) =
159-    if rangeSize (l1,u1) == 0 then rangeSize (l2,u2) == 0 else
160+eqArray arr1@(Array l1 u1 n1 _) arr2@(Array l2 u2 n2 _) =
161+    if n1 == 0 then n2 == 0 else
162hunk ./GHC/Arr.lhs 577
163-    and [unsafeAt arr1 i == unsafeAt arr2 i | i <- [0 .. rangeSize (l1,u1) - 1]]
164+    and [unsafeAt arr1 i == unsafeAt arr2 i | i <- [0 .. n1 - 1]]
165hunk ./GHC/Arr.lhs 585
166-cmpIntArray arr1@(Array l1 u1 _) arr2@(Array l2 u2 _) =
167-    if rangeSize (l1,u1) == 0 then if rangeSize (l2,u2) == 0 then EQ else LT else
168-    if rangeSize (l2,u2) == 0 then GT else
169-    case compare l1 l2 of
170-        EQ    -> foldr cmp (compare u1 u2) [0 .. rangeSize (l1, min u1 u2) - 1]
171-        other -> other
172-    where
173+cmpIntArray arr1@(Array l1 u1 n1 _) arr2@(Array l2 u2 n2 _) =
174+    if n1 == 0 then
175+        if n2 == 0 then EQ else LT
176+    else if n2 == 0 then GT
177+    else case compare l1 l2 of
178+             EQ    -> foldr cmp (compare u1 u2) [0 .. (n1 `min` n2) - 1]
179+             other -> other
180+  where
181hunk ./GHC/Arr.lhs 653
182-    case rangeSize (l,u)                of { I# n# ->
183+    case safeRangeSize (l,u)            of { n@(I# n#) ->
184hunk ./GHC/Arr.lhs 655
185-    (# s2#, STArray l u marr# #) }}
186+    (# s2#, STArray l u n marr# #) }}
187hunk ./GHC/Arr.lhs 659
188-boundsSTArray (STArray l u _) = (l,u)
189+boundsSTArray (STArray l u _ _) = (l,u)
191+{-# INLINE numElementsSTArray #-}
192+numElementsSTArray :: STArray s i e -> Int
193+numElementsSTArray (STArray _ _ n _) = n
194hunk ./GHC/Arr.lhs 667
195-readSTArray marr@(STArray l u _) i =
196-    unsafeReadSTArray marr (index (l,u) i)
197+readSTArray marr@(STArray l u n _) i =
198+    unsafeReadSTArray marr (safeIndex (l,u) n i)
199hunk ./GHC/Arr.lhs 672
200-unsafeReadSTArray (STArray _ _ marr#) (I# i#) = ST $ \s1# ->
201-    readArray# marr# i# s1#
202+unsafeReadSTArray (STArray _ _ _ marr#) (I# i#)
203+    = ST $ \s1# -> readArray# marr# i# s1#
204hunk ./GHC/Arr.lhs 677
205-writeSTArray marr@(STArray l u _) i e =
206-    unsafeWriteSTArray marr (index (l,u) i) e
207+writeSTArray marr@(STArray l u n _) i e =
208+    unsafeWriteSTArray marr (safeIndex (l,u) n i) e
209hunk ./GHC/Arr.lhs 682
210-unsafeWriteSTArray (STArray _ _ marr#) (I# i#) e = ST $ \s1# ->
211-    case writeArray# marr# i# e s1#     of { s2# ->
212-    (# s2#, () #) }
213+unsafeWriteSTArray (STArray _ _ _ marr#) (I# i#) e = ST $ \s1# ->
214+    case writeArray# marr# i# e s1# of
215+        s2# -> (# s2#, () #)
216hunk ./GHC/Arr.lhs 696
217-freezeSTArray (STArray l u marr#) = ST $ \s1# ->
218-    case rangeSize (l,u)                of { I# n# ->
219+freezeSTArray (STArray l u n@(I# n#) marr#) = ST $ \s1# ->
220hunk ./GHC/Arr.lhs 705
221-    (# s4#, Array l u arr# #) }}}}
222+    (# s4#, Array l u n arr# #) }}}
223hunk ./GHC/Arr.lhs 709
224-unsafeFreezeSTArray (STArray l u marr#) = ST $ \s1# ->
225+unsafeFreezeSTArray (STArray l u n marr#) = ST $ \s1# ->
226hunk ./GHC/Arr.lhs 711
227-    (# s2#, Array l u arr# #) }
228+    (# s2#, Array l u n arr# #) }
229hunk ./GHC/Arr.lhs 714
230-thawSTArray (Array l u arr#) = ST $ \s1# ->
231-    case rangeSize (l,u)                of { I# n# ->
232+thawSTArray (Array l u n@(I# n#) arr#) = ST $ \s1# ->
233hunk ./GHC/Arr.lhs 722
234-    (# s3#, STArray l u marr# #) }}}
235+    (# s3#, STArray l u n marr# #) }}
236hunk ./GHC/Arr.lhs 726
237-unsafeThawSTArray (Array l u arr#) = ST $ \s1# ->
238+unsafeThawSTArray (Array l u n arr#) = ST $ \s1# ->
239hunk ./GHC/Arr.lhs 728
240-    (# s2#, STArray l u marr# #) }
241+    (# s2#, STArray l u n marr# #) }
246[Clarify the swapMVar haddock doc
247Ian Lynagh <igloo@earth.li>**20070807185557]
248[fix Haddock markup
249Simon Marlow <simonmar@microsoft.com>**20070802081717]
250[Temporarily fix breakage for nhc98.
252 A recent patch to System.IO introduced a cyclic dependency on Foreign.C.Error,
253 and also inadvertently dragged along System.Posix.Internals which has
254 non-H'98 layout, causing many build problems.  The solution for now
255 is to #ifndef __NHC__ all of the recent the openTempFile additions,
256 and mark them non-portable once again.  (I also took the opportunity
257 to note a number of other non-portable functions in their Haddock
260[Generalise the type of synthesize, as suggested by Trac #1571
263 I have not looked at the details, but the type checker is happy with the
264 more general type, and more general types are usually a Good Thing.
267[Fix fdToHandle on Windows
268Ian Lynagh <igloo@earth.li>**20070730133139
269 The old setmode code was throwing an exception, and I'm not sure it is
270 meant to do what we need anyway. For now we assume that all FDs are
271 both readable and writable.
273[Handle buffers should be allocated with newPinnedByteArray# always
274Simon Marlow <simonmar@microsoft.com>**20070725095550
275 Not just on Windows.  This change is required because we now use safe
276 foreign calls for I/O on blocking file descriptors with the threaded
277 RTS.  Exposed by concio001.thr on MacOS X: MacOS apparently uses
278 smaller buffers by default, so they weren't being allocated as large
279 objects.
282[Correct Windows OS name in cabal configuration
283Ian Lynagh <igloo@earth.li>**20070729161739]
284[Use cabal configurations rather than Setup hacks
285Ian Lynagh <igloo@earth.li>**20070729132157]
286[fix Hugs implementation of openTempFile
287Ross Paterson <ross@soi.city.ac.uk>**20070724114003]
288[Hugs only: avoid dependency cycle
289Ross Paterson <ross@soi.city.ac.uk>**20070724113852]
290[open(Binary)TempFile is now portable
291Ian Lynagh <igloo@earth.li>**20070722152752]
292[Tweak temporary file filename chooser
293Ian Lynagh <igloo@earth.li>**20070722105445]
294[Move open(Binary)TempFile to System.IO
295Ian Lynagh <igloo@earth.li>**20070722010205]
296[Rename openFd to fdToHandle'
297Ian Lynagh <igloo@earth.li>**20070721235538
298 The name collision with System.Posix.IO.openFd made my brain hurt.
300[Add a test for Data.Map, for a bug on the libraries@ list
301Ian Lynagh <igloo@earth.li>**20070721002119]
302[fix Data.Map.updateAt
303Bertram Felgenhauer <int-e@gmx.de>**20070718150340
304 See http://haskell.org/pipermail/libraries/2007-July/007785.html for a piece
305 of code triggering the bug. updateAt threw away parts of the tree making up
306 the map.
308[in hClose, free the handle buffer by replacing it with an empty one
309Simon Marlow <simonmar@microsoft.com>**20070719161419
310 This helps reduce the memory requirements for a closed but unfinalised
311 Handle.
313[Implement GHC.Environment.getFullArgs
314Ian Lynagh <igloo@earth.li>**20070717141918
315 This returns all the arguments, including those normally eaten by the
316 RTS (+RTS ... -RTS).
317 This is mainly for ghc-inplace, where we need to pass /all/ the
318 arguments on to the real ghc. e.g. ioref001(ghci) was failing because
319 the +RTS -K32m -RTS wasn't getting passed on.
321[Define stripPrefix; fixes trac #1464
322Ian Lynagh <igloo@earth.li>**20070714235204]
323[no need to hide Maybe
325[Add a more efficient Data.List.foldl' for GHC (from GHC's utils/Util.lhs)
326Ian Lynagh <igloo@earth.li>**20070706205526]
327[Remove include-dirs ../../includes and ../../rts
328Ian Lynagh <igloo@earth.li>**20070705205356
329 We get these by virtue of depending on the rts package.
331[FIX #1131 (newArray_ allocates an array full of garbage)
332Simon Marlow <simonmar@microsoft.com>**20070704102020
333 Now newArray_ returns a deterministic result in the ST monad, and
334 behaves as before in other contexts.  The current newArray_ is renamed
335 to unsafeNewArray_; the MArray class therefore has one more method
336 than before.
338[change nhc98 option from -prelude to --prelude
340[Word is a type synonym in nhc98 - so class instance not permitted.
342[fix bug in writes to blocking FDs in the non-threaded RTS
343Simon Marlow <simonmar@microsoft.com>**20070628134320]
344[Modernize printf.
347 Add instances for Int8, Int16, Int32, Int64, Word, Word8, Word16, Word32, and
348 Word64.
349 Handle + flag.
350 Handle X, E, and G formatting characters.
351 Rewrite internals to make it simpler.
353[Speed up number printing and remove the need for Array by using the standard 'intToDigit' routine
354John Meacham <john@repetae.net>**20070608182353]
355[Use "--  //" (2 spaces) rather than "-- //" (1) to avoid tripping haddock up
356Ian Lynagh <igloo@earth.li>**20070627010930
357 Are we nearly there yet?
359[Use a combination of Haskell/C comments to ensure robustness.
361 e.g. -- // ensures that _no_ preprocessor will try to tokenise the
362 rest of the line.
364[Change C-style comments to Haskell-style.
366 These two headers are only ever used for pre-processing Haskell code,
367 and are never seen by any C tools except cpp.  Using the Haskell comment
368 convention means that cpphs no longer needs to be given the --strip
369 option to remove C comments from open code.  This is a Good Thing,
370 because all of /* */ and // are valid Haskell operator names, and there
371 is no compelling reason to forbid using them in files which also happen
372 to have C-preprocessor directives.
374[makefileHook needs to generate PrimopWrappers.hs too
375Simon Marlow <simonmar@microsoft.com>**20070622073424]
376[Hugs now gets MonadFix(mfix) from its prelude
377Ross Paterson <ross@soi.city.ac.uk>**20070620000343]
378[Typo (consUtils.hs -> consUtils.h)
379Ian Lynagh <igloo@earth.li>**20070619124140]
380[install dependent include files and Typeable.h
381Bertram Felgenhauer <int-e@gmx.de>**20070613041734]
382[update prototype following inputReady->fdReady change
383Simon Marlow <simonmar@microsoft.com>**20070614095309]
384[FIX hGetBuf001: cut-and-pasto in readRawBufferNoBlock
385Simon Marlow <simonmar@microsoft.com>**20070614094222]
386[fix description of CWStringLen
387Ross Paterson <ross@soi.city.ac.uk>**20070605223345]
388[Remove unsafeCoerce-importing kludgery in favor of Unsafe.Coerce
389Isaac Dupree <id@isaac.cedarswampstudios.org>**20070601203625]
390[--configure-option and --ghc-option are now provided by Cabal
391Ross Paterson <ross@soi.city.ac.uk>**20070604115233]
392[Data.PackedString: Data.Generics is GHC-only
393Ross Paterson <ross@soi.city.ac.uk>**20070529232427]
394[Add Data instance for PackedString; patch from greenrd in trac #1263
395Ian Lynagh <igloo@earth.li>**20070529205420]
396[Control.Concurrent documentation fix
398[add nhc98-options: field to .cabal file
400[add a dummy implementation of System.Timeout.timeout for nhc98
402[Add System.Timeout to base.cabal
403Ian Lynagh <igloo@earth.li>**20070527123314
404 Filtered out for non-GHC by Setup.hs.
406[add module Data.Fixed to nhc98 build
408[DIRS now lives in package Makefile, not script/pkgdirlist
410[delete unused constants
411Ross Paterson <ross@soi.city.ac.uk>**20070525001741]
412[remove System.Cmd and System.Time too
414[remove locale as well
416[nhc98 version of instance Show (a->b) copied from Prelude
418[remove directory, pretty, and random bits from base for nhc98
420[Remove Makefile and package.conf.in (used in the old build system)
421Ian Lynagh <igloo@earth.li>**20070524142545]
422[Split off process package
423Ian Lynagh <igloo@earth.li>**20070523210523]
424[Fix comment: maperrno is in Win32Utils.c, not runProcess.c
425Ian Lynagh <igloo@earth.li>**20070523181331]
426[System.Locale is now split out
427Ian Lynagh <igloo@earth.li>**20070519132638]
428[Split off directory, random and old-time packages
429Ian Lynagh <igloo@earth.li>**20070519120642]
430[Remove Control.Parallel*, now in package parallel
431Ian Lynagh <igloo@earth.li>**20070518165431]
432[Remove the pretty-printing modules (now in package pretty(
433Ian Lynagh <igloo@earth.li>**20070518162521]
434[add install-includes: field
435Simon Marlow <simonmar@microsoft.com>**20070517094948]
436[correct the documentation for newForeignPtr
437Simon Marlow <simonmar@microsoft.com>**20070516082019]
438[When doing safe writes, handle EAGAIN rather than raising an exception
439Simon Marlow <simonmar@microsoft.com>**20070515114615
440 It might be that stdin was set to O_NONBLOCK by someone else, and we
441 should handle this case.  (this happens with GHCi, I'm not quite sure why)
443[Use FilePath to make paths when building GHC/Prim.hs and GHC/PrimopWrappers.hs
444Ian Lynagh <igloo@earth.li>**20070514110409]
445[fix imports for non-GHC
446Ross Paterson <ross@soi.city.ac.uk>**20070513001138]
447[Give an example of how intersection takes elements from the first set
448Ian Lynagh <igloo@earth.li>**20070512160253]
449[further clarify the docs for 'evaluate'
451[improve documentation for evaluate
452Simon Marlow <simonmar@microsoft.com>**20070508081712]
453[FIX: #724 (tee complains if used in a process started by ghc)
454Simon Marlow <simonmar@microsoft.com>**20070507123537
456 Now, we only set O_NONBLOCK on file descriptors that we create
457 ourselves.  File descriptors that we inherit (stdin, stdout, stderr)
458 are kept in blocking mode.  The way we deal with this differs between
459 the threaded and non-threaded runtimes:
461  - with -threaded, we just make a safe foreign call to read(), which
462    may block, but this is ok.
464  - without -threaded, we test the descriptor with select() before
465    attempting any I/O.  This isn't completely safe - someone else
466    might read the data between the select() and the read() - but it's
467    a reasonable compromise and doesn't seem to measurably affect
468    performance.
470[the "unknown" types are no longer required
471Simon Marlow <simonmar@microsoft.com>**20070426135931]
472[Build GHC/Prim.hs and GHC/PrimopWrappers.hs from Cabal
473Ian Lynagh <igloo@earth.li>**20070509142655]
474[Make Control.Exception buildable by nhc98.
476 The nhc98 does not have true exceptions, but these additions should be
477 enough infrastructure to pretend that it does.  Only IO exceptions will
478 actually work.
480[Trim imports, remove a cycle
483 A first attempt at removing gratuitous cycles in the base package.
484 I've removed the useless module GHC.Dynamic, which gets rid of a cycle;
485 and trimmed off various unnecesary imports.
487 This also fixes the IsString import problem.
490[Be less quiet about building the base package
492[Remove Splittable class (a vestige of linear implicit parameters)
494[Add IsString to exports of GHC.Exts
496[tweak documentation as per suggestion from Marc Weber on libraries@haskell.org
497Simon Marlow <simonmar@microsoft.com>**20070426075921]
498[Add extra libraries when compiling with GHC on Windows
499Ian Lynagh <igloo@earth.li>**20070424213127]
500[Follow Cabal changes in Setup.hs
501Ian Lynagh <igloo@earth.li>**20070418114345]
502[inclusion of libc.h is conditional on __APPLE__
504[MERGE: fix ugly uses of memcpy foreign import inside ST
505Simon Marlow <simonmar@microsoft.com>**20070416101530
506 fixes cg026
508[Fix configure with no --with-cc
509Ian Lynagh <igloo@earth.li>**20070415165143]
510[MacOS 10.3 needs #include <libc.h> as well
512[For nhc98 only, use hsc2hs to determine System.Posix.Types.
514 Avoids the existing autoconf stuff, by introducing an auxiliary module
515 called NHC.PosixTypes that uses hsc2hs, which is then simply re-exported
516 from System.Posix.Types.
518[we need a makefileHook too
519Simon Marlow <simonmar@microsoft.com>**20070413151307]
520[Remove unnecesary SOURCE import of GHC.Err in GHC.Pack
521Ian Lynagh <igloo@earth.li>**20070412235908]
522[add System.Posix.Types to default nhc98 build
524[mark System.IO.openTempFile as non-portable in haddocks
526[Don't turn on -Werror in Data.Fixed
527Ian Lynagh <igloo@earth.li>**20070411155721
528 This may be responsible for the x86_64/Linux nightly build failing.
530[Fix -Wall warnings
531Ian Lynagh <igloo@earth.li>**20070411004929]
532[Add missing case in removePrefix
533Ian Lynagh <igloo@earth.li>**20070411002537]
534[Allow additional options to pass on to ./configure to be given
535Ian Lynagh <igloo@earth.li>**20070406151856]
536[Hugs only: fix location of unsafeCoerce
537Ross Paterson <ross@soi.city.ac.uk>**20070406113731]
538[fix isPortableBuild test
539Ross Paterson <ross@soi.city.ac.uk>**20070406111304]
540[Unsafe.Coerce doesn't need Prelude
541Ian Lynagh <igloo@earth.li>**20070405175930]
542[make Setup and base.cabal suitable for building the libraries with GHC
543Ian Lynagh <igloo@earth.li>**20070308163824]
544[HsByteArray doesn't exist
545Ian Lynagh <igloo@earth.li>**20070404163051]
546[Don't use Fd/FD in foreign decls
547Ian Lynagh <igloo@earth.li>**20070404155822
548 Using CInt makes it much easier to verify that it is right, and we won't
549 get caught out by possible newtype switches between CInt/Int.
551[HsByteArray doesn't exist
552Ian Lynagh <igloo@earth.li>**20070404155732]
553[Fix braino
554Ian Lynagh <igloo@earth.li>**20070404144508]
555[Fix incorrect changes to C types in a foreign import for nhc98.
557 If we use type CTime, it needs to be imported.  Also, CTime is not an
558 instance of Integral, so use some other mechanism to convert it.
560[Fix C/Haskell type mismatches
561Ian Lynagh <igloo@earth.li>**20070403194943]
562[add new module Unsafe.Coerce to build system
564[Fix type mismatches between foreign imports and HsBase.h
565Ian Lynagh <igloo@earth.li>**20070403001611
567 Merge to stable, checking for interface changes.
569[put 'unsafeCoerce' in a standard location
571[fix for nhc98 build
573[Function crossMapP for fixing desugaring of comprehensions
574Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070402082906
576 Merge into 6.6 branch.
578[Add min/max handling operations for IntSet/IntMap
580[Monoid instance for Maybe and two wrappers: First and Last. trac proposal #1189
581Jeffrey Yasskin <jyasskin@gmail.com>**20070309062550]
582[Fix the type of wgencat
583Ian Lynagh <igloo@earth.li>**20070329164223]
584[fix strictness of foldr/build rule for take, see #1219
585Simon Marlow <simonmar@microsoft.com>**20070327103941]
586[remove Makefile.inc (only affects nhc98)
588[copyBytes copies bytes, not elements; fixes trac #1203
589Ian Lynagh <igloo@earth.li>**20070312113555]
590[Add ioeGetLocation, ioeSetLocation to System/IO/Error.hs; trac #1191
591Ian Lynagh <igloo@earth.li>**20070304130315]
592[fix race condition in prodServiceThread
593Simon Marlow <simonmar@microsoft.com>**20070307134330
594 See #1187
596[Prevent duplication of unsafePerformIO on a multiprocessor
597Simon Marlow <simonmar@microsoft.com>**20070306145424
598 Fixes #986.  The idea is to add a new operation
600   noDuplicate :: IO ()
602 it is guaranteed that if two threads have executed noDuplicate, then
603 they are not duplicating any computation.
605 We now provide two new unsafe operations:
607 unsafeDupablePerformIO    :: IO a -> a
608 unsafeDupableInterleaveIO :: IO a -> IO a
610 which are equivalent to the old unsafePerformIO and unsafeInterleaveIO
611 respectively.  The new versions of these functions are defined as:
613 unsafePerformIO    m = unsafeDupablePerformIO (noDuplicate >> m)
614 unsafeInterleaveIO m = unsafeDupableInterleaveIO (noDuplicate >> m)
616[expand docs for forkOS
617Simon Marlow <simonmar@microsoft.com>**20070305160921]
618[document timeout limitations
619Peter Simons <simons@cryp.to>**20070228223540]
620[So many people were involved in the writing of this module that
621Peter Simons <simons@cryp.to>**20070228223415
622 it feels unfair to single anyone out as the lone copyright
623 holder.
625[This patch adds a timeout function to the base libraries. Trac #980 is
626Peter Simons <simons@cryp.to>**20070126222615
627 concerned with this issue. The design guideline for this implementation
628 is that 'timeout N E' should behave exactly the same as E as long as E
629 doesn't time out. In our implementation, this means that E has the same
630 myThreadId it would have without the timeout wrapper. Any exception E
631 might throw cancels the timeout and propagates further up. It also
632 possible for E to receive exceptions thrown to it by another thread.
634[PArr: fixed permutations
635Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070305055807]
636[Add Data.String, containing IsString(fromString); trac proposal #1126
637Ian Lynagh <igloo@earth.li>**20070130134841
638 This is used by the overloaded strings extension (-foverloaded-strings in GHC).
640[GHC.PArr: add bounds checking
641Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070302053224]
642[Bump nhc98 stack size for System/Time.hsc
644[FDs are CInts now, fixing non-GHC builds
646[Fixed PArr.dropP
647Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20070222032405
648 - Thanks to Audrey Tang for the bug report
650[Keep the same FD in both halves of a duplex handle when dup'ing
651Ian Lynagh <igloo@earth.li>**20070220141039
652 Otherwise we only close one of the FDs when closing the handle.
653 Fixes trac #1149.
655[Remove more redundant FD conversions
656Ian Lynagh <igloo@earth.li>**20070220092520]
657[Fix FD changes on Windows
658Ian Lynagh <igloo@earth.li>**20070220091516]
659[Consistently use CInt rather than Int for FDs
660Ian Lynagh <igloo@earth.li>**20070219233854]
661[Fix the types of minView/maxView (ticket #1134)
663[fix for hashString, from Jan-Willem Maessen (see #1137)
664Simon Marlow <simonmar@microsoft.com>**20070215094304
667[fix to getUSecOfDay(): arithmetic was overflowing
668Simon Marlow <simonmar@microsoft.com>**20070214161719]
669[The Windows counterpart to 'wrapround of thread delays'
670Ian Lynagh <igloo@earth.li>**20070209173510]
671[wrapround of thread delays
672Neil Davies <SemanticPhilosopher@gmail.com>**20070129160519
674   * made the wrapround of the underlying O/S occur before the wrapround
675     of the delayed threads by making threads delay in microseconds since
676     O/S epoch (1970 - Unix, 1601 - Windows) stored in Word64.
677   * removed redundant calls reading O/S realtime clock
678   * removed rounding to 1/50th of sec for timers
679   * Only for Unix version of scheduler.
681[Whitespace changes only
682Ian Lynagh <igloo@earth.li>**20070206232722]
683[Add some type sigs
684Ian Lynagh <igloo@earth.li>**20070206232439]
685[Use static inline rather than extern inline/inline
686Ian Lynagh <igloo@earth.li>**20070205203628
687 I understand this is more portable, and it also fixes warnings when
688 C things we are wrapping are themselves static inlines (which FD_ISSET
689 is on ppc OS X).
691[add derived instances for Dual monoid
692Ross Paterson <ross@soi.city.ac.uk>**20070202190847]
693[add doc pointers to Foldable
694Ross Paterson <ross@soi.city.ac.uk>**20070202110931
696 Could be applied to STABLE.
698[Eliminate some warnings
699Ian Lynagh <igloo@earth.li>**20060729220854
700 Eliminate warnings in the libraries caused by mixing pattern matching
701 with numeric literal matching.
703[Remove IsString(fromString) from the Prelude
704Ian Lynagh <igloo@earth.li>**20070130124136]
705[Add Kleisli composition
706Don Stewart <dons@cse.unsw.edu.au>**20061113015442]
707[IsString is GHC-only (so why is it in the Prelude?)
708Ross Paterson <ross@soi.city.ac.uk>**20070123183007]
709[Applicative and Monad instances for Tree
710Ross Paterson <ross@soi.city.ac.uk>**20070115174510]
711[Add IsString class for overloaded string literals.
713[Added examples, more detailed documentation to Data.List Extracting sublists functions
714Andriy Palamarchuk <apa3a@yahoo.com>**20061204164710]
715[fix threadDelay
716Simon Marlow <simonmar@microsoft.com>**20070117091702
717 In "Add support for the IO manager thread" I accidentally spammed part
718 of "Make sure the threaded threadDelay sleeps at least as long as it
719 is asked", which is why the ThreadDelay001 test has been failing.
721[update section on "blocking"
722Simon Marlow <simonmar@microsoft.com>**20070116124328]
723[Fix crash with   (minBound :: Int*) `div (-1)   as result is maxBound + 1.
724Ian Lynagh <igloo@earth.li>**20070115142005]
725[version of example using Tomasz Zielonka's technique
726Ross Paterson <ross@soi.city.ac.uk>**20070105175907]
727[Added Unknowns for higher kinds
728Pepe Iborra <mnislaih@gmail.com>**20061108155938]
729[Improved the Show instance for Unknown
730Pepe Iborra <mnislaih@gmail.com>**20060813111816]
731[Show instance for GHC.Base.Unknown
733[Introduce Unknowns for the closure viewer. Add breakpointCond which was missing
735[Fix missing comma in Fractional documentation
736Alec Berryman <alec@thened.net>**20061201173237]
737[Mention that throwTo does not guarantee promptness of delivery
739[Add note about synhronous delivery of throwTo
741[documentation for installHandler
742Simon Marlow <simonmar@microsoft.com>**20061205154927
743 merge to 6.6
746Simon Marlow <simonmar@microsoft.com>**20061204095439]
747[don't try to compile this on Unix
748Simon Marlow <simonmar@microsoft.com>**20061204095427]
749[TAG 6.6 release
750Ian Lynagh <igloo@earth.li>**20061011124740]
751[TAG Version 2.1
752Ian Lynagh <igloo@earth.li>**20061009114014]
753[Bump version number
754Ian Lynagh <igloo@earth.li>**20061009114009]
755[Add support for the IO manager thread on Windows
756Simon Marlow <simonmar@microsoft.com>**20061201152042
757 Fixes #637.  The test program in that report now works for me with
758 -threaded, but it doesn't work without -threaded (I don't know if
759 that's new behaviour or not, though).
761[deriving (Eq, Ord, Enum, Show, Read, Typeab) for ConsoleEvent
762Simon Marlow <simonmar@microsoft.com>**20061201144032]
763[Make sure the threaded threadDelay sleeps at least as long as it is asked to
764Ian Lynagh <igloo@earth.li>**20061128204807]
765[Add comments about argument order to the definitions of gmapQ and constrFields
767[Hugs: add Control.Parallel.Strategies
768Ross Paterson <ross@soi.city.ac.uk>**20061124161039]
769[Move instance of Show Ptr to Ptr.hs (fewer orphans)
771[Add type signatures
773[Add an example of the use of unfoldr, following doc feedback from dozer
774Don Stewart <dons@cse.unsw.edu.au>**20061124011249]
775[trim imports
776Ross Paterson <ross@soi.city.ac.uk>**20061123190352]
777[Data.Graph is now portable (enable for nhc98)
779[remove Data.FunctorM and Data.Queue
780Ross Paterson <ross@soi.city.ac.uk>**20061112001046
782 These were deprecated in 6.6, and can thus be removed in 6.8.
784[make Data.Graph portable (no change to the interface)
785Ross Paterson <ross@soi.city.ac.uk>**20061122010040
787 The algorithm now uses STArrays on GHC and IntSets elsewhere.
788 (Hugs has STArrays, but avoiding them saves a -98, and boxed arrays
789 aren't fast under Hugs anyway.)
791[One less unsafeCoerce# in the tree
792Don Stewart <dons@cse.unsw.edu.au>**20061120120242]
793[typo in comment
794Ross Paterson <ross@soi.city.ac.uk>**20061120115106]
795[fix shift docs to match ffi spec
796Ross Paterson <ross@soi.city.ac.uk>**20061117003144]
797[(nhc98) use new primitive implementations of h{Put,Get}Buf.
799[The wrong 'cycle' was exported from Data.ByteString.Lazy.Char8, spotted by sjanssen
800Don Stewart <dons@cse.unsw.edu.au>**20061110021311]
801[LPS chunk sizes should be 16 bytes, not 17.
802Don Stewart <dons@cse.unsw.edu.au>**20061110021254]
803[Update comments on Prelude organisation in GHC/Base.lhs
804Ian Lynagh <igloo@earth.li>**20061115001926]
805[Control.Parallel.Strategies clean-up: Added export list to avoid exporting seq, fixed import list strangeness that haddock choked on, and moved the deprecated functions to a separate section.
807[Control.Parallel.Strategies: added NFData instances for Data.Int.*, Data.Word.*, Maybe, Either, Map, Set, Tree, IntMap, IntSet.
809[Control.Parallel.Strategies: deprecate sPar, sSeq, Assoc, fstPairFstList, force and sforce.
811 Code comments indicated that sPar and sSeq have been superceded by sparking and demanding, and that Assoc, fstPairFstList, force and sforce are examples and hacks needed by the Lolita system.
813[add Control.Monad.Instances to nhc98 build
815[Control.Parallel.Strategies: clarified documentation of parListChunk.
817[Added and cleaned up Haddock comments in Control.Parallel.Strategies.
819 Many of the definitions in Control.Parallel.Strategies had missing or unclear Haddock comments. I converted most of the existing plain code comments to haddock comments, added some missing documentation and cleaned up the existing Haddock mark-up.
821[Fix broken pragmas; spotted by Bulat Ziganshin
822Ian Lynagh <igloo@earth.li>**20061111205916]
823[add doc link to bound threads section
824Ross Paterson <ross@soi.city.ac.uk>**20060929103252]
825[hide Data.Array.IO.Internals
826Ross Paterson <ross@soi.city.ac.uk>**20061111113248
828 It's hidden from haddock, and everything it exports is re-exported by
829 Data.Array.IO.
831[add Data.Function
833[add Data.Function
834Ross Paterson <ross@soi.city.ac.uk>**20061110141354]
835[whitespace only
836Ross Paterson <ross@soi.city.ac.uk>**20061110141326]
837[move fix to Data.Function
838Ross Paterson <ross@soi.city.ac.uk>**20061110141120]
839[import Prelude
840Ross Paterson <ross@soi.city.ac.uk>**20061110140445]
841[Added Data.Function (Trac ticket #979).
842Nils Anders Danielsson <nad@cs.chalmers.se>**20061110122503
843 + A module with simple combinators working solely on and with
844   functions.
845 + The only new function is "on".
846 + Some functions from the Prelude are re-exported.
848[__hscore_long_path_size is not portable beyond GHC
850[redefine writeFile and appendFile using withFile
851Ross Paterson <ross@soi.city.ac.uk>**20061107140359]
852[add withFile and withBinaryFile (#966)
853Ross Paterson <ross@soi.city.ac.uk>**20061107134510]
854[remove conflicting import for nhc98
856[Add intercalate to Data.List (ticket #971)
857Josef Svenningsson <josef.svenningsson@gmail.com>**20061102122052]
858[non-GHC: fix canonicalizeFilePath
859Ross Paterson <ross@soi.city.ac.uk>**20061107133902
861 I've also removed the #ifdef __GLASGOW_HASKELL__ from the proper
862 Windows versions of a few functions.  These will need testing with
863 Hugs on Windows.
865[enable canonicalizePath for non-GHC platforms
866Simon Marlow <simonmar@microsoft.com>**20061107121141]
867[Update documentation for hWaitForInput
868Simon Marlow <simonmar@microsoft.com>**20061107111430
869 See #972
870 Merge to 6.6 branch.
872[Use unchecked shifts to implement Data.Bits.rotate
873Samuel Bronson <naesten@gmail.com>**20061012125553
874 This should get rid of those cases, maybe lower the size enough that the inliner will like it?
876[fix Haddock module headers
877Ross Paterson <ross@soi.city.ac.uk>**20061106124140]
878[fix example in docs
879Ross Paterson <ross@soi.city.ac.uk>**20061106115628]
880[Add intercalate and split to Data.List
881Josef Svenningsson <josef.svenningsson@gmail.com>*-20061024172357]
882[Data.Generics.Basics is GHC-only
883Ross Paterson <ross@soi.city.ac.uk>**20061102111736]
884[#ifdef around non-portable Data.Generics.Basics
886[Add deriving Data to Complex
888[minor clarification of RandomGen doc
889Ross Paterson <ross@soi.city.ac.uk>**20061030230842]
890[rearrange docs a bit
891Ross Paterson <ross@soi.city.ac.uk>**20061030161223]
892[Add intercalate and split to Data.List
893Josef Svenningsson <josef.svenningsson@gmail.com>**20061024172357]
894[Export pseq from Control.Parallel, and use it in Control.Parallel.Strategies
895Simon Marlow <simonmar@microsoft.com>**20061027150141]
896[`par` should be infixr 0
897Simon Marlow <simonmar@microsoft.com>**20061027130800
898 Alas, I didn't spot this due to lack of testing, and the symptom is
899 that an expression like x `par` y `seq z will have exactly the wrong
900 parallelism properties.  The workaround is to add parantheses.
902 I think we could push this to the 6.6 branch.
904[fix example in comment
905Ross Paterson <ross@soi.city.ac.uk>**20061023163925]
906[Use the new Any type for dynamics (GHC only)
908[add Data.Sequence to nhc98 build
910[Remove Data.FiniteMap, add Control.Applicative, Data.Traversable, and
912 Data.Foldable to the nhc98 build.
914[STM invariants
916[Inline shift in GHC's Bits instances for {Int,Word}{,8,16,32,64}
917Samuel Bronson <naesten@gmail.com>**20061009020906]
918[Don't create GHC.Prim when bootstrapping; we can't, and we don't need it
919Ian Lynagh <igloo@earth.li>**20061004165355]
920[Data.ByteString: fix lazyness of take, drop & splitAt
921Don Stewart <dons@cse.unsw.edu.au>**20061005011703
923 ByteString.Lazy's take, drop and splitAt were too strict when demanding
924 a byte string. Spotted by Einar Karttunen. Thanks to him and to Bertram
925 Felgenhauer for explaining the problem and the fix.
928[Fix syntax error that prevents building Haddock documentation on Windows
930[Hugs only: unbreak typeRepKey
931Ross Paterson <ross@soi.city.ac.uk>**20060929102743]
932[make hGetBufNonBlocking do something on Windows w/ -threaded
933Simon Marlow <simonmar@microsoft.com>**20060927145811
934 hGetBufNonBlocking will behave the same as hGetBuf on Windows now, which
935 is better than just crashing (which it did previously).
937[add typeRepKey :: TypeRep -> IO Int
938Simon Marlow <simonmar@microsoft.com>**20060927100342
939 See feature request #880
941[fix header comment
942Ross Paterson <ross@soi.city.ac.uk>**20060926135843]
943[Add strict versions of insertWith and insertWithKey (Data.Map)
945[doc tweaks, including more precise equations for evaluate
946Ross Paterson <ross@soi.city.ac.uk>**20060910115259]
947[Sync Data.ByteString with stable branch
948Don Stewart <dons@cse.unsw.edu.au>**20060909050111
950 This patch:
951     * hides the LPS constructor (its in .Base if you need it)
952     * adds functions to convert between strict and lazy bytestrings
953     * and adds readInteger
956[Typeable1 instances for STM and TVar
957Ross Paterson <ross@soi.city.ac.uk>**20060904231425]
958[remove obsolete Hugs stuff
959Ross Paterson <ross@soi.city.ac.uk>**20060904223944]
960[Cleaner isInfixOf suggestion from Ross Paterson
961John Goerzen <jgoerzen@complete.org>**20060901143654]
962[New function isInfixOf that searches a list for a given sublist
963John Goerzen <jgoerzen@complete.org>**20060831151556
965 Example:
967 isInfixOf "Haskell" "I really like Haskell." -> True
968 isInfixOf "Ial" "I really like Haskell." -> False
970 This function was first implemented in MissingH as MissingH.List.contains
972[Better doc on Data.Map.lookup: explain what the monad is for
974[fix hDuplicateTo on Windows
975Simon Marlow <simonmar@microsoft.com>**20060901150016
976 deja vu - I'm sure I remember fixing this before...
978[Improve documentation of atomically
980[Add missing method genRange for StdGen (fixes #794)
983        MERGE TO STABLE
985 Trac #794 reports (correctly) that the implementation of StdGen
986 only returns numbers in the range (0..something) rather than
987 (minBound, maxBound), which is what StdGen's genRange claims.
989 This commit fixes the problem, by implementing genRange for StdGen
990 (previously it just used the default method).
994[mark nhc98 import hack
995Ross Paterson <ross@soi.city.ac.uk>**20060831125219]
996[remove some outdated comments
997Simon Marlow <simonmar@microsoft.com>**20060831104200]
998[import Control.Arrow.ArrowZero to help nhc98's type checker
1000[remove Text.Regex(.Posix) from nhc98 build
1002[add Data.Foldable.{msum,asum}, plus tweaks to comments
1003Ross Paterson <ross@soi.city.ac.uk>**20060830163521]
1004[fix doc typo
1005Ross Paterson <ross@soi.city.ac.uk>**20060830134123]
1006[add Data.Foldable.{for_,forM_} and Data.Traversable.{for,forM}
1007Ross Paterson <ross@soi.city.ac.uk>**20060830133805
1009 generalizing Control.Monad.{forM_,forM}
1011[Make length a good consumer
1014 Make length into a good consumer.  Fixes Trac bug #707.
1016 (Before length simply didn't use foldr.)
1019[Add Control.Monad.forM and forM_
1020Don Stewart <dons@cse.unsw.edu.au>**20060824081118
1022 flip mapM_ is more and more common, I find. Several suggestions have
1023 been made to add this, as foreach or something similar. This patch
1024 does just that:
1026     forM  :: (Monad m) => [a] -> (a -> m b) -> m [b]
1027     forM_ :: (Monad m) => [a] -> (a -> m b) -> m ()
1029 So we can write:
1031     Prelude Control.Monad> forM_ [1..4] $ \x -> print x
1032     1
1033     2
1034     3
1035     4
1038[Hide internal module from haddock in Data.ByteString
1039Don Stewart <dons@cse.unsw.edu.au>**20060828011515]
1040[add advice on avoiding import ambiguities
1041Ross Paterson <ross@soi.city.ac.uk>**20060827170407]
1042[expand advice on importing these modules
1043Ross Paterson <ross@soi.city.ac.uk>**20060827164044]
1044[add Haddock marker
1045Ross Paterson <ross@soi.city.ac.uk>**20060827115140]
1046[Clarify how one hides Prelude.catch
1047Don Stewart <dons@cse.unsw.edu.au>**20060826124346
1049 User feedback indicated that an example was required, of how to hide
1050 Prelude.catch, so add such an example to the docs
1053[Workaround for OSes that don't have intmax_t and uintmax_t
1054Ian Lynagh <igloo@earth.li>**20060825134936
1055 OpenBSD (and possibly others) do not have intmax_t and uintmax_t types:
1056     http://www.mail-archive.com/haskell-prime@haskell.org/msg01548.html
1057 so substitute (unsigned) long long if we have them, otherwise
1058 (unsigned) long.
1061[add docs for par
1062Simon Marlow <simonmar@microsoft.com>**20060825110610]
1063[document minimal complete definition for Bits
1064Ross Paterson <ross@soi.city.ac.uk>**20060824140504]
1065[C regex library bits have moved to the regex-posix package
1066Simon Marlow <simonmar@microsoft.com>**20060824132311]
1067[Add shared Typeable support (ghc only)
1068Esa Ilari Vuokko <ei@vuokko.info>**20060823003126]
1069[this should have been removed with the previous patch
1070Simon Marlow <simonmar@microsoft.com>**20060824121223]
1071[remove Text.Regx & Text.Regex.Posix
1072Simon Marlow <simonmar@microsoft.com>**20060824094615
1073 These are subsumed by the new regex-base, regex-posix and regex-compat
1074 packages.
1076[explicitly tag Data.ByteString rules with the FPS prefix.
1077Don Stewart <dons@cse.unsw.edu.au>**20060824041326]
1078[Add spec rules for sections in Data.ByteString
1079Don Stewart <dons@cse.unsw.edu.au>**20060824012611]
1080[Sync Data.ByteString with current stable branch, 0.7
1081Don Stewart <dons@cse.unsw.edu.au>**20060823143338]
1082[add notes about why copyFile doesn't remove the target
1083Simon Marlow <simonmar@microsoft.com>**20060823095059]
1084[copyFile: try removing the target file before opening it for writing
1085Simon Marlow <simonmar@microsoft.com>*-20060822121909]
1086[copyFile: try removing the target file before opening it for writing
1087Simon Marlow <simonmar@microsoft.com>**20060822121909]
1088[add alternative functors and extra instances
1089Ross Paterson <ross@soi.city.ac.uk>**20060821152151
1091 * Alternative class, for functors with a monoid
1092 * instances for Const
1093 * instances for arrows
1095[generate Haddock docs on all platforms
1096Simon Marlow <simonmar@microsoft.com>**20060821131612]
1097[remove extra comma from import
1098Ross Paterson <ross@soi.city.ac.uk>**20060819173954]
1099[fix docs for withC(A)StringLen
1100Ross Paterson <ross@soi.city.ac.uk>**20060818170328]
1101[use Haskell'98 compliant indentation in do blocks
1103[use correct names of IOArray operations for nhc98
1105[add mapMaybe and mapEither, plus WithKey variants
1106Ross Paterson <ross@soi.city.ac.uk>**20060817235041]
1107[remove Text.Html from nhc98 build
1109[eliminate more HOST_OS tests
1110Ross Paterson <ross@soi.city.ac.uk>**20060815190609]
1111[Hugs only: disable unused process primitives
1112Ross Paterson <ross@soi.city.ac.uk>**20060813184435
1114 These were the cause of Hugs bug #30, I think, and weren't used by Hugs anyway.
1116[markup fix to Data.HashTable
1117Ross Paterson <ross@soi.city.ac.uk>**20060812103835]
1118[revert removal of ghcconfig.h from package.conf.in
1119Ross Paterson <ross@soi.city.ac.uk>**20060812082702
1121 as it's preprocessed with -undef (pointed out by Esa Ilari Vuokko)
1123[fix Data.HashTable for non-GHC
1124Ross Paterson <ross@soi.city.ac.uk>**20060811231521]
1125[remove deprecated 'withObject'
1126Simon Marlow <simonmar@microsoft.com>**20060811152350]
1127[Jan-Willem Maessen's improved implementation of Data.HashTable
1128Simon Marlow <simonmar@microsoft.com>**20060811151024
1129 Rather than incrementally enlarging the hash table, this version
1130 just does it in one go when the table gets too full.
1132[Warning police: Make some prototypes from the RTS known
1134[Warning police: Removed useless catch-all clause
1136[reduce dependency on ghcconfig.h
1137Ross Paterson <ross@soi.city.ac.uk>**20060811124030
1139 The only remaining use is in cbits/dirUtils.h, which tests solaris2_HOST_OS
1141 (Also System.Info uses ghcplatform.h and several modules import MachDeps.h
1142 to get SIZEOF_* and ALIGNMENT_* from ghcautoconf.h)
1144[(non-GHC only) track MArray interface change
1145Ross Paterson <ross@soi.city.ac.uk>**20060810182902]
1146[move Text.Html to a separate package
1147Simon Marlow <simonmar@microsoft.com>**20060810113017]
1148[bump version to 2.0
1149Simon Marlow <simonmar@microsoft.com>**20060810112833]
1150[Remove deprecated Data.FiniteMap and Data.Set interfaces
1151Simon Marlow <simonmar@microsoft.com>**20060809153810]
1152[move altzone test from ghc to base package
1153Ross Paterson <ross@soi.city.ac.uk>**20060809124259]
1154[remove unnecessary #include "ghcconfig.h"
1155Ross Paterson <ross@soi.city.ac.uk>**20060809123812]
1156[Change the API of MArray to allow resizable arrays
1157Simon Marlow <simonmar@microsoft.com>**20060809100548
1158 See #704
1160 The MArray class doesn't currently allow a mutable array to change its
1161 size, because of the pure function
1163   bounds :: (HasBounds a, Ix i) => a i e -> (i,i)
1165 This patch removes the HasBounds class, and adds
1167   getBounds :: (MArray a e m, Ix i) => a i e -> m (i,i)
1169 to the MArray class, and
1171   bounds :: (IArray a e, Ix i) => a i e -> (i,i)
1173 to the IArray class.
1175 The reason that bounds had to be incorporated into the IArray class is
1176 because I couldn't make DiffArray work without doing this.  DiffArray
1177 acts as a layer converting an MArray into an IArray, and there was no
1178 way (that I could find) to define an instance of HasBounds for
1179 DiffArray.
1181[deprecate this module.
1182Simon Marlow <simonmar@microsoft.com>**20060808100708]
1183[add traceShow (see #474)
1184Simon Marlow <simonmar@microsoft.com>**20060807155545]
1185[remove spurious 'extern "C" {'
1186Simon Marlow <simonmar@microsoft.com>**20060724160258]
1187[Fix unsafeIndex for large ranges
1188Simon Marlow <simonmar@microsoft.com>**20060721100225]
1189[disambiguate uses of foldr for nhc98 to compile without errors
1191[make Control.Monad.Instances compilable by nhc98
1194Lemmih <lemmih@gmail.com>**20060708055528]
1195[UNDO: Merge "unrecognized long opt" fix from 6.4.2
1196Simon Marlow <simonmar@microsoft.com>**20060705142537
1197 This patch undid the previous patch, "RequireOrder: do not collect
1198 unrecognised options after a non-opt".  I asked Sven to revert it, but
1199 didn't get an answer.
1201 See bug #473.
1203[Avoid strictness in accumulator for unpackFoldr
1204Don Stewart <dons@cse.unsw.edu.au>**20060703091806
1206 The seq on the accumulator for unpackFoldr will break in the presence of
1207 head/build rewrite rules. The empty list case will be forced, producing
1208 an exception. This is a known issue with seq and rewrite rules that we
1209 just stumbled on to.
1212[Disable unpack/build fusion
1213Don Stewart <dons@cse.unsw.edu.au>**20060702083913
1215 unpack/build on bytestrings seems to trigger a bug when interacting with
1216 head/build fusion in GHC.List. The bytestring001 testcase catches it.
1218 I'll investigate further, but best to disable this for now (its not
1219 often used anyway).
1221 Note that with -frules-off or ghc 6.4.2 things are fine. It seems to
1222 have emerged with the recent rules changes.
1225[Import Data.ByteString.Lazy, improve ByteString Fusion, and resync with FPS head
1226Don Stewart <dons@cse.unsw.edu.au>**20060701084345
1228 This patch imports the Data.ByteString.Lazy module, and its helpers,
1229 providing a ByteString implemented as a lazy list of strict cache-sized
1230 chunks. This type allows the usual lazy operations to be written on
1231 bytestrings, including lazy IO, with much improved space and time over
1232 the [Char] equivalents.
1235[Wibble in docs for new ForeignPtr functionsn
1236Don Stewart <dons@cse.unsw.edu.au>**20060609075924]
1237[comments for Applicative and Traversable
1238Ross Paterson <ross@soi.city.ac.uk>**20060622170436]
1239[default to NoBuffering on Windows for a read/write text file
1240Simon Marlow <simonmar@microsoft.com>**20060622144446
1241 Fixes (works around) #679
1243[remove dead code
1244Simon Marlow <simonmar@microsoft.com>**20060622144433]
1245[clarify and expand docs
1246Simon Marlow <simonmar@microsoft.com>**20060622112911]
1247[Add minView and maxView to Map and Set
1249[add signature for registerDelay
1250Ross Paterson <ross@soi.city.ac.uk>**20060614114456]
1251[a few doc comments
1252Ross Paterson <ross@soi.city.ac.uk>**20060613142704]
1253[Optimised foreign pointer representation, for heap-allocated objects
1254Don Stewart <dons@cse.unsw.edu.au>**20060608015011]
1255[Add the inline function, and many comments
1258 This commit adds the 'inline' function described in the
1259 related patch in the compiler.
1261 I've also added comments about the 'lazy' function.
1264[small intro to exceptions
1265Ross Paterson <ross@soi.city.ac.uk>**20060525111604]
1266[export breakpoint
1267Simon Marlow <simonmar@microsoft.com>**20060525090456]
1268[Merge in changes from fps head. Highlights:
1269Don Stewart <dons@cse.unsw.edu.au>**20060525065012
1271     Wed May 24 15:49:38 EST 2006  sjanssen@cse.unl.edu
1272       * instance Monoid ByteString
1274     Wed May 24 15:04:04 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1275       * Rearange export lists for the .Char8 modules
1277     Wed May 24 14:59:56 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1278       * Implement mapAccumL and reimplement mapIndexed using loopU
1280     Wed May 24 14:47:32 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1281       * Change the implementation of the unfoldr(N) functions.
1282       Use a more compact implementation for unfoldrN and change it's behaviour
1283       to only return Just in the case that it actually 'overflowed' the N, so
1284       the boundary case of unfolding exactly N gives Nothing.
1285       Implement unfoldr and Lazy.unfoldr in terms of unfoldrN. Use fibonacci
1286       growth for the chunk size in unfoldr
1288     Wed May 24 08:32:29 EST 2006  sjanssen@cse.unl.edu
1289       * Add unfoldr to ByteString and .Char8
1290       A preliminary implementation of unfoldr.
1292     Wed May 24 01:39:41 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1293       * Reorder the export lists to better match the Data.List api
1295     Tue May 23 14:04:32 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1296       * pack{Byte,Char} -> singleton. As per fptools convention
1298     Tue May 23 14:00:51 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1299       * elemIndexLast -> elemIndexEnd
1301     Tue May 23 13:57:34 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1302       * In the search for a more orthogonal api, we kill breakFirst/breakLast,
1303         which were of dubious value
1305     Tue May 23 12:24:09 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1306       * Abolish elems. It's name implied it was unpack, but its type didn't. it made no sense
1308     Tue May 23 10:42:09 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1309       * Minor doc tidyup. Use haddock markup better.
1311     Tue May 23 11:00:31 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1312       * Simplify the join() implementation. Spotted by Duncan.
1315[add a way to ask the IO manager thread to exit
1316Simon Marlow <simonmar@microsoft.com>**20060524121823]
1317[Sync with FPS head, including the following patches:
1318Don Stewart <dons@cse.unsw.edu.au>**20060520030436
1320     Thu May 18 15:45:46 EST 2006  sjanssen@cse.unl.edu
1321       * Export unsafeTake and unsafeDrop
1323     Fri May 19 11:53:08 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1324       * Add foldl1'
1326     Fri May 19 13:41:24 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1327       * Add fuseable scanl, scanl1 + properties
1329     Fri May 19 18:20:40 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1330       * Spotted another chance to use unsafeTake,Drop (in groupBy)
1332     Thu May 18 09:24:25 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1333       * More effecient findIndexOrEnd based on the impl of findIndex
1335     Thu May 18 09:22:49 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1336       * Eliminate special case in findIndex since it's handled anyway.
1338     Thu May 18 09:19:08 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1339       * Add unsafeTake and unsafeDrop
1340       These versions assume the n is in the bounds of the bytestring, saving
1341       two comparison tests. Then use them in varous places where we think this
1342       holds. These cases need double checking (and there are a few remaining
1343       internal uses of take / drop that might be possible to convert).
1344       Not exported for the moment.
1346     Tue May 16 23:15:11 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1347       * Handle n < 0 in drop and splitAt. Spotted by QC.
1349     Tue May 16 22:46:22 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1350       * Handle n <= 0 cases for unfoldr and replicate. Spotted by QC
1352     Tue May 16 21:34:11 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1353       * mapF -> map', filterF -> filter'
1356[haddock fix
1357Ross Paterson <ross@soi.city.ac.uk>**20060518154723]
1358[simplify indexing in Data.Sequence
1359Ross Paterson <ross@soi.city.ac.uk>**20060518154316]
1360[Move Eq, Ord, Show instances for ThreadId to GHC.Conc
1361Simon Marlow <simonmar@microsoft.com>**20060518113339
1362 Eliminates orphans.
1364[Better error handling in the IO manager thread
1365Simon Marlow <simonmar@microsoft.com>**20060518113303
1366 In particular, handle EBADF just like rts/posix/Select.c, by waking up
1367 all the waiting threads.  Other errors are thrown, instead of just
1368 being ignored.
1370[#define _REENTRANT 1  (needed to get the right errno on some OSs)
1371Simon Marlow <simonmar@microsoft.com>**20060518104151
1372 Part 2 of the fix for threaded RTS problems on Solaris and possibly
1373 *BSD (Part 1 was the same change in ghc/includes/Rts.h).
1375[copyCString* should be in IO. Spotted by Tomasz Zielonka
1376Don Stewart <dons@cse.unsw.edu.au>**20060518012154]
1377[add import Prelude to get dependencies right for Data/Fixed.hs
1378Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060517222044
1379 Hopefully this fixes parallel builds.
1381[Fix negative index handling in splitAt, replicate and unfoldrN. Move mapF, filterF -> map', filter' while we're here
1382Don Stewart <dons@cse.unsw.edu.au>**20060517020150]
1383[Use our own realloc. Thus reduction functions (like filter) allocate on the Haskell heap. Makes around 10% difference.
1384Don Stewart <dons@cse.unsw.edu.au>**20060513051736]
1385[Last two CInt fixes for 64 bit, and bracket writeFile while we're here
1386Don Stewart <dons@cse.unsw.edu.au>**20060512050750]
1387[Some small optimisations, generalise the type of unfold
1388Don Stewart <dons@cse.unsw.edu.au>**20060510043309
1390     Tue May  9 22:36:29 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1391       * Surely the error function should not be inlined.
1393     Tue May  9 22:35:53 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1394       * Reorder memory writes for better cache locality.
1396     Tue May  9 23:28:09 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
1397       * Generalise the type of unfoldrN
1399       The type of unfoldrN was overly constrained:
1400       unfoldrN :: Int -> (Word8 -> Maybe (Word8, Word8)) -> Word8 -> ByteString
1402       if we compare that to unfoldr:
1403       unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
1405       So we can generalise unfoldrN to this type:
1406       unfoldrN :: Int -> (a -> Maybe (Word8, a)) -> a -> ByteString
1408       and something similar for the .Char8 version. If people really do want to
1409       use it a lot with Word8/Char then perhaps we should add a specialise pragma.
1411     Wed May 10 13:26:40 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1412       * Add foldl', and thus a fusion rule for length . {map,filter,fold},
1413       that avoids creating an array at all if the end of the pipeline is a 'length' reduction
1417 Place the long patch description above the ***END OF DESCRIPTION*** marker.
1418 The first line of this file will be the patch name.
1421 This patch contains the following changes:
1423 M ./Data/ByteString.hs -8 +38
1424 M ./Data/ByteString/Char8.hs -6 +12
1426[portable implementation of WordPtr/IntPtr for non-GHC
1427Ross Paterson <ross@soi.city.ac.uk>**20060510001826
1429 plus much tweaking of imports to avoid cycles
1431[add WordPtr and IntPtr types to Foreign.Ptr, with associated conversions
1432Simon Marlow <simonmar@microsoft.com>**20060509092606
1434 As suggested by John Meacham. 
1436 I had to move the Show instance for Ptr into GHC.ForeignPtr to avoid
1437 recursive dependencies.
1439[add CIntPtr, CUIntPtr, CIntMax, CUIntMax types
1440Simon Marlow <simonmar@microsoft.com>**20060509092427]
1441[add GHC.Dynamic
1442Simon Marlow <simonmar@microsoft.com>**20060509082739]
1443[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
1444Don Stewart <dons@cse.unsw.edu.au>**20060509023425]
1445[Make length a good consumer
1448 Make length into a good consumer.  Fixes Trac bug #707.
1450 (Before length simply didn't use foldr.)
1453[Trim imports
1455[Make unsafePerformIO lazy
1458 The stricteness analyser used to have a HACK which ensured that NOINLNE things
1459 were not strictness-analysed.  The reason was unsafePerformIO. Left to itself,
1460 the strictness analyser would discover this strictness for unsafePerformIO:
1461        unsafePerformIO:  C(U(AV))
1462 But then consider this sub-expression
1463        unsafePerformIO (\s -> let r = f x in
1464                               case writeIORef v r s of (# s1, _ #) ->
1465                               (# s1, r #)
1466 The strictness analyser will now find that r is sure to be eval'd,
1467 and may then hoist it out.  This makes tests/lib/should_run/memo002
1468 deadlock.
1470 Solving this by making all NOINLINE things have no strictness info is overkill.
1471 In particular, it's overkill for runST, which is perfectly respectable.
1472 Consider
1473        f x = runST (return x)
1474 This should be strict in x.
1476 So the new plan is to define unsafePerformIO using the 'lazy' combinator:
1478        unsafePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r)
1480 Remember, 'lazy' is a wired-in identity-function Id, of type a->a, which is
1481 magically NON-STRICT, and is inlined after strictness analysis.  So
1482 unsafePerformIO will look non-strict, and that's what we want.
1485[Sync with FPS head.
1486Don Stewart <dons@cse.unsw.edu.au>**20060508122322
1488 Mon May  8 10:40:14 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1489   * Fix all uses for Int that should be CInt or CSize in ffi imports.
1490   Spotted by Igloo, dcoutts
1492 Mon May  8 16:09:41 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1493   * Import nicer loop/loop fusion rule from ghc-ndp
1495 Mon May  8 17:36:07 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1496   * Fix stack leak in split on > 60M strings
1498 Mon May  8 17:50:13 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1499   * Try same fix for stack overflow in elemIndices
1502[Fix all uses for Int that should be CInt or CSize in ffi imports. Spotted by Duncan and Ian
1503Don Stewart <dons@cse.unsw.edu.au>**20060508010311]
1504[Fixed import list syntax
1505Sven Panne <sven.panne@aedion.de>**20060507155008]
1506[Faster filterF, filterNotByte
1508[Much faster find, findIndex. Hint from sjanssen
1510[Merge "unrecognized long opt" fix from 6.4.2
1511Sven Panne <sven.panne@aedion.de>**20060506110519]
1514 Sat May  6 13:01:34 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1515   * Do loopU realloc on the Haskell heap. And add a really tough stress test
1517 Sat May  6 12:28:58 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1518   * Use simple, 3x faster concat. Plus QC properties. Suggested by sjanssen and dcoutts
1520 Sat May  6 15:59:31 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1521   * dcoutt's packByte bug squashed
1523   With inlinePerformIO, ghc head was compiling:
1525    packByte 255 `compare` packByte 127
1527   into roughly
1529    case mallocByteString 2 of
1530        ForeignPtr f internals ->
1531             case writeWord8OffAddr# f 0 255 of _ ->
1532             case writeWord8OffAddr# f 0 127 of _ ->
1533             case eqAddr# f f of
1534                    False -> case compare (GHC.Prim.plusAddr# f 0)
1535                                          (GHC.Prim.plusAddr# f 0)
1537   which is rather stunning. unsafePerformIO seems to prevent whatever
1538   magic inlining was leading to this. Only affected the head.
1541[Add array fusion versions of map, filter and foldl
1544 This patch adds fusable map, filter and foldl, using the array fusion
1545 code for unlifted, flat arrays, from the Data Parallel Haskell branch,
1546 after kind help from Roman Leshchinskiy,
1548 Pipelines of maps, filters and folds should now need to walk the
1549 bytestring once only, and intermediate bytestrings won't be constructed.
1552[fix for non-GHC
1553Ross Paterson <ross@soi.city.ac.uk>**20060504093044]
1554[use bracket in appendFile (like writeFile)
1555Ross Paterson <ross@soi.city.ac.uk>**20060504091528]
1556[writeFile: close the file on error
1557Simon Marlow <simonmar@microsoft.com>**20060504084505
1558 Suggested by Ross Paterson, via Neil Mitchell
1561[Sync with FPS head
1564 This patch brings Data.ByteString into sync with the FPS head.
1565 The most significant of which is the new Haskell counting sort.
1567 Changes:
1569 Sun Apr 30 18:16:29 EST 2006  sjanssen@cse.unl.edu
1570   * Fix foldr1 in Data.ByteString and Data.ByteString.Char8
1572 Mon May  1 11:51:16 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1573   * Add group and groupBy. Suggested by conversation between sjanssen and petekaz on #haskell
1575 Mon May  1 16:42:04 EST 2006  sjanssen@cse.unl.edu
1576   * Fix groupBy to match Data.List.groupBy.
1578 Wed May  3 15:01:07 EST 2006  sjanssen@cse.unl.edu
1579   * Migrate to counting sort.
1581   Data.ByteString.sort used C's qsort(), which is O(n log n).  The new algorithm
1582   is O(n), and is faster for strings larger than approximately thirty bytes.  We
1583   also reduce our dependency on cbits!
1586[improve performance of Integer->String conversion
1587Simon Marlow <simonmar@microsoft.com>**20060503113306
1588 See
1589  http://www.haskell.org//pipermail/libraries/2006-April/005227.html
1591 Submitted by: bertram.felgenhauer@googlemail.com
1595[inline withMVar, modifyMVar, modifyMVar_
1596Simon Marlow <simonmar@microsoft.com>**20060503111152]
1597[Fix string truncating in hGetLine -- it was a pasto from Simon's code
1598Simon Marlow <simonmar@microsoft.com>**20060503103504
1599 (from Don Stewart)
1601[Merge in Data.ByteString head. Fixes ByteString+cbits in hugs
1602Don Stewart <dons@cse.unsw.edu.au>**20060429040733]
1603[Import Data.ByteString from fps 0.5.
1604Don Stewart <dons@cse.unsw.edu.au>**20060428130718
1605 Fast, packed byte vectors, providing a better PackedString.
1608[fix previous patch
1609Ross Paterson <ross@soi.city.ac.uk>**20060501154847]
1610[fixes for non-GHC
1611Ross Paterson <ross@soi.city.ac.uk>**20060501144322]
1612[fix imports for mingw32 && !GHC
1613Ross Paterson <ross@soi.city.ac.uk>**20060427163248]
1614[RequireOrder: do not collect unrecognised options after a non-opt
1615Simon Marlow <simonmar@microsoft.com>**20060426121110
1616 The documentation for RequireOrder says "no option processing after
1617 first non-option", so it doesn't seem right that we should process the
1618 rest of the arguments to collect the unrecognised ones.  Presumably
1619 the client wants to know about the unrecognised options up to the
1620 first non-option, and will be using a different option parser for the
1621 rest of the command line.
1623 eg. before:
1625 Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"]
1626 ([],["bar","--foo"],["--foo"],[])
1628 after:
1630 Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"]
1631 ([],["bar","--foo"],[],[])
1633[fix for Haddock 0.7
1634Ashley Yakeley <ashley@semantic.org>**20060426072521]
1635[add Data.Fixed module
1636Ashley Yakeley <ashley@semantic.org>**20060425071853]
1637[add instances
1638Ross Paterson <ross@soi.city.ac.uk>**20060424102146]
1639[add superclasses to Applicative and Traversable
1640Ross Paterson <ross@soi.city.ac.uk>**20060411144734
1642 Functor is now a superclass of Applicative, and Functor and Foldable
1643 are now superclasses of Traversable.  The new hierarchy makes clear the
1644 inclusions between the classes, but means more work in defining instances.
1645 Default definitions are provided to help.
1647[add Functor and Monad instances for Prelude types
1648Ross Paterson <ross@soi.city.ac.uk>**20060410111443]
1650Lemmih <lemmih@gmail.com>**20060407125827]
1651[Track the GHC source tree reorganisation
1652Simon Marlow <simonmar@microsoft.com>**20060407041631]
1653[in the show instance for Exception, print the type of dynamic exceptions
1654Simon Marlow <simonmar@microsoft.com>**20060406112444
1655 Unfortunately this requires some recursve module hackery to get at
1656 the show instance for Typeable.
1658[implement ForeignEnvPtr, newForeignPtrEnv, addForeignPtrEnv for GHC
1659Simon Marlow <simonmar@microsoft.com>**20060405155448]
1660[add  forkOnIO :: Int -> IO () -> IO ThreadId
1661Simon Marlow <simonmar@microsoft.com>**20060327135018]
1662[Rework previous: not a gcc bug after all
1663Simon Marlow <simonmar@microsoft.com>**20060323161229
1664 It turns out that we were relying on behaviour that is undefined in C,
1665 and undefined behaviour in C means "the compiler can do whatever the
1666 hell it likes with your entire program".  So avoid that.
1668[work around a gcc 4.1.0 codegen bug in -O2 by forcing -O1 for GHC.Show
1669Simon Marlow <simonmar@microsoft.com>**20060323134514
1670 See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26824
1672[commit mysteriously missing parts of "runIOFastExit" patch
1673Simon Marlow <simonmar@microsoft.com>**20060321101535]
1674[add runIOFastExit :: IO a -> IO a
1675Simon Marlow <simonmar@microsoft.com>**20060320124333
1676 Similar to runIO, but calls stg_exit() directly to exit, rather than
1677 shutdownHaskellAndExit().  Needed for running GHCi in the test suite.
1679[Fix a broken invariant
1680Simon Marlow <simonmar@microsoft.com>**20060316134151
1681 Patch from #694,  for the problem "empty is an identity for <> and $$" is
1682 currently broken by eg. isEmpty (empty<>empty)"
1684[Add unsafeSTToIO :: ST s a -> IO a
1685Simon Marlow <simonmar@microsoft.com>**20060315160232
1686 Implementation for Hugs is missing, but should be easy.  We need this
1687 for the forthcoming nested data parallelism implementation.
1689[Added 'alter'
1691 Added 'alter :: (Maybe a -> Maybe a) -> k -> Map k a -> Map k a' to IntMap and Map
1692 This addresses ticket #665
1694[deprecate FunctorM in favour of Foldable and Traversable
1695Ross Paterson <ross@soi.city.ac.uk>**20060315092942
1696 as discussed on the libraries list.
1698[Simplify Eq, Ord, and Show instances for UArray
1699Simon Marlow <simonmar@microsoft.com>**20060313142701
1700 The Eq, Ord, and Show instances of UArray were written out longhand
1701 with one instance per element type.  It is possible to condense these
1702 into a single instance for each class, at the expense of using more
1703 extensions (non-std context on instance declaration).
1705 Suggestion by: Frederik Eaton <frederik@ofb.net>
1708[Oops typo in intSet notMember
1710[IntMap lookup now returns monad instead of Maybe.
1712[Added notMember to Data.IntSet and Data.IntMap
1714[add Data.Set.notMember and Data.Map.notMember
1715John Meacham <john@repetae.net>**20060309191806]
1716[addToClockTime: handle picoseconds properly
1717Simon Marlow <simonmar@microsoft.com>**20060310114532
1718 fixes #588
1720[make head/build rule apply to all types, not just Bool.
1721John Meacham <john@repetae.net>**20060303045753]
1722[Avoid overflow when normalising clock times
1723Ian Lynagh <igloo@earth.li>**20060210144638]
1724[Years have 365 days, not 30*365
1725Ian Lynagh <igloo@earth.li>**20060210142853]
1726[declare blkcmp() static
1727Simon Marlow <simonmar@microsoft.com>**20060223134317]
1728[typo in comment in Foldable class
1729Ross Paterson <ross@soi.city.ac.uk>**20060209004901]
1730[simplify fmap
1731Ross Paterson <ross@soi.city.ac.uk>**20060206095048]
1732[update ref in comment
1733Ross Paterson <ross@soi.city.ac.uk>**20060206095139]
1734[Give -foverlapping-instances to Data.Typeable
1737 For some time, GHC has made -fallow-overlapping-instances "sticky":
1738 any instance in a module compiled with -fallow-overlapping-instances
1739 can overlap when imported, regardless of whether the importing module
1740 allows overlap.  (If there is an overlap, both instances must come from
1741 modules thus compiled.)
1743 Instances in Data.Typeable might well want to be overlapped, so this
1744 commit adds the flag to Data.Typeable (with an explanatory comment)
1748[Add -fno-bang-patterns to modules using both bang and glasgow-exts
1750[When splitting a bucket, keep the contents in the same order
1751Simon Marlow <simonmar@microsoft.com>**20060201130427
1752 To retain the property that multiple inserts shadow each other
1753 (see ticket #661, test hash001)
1755[add foldr/build optimisation for take and replicate
1756Simon Marlow <simonmar@microsoft.com>**20060126164603
1757 This allows take to be deforested, and improves performance of
1758 replicate and replicateM/replicateM_.  We have a separate problem that
1759 means expressions involving [n..m] aren't being completely optimised
1760 because eftIntFB isn't being inlined but otherwise the results look
1761 good. 
1763 Sadly this has invalidated a number of the nofib benchmarks which were
1764 erroneously using take to duplicate work in a misguided attempt to
1765 lengthen their runtimes (ToDo).
1767[Generate PrimopWrappers.hs with Haddock docs
1768Simon Marlow <simonmar@microsoft.com>**20060124131121
1769 Patch originally from Dinko Tenev <dinko.tenev@gmail.com>, modified
1770 to add log message by me.
1772[[project @ 2006-01-19 14:47:15 by ross]
1774 backport warning avoidance from Haddock
1776[[project @ 2006-01-18 11:45:47 by malcolm]
1778 Fix import of Ix for nhc98.
1780[[project @ 2006-01-17 09:38:38 by ross]
1782 add Ix instance for GeneralCategory.
1784[TAG Initial conversion from CVS complete
1785John Goerzen <jgoerzen@complete.org>**20060112154126]
1786Patch bundle hash: