Ticket #724: nonblock.patch

File nonblock.patch, 51.2 KB (added by simonmar, 8 years ago)
2New patches:
4[don't put stdin in O_NONBLOCK mode; partial fix for #724
5Simon Marlow <[email protected]>**20070118112305] {
6hunk ./GHC/Handle.hs 531
9+NOTE [nonblock]:
11+Unix has broken semantics when it comes to non-blocking I/O: you can
12+set the O_NONBLOCK flag on an FD, but it applies to the all other FDs
13+attached to the same underlying file, pipe or TTY; there's no way to
14+have private non-blocking behaviour for an FD.  See bug #724.
16+We fix this by only setting O_NONBLOCK on FDs that we create; FDs that
17+come from external source are left alone, and we avoid doing
18+non-blocking reads on these.  This solution has some problems though.
19+We can't completely simulate a non-blocking read without O_NONBLOCK:
20+several cases are wrong here.  The cases that are wrong:
22+  * reading/writing to a blocking FD in non-threaded
23+    (in threaded mode, we just make a safe call to read(), in non-threaded
24+    mode, this will block all the other threads).
25+  * readRawBufferNoBlock for a blocking FD
27+We could be slightly more clever.  For example, in the non-threaded
28+RTS we could do threadWaitRead before read(), but that suffers from a
29+small race window where someone could read the data.  So we could
30+catch the blocked read when it periodically wakes up with EINTR, but
31+that's ugly.  We don't care too much about the non-threaded RTS: if
32+you want non-blocking reads from stdin, just use -threaded.
35hunk ./GHC/Handle.hs 560
36-readRawBuffer loc fd is_stream buf off len =
37-  throwErrnoIfMinus1RetryMayBlock loc
38-           (read_rawBuffer fd buf off len)
39-           (threadWaitRead (fromIntegral fd))
40+readRawBuffer loc fd is_nonblock buf off len
41+  | is_nonblock
42+  = throwErrnoIfMinus1RetryMayBlock loc
43+        (read_rawBuffer fd buf off len)
44+        (threadWaitRead (fromIntegral fd))
45+  | otherwise
46+  = throwErrnoIfMinus1Retry loc (safe_read_rawBuffer fd buf off len)
47hunk ./GHC/Handle.hs 569
48-readRawBufferNoBlock loc fd is_stream buf off len =
49-  throwErrnoIfMinus1RetryOnBlock loc
50-           (read_rawBuffer fd buf off len)
51-           (return 0)
52+readRawBufferNoBlock loc fd is_nonblock buf off len
53+  | is_nonblock
54+  = throwErrnoIfMinus1RetryOnBlock loc
55+        (read_rawBuffer fd buf off len)
56+        (return 0)
57+  | otherwise
58+  = do r <- inputReady (fromIntegral fd) 0 False
59+       if r /= 0 then throwErrnoIfMinus1Retry loc
60+                         (safe_read_rawBuffer fd buf off len)
61+                 else return 0
62+       -- XXX see note [nonblock]
63hunk ./GHC/Handle.hs 582
64-readRawBufferPtr loc fd is_stream buf off len =
65-  throwErrnoIfMinus1RetryMayBlock loc
66-           (read_off fd buf off len)
67-           (threadWaitRead (fromIntegral fd))
68+readRawBufferPtr loc fd is_nonblock buf off len
69+  | is_nonblock
70+  = throwErrnoIfMinus1RetryMayBlock loc
71+               (read_off fd buf off len)
72+               (threadWaitRead (fromIntegral fd))
73+  | otherwise
74+  = throwErrnoIfMinus1Retry loc
75+                (safe_read_off fd buf off len)
76hunk ./GHC/Handle.hs 592
77-writeRawBuffer loc fd is_stream buf off len =
78-  throwErrnoIfMinus1RetryMayBlock loc
79+writeRawBuffer loc fd is_nonblock buf off len
80+  | is_nonblock
81+  = throwErrnoIfMinus1RetryMayBlock loc
82hunk ./GHC/Handle.hs 597
83+  | otherwise
84+  = throwErrnoIfMinus1Retry loc
85+                (safe_write_rawBuffer (fromIntegral fd) buf off len)
86hunk ./GHC/Handle.hs 602
87-writeRawBufferPtr loc fd is_stream buf off len =
88-  throwErrnoIfMinus1RetryMayBlock loc
89+writeRawBufferPtr loc fd is_nonblock buf off len
90+  | is_nonblock
91+  = throwErrnoIfMinus1RetryMayBlock loc
92hunk ./GHC/Handle.hs 607
93+  | otherwise
94+  = throwErrnoIfMinus1Retry loc
95+                (safe_write_off (fromIntegral fd) buf off len)
96hunk ./GHC/Handle.hs 623
97+foreign import ccall safe "inputReady"
98+  inputReady :: CInt -> CInt -> Bool -> IO CInt
100hunk ./GHC/Handle.hs 690
101-    recv_rawBuffer fd buf off len
102+    safe_recv_rawBuffer fd buf off len
103hunk ./GHC/Handle.hs 693
104-    read_rawBuffer fd buf off len
105+    safe_read_rawBuffer fd buf off len
106hunk ./GHC/Handle.hs 697
107-    recv_off fd buf off len
108+    safe_recv_off fd buf off len
109hunk ./GHC/Handle.hs 700
110-    read_off fd buf off len
111+    safe_read_off fd buf off len
112hunk ./GHC/Handle.hs 704
113-    send_rawBuffer (fromIntegral fd) buf off len
114+    safe_send_rawBuffer (fromIntegral fd) buf off len
115hunk ./GHC/Handle.hs 707
116-    write_rawBuffer (fromIntegral fd) buf off len
117+    safe_write_rawBuffer (fromIntegral fd) buf off len
118hunk ./GHC/Handle.hs 711
119-    send_off (fromIntegral fd) buf off len
120+    safe_send_off (fromIntegral fd) buf off len
121hunk ./GHC/Handle.hs 714
122-    write_off (fromIntegral fd) buf off len
123+    safe_write_off (fromIntegral fd) buf off len
124hunk ./GHC/Handle.hs 719
125-foreign import ccall safe "__hscore_PrelHandle_read"
126-   read_rawBuffer :: FD -> RawBuffer -> Int -> CInt -> IO CInt
128-foreign import ccall safe "__hscore_PrelHandle_read"
129-   read_off :: FD -> Ptr CChar -> Int -> CInt -> IO CInt
131-foreign import ccall safe "__hscore_PrelHandle_write"
132-   write_rawBuffer :: CInt -> RawBuffer -> Int -> CInt -> IO CInt
134-foreign import ccall safe "__hscore_PrelHandle_write"
135-   write_off :: CInt -> Ptr CChar -> Int -> CInt -> IO CInt
137hunk ./GHC/Handle.hs 720
138-   recv_rawBuffer :: FD -> RawBuffer -> Int -> CInt -> IO CInt
139+   safe_recv_rawBuffer :: FD -> RawBuffer -> Int -> CInt -> IO CInt
140hunk ./GHC/Handle.hs 723
141-   recv_off :: FD -> Ptr CChar -> Int -> CInt -> IO CInt
142+   safe_recv_off :: FD -> Ptr CChar -> Int -> CInt -> IO CInt
143hunk ./GHC/Handle.hs 726
144-   send_rawBuffer :: CInt -> RawBuffer -> Int -> CInt -> IO CInt
145+   safe_send_rawBuffer :: CInt -> RawBuffer -> Int -> CInt -> IO CInt
146hunk ./GHC/Handle.hs 729
147-   send_off :: CInt -> Ptr CChar -> Int -> CInt -> IO CInt
148+   safe_send_off :: CInt -> Ptr CChar -> Int -> CInt -> IO CInt
149hunk ./GHC/Handle.hs 734
150+foreign import ccall safe "__hscore_PrelHandle_read"
151+   safe_read_rawBuffer :: FD -> RawBuffer -> Int -> CInt -> IO CInt
153+foreign import ccall safe "__hscore_PrelHandle_read"
154+   safe_read_off :: FD -> Ptr CChar -> Int -> CInt -> IO CInt
156+foreign import ccall safe "__hscore_PrelHandle_write"
157+   safe_write_rawBuffer :: CInt -> RawBuffer -> Int -> CInt -> IO CInt
159+foreign import ccall safe "__hscore_PrelHandle_write"
160+   safe_write_off :: CInt -> Ptr CChar -> Int -> CInt -> IO CInt
162hunk ./GHC/Handle.hs 762
163-   setNonBlockingFD fd_stdin
164+   -- We don't set non-blocking mode on standard handles, because it may
165+   -- confuse other applications attached to the same TTY/pipe
166+   -- setNonBlockingFD fd_stdin
167hunk ./GHC/Handle.hs 772
168-   -- We don't set non-blocking mode on stdout or sterr, because
169-   -- some shells don't recover properly.
170+   -- We don't set non-blocking mode on standard handles, because it may
171+   -- confuse other applications attached to the same TTY/pipe
172hunk ./GHC/Handle.hs 782
173-   -- We don't set non-blocking mode on stdout or sterr, because
174-   -- some shells don't recover properly.
175+   -- We don't set non-blocking mode on standard handles, because it may
176+   -- confuse other applications attached to the same TTY/pipe
177hunk ./GHC/Handle.hs 954
178+#ifdef mingw32_HOST_OS
179+    -- On Windows, the is_stream flag indicates that the Handle is a socket
180+    let is_stream = is_socket
182+    -- On Unix, the is_stream flag indicates that the FD is non-blocking
183+    let is_stream = True
186hunk ./GHC/Handle.hs 989
187-          mkFileHandle fd is_socket filepath ha_type binary
188+          mkFileHandle fd is_stream filepath ha_type binary
189hunk ./GHC/Handle.hs 995
190-               mkDuplexHandle fd is_socket filepath binary
191+               mkDuplexHandle fd is_stream filepath binary
192hunk ./GHC/Handle.hs 997
193-               mkFileHandle   fd is_socket filepath ha_type binary
194+               mkFileHandle   fd is_stream filepath ha_type binary
195hunk ./GHC/Handle.hs 1000
196-               mkFileHandle fd is_socket filepath ha_type binary
197+               mkFileHandle fd is_stream filepath ha_type binary
198hunk ./GHC/Handle.hs 1025
199-                       haIsStream = False,
200+                       haIsStream = False, -- means FD is blocking on Unix
201hunk ./GHC/IOBase.lhs 352
202-      haIsStream    :: Bool,                -- is this a stream handle?
203+      haIsStream    :: Bool,                -- Windows : is this a socket?
204+                                             -- Unix    : is O_NONBLOCK set?
209[fix threadDelay
210Simon Marlow <[email protected]>**20070117091702
211 In "Add support for the IO manager thread" I accidentally spammed part
212 of "Make sure the threaded threadDelay sleeps at least as long as it
213 is asked", which is why the ThreadDelay001 test has been failing.
215[update section on "blocking"
216Simon Marlow <[email protected]>**20070116124328]
217[Fix crash with   (minBound :: Int*) `div (-1)   as result is maxBound + 1.
218Ian Lynagh <[email protected]>**20070115142005]
219[version of example using Tomasz Zielonka's technique
220Ross Paterson <[email protected]>**20070105175907]
221[Added Unknowns for higher kinds
222Pepe Iborra <[email protected]>**20061108155938]
223[Improved the Show instance for Unknown
224Pepe Iborra <[email protected]>**20060813111816]
225[Show instance for GHC.Base.Unknown
226[email protected]**20060801233530]
227[Introduce Unknowns for the closure viewer. Add breakpointCond which was missing
228[email protected]**20060725174537]
229[Fix missing comma in Fractional documentation
230Alec Berryman <[email protected]>**20061201173237]
231[Mention that throwTo does not guarantee promptness of delivery
233[Add note about synhronous delivery of throwTo
235[documentation for installHandler
236Simon Marlow <[email protected]>**20061205154927
237 merge to 6.6
240Simon Marlow <[email protected]>**20061204095439]
241[don't try to compile this on Unix
242Simon Marlow <[email protected]>**20061204095427]
243[TAG 6.6 release
244Ian Lynagh <[email protected]>**20061011124740]
245[TAG Version 2.1
246Ian Lynagh <[email protected]>**20061009114014]
247[Bump version number
248Ian Lynagh <[email protected]>**20061009114009]
249[Add support for the IO manager thread on Windows
250Simon Marlow <[email protected]>**20061201152042
251 Fixes #637.  The test program in that report now works for me with
252 -threaded, but it doesn't work without -threaded (I don't know if
253 that's new behaviour or not, though).
255[deriving (Eq, Ord, Enum, Show, Read, Typeab) for ConsoleEvent
256Simon Marlow <[email protected]>**20061201144032]
257[Make sure the threaded threadDelay sleeps at least as long as it is asked to
258Ian Lynagh <[email protected]>**20061128204807]
259[Add comments about argument order to the definitions of gmapQ and constrFields
261[Hugs: add Control.Parallel.Strategies
262Ross Paterson <[email protected]>**20061124161039]
263[Move instance of Show Ptr to Ptr.hs (fewer orphans)
264[email protected]**20061124100639]
265[Add type signatures
266[email protected]**20061124100621]
267[Add an example of the use of unfoldr, following doc feedback from dozer
268Don Stewart <[email protected]>**20061124011249]
269[trim imports
270Ross Paterson <[email protected]>**20061123190352]
271[Data.Graph is now portable (enable for nhc98)
272[email protected]**20061123174913]
273[remove Data.FunctorM and Data.Queue
274Ross Paterson <[email protected]>**20061112001046
276 These were deprecated in 6.6, and can thus be removed in 6.8.
278[make Data.Graph portable (no change to the interface)
279Ross Paterson <[email protected]>**20061122010040
281 The algorithm now uses STArrays on GHC and IntSets elsewhere.
282 (Hugs has STArrays, but avoiding them saves a -98, and boxed arrays
283 aren't fast under Hugs anyway.)
285[One less unsafeCoerce# in the tree
286Don Stewart <[email protected]>**20061120120242]
287[typo in comment
288Ross Paterson <[email protected]>**20061120115106]
289[fix shift docs to match ffi spec
290Ross Paterson <[email protected]>**20061117003144]
291[(nhc98) use new primitive implementations of h{Put,Get}Buf.
292[email protected]**20061116173104]
293[The wrong 'cycle' was exported from Data.ByteString.Lazy.Char8, spotted by sjanssen
294Don Stewart <[email protected]>**20061110021311]
295[LPS chunk sizes should be 16 bytes, not 17.
296Don Stewart <[email protected]>**20061110021254]
297[Update comments on Prelude organisation in GHC/Base.lhs
298Ian Lynagh <[email protected]>**20061115001926]
299[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.
300[email protected]**20061113224202]
301[Control.Parallel.Strategies: added NFData instances for Data.Int.*, Data.Word.*, Maybe, Either, Map, Set, Tree, IntMap, IntSet.
302[email protected]**20061113221843]
303[Control.Parallel.Strategies: deprecate sPar, sSeq, Assoc, fstPairFstList, force and sforce.
304[email protected]**20061113215219
305 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.
307[add Control.Monad.Instances to nhc98 build
308[email protected]**20061113113221]
309[Control.Parallel.Strategies: clarified documentation of parListChunk.
310[email protected]**20061112232904]
311[Added and cleaned up Haddock comments in Control.Parallel.Strategies.
312[email protected]**20061112220445
313 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.
315[Fix broken pragmas; spotted by Bulat Ziganshin
316Ian Lynagh <[email protected]>**20061111205916]
317[add doc link to bound threads section
318Ross Paterson <[email protected]>**20060929103252]
319[hide Data.Array.IO.Internals
320Ross Paterson <[email protected]>**20061111113248
322 It's hidden from haddock, and everything it exports is re-exported by
323 Data.Array.IO.
325[add Data.Function
326[email protected]**20061110142710]
327[add Data.Function
328Ross Paterson <[email protected]>**20061110141354]
329[whitespace only
330Ross Paterson <[email protected]>**20061110141326]
331[move fix to Data.Function
332Ross Paterson <[email protected]>**20061110141120]
333[import Prelude
334Ross Paterson <[email protected]>**20061110140445]
335[Added Data.Function (Trac ticket #979).
336Nils Anders Danielsson <[email protected]>**20061110122503
337 + A module with simple combinators working solely on and with
338   functions.
339 + The only new function is "on".
340 + Some functions from the Prelude are re-exported.
342[__hscore_long_path_size is not portable beyond GHC
343[email protected]**20061110113222]
344[redefine writeFile and appendFile using withFile
345Ross Paterson <[email protected]>**20061107140359]
346[add withFile and withBinaryFile (#966)
347Ross Paterson <[email protected]>**20061107134510]
348[remove conflicting import for nhc98
349[email protected]**20061108111215]
350[Add intercalate to Data.List (ticket #971)
351Josef Svenningsson <[email protected]>**20061102122052]
352[non-GHC: fix canonicalizeFilePath
353Ross Paterson <[email protected]>**20061107133902
355 I've also removed the #ifdef __GLASGOW_HASKELL__ from the proper
356 Windows versions of a few functions.  These will need testing with
357 Hugs on Windows.
359[enable canonicalizePath for non-GHC platforms
360Simon Marlow <[email protected]>**20061107121141]
361[Update documentation for hWaitForInput
362Simon Marlow <[email protected]>**20061107111430
363 See #972
364 Merge to 6.6 branch.
366[Use unchecked shifts to implement Data.Bits.rotate
367Samuel Bronson <[email protected]>**20061012125553
368 This should get rid of those cases, maybe lower the size enough that the inliner will like it?
370[fix Haddock module headers
371Ross Paterson <[email protected]>**20061106124140]
372[fix example in docs
373Ross Paterson <[email protected]>**20061106115628]
374[Add intercalate and split to Data.List
375Josef Svenningsson <[email protected]>*-20061024172357]
376[Data.Generics.Basics is GHC-only
377Ross Paterson <[email protected]>**20061102111736]
378[#ifdef around non-portable Data.Generics.Basics
379[email protected]**20061102103445]
380[Add deriving Data to Complex
382[minor clarification of RandomGen doc
383Ross Paterson <[email protected]>**20061030230842]
384[rearrange docs a bit
385Ross Paterson <[email protected]>**20061030161223]
386[Add intercalate and split to Data.List
387Josef Svenningsson <[email protected]>**20061024172357]
388[Export pseq from Control.Parallel, and use it in Control.Parallel.Strategies
389Simon Marlow <[email protected]>**20061027150141]
390[`par` should be infixr 0
391Simon Marlow <[email protected]>**20061027130800
392 Alas, I didn't spot this due to lack of testing, and the symptom is
393 that an expression like x `par` y `seq z will have exactly the wrong
394 parallelism properties.  The workaround is to add parantheses.
396 I think we could push this to the 6.6 branch.
398[fix example in comment
399Ross Paterson <[email protected]>**20061023163925]
400[Use the new Any type for dynamics (GHC only)
402[add Data.Sequence to nhc98 build
403[email protected]**20061012135200]
404[Remove Data.FiniteMap, add Control.Applicative, Data.Traversable, and
405[email protected]**20061012095605
406 Data.Foldable to the nhc98 build.
408[STM invariants
409[email protected]**20061007123253]
410[Inline shift in GHC's Bits instances for {Int,Word}{,8,16,32,64}
411Samuel Bronson <[email protected]>**20061009020906]
412[Don't create GHC.Prim when bootstrapping; we can't, and we don't need it
413Ian Lynagh <[email protected]>**20061004165355]
414[Data.ByteString: fix lazyness of take, drop & splitAt
415Don Stewart <[email protected]>**20061005011703
417 ByteString.Lazy's take, drop and splitAt were too strict when demanding
418 a byte string. Spotted by Einar Karttunen. Thanks to him and to Bertram
419 Felgenhauer for explaining the problem and the fix.
422[Fix syntax error that prevents building Haddock documentation on Windows
423[email protected]**20060917013530]
424[Hugs only: unbreak typeRepKey
425Ross Paterson <[email protected]>**20060929102743]
426[make hGetBufNonBlocking do something on Windows w/ -threaded
427Simon Marlow <[email protected]>**20060927145811
428 hGetBufNonBlocking will behave the same as hGetBuf on Windows now, which
429 is better than just crashing (which it did previously).
431[add typeRepKey :: TypeRep -> IO Int
432Simon Marlow <[email protected]>**20060927100342
433 See feature request #880
435[fix header comment
436Ross Paterson <[email protected]>**20060926135843]
437[Add strict versions of insertWith and insertWithKey (Data.Map)
438[email protected]**20060910162443]
439[doc tweaks, including more precise equations for evaluate
440Ross Paterson <[email protected]>**20060910115259]
441[Sync Data.ByteString with stable branch
442Don Stewart <[email protected]>**20060909050111
444 This patch:
445     * hides the LPS constructor (its in .Base if you need it)
446     * adds functions to convert between strict and lazy bytestrings
447     * and adds readInteger
450[Typeable1 instances for STM and TVar
451Ross Paterson <[email protected]>**20060904231425]
452[remove obsolete Hugs stuff
453Ross Paterson <[email protected]>**20060904223944]
454[Cleaner isInfixOf suggestion from Ross Paterson
455John Goerzen <[email protected]>**20060901143654]
456[New function isInfixOf that searches a list for a given sublist
457John Goerzen <[email protected]>**20060831151556
459 Example:
461 isInfixOf "Haskell" "I really like Haskell." -> True
462 isInfixOf "Ial" "I really like Haskell." -> False
464 This function was first implemented in MissingH as MissingH.List.contains
466[Better doc on Data.Map.lookup: explain what the monad is for
467[email protected]**20060903133440]
468[fix hDuplicateTo on Windows
469Simon Marlow <[email protected]>**20060901150016
470 deja vu - I'm sure I remember fixing this before...
472[Improve documentation of atomically
474[Add missing method genRange for StdGen (fixes #794)
477        MERGE TO STABLE
479 Trac #794 reports (correctly) that the implementation of StdGen
480 only returns numbers in the range (0..something) rather than
481 (minBound, maxBound), which is what StdGen's genRange claims.
483 This commit fixes the problem, by implementing genRange for StdGen
484 (previously it just used the default method).
488[mark nhc98 import hack
489Ross Paterson <[email protected]>**20060831125219]
490[remove some outdated comments
491Simon Marlow <[email protected]>**20060831104200]
492[import Control.Arrow.ArrowZero to help nhc98's type checker
493[email protected]**20060831101105]
494[remove Text.Regex(.Posix) from nhc98 build
495[email protected]**20060831101016]
496[add Data.Foldable.{msum,asum}, plus tweaks to comments
497Ross Paterson <[email protected]>**20060830163521]
498[fix doc typo
499Ross Paterson <[email protected]>**20060830134123]
500[add Data.Foldable.{for_,forM_} and Data.Traversable.{for,forM}
501Ross Paterson <[email protected]>**20060830133805
503 generalizing Control.Monad.{forM_,forM}
505[Make length a good consumer
508 Make length into a good consumer.  Fixes Trac bug #707.
510 (Before length simply didn't use foldr.)
513[Add Control.Monad.forM and forM_
514Don Stewart <[email protected]>**20060824081118
516 flip mapM_ is more and more common, I find. Several suggestions have
517 been made to add this, as foreach or something similar. This patch
518 does just that:
520     forM  :: (Monad m) => [a] -> (a -> m b) -> m [b]
521     forM_ :: (Monad m) => [a] -> (a -> m b) -> m ()
523 So we can write:
525     Prelude Control.Monad> forM_ [1..4] $ \x -> print x
526     1
527     2
528     3
529     4
532[Hide internal module from haddock in Data.ByteString
533Don Stewart <[email protected]>**20060828011515]
534[add advice on avoiding import ambiguities
535Ross Paterson <[email protected]>**20060827170407]
536[expand advice on importing these modules
537Ross Paterson <[email protected]>**20060827164044]
538[add Haddock marker
539Ross Paterson <ross@soi.city.ac.uk>**20060827115140]
540[Clarify how one hides Prelude.catch
541Don Stewart <dons@cse.unsw.edu.au>**20060826124346
543 User feedback indicated that an example was required, of how to hide
544 Prelude.catch, so add such an example to the docs
547[Workaround for OSes that don't have intmax_t and uintmax_t
548Ian Lynagh <igloo@earth.li>**20060825134936
549 OpenBSD (and possibly others) do not have intmax_t and uintmax_t types:
550     http://www.mail-archive.com/haskell-prime@haskell.org/msg01548.html
551 so substitute (unsigned) long long if we have them, otherwise
552 (unsigned) long.
555[add docs for par
556Simon Marlow <simonmar@microsoft.com>**20060825110610]
557[document minimal complete definition for Bits
558Ross Paterson <ross@soi.city.ac.uk>**20060824140504]
559[C regex library bits have moved to the regex-posix package
560Simon Marlow <simonmar@microsoft.com>**20060824132311]
561[Add shared Typeable support (ghc only)
562Esa Ilari Vuokko <ei@vuokko.info>**20060823003126]
563[this should have been removed with the previous patch
564Simon Marlow <simonmar@microsoft.com>**20060824121223]
565[remove Text.Regx & Text.Regex.Posix
566Simon Marlow <simonmar@microsoft.com>**20060824094615
567 These are subsumed by the new regex-base, regex-posix and regex-compat
568 packages.
570[explicitly tag Data.ByteString rules with the FPS prefix.
571Don Stewart <dons@cse.unsw.edu.au>**20060824041326]
572[Add spec rules for sections in Data.ByteString
573Don Stewart <dons@cse.unsw.edu.au>**20060824012611]
574[Sync Data.ByteString with current stable branch, 0.7
575Don Stewart <dons@cse.unsw.edu.au>**20060823143338]
576[add notes about why copyFile doesn't remove the target
577Simon Marlow <simonmar@microsoft.com>**20060823095059]
578[copyFile: try removing the target file before opening it for writing
579Simon Marlow <simonmar@microsoft.com>*-20060822121909]
580[copyFile: try removing the target file before opening it for writing
581Simon Marlow <simonmar@microsoft.com>**20060822121909]
582[add alternative functors and extra instances
583Ross Paterson <ross@soi.city.ac.uk>**20060821152151
585 * Alternative class, for functors with a monoid
586 * instances for Const
587 * instances for arrows
589[generate Haddock docs on all platforms
590Simon Marlow <simonmar@microsoft.com>**20060821131612]
591[remove extra comma from import
592Ross Paterson <ross@soi.city.ac.uk>**20060819173954]
593[fix docs for withC(A)StringLen
594Ross Paterson <ross@soi.city.ac.uk>**20060818170328]
595[use Haskell'98 compliant indentation in do blocks
597[use correct names of IOArray operations for nhc98
599[add mapMaybe and mapEither, plus WithKey variants
600Ross Paterson <ross@soi.city.ac.uk>**20060817235041]
601[remove Text.Html from nhc98 build
603[eliminate more HOST_OS tests
604Ross Paterson <ross@soi.city.ac.uk>**20060815190609]
605[Hugs only: disable unused process primitives
606Ross Paterson <ross@soi.city.ac.uk>**20060813184435
608 These were the cause of Hugs bug #30, I think, and weren't used by Hugs anyway.
610[markup fix to Data.HashTable
611Ross Paterson <ross@soi.city.ac.uk>**20060812103835]
612[revert removal of ghcconfig.h from package.conf.in
613Ross Paterson <ross@soi.city.ac.uk>**20060812082702
615 as it's preprocessed with -undef (pointed out by Esa Ilari Vuokko)
617[fix Data.HashTable for non-GHC
618Ross Paterson <ross@soi.city.ac.uk>**20060811231521]
619[remove deprecated 'withObject'
620Simon Marlow <simonmar@microsoft.com>**20060811152350]
621[Jan-Willem Maessen's improved implementation of Data.HashTable
622Simon Marlow <simonmar@microsoft.com>**20060811151024
623 Rather than incrementally enlarging the hash table, this version
624 just does it in one go when the table gets too full.
626[Warning police: Make some prototypes from the RTS known
628[Warning police: Removed useless catch-all clause
630[reduce dependency on ghcconfig.h
631Ross Paterson <ross@soi.city.ac.uk>**20060811124030
633 The only remaining use is in cbits/dirUtils.h, which tests solaris2_HOST_OS
635 (Also System.Info uses ghcplatform.h and several modules import MachDeps.h
636 to get SIZEOF_* and ALIGNMENT_* from ghcautoconf.h)
638[(non-GHC only) track MArray interface change
639Ross Paterson <ross@soi.city.ac.uk>**20060810182902]
640[move Text.Html to a separate package
641Simon Marlow <simonmar@microsoft.com>**20060810113017]
642[bump version to 2.0
643Simon Marlow <simonmar@microsoft.com>**20060810112833]
644[Remove deprecated Data.FiniteMap and Data.Set interfaces
645Simon Marlow <simonmar@microsoft.com>**20060809153810]
646[move altzone test from ghc to base package
647Ross Paterson <ross@soi.city.ac.uk>**20060809124259]
648[remove unnecessary #include "ghcconfig.h"
649Ross Paterson <ross@soi.city.ac.uk>**20060809123812]
650[Change the API of MArray to allow resizable arrays
651Simon Marlow <simonmar@microsoft.com>**20060809100548
652 See #704
654 The MArray class doesn't currently allow a mutable array to change its
655 size, because of the pure function
657   bounds :: (HasBounds a, Ix i) => a i e -> (i,i)
659 This patch removes the HasBounds class, and adds
661   getBounds :: (MArray a e m, Ix i) => a i e -> m (i,i)
663 to the MArray class, and
665   bounds :: (IArray a e, Ix i) => a i e -> (i,i)
667 to the IArray class.
669 The reason that bounds had to be incorporated into the IArray class is
670 because I couldn't make DiffArray work without doing this.  DiffArray
671 acts as a layer converting an MArray into an IArray, and there was no
672 way (that I could find) to define an instance of HasBounds for
673 DiffArray.
675[deprecate this module.
676Simon Marlow <simonmar@microsoft.com>**20060808100708]
677[add traceShow (see #474)
678Simon Marlow <simonmar@microsoft.com>**20060807155545]
679[remove spurious 'extern "C" {'
680Simon Marlow <simonmar@microsoft.com>**20060724160258]
681[Fix unsafeIndex for large ranges
682Simon Marlow <simonmar@microsoft.com>**20060721100225]
683[disambiguate uses of foldr for nhc98 to compile without errors
685[make Control.Monad.Instances compilable by nhc98
688Lemmih <lemmih@gmail.com>**20060708055528]
689[UNDO: Merge "unrecognized long opt" fix from 6.4.2
690Simon Marlow <simonmar@microsoft.com>**20060705142537
691 This patch undid the previous patch, "RequireOrder: do not collect
692 unrecognised options after a non-opt".  I asked Sven to revert it, but
693 didn't get an answer.
695 See bug #473.
697[Avoid strictness in accumulator for unpackFoldr
698Don Stewart <dons@cse.unsw.edu.au>**20060703091806
700 The seq on the accumulator for unpackFoldr will break in the presence of
701 head/build rewrite rules. The empty list case will be forced, producing
702 an exception. This is a known issue with seq and rewrite rules that we
703 just stumbled on to.
706[Disable unpack/build fusion
707Don Stewart <dons@cse.unsw.edu.au>**20060702083913
709 unpack/build on bytestrings seems to trigger a bug when interacting with
710 head/build fusion in GHC.List. The bytestring001 testcase catches it.
712 I'll investigate further, but best to disable this for now (its not
713 often used anyway).
715 Note that with -frules-off or ghc 6.4.2 things are fine. It seems to
716 have emerged with the recent rules changes.
719[Import Data.ByteString.Lazy, improve ByteString Fusion, and resync with FPS head
720Don Stewart <dons@cse.unsw.edu.au>**20060701084345
722 This patch imports the Data.ByteString.Lazy module, and its helpers,
723 providing a ByteString implemented as a lazy list of strict cache-sized
724 chunks. This type allows the usual lazy operations to be written on
725 bytestrings, including lazy IO, with much improved space and time over
726 the [Char] equivalents.
729[Wibble in docs for new ForeignPtr functionsn
730Don Stewart <dons@cse.unsw.edu.au>**20060609075924]
731[comments for Applicative and Traversable
732Ross Paterson <ross@soi.city.ac.uk>**20060622170436]
733[default to NoBuffering on Windows for a read/write text file
734Simon Marlow <simonmar@microsoft.com>**20060622144446
735 Fixes (works around) #679
737[remove dead code
738Simon Marlow <simonmar@microsoft.com>**20060622144433]
739[clarify and expand docs
740Simon Marlow <simonmar@microsoft.com>**20060622112911]
741[Add minView and maxView to Map and Set
743[add signature for registerDelay
744Ross Paterson <ross@soi.city.ac.uk>**20060614114456]
745[a few doc comments
746Ross Paterson <ross@soi.city.ac.uk>**20060613142704]
747[Optimised foreign pointer representation, for heap-allocated objects
748Don Stewart <dons@cse.unsw.edu.au>**20060608015011]
749[Add the inline function, and many comments
752 This commit adds the 'inline' function described in the
753 related patch in the compiler.
755 I've also added comments about the 'lazy' function.
758[small intro to exceptions
759Ross Paterson <ross@soi.city.ac.uk>**20060525111604]
760[export breakpoint
761Simon Marlow <simonmar@microsoft.com>**20060525090456]
762[Merge in changes from fps head. Highlights:
763Don Stewart <dons@cse.unsw.edu.au>**20060525065012
765     Wed May 24 15:49:38 EST 2006  sjanssen@cse.unl.edu
766       * instance Monoid ByteString
768     Wed May 24 15:04:04 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
769       * Rearange export lists for the .Char8 modules
771     Wed May 24 14:59:56 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
772       * Implement mapAccumL and reimplement mapIndexed using loopU
774     Wed May 24 14:47:32 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
775       * Change the implementation of the unfoldr(N) functions.
776       Use a more compact implementation for unfoldrN and change it's behaviour
777       to only return Just in the case that it actually 'overflowed' the N, so
778       the boundary case of unfolding exactly N gives Nothing.
779       Implement unfoldr and Lazy.unfoldr in terms of unfoldrN. Use fibonacci
780       growth for the chunk size in unfoldr
782     Wed May 24 08:32:29 EST 2006  sjanssen@cse.unl.edu
783       * Add unfoldr to ByteString and .Char8
784       A preliminary implementation of unfoldr.
786     Wed May 24 01:39:41 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
787       * Reorder the export lists to better match the Data.List api
789     Tue May 23 14:04:32 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
790       * pack{Byte,Char} -> singleton. As per fptools convention
792     Tue May 23 14:00:51 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
793       * elemIndexLast -> elemIndexEnd
795     Tue May 23 13:57:34 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
796       * In the search for a more orthogonal api, we kill breakFirst/breakLast,
797         which were of dubious value
799     Tue May 23 12:24:09 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
800       * Abolish elems. It's name implied it was unpack, but its type didn't. it made no sense
802     Tue May 23 10:42:09 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
803       * Minor doc tidyup. Use haddock markup better.
805     Tue May 23 11:00:31 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
806       * Simplify the join() implementation. Spotted by Duncan.
809[add a way to ask the IO manager thread to exit
810Simon Marlow <simonmar@microsoft.com>**20060524121823]
811[Sync with FPS head, including the following patches:
812Don Stewart <dons@cse.unsw.edu.au>**20060520030436
814     Thu May 18 15:45:46 EST 2006  sjanssen@cse.unl.edu
815       * Export unsafeTake and unsafeDrop
817     Fri May 19 11:53:08 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
818       * Add foldl1'
820     Fri May 19 13:41:24 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
821       * Add fuseable scanl, scanl1 + properties
823     Fri May 19 18:20:40 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
824       * Spotted another chance to use unsafeTake,Drop (in groupBy)
826     Thu May 18 09:24:25 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
827       * More effecient findIndexOrEnd based on the impl of findIndex
829     Thu May 18 09:22:49 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
830       * Eliminate special case in findIndex since it's handled anyway.
832     Thu May 18 09:19:08 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
833       * Add unsafeTake and unsafeDrop
834       These versions assume the n is in the bounds of the bytestring, saving
835       two comparison tests. Then use them in varous places where we think this
836       holds. These cases need double checking (and there are a few remaining
837       internal uses of take / drop that might be possible to convert).
838       Not exported for the moment.
840     Tue May 16 23:15:11 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
841       * Handle n < 0 in drop and splitAt. Spotted by QC.
843     Tue May 16 22:46:22 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
844       * Handle n <= 0 cases for unfoldr and replicate. Spotted by QC
846     Tue May 16 21:34:11 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
847       * mapF -> map', filterF -> filter'
850[haddock fix
851Ross Paterson <ross@soi.city.ac.uk>**20060518154723]
852[simplify indexing in Data.Sequence
853Ross Paterson <ross@soi.city.ac.uk>**20060518154316]
854[Move Eq, Ord, Show instances for ThreadId to GHC.Conc
855Simon Marlow <simonmar@microsoft.com>**20060518113339
856 Eliminates orphans.
858[Better error handling in the IO manager thread
859Simon Marlow <simonmar@microsoft.com>**20060518113303
860 In particular, handle EBADF just like rts/posix/Select.c, by waking up
861 all the waiting threads.  Other errors are thrown, instead of just
862 being ignored.
864[#define _REENTRANT 1  (needed to get the right errno on some OSs)
865Simon Marlow <simonmar@microsoft.com>**20060518104151
866 Part 2 of the fix for threaded RTS problems on Solaris and possibly
867 *BSD (Part 1 was the same change in ghc/includes/Rts.h).
869[copyCString* should be in IO. Spotted by Tomasz Zielonka
870Don Stewart <dons@cse.unsw.edu.au>**20060518012154]
871[add import Prelude to get dependencies right for Data/Fixed.hs
872Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060517222044
873 Hopefully this fixes parallel builds.
875[Fix negative index handling in splitAt, replicate and unfoldrN. Move mapF, filterF -> map', filter' while we're here
876Don Stewart <dons@cse.unsw.edu.au>**20060517020150]
877[Use our own realloc. Thus reduction functions (like filter) allocate on the Haskell heap. Makes around 10% difference.
878Don Stewart <dons@cse.unsw.edu.au>**20060513051736]
879[Last two CInt fixes for 64 bit, and bracket writeFile while we're here
880Don Stewart <dons@cse.unsw.edu.au>**20060512050750]
881[Some small optimisations, generalise the type of unfold
882Don Stewart <dons@cse.unsw.edu.au>**20060510043309
884     Tue May  9 22:36:29 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
885       * Surely the error function should not be inlined.
887     Tue May  9 22:35:53 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
888       * Reorder memory writes for better cache locality.
890     Tue May  9 23:28:09 EST 2006  Duncan Coutts <duncan.coutts@worc.ox.ac.uk>
891       * Generalise the type of unfoldrN
893       The type of unfoldrN was overly constrained:
894       unfoldrN :: Int -> (Word8 -> Maybe (Word8, Word8)) -> Word8 -> ByteString
896       if we compare that to unfoldr:
897       unfoldr :: (b -> Maybe (a, b)) -> b -> [a]
899       So we can generalise unfoldrN to this type:
900       unfoldrN :: Int -> (a -> Maybe (Word8, a)) -> a -> ByteString
902       and something similar for the .Char8 version. If people really do want to
903       use it a lot with Word8/Char then perhaps we should add a specialise pragma.
905     Wed May 10 13:26:40 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
906       * Add foldl', and thus a fusion rule for length . {map,filter,fold},
907       that avoids creating an array at all if the end of the pipeline is a 'length' reduction
911 Place the long patch description above the ***END OF DESCRIPTION*** marker.
912 The first line of this file will be the patch name.
915 This patch contains the following changes:
917 M ./Data/ByteString.hs -8 +38
918 M ./Data/ByteString/Char8.hs -6 +12
920[portable implementation of WordPtr/IntPtr for non-GHC
921Ross Paterson <ross@soi.city.ac.uk>**20060510001826
923 plus much tweaking of imports to avoid cycles
925[add WordPtr and IntPtr types to Foreign.Ptr, with associated conversions
926Simon Marlow <simonmar@microsoft.com>**20060509092606
928 As suggested by John Meacham. 
930 I had to move the Show instance for Ptr into GHC.ForeignPtr to avoid
931 recursive dependencies.
933[add CIntPtr, CUIntPtr, CIntMax, CUIntMax types
934Simon Marlow <simonmar@microsoft.com>**20060509092427]
935[add GHC.Dynamic
936Simon Marlow <simonmar@microsoft.com>**20060509082739]
937[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
938Don Stewart <dons@cse.unsw.edu.au>**20060509023425]
939[Make length a good consumer
942 Make length into a good consumer.  Fixes Trac bug #707.
944 (Before length simply didn't use foldr.)
947[Trim imports
949[Make unsafePerformIO lazy
952 The stricteness analyser used to have a HACK which ensured that NOINLNE things
953 were not strictness-analysed.  The reason was unsafePerformIO. Left to itself,
954 the strictness analyser would discover this strictness for unsafePerformIO:
955        unsafePerformIO:  C(U(AV))
956 But then consider this sub-expression
957        unsafePerformIO (\s -> let r = f x in
958                               case writeIORef v r s of (# s1, _ #) ->
959                               (# s1, r #)
960 The strictness analyser will now find that r is sure to be eval'd,
961 and may then hoist it out.  This makes tests/lib/should_run/memo002
962 deadlock.
964 Solving this by making all NOINLINE things have no strictness info is overkill.
965 In particular, it's overkill for runST, which is perfectly respectable.
966 Consider
967        f x = runST (return x)
968 This should be strict in x.
970 So the new plan is to define unsafePerformIO using the 'lazy' combinator:
972        unsafePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r)
974 Remember, 'lazy' is a wired-in identity-function Id, of type a->a, which is
975 magically NON-STRICT, and is inlined after strictness analysis.  So
976 unsafePerformIO will look non-strict, and that's what we want.
979[Sync with FPS head.
980Don Stewart <dons@cse.unsw.edu.au>**20060508122322
982 Mon May  8 10:40:14 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
983   * Fix all uses for Int that should be CInt or CSize in ffi imports.
984   Spotted by Igloo, dcoutts
986 Mon May  8 16:09:41 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
987   * Import nicer loop/loop fusion rule from ghc-ndp
989 Mon May  8 17:36:07 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
990   * Fix stack leak in split on > 60M strings
992 Mon May  8 17:50:13 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
993   * Try same fix for stack overflow in elemIndices
996[Fix all uses for Int that should be CInt or CSize in ffi imports. Spotted by Duncan and Ian
997Don Stewart <dons@cse.unsw.edu.au>**20060508010311]
998[Fixed import list syntax
999Sven Panne <sven.panne@aedion.de>**20060507155008]
1000[Faster filterF, filterNotByte
1002[Much faster find, findIndex. Hint from sjanssen
1004[Merge "unrecognized long opt" fix from 6.4.2
1005Sven Panne <sven.panne@aedion.de>**20060506110519]
1008 Sat May  6 13:01:34 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1009   * Do loopU realloc on the Haskell heap. And add a really tough stress test
1011 Sat May  6 12:28:58 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1012   * Use simple, 3x faster concat. Plus QC properties. Suggested by sjanssen and dcoutts
1014 Sat May  6 15:59:31 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1015   * dcoutt's packByte bug squashed
1017   With inlinePerformIO, ghc head was compiling:
1019    packByte 255 `compare` packByte 127
1021   into roughly
1023    case mallocByteString 2 of
1024        ForeignPtr f internals ->
1025             case writeWord8OffAddr# f 0 255 of _ ->
1026             case writeWord8OffAddr# f 0 127 of _ ->
1027             case eqAddr# f f of
1028                    False -> case compare (GHC.Prim.plusAddr# f 0)
1029                                          (GHC.Prim.plusAddr# f 0)
1031   which is rather stunning. unsafePerformIO seems to prevent whatever
1032   magic inlining was leading to this. Only affected the head.
1035[Add array fusion versions of map, filter and foldl
1038 This patch adds fusable map, filter and foldl, using the array fusion
1039 code for unlifted, flat arrays, from the Data Parallel Haskell branch,
1040 after kind help from Roman Leshchinskiy,
1042 Pipelines of maps, filters and folds should now need to walk the
1043 bytestring once only, and intermediate bytestrings won't be constructed.
1046[fix for non-GHC
1047Ross Paterson <ross@soi.city.ac.uk>**20060504093044]
1048[use bracket in appendFile (like writeFile)
1049Ross Paterson <ross@soi.city.ac.uk>**20060504091528]
1050[writeFile: close the file on error
1051Simon Marlow <simonmar@microsoft.com>**20060504084505
1052 Suggested by Ross Paterson, via Neil Mitchell
1055[Sync with FPS head
1058 This patch brings Data.ByteString into sync with the FPS head.
1059 The most significant of which is the new Haskell counting sort.
1061 Changes:
1063 Sun Apr 30 18:16:29 EST 2006  sjanssen@cse.unl.edu
1064   * Fix foldr1 in Data.ByteString and Data.ByteString.Char8
1066 Mon May  1 11:51:16 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
1067   * Add group and groupBy. Suggested by conversation between sjanssen and petekaz on #haskell
1069 Mon May  1 16:42:04 EST 2006  sjanssen@cse.unl.edu
1070   * Fix groupBy to match Data.List.groupBy.
1072 Wed May  3 15:01:07 EST 2006  sjanssen@cse.unl.edu
1073   * Migrate to counting sort.
1075   Data.ByteString.sort used C's qsort(), which is O(n log n).  The new algorithm
1076   is O(n), and is faster for strings larger than approximately thirty bytes.  We
1077   also reduce our dependency on cbits!
1080[improve performance of Integer->String conversion
1081Simon Marlow <simonmar@microsoft.com>**20060503113306
1082 See
1083  http://www.haskell.org//pipermail/libraries/2006-April/005227.html
1085 Submitted by: bertram.felgenhauer@googlemail.com
1089[inline withMVar, modifyMVar, modifyMVar_
1090Simon Marlow <simonmar@microsoft.com>**20060503111152]
1091[Fix string truncating in hGetLine -- it was a pasto from Simon's code
1092Simon Marlow <simonmar@microsoft.com>**20060503103504
1093 (from Don Stewart)
1095[Merge in Data.ByteString head. Fixes ByteString+cbits in hugs
1096Don Stewart <dons@cse.unsw.edu.au>**20060429040733]
1097[Import Data.ByteString from fps 0.5.
1098Don Stewart <dons@cse.unsw.edu.au>**20060428130718
1099 Fast, packed byte vectors, providing a better PackedString.
1102[fix previous patch
1103Ross Paterson <ross@soi.city.ac.uk>**20060501154847]
1104[fixes for non-GHC
1105Ross Paterson <ross@soi.city.ac.uk>**20060501144322]
1106[fix imports for mingw32 && !GHC
1107Ross Paterson <ross@soi.city.ac.uk>**20060427163248]
1108[RequireOrder: do not collect unrecognised options after a non-opt
1109Simon Marlow <simonmar@microsoft.com>**20060426121110
1110 The documentation for RequireOrder says "no option processing after
1111 first non-option", so it doesn't seem right that we should process the
1112 rest of the arguments to collect the unrecognised ones.  Presumably
1113 the client wants to know about the unrecognised options up to the
1114 first non-option, and will be using a different option parser for the
1115 rest of the command line.
1117 eg. before:
1119 Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"]
1120 ([],["bar","--foo"],["--foo"],[])
1122 after:
1124 Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"]
1125 ([],["bar","--foo"],[],[])
1127[fix for Haddock 0.7
1128Ashley Yakeley <ashley@semantic.org>**20060426072521]
1129[add Data.Fixed module
1130Ashley Yakeley <ashley@semantic.org>**20060425071853]
1131[add instances
1132Ross Paterson <ross@soi.city.ac.uk>**20060424102146]
1133[add superclasses to Applicative and Traversable
1134Ross Paterson <ross@soi.city.ac.uk>**20060411144734
1136 Functor is now a superclass of Applicative, and Functor and Foldable
1137 are now superclasses of Traversable.  The new hierarchy makes clear the
1138 inclusions between the classes, but means more work in defining instances.
1139 Default definitions are provided to help.
1141[add Functor and Monad instances for Prelude types
1142Ross Paterson <ross@soi.city.ac.uk>**20060410111443]
1144Lemmih <lemmih@gmail.com>**20060407125827]
1145[Track the GHC source tree reorganisation
1146Simon Marlow <simonmar@microsoft.com>**20060407041631]
1147[in the show instance for Exception, print the type of dynamic exceptions
1148Simon Marlow <simonmar@microsoft.com>**20060406112444
1149 Unfortunately this requires some recursve module hackery to get at
1150 the show instance for Typeable.
1152[implement ForeignEnvPtr, newForeignPtrEnv, addForeignPtrEnv for GHC
1153Simon Marlow <simonmar@microsoft.com>**20060405155448]
1154[add  forkOnIO :: Int -> IO () -> IO ThreadId
1155Simon Marlow <simonmar@microsoft.com>**20060327135018]
1156[Rework previous: not a gcc bug after all
1157Simon Marlow <simonmar@microsoft.com>**20060323161229
1158 It turns out that we were relying on behaviour that is undefined in C,
1159 and undefined behaviour in C means "the compiler can do whatever the
1160 hell it likes with your entire program".  So avoid that.
1162[work around a gcc 4.1.0 codegen bug in -O2 by forcing -O1 for GHC.Show
1163Simon Marlow <simonmar@microsoft.com>**20060323134514
1164 See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26824
1166[commit mysteriously missing parts of "runIOFastExit" patch
1167Simon Marlow <simonmar@microsoft.com>**20060321101535]
1168[add runIOFastExit :: IO a -> IO a
1169Simon Marlow <simonmar@microsoft.com>**20060320124333
1170 Similar to runIO, but calls stg_exit() directly to exit, rather than
1171 shutdownHaskellAndExit().  Needed for running GHCi in the test suite.
1173[Fix a broken invariant
1174Simon Marlow <simonmar@microsoft.com>**20060316134151
1175 Patch from #694,  for the problem "empty is an identity for <> and $$" is
1176 currently broken by eg. isEmpty (empty<>empty)"
1178[Add unsafeSTToIO :: ST s a -> IO a
1179Simon Marlow <simonmar@microsoft.com>**20060315160232
1180 Implementation for Hugs is missing, but should be easy.  We need this
1181 for the forthcoming nested data parallelism implementation.
1183[Added 'alter'
1185 Added 'alter :: (Maybe a -> Maybe a) -> k -> Map k a -> Map k a' to IntMap and Map
1186 This addresses ticket #665
1188[deprecate FunctorM in favour of Foldable and Traversable
1189Ross Paterson <ross@soi.city.ac.uk>**20060315092942
1190 as discussed on the libraries list.
1192[Simplify Eq, Ord, and Show instances for UArray
1193Simon Marlow <simonmar@microsoft.com>**20060313142701
1194 The Eq, Ord, and Show instances of UArray were written out longhand
1195 with one instance per element type.  It is possible to condense these
1196 into a single instance for each class, at the expense of using more
1197 extensions (non-std context on instance declaration).
1199 Suggestion by: Frederik Eaton <frederik@ofb.net>
1202[Oops typo in intSet notMember
1204[IntMap lookup now returns monad instead of Maybe.
1206[Added notMember to Data.IntSet and Data.IntMap
1208[add Data.Set.notMember and Data.Map.notMember
1209John Meacham <john@repetae.net>**20060309191806]
1210[addToClockTime: handle picoseconds properly
1211Simon Marlow <simonmar@microsoft.com>**20060310114532
1212 fixes #588
1214[make head/build rule apply to all types, not just Bool.
1215John Meacham <john@repetae.net>**20060303045753]
1216[Avoid overflow when normalising clock times
1217Ian Lynagh <igloo@earth.li>**20060210144638]
1218[Years have 365 days, not 30*365
1219Ian Lynagh <igloo@earth.li>**20060210142853]
1220[declare blkcmp() static
1221Simon Marlow <simonmar@microsoft.com>**20060223134317]
1222[typo in comment in Foldable class
1223Ross Paterson <ross@soi.city.ac.uk>**20060209004901]
1224[simplify fmap
1225Ross Paterson <ross@soi.city.ac.uk>**20060206095048]
1226[update ref in comment
1227Ross Paterson <ross@soi.city.ac.uk>**20060206095139]
1228[Give -foverlapping-instances to Data.Typeable
1231 For some time, GHC has made -fallow-overlapping-instances "sticky":
1232 any instance in a module compiled with -fallow-overlapping-instances
1233 can overlap when imported, regardless of whether the importing module
1234 allows overlap.  (If there is an overlap, both instances must come from
1235 modules thus compiled.)
1237 Instances in Data.Typeable might well want to be overlapped, so this
1238 commit adds the flag to Data.Typeable (with an explanatory comment)
1242[Add -fno-bang-patterns to modules using both bang and glasgow-exts
1244[When splitting a bucket, keep the contents in the same order
1245Simon Marlow <simonmar@microsoft.com>**20060201130427
1246 To retain the property that multiple inserts shadow each other
1247 (see ticket #661, test hash001)
1249[add foldr/build optimisation for take and replicate
1250Simon Marlow <simonmar@microsoft.com>**20060126164603
1251 This allows take to be deforested, and improves performance of
1252 replicate and replicateM/replicateM_.  We have a separate problem that
1253 means expressions involving [n..m] aren't being completely optimised
1254 because eftIntFB isn't being inlined but otherwise the results look
1255 good. 
1257 Sadly this has invalidated a number of the nofib benchmarks which were
1258 erroneously using take to duplicate work in a misguided attempt to
1259 lengthen their runtimes (ToDo).
1261[Generate PrimopWrappers.hs with Haddock docs
1262Simon Marlow <simonmar@microsoft.com>**20060124131121
1263 Patch originally from Dinko Tenev <dinko.tenev@gmail.com>, modified
1264 to add log message by me.
1266[[project @ 2006-01-19 14:47:15 by ross]
1268 backport warning avoidance from Haddock
1270[[project @ 2006-01-18 11:45:47 by malcolm]
1272 Fix import of Ix for nhc98.
1274[[project @ 2006-01-17 09:38:38 by ross]
1276 add Ix instance for GeneralCategory.
1278[TAG Initial conversion from CVS complete
1279John Goerzen <jgoerzen@complete.org>**20060112154126]
1280Patch bundle hash: