| 1 | |
|---|
| 2 | New patches: |
|---|
| 3 | |
|---|
| 4 | [don't put stdin in O_NONBLOCK mode; partial fix for #724 |
|---|
| 5 | Simon Marlow <simonmar@microsoft.com>**20070118112305] { |
|---|
| 6 | hunk ./GHC/Handle.hs 531 |
|---|
| 7 | + |
|---|
| 8 | +{- |
|---|
| 9 | +NOTE [nonblock]: |
|---|
| 10 | + |
|---|
| 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. |
|---|
| 15 | + |
|---|
| 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: |
|---|
| 21 | + |
|---|
| 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 |
|---|
| 26 | + |
|---|
| 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. |
|---|
| 33 | +-} |
|---|
| 34 | + |
|---|
| 35 | hunk ./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) |
|---|
| 47 | hunk ./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] |
|---|
| 63 | hunk ./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) |
|---|
| 76 | hunk ./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 |
|---|
| 82 | hunk ./GHC/Handle.hs 597 |
|---|
| 83 | + | otherwise |
|---|
| 84 | + = throwErrnoIfMinus1Retry loc |
|---|
| 85 | + (safe_write_rawBuffer (fromIntegral fd) buf off len) |
|---|
| 86 | hunk ./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 |
|---|
| 92 | hunk ./GHC/Handle.hs 607 |
|---|
| 93 | + | otherwise |
|---|
| 94 | + = throwErrnoIfMinus1Retry loc |
|---|
| 95 | + (safe_write_off (fromIntegral fd) buf off len) |
|---|
| 96 | hunk ./GHC/Handle.hs 623 |
|---|
| 97 | +foreign import ccall safe "inputReady" |
|---|
| 98 | + inputReady :: CInt -> CInt -> Bool -> IO CInt |
|---|
| 99 | + |
|---|
| 100 | hunk ./GHC/Handle.hs 690 |
|---|
| 101 | - recv_rawBuffer fd buf off len |
|---|
| 102 | + safe_recv_rawBuffer fd buf off len |
|---|
| 103 | hunk ./GHC/Handle.hs 693 |
|---|
| 104 | - read_rawBuffer fd buf off len |
|---|
| 105 | + safe_read_rawBuffer fd buf off len |
|---|
| 106 | hunk ./GHC/Handle.hs 697 |
|---|
| 107 | - recv_off fd buf off len |
|---|
| 108 | + safe_recv_off fd buf off len |
|---|
| 109 | hunk ./GHC/Handle.hs 700 |
|---|
| 110 | - read_off fd buf off len |
|---|
| 111 | + safe_read_off fd buf off len |
|---|
| 112 | hunk ./GHC/Handle.hs 704 |
|---|
| 113 | - send_rawBuffer (fromIntegral fd) buf off len |
|---|
| 114 | + safe_send_rawBuffer (fromIntegral fd) buf off len |
|---|
| 115 | hunk ./GHC/Handle.hs 707 |
|---|
| 116 | - write_rawBuffer (fromIntegral fd) buf off len |
|---|
| 117 | + safe_write_rawBuffer (fromIntegral fd) buf off len |
|---|
| 118 | hunk ./GHC/Handle.hs 711 |
|---|
| 119 | - send_off (fromIntegral fd) buf off len |
|---|
| 120 | + safe_send_off (fromIntegral fd) buf off len |
|---|
| 121 | hunk ./GHC/Handle.hs 714 |
|---|
| 122 | - write_off (fromIntegral fd) buf off len |
|---|
| 123 | + safe_write_off (fromIntegral fd) buf off len |
|---|
| 124 | hunk ./GHC/Handle.hs 719 |
|---|
| 125 | -foreign import ccall safe "__hscore_PrelHandle_read" |
|---|
| 126 | - read_rawBuffer :: FD -> RawBuffer -> Int -> CInt -> IO CInt |
|---|
| 127 | - |
|---|
| 128 | -foreign import ccall safe "__hscore_PrelHandle_read" |
|---|
| 129 | - read_off :: FD -> Ptr CChar -> Int -> CInt -> IO CInt |
|---|
| 130 | - |
|---|
| 131 | -foreign import ccall safe "__hscore_PrelHandle_write" |
|---|
| 132 | - write_rawBuffer :: CInt -> RawBuffer -> Int -> CInt -> IO CInt |
|---|
| 133 | - |
|---|
| 134 | -foreign import ccall safe "__hscore_PrelHandle_write" |
|---|
| 135 | - write_off :: CInt -> Ptr CChar -> Int -> CInt -> IO CInt |
|---|
| 136 | - |
|---|
| 137 | hunk ./GHC/Handle.hs 720 |
|---|
| 138 | - recv_rawBuffer :: FD -> RawBuffer -> Int -> CInt -> IO CInt |
|---|
| 139 | + safe_recv_rawBuffer :: FD -> RawBuffer -> Int -> CInt -> IO CInt |
|---|
| 140 | hunk ./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 |
|---|
| 143 | hunk ./GHC/Handle.hs 726 |
|---|
| 144 | - send_rawBuffer :: CInt -> RawBuffer -> Int -> CInt -> IO CInt |
|---|
| 145 | + safe_send_rawBuffer :: CInt -> RawBuffer -> Int -> CInt -> IO CInt |
|---|
| 146 | hunk ./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 |
|---|
| 149 | hunk ./GHC/Handle.hs 734 |
|---|
| 150 | +foreign import ccall safe "__hscore_PrelHandle_read" |
|---|
| 151 | + safe_read_rawBuffer :: FD -> RawBuffer -> Int -> CInt -> IO CInt |
|---|
| 152 | + |
|---|
| 153 | +foreign import ccall safe "__hscore_PrelHandle_read" |
|---|
| 154 | + safe_read_off :: FD -> Ptr CChar -> Int -> CInt -> IO CInt |
|---|
| 155 | + |
|---|
| 156 | +foreign import ccall safe "__hscore_PrelHandle_write" |
|---|
| 157 | + safe_write_rawBuffer :: CInt -> RawBuffer -> Int -> CInt -> IO CInt |
|---|
| 158 | + |
|---|
| 159 | +foreign import ccall safe "__hscore_PrelHandle_write" |
|---|
| 160 | + safe_write_off :: CInt -> Ptr CChar -> Int -> CInt -> IO CInt |
|---|
| 161 | + |
|---|
| 162 | hunk ./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 |
|---|
| 167 | hunk ./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 |
|---|
| 172 | hunk ./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 |
|---|
| 177 | hunk ./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 |
|---|
| 181 | +#else |
|---|
| 182 | + -- On Unix, the is_stream flag indicates that the FD is non-blocking |
|---|
| 183 | + let is_stream = True |
|---|
| 184 | +#endif |
|---|
| 185 | + |
|---|
| 186 | hunk ./GHC/Handle.hs 989 |
|---|
| 187 | - mkFileHandle fd is_socket filepath ha_type binary |
|---|
| 188 | + mkFileHandle fd is_stream filepath ha_type binary |
|---|
| 189 | hunk ./GHC/Handle.hs 995 |
|---|
| 190 | - mkDuplexHandle fd is_socket filepath binary |
|---|
| 191 | + mkDuplexHandle fd is_stream filepath binary |
|---|
| 192 | hunk ./GHC/Handle.hs 997 |
|---|
| 193 | - mkFileHandle fd is_socket filepath ha_type binary |
|---|
| 194 | + mkFileHandle fd is_stream filepath ha_type binary |
|---|
| 195 | hunk ./GHC/Handle.hs 1000 |
|---|
| 196 | - mkFileHandle fd is_socket filepath ha_type binary |
|---|
| 197 | + mkFileHandle fd is_stream filepath ha_type binary |
|---|
| 198 | hunk ./GHC/Handle.hs 1025 |
|---|
| 199 | - haIsStream = False, |
|---|
| 200 | + haIsStream = False, -- means FD is blocking on Unix |
|---|
| 201 | hunk ./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? |
|---|
| 205 | } |
|---|
| 206 | |
|---|
| 207 | Context: |
|---|
| 208 | |
|---|
| 209 | [fix threadDelay |
|---|
| 210 | Simon Marlow <simonmar@microsoft.com>**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. |
|---|
| 214 | ] |
|---|
| 215 | [update section on "blocking" |
|---|
| 216 | Simon Marlow <simonmar@microsoft.com>**20070116124328] |
|---|
| 217 | [Fix crash with (minBound :: Int*) `div (-1) as result is maxBound + 1. |
|---|
| 218 | Ian Lynagh <igloo@earth.li>**20070115142005] |
|---|
| 219 | [version of example using Tomasz Zielonka's technique |
|---|
| 220 | Ross Paterson <ross@soi.city.ac.uk>**20070105175907] |
|---|
| 221 | [Added Unknowns for higher kinds |
|---|
| 222 | Pepe Iborra <mnislaih@gmail.com>**20061108155938] |
|---|
| 223 | [Improved the Show instance for Unknown |
|---|
| 224 | Pepe Iborra <mnislaih@gmail.com>**20060813111816] |
|---|
| 225 | [Show instance for GHC.Base.Unknown |
|---|
| 226 | mnislaih@gmail.com**20060801233530] |
|---|
| 227 | [Introduce Unknowns for the closure viewer. Add breakpointCond which was missing |
|---|
| 228 | mnislaih@gmail.com**20060725174537] |
|---|
| 229 | [Fix missing comma in Fractional documentation |
|---|
| 230 | Alec Berryman <alec@thened.net>**20061201173237] |
|---|
| 231 | [Mention that throwTo does not guarantee promptness of delivery |
|---|
| 232 | simonpj@microsoft**20061211123215] |
|---|
| 233 | [Add note about synhronous delivery of throwTo |
|---|
| 234 | simonpj@microsoft**20061211122257] |
|---|
| 235 | [documentation for installHandler |
|---|
| 236 | Simon Marlow <simonmar@microsoft.com>**20061205154927 |
|---|
| 237 | merge to 6.6 |
|---|
| 238 | ] |
|---|
| 239 | [dos2unix |
|---|
| 240 | Simon Marlow <simonmar@microsoft.com>**20061204095439] |
|---|
| 241 | [don't try to compile this on Unix |
|---|
| 242 | Simon Marlow <simonmar@microsoft.com>**20061204095427] |
|---|
| 243 | [TAG 6.6 release |
|---|
| 244 | Ian Lynagh <igloo@earth.li>**20061011124740] |
|---|
| 245 | [TAG Version 2.1 |
|---|
| 246 | Ian Lynagh <igloo@earth.li>**20061009114014] |
|---|
| 247 | [Bump version number |
|---|
| 248 | Ian Lynagh <igloo@earth.li>**20061009114009] |
|---|
| 249 | [Add support for the IO manager thread on Windows |
|---|
| 250 | Simon Marlow <simonmar@microsoft.com>**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). |
|---|
| 254 | ] |
|---|
| 255 | [deriving (Eq, Ord, Enum, Show, Read, Typeab) for ConsoleEvent |
|---|
| 256 | Simon Marlow <simonmar@microsoft.com>**20061201144032] |
|---|
| 257 | [Make sure the threaded threadDelay sleeps at least as long as it is asked to |
|---|
| 258 | Ian Lynagh <igloo@earth.li>**20061128204807] |
|---|
| 259 | [Add comments about argument order to the definitions of gmapQ and constrFields |
|---|
| 260 | simonpj@microsoft**20061124164505] |
|---|
| 261 | [Hugs: add Control.Parallel.Strategies |
|---|
| 262 | Ross Paterson <ross@soi.city.ac.uk>**20061124161039] |
|---|
| 263 | [Move instance of Show Ptr to Ptr.hs (fewer orphans) |
|---|
| 264 | simonpj@microsoft.com**20061124100639] |
|---|
| 265 | [Add type signatures |
|---|
| 266 | simonpj@microsoft.com**20061124100621] |
|---|
| 267 | [Add an example of the use of unfoldr, following doc feedback from dozer |
|---|
| 268 | Don Stewart <dons@cse.unsw.edu.au>**20061124011249] |
|---|
| 269 | [trim imports |
|---|
| 270 | Ross Paterson <ross@soi.city.ac.uk>**20061123190352] |
|---|
| 271 | [Data.Graph is now portable (enable for nhc98) |
|---|
| 272 | Malcolm.Wallace@cs.york.ac.uk**20061123174913] |
|---|
| 273 | [remove Data.FunctorM and Data.Queue |
|---|
| 274 | Ross Paterson <ross@soi.city.ac.uk>**20061112001046 |
|---|
| 275 | |
|---|
| 276 | These were deprecated in 6.6, and can thus be removed in 6.8. |
|---|
| 277 | ] |
|---|
| 278 | [make Data.Graph portable (no change to the interface) |
|---|
| 279 | Ross Paterson <ross@soi.city.ac.uk>**20061122010040 |
|---|
| 280 | |
|---|
| 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.) |
|---|
| 284 | ] |
|---|
| 285 | [One less unsafeCoerce# in the tree |
|---|
| 286 | Don Stewart <dons@cse.unsw.edu.au>**20061120120242] |
|---|
| 287 | [typo in comment |
|---|
| 288 | Ross Paterson <ross@soi.city.ac.uk>**20061120115106] |
|---|
| 289 | [fix shift docs to match ffi spec |
|---|
| 290 | Ross Paterson <ross@soi.city.ac.uk>**20061117003144] |
|---|
| 291 | [(nhc98) use new primitive implementations of h{Put,Get}Buf. |
|---|
| 292 | Malcolm.Wallace@cs.york.ac.uk**20061116173104] |
|---|
| 293 | [The wrong 'cycle' was exported from Data.ByteString.Lazy.Char8, spotted by sjanssen |
|---|
| 294 | Don Stewart <dons@cse.unsw.edu.au>**20061110021311] |
|---|
| 295 | [LPS chunk sizes should be 16 bytes, not 17. |
|---|
| 296 | Don Stewart <dons@cse.unsw.edu.au>**20061110021254] |
|---|
| 297 | [Update comments on Prelude organisation in GHC/Base.lhs |
|---|
| 298 | Ian Lynagh <igloo@earth.li>**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 | bringert@cs.chalmers.se**20061113224202] |
|---|
| 301 | [Control.Parallel.Strategies: added NFData instances for Data.Int.*, Data.Word.*, Maybe, Either, Map, Set, Tree, IntMap, IntSet. |
|---|
| 302 | bringert@cs.chalmers.se**20061113221843] |
|---|
| 303 | [Control.Parallel.Strategies: deprecate sPar, sSeq, Assoc, fstPairFstList, force and sforce. |
|---|
| 304 | bringert@cs.chalmers.se**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. |
|---|
| 306 | ] |
|---|
| 307 | [add Control.Monad.Instances to nhc98 build |
|---|
| 308 | Malcolm.Wallace@cs.york.ac.uk**20061113113221] |
|---|
| 309 | [Control.Parallel.Strategies: clarified documentation of parListChunk. |
|---|
| 310 | bringert@cs.chalmers.se**20061112232904] |
|---|
| 311 | [Added and cleaned up Haddock comments in Control.Parallel.Strategies. |
|---|
| 312 | bringert@cs.chalmers.se**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. |
|---|
| 314 | ] |
|---|
| 315 | [Fix broken pragmas; spotted by Bulat Ziganshin |
|---|
| 316 | Ian Lynagh <igloo@earth.li>**20061111205916] |
|---|
| 317 | [add doc link to bound threads section |
|---|
| 318 | Ross Paterson <ross@soi.city.ac.uk>**20060929103252] |
|---|
| 319 | [hide Data.Array.IO.Internals |
|---|
| 320 | Ross Paterson <ross@soi.city.ac.uk>**20061111113248 |
|---|
| 321 | |
|---|
| 322 | It's hidden from haddock, and everything it exports is re-exported by |
|---|
| 323 | Data.Array.IO. |
|---|
| 324 | ] |
|---|
| 325 | [add Data.Function |
|---|
| 326 | Malcolm.Wallace@cs.york.ac.uk**20061110142710] |
|---|
| 327 | [add Data.Function |
|---|
| 328 | Ross Paterson <ross@soi.city.ac.uk>**20061110141354] |
|---|
| 329 | [whitespace only |
|---|
| 330 | Ross Paterson <ross@soi.city.ac.uk>**20061110141326] |
|---|
| 331 | [move fix to Data.Function |
|---|
| 332 | Ross Paterson <ross@soi.city.ac.uk>**20061110141120] |
|---|
| 333 | [import Prelude |
|---|
| 334 | Ross Paterson <ross@soi.city.ac.uk>**20061110140445] |
|---|
| 335 | [Added Data.Function (Trac ticket #979). |
|---|
| 336 | Nils Anders Danielsson <nad@cs.chalmers.se>**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. |
|---|
| 341 | ] |
|---|
| 342 | [__hscore_long_path_size is not portable beyond GHC |
|---|
| 343 | Malcolm.Wallace@cs.york.ac.uk**20061110113222] |
|---|
| 344 | [redefine writeFile and appendFile using withFile |
|---|
| 345 | Ross Paterson <ross@soi.city.ac.uk>**20061107140359] |
|---|
| 346 | [add withFile and withBinaryFile (#966) |
|---|
| 347 | Ross Paterson <ross@soi.city.ac.uk>**20061107134510] |
|---|
| 348 | [remove conflicting import for nhc98 |
|---|
| 349 | Malcolm.Wallace@cs.york.ac.uk**20061108111215] |
|---|
| 350 | [Add intercalate to Data.List (ticket #971) |
|---|
| 351 | Josef Svenningsson <josef.svenningsson@gmail.com>**20061102122052] |
|---|
| 352 | [non-GHC: fix canonicalizeFilePath |
|---|
| 353 | Ross Paterson <ross@soi.city.ac.uk>**20061107133902 |
|---|
| 354 | |
|---|
| 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. |
|---|
| 358 | ] |
|---|
| 359 | [enable canonicalizePath for non-GHC platforms |
|---|
| 360 | Simon Marlow <simonmar@microsoft.com>**20061107121141] |
|---|
| 361 | [Update documentation for hWaitForInput |
|---|
| 362 | Simon Marlow <simonmar@microsoft.com>**20061107111430 |
|---|
| 363 | See #972 |
|---|
| 364 | Merge to 6.6 branch. |
|---|
| 365 | ] |
|---|
| 366 | [Use unchecked shifts to implement Data.Bits.rotate |
|---|
| 367 | Samuel Bronson <naesten@gmail.com>**20061012125553 |
|---|
| 368 | This should get rid of those cases, maybe lower the size enough that the inliner will like it? |
|---|
| 369 | ] |
|---|
| 370 | [fix Haddock module headers |
|---|
| 371 | Ross Paterson <ross@soi.city.ac.uk>**20061106124140] |
|---|
| 372 | [fix example in docs |
|---|
| 373 | Ross Paterson <ross@soi.city.ac.uk>**20061106115628] |
|---|
| 374 | [Add intercalate and split to Data.List |
|---|
| 375 | Josef Svenningsson <josef.svenningsson@gmail.com>*-20061024172357] |
|---|
| 376 | [Data.Generics.Basics is GHC-only |
|---|
| 377 | Ross Paterson <ross@soi.city.ac.uk>**20061102111736] |
|---|
| 378 | [#ifdef around non-portable Data.Generics.Basics |
|---|
| 379 | Malcolm.Wallace@cs.york.ac.uk**20061102103445] |
|---|
| 380 | [Add deriving Data to Complex |
|---|
| 381 | simonpj@microsoft**20061101102059] |
|---|
| 382 | [minor clarification of RandomGen doc |
|---|
| 383 | Ross Paterson <ross@soi.city.ac.uk>**20061030230842] |
|---|
| 384 | [rearrange docs a bit |
|---|
| 385 | Ross Paterson <ross@soi.city.ac.uk>**20061030161223] |
|---|
| 386 | [Add intercalate and split to Data.List |
|---|
| 387 | Josef Svenningsson <josef.svenningsson@gmail.com>**20061024172357] |
|---|
| 388 | [Export pseq from Control.Parallel, and use it in Control.Parallel.Strategies |
|---|
| 389 | Simon Marlow <simonmar@microsoft.com>**20061027150141] |
|---|
| 390 | [`par` should be infixr 0 |
|---|
| 391 | Simon Marlow <simonmar@microsoft.com>**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. |
|---|
| 395 | |
|---|
| 396 | I think we could push this to the 6.6 branch. |
|---|
| 397 | ] |
|---|
| 398 | [fix example in comment |
|---|
| 399 | Ross Paterson <ross@soi.city.ac.uk>**20061023163925] |
|---|
| 400 | [Use the new Any type for dynamics (GHC only) |
|---|
| 401 | simonpj@microsoft**20061019160408] |
|---|
| 402 | [add Data.Sequence to nhc98 build |
|---|
| 403 | Malcolm.Wallace@cs.york.ac.uk**20061012135200] |
|---|
| 404 | [Remove Data.FiniteMap, add Control.Applicative, Data.Traversable, and |
|---|
| 405 | Malcolm.Wallace@cs.york.ac.uk**20061012095605 |
|---|
| 406 | Data.Foldable to the nhc98 build. |
|---|
| 407 | ] |
|---|
| 408 | [STM invariants |
|---|
| 409 | tharris@microsoft.com**20061007123253] |
|---|
| 410 | [Inline shift in GHC's Bits instances for {Int,Word}{,8,16,32,64} |
|---|
| 411 | Samuel Bronson <naesten@gmail.com>**20061009020906] |
|---|
| 412 | [Don't create GHC.Prim when bootstrapping; we can't, and we don't need it |
|---|
| 413 | Ian Lynagh <igloo@earth.li>**20061004165355] |
|---|
| 414 | [Data.ByteString: fix lazyness of take, drop & splitAt |
|---|
| 415 | Don Stewart <dons@cse.unsw.edu.au>**20061005011703 |
|---|
| 416 | |
|---|
| 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. |
|---|
| 420 | |
|---|
| 421 | ] |
|---|
| 422 | [Fix syntax error that prevents building Haddock documentation on Windows |
|---|
| 423 | brianlsmith@gmail.com**20060917013530] |
|---|
| 424 | [Hugs only: unbreak typeRepKey |
|---|
| 425 | Ross Paterson <ross@soi.city.ac.uk>**20060929102743] |
|---|
| 426 | [make hGetBufNonBlocking do something on Windows w/ -threaded |
|---|
| 427 | Simon Marlow <simonmar@microsoft.com>**20060927145811 |
|---|
| 428 | hGetBufNonBlocking will behave the same as hGetBuf on Windows now, which |
|---|
| 429 | is better than just crashing (which it did previously). |
|---|
| 430 | ] |
|---|
| 431 | [add typeRepKey :: TypeRep -> IO Int |
|---|
| 432 | Simon Marlow <simonmar@microsoft.com>**20060927100342 |
|---|
| 433 | See feature request #880 |
|---|
| 434 | ] |
|---|
| 435 | [fix header comment |
|---|
| 436 | Ross Paterson <ross@soi.city.ac.uk>**20060926135843] |
|---|
| 437 | [Add strict versions of insertWith and insertWithKey (Data.Map) |
|---|
| 438 | jeanphilippe.bernardy@gmail.com**20060910162443] |
|---|
| 439 | [doc tweaks, including more precise equations for evaluate |
|---|
| 440 | Ross Paterson <ross@soi.city.ac.uk>**20060910115259] |
|---|
| 441 | [Sync Data.ByteString with stable branch |
|---|
| 442 | Don Stewart <dons@cse.unsw.edu.au>**20060909050111 |
|---|
| 443 | |
|---|
| 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 |
|---|
| 448 | |
|---|
| 449 | ] |
|---|
| 450 | [Typeable1 instances for STM and TVar |
|---|
| 451 | Ross Paterson <ross@soi.city.ac.uk>**20060904231425] |
|---|
| 452 | [remove obsolete Hugs stuff |
|---|
| 453 | Ross Paterson <ross@soi.city.ac.uk>**20060904223944] |
|---|
| 454 | [Cleaner isInfixOf suggestion from Ross Paterson |
|---|
| 455 | John Goerzen <jgoerzen@complete.org>**20060901143654] |
|---|
| 456 | [New function isInfixOf that searches a list for a given sublist |
|---|
| 457 | John Goerzen <jgoerzen@complete.org>**20060831151556 |
|---|
| 458 | |
|---|
| 459 | Example: |
|---|
| 460 | |
|---|
| 461 | isInfixOf "Haskell" "I really like Haskell." -> True |
|---|
| 462 | isInfixOf "Ial" "I really like Haskell." -> False |
|---|
| 463 | |
|---|
| 464 | This function was first implemented in MissingH as MissingH.List.contains |
|---|
| 465 | ] |
|---|
| 466 | [Better doc on Data.Map.lookup: explain what the monad is for |
|---|
| 467 | jeanphilippe.bernardy@gmail.com**20060903133440] |
|---|
| 468 | [fix hDuplicateTo on Windows |
|---|
| 469 | Simon Marlow <simonmar@microsoft.com>**20060901150016 |
|---|
| 470 | deja vu - I'm sure I remember fixing this before... |
|---|
| 471 | ] |
|---|
| 472 | [Improve documentation of atomically |
|---|
| 473 | simonpj@microsoft**20060714120207] |
|---|
| 474 | [Add missing method genRange for StdGen (fixes #794) |
|---|
| 475 | simonpj@microsoft**20060707151901 |
|---|
| 476 | |
|---|
| 477 | MERGE TO STABLE |
|---|
| 478 | |
|---|
| 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. |
|---|
| 482 | |
|---|
| 483 | This commit fixes the problem, by implementing genRange for StdGen |
|---|
| 484 | (previously it just used the default method). |
|---|
| 485 | |
|---|
| 486 | |
|---|
| 487 | ] |
|---|
| 488 | [mark nhc98 import hack |
|---|
| 489 | Ross Paterson <ross@soi.city.ac.uk>**20060831125219] |
|---|
| 490 | [remove some outdated comments |
|---|
| 491 | Simon Marlow <simonmar@microsoft.com>**20060831104200] |
|---|
| 492 | [import Control.Arrow.ArrowZero to help nhc98's type checker |
|---|
| 493 | Malcolm.Wallace@cs.york.ac.uk**20060831101105] |
|---|
| 494 | [remove Text.Regex(.Posix) from nhc98 build |
|---|
| 495 | Malcolm.Wallace@cs.york.ac.uk**20060831101016] |
|---|
| 496 | [add Data.Foldable.{msum,asum}, plus tweaks to comments |
|---|
| 497 | Ross Paterson <ross@soi.city.ac.uk>**20060830163521] |
|---|
| 498 | [fix doc typo |
|---|
| 499 | Ross Paterson <ross@soi.city.ac.uk>**20060830134123] |
|---|
| 500 | [add Data.Foldable.{for_,forM_} and Data.Traversable.{for,forM} |
|---|
| 501 | Ross Paterson <ross@soi.city.ac.uk>**20060830133805 |
|---|
| 502 | |
|---|
| 503 | generalizing Control.Monad.{forM_,forM} |
|---|
| 504 | ] |
|---|
| 505 | [Make length a good consumer |
|---|
| 506 | simonpj@microsoft*-20060508142726 |
|---|
| 507 | |
|---|
| 508 | Make length into a good consumer. Fixes Trac bug #707. |
|---|
| 509 | |
|---|
| 510 | (Before length simply didn't use foldr.) |
|---|
| 511 | |
|---|
| 512 | ] |
|---|
| 513 | [Add Control.Monad.forM and forM_ |
|---|
| 514 | Don Stewart <dons@cse.unsw.edu.au>**20060824081118 |
|---|
| 515 | |
|---|
| 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: |
|---|
| 519 | |
|---|
| 520 | forM :: (Monad m) => [a] -> (a -> m b) -> m [b] |
|---|
| 521 | forM_ :: (Monad m) => [a] -> (a -> m b) -> m () |
|---|
| 522 | |
|---|
| 523 | So we can write: |
|---|
| 524 | |
|---|
| 525 | Prelude Control.Monad> forM_ [1..4] $ \x -> print x |
|---|
| 526 | 1 |
|---|
| 527 | 2 |
|---|
| 528 | 3 |
|---|
| 529 | 4 |
|---|
| 530 | |
|---|
| 531 | ] |
|---|
| 532 | [Hide internal module from haddock in Data.ByteString |
|---|
| 533 | Don Stewart <dons@cse.unsw.edu.au>**20060828011515] |
|---|
| 534 | [add advice on avoiding import ambiguities |
|---|
| 535 | Ross Paterson <ross@soi.city.ac.uk>**20060827170407] |
|---|
| 536 | [expand advice on importing these modules |
|---|
| 537 | Ross Paterson <ross@soi.city.ac.uk>**20060827164044] |
|---|
| 538 | [add Haddock marker |
|---|
| 539 | Ross Paterson <ross@soi.city.ac.uk>**20060827115140] |
|---|
| 540 | [Clarify how one hides Prelude.catch |
|---|
| 541 | Don Stewart <dons@cse.unsw.edu.au>**20060826124346 |
|---|
| 542 | |
|---|
| 543 | User feedback indicated that an example was required, of how to hide |
|---|
| 544 | Prelude.catch, so add such an example to the docs |
|---|
| 545 | |
|---|
| 546 | ] |
|---|
| 547 | [Workaround for OSes that don't have intmax_t and uintmax_t |
|---|
| 548 | Ian 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. |
|---|
| 553 | |
|---|
| 554 | ] |
|---|
| 555 | [add docs for par |
|---|
| 556 | Simon Marlow <simonmar@microsoft.com>**20060825110610] |
|---|
| 557 | [document minimal complete definition for Bits |
|---|
| 558 | Ross Paterson <ross@soi.city.ac.uk>**20060824140504] |
|---|
| 559 | [C regex library bits have moved to the regex-posix package |
|---|
| 560 | Simon Marlow <simonmar@microsoft.com>**20060824132311] |
|---|
| 561 | [Add shared Typeable support (ghc only) |
|---|
| 562 | Esa Ilari Vuokko <ei@vuokko.info>**20060823003126] |
|---|
| 563 | [this should have been removed with the previous patch |
|---|
| 564 | Simon Marlow <simonmar@microsoft.com>**20060824121223] |
|---|
| 565 | [remove Text.Regx & Text.Regex.Posix |
|---|
| 566 | Simon Marlow <simonmar@microsoft.com>**20060824094615 |
|---|
| 567 | These are subsumed by the new regex-base, regex-posix and regex-compat |
|---|
| 568 | packages. |
|---|
| 569 | ] |
|---|
| 570 | [explicitly tag Data.ByteString rules with the FPS prefix. |
|---|
| 571 | Don Stewart <dons@cse.unsw.edu.au>**20060824041326] |
|---|
| 572 | [Add spec rules for sections in Data.ByteString |
|---|
| 573 | Don Stewart <dons@cse.unsw.edu.au>**20060824012611] |
|---|
| 574 | [Sync Data.ByteString with current stable branch, 0.7 |
|---|
| 575 | Don Stewart <dons@cse.unsw.edu.au>**20060823143338] |
|---|
| 576 | [add notes about why copyFile doesn't remove the target |
|---|
| 577 | Simon Marlow <simonmar@microsoft.com>**20060823095059] |
|---|
| 578 | [copyFile: try removing the target file before opening it for writing |
|---|
| 579 | Simon Marlow <simonmar@microsoft.com>*-20060822121909] |
|---|
| 580 | [copyFile: try removing the target file before opening it for writing |
|---|
| 581 | Simon Marlow <simonmar@microsoft.com>**20060822121909] |
|---|
| 582 | [add alternative functors and extra instances |
|---|
| 583 | Ross Paterson <ross@soi.city.ac.uk>**20060821152151 |
|---|
| 584 | |
|---|
| 585 | * Alternative class, for functors with a monoid |
|---|
| 586 | * instances for Const |
|---|
| 587 | * instances for arrows |
|---|
| 588 | ] |
|---|
| 589 | [generate Haddock docs on all platforms |
|---|
| 590 | Simon Marlow <simonmar@microsoft.com>**20060821131612] |
|---|
| 591 | [remove extra comma from import |
|---|
| 592 | Ross Paterson <ross@soi.city.ac.uk>**20060819173954] |
|---|
| 593 | [fix docs for withC(A)StringLen |
|---|
| 594 | Ross Paterson <ross@soi.city.ac.uk>**20060818170328] |
|---|
| 595 | [use Haskell'98 compliant indentation in do blocks |
|---|
| 596 | Malcolm.Wallace@cs.york.ac.uk**20060818130810] |
|---|
| 597 | [use correct names of IOArray operations for nhc98 |
|---|
| 598 | Malcolm.Wallace@cs.york.ac.uk**20060818130714] |
|---|
| 599 | [add mapMaybe and mapEither, plus WithKey variants |
|---|
| 600 | Ross Paterson <ross@soi.city.ac.uk>**20060817235041] |
|---|
| 601 | [remove Text.Html from nhc98 build |
|---|
| 602 | Malcolm.Wallace@cs.york.ac.uk**20060817135502] |
|---|
| 603 | [eliminate more HOST_OS tests |
|---|
| 604 | Ross Paterson <ross@soi.city.ac.uk>**20060815190609] |
|---|
| 605 | [Hugs only: disable unused process primitives |
|---|
| 606 | Ross Paterson <ross@soi.city.ac.uk>**20060813184435 |
|---|
| 607 | |
|---|
| 608 | These were the cause of Hugs bug #30, I think, and weren't used by Hugs anyway. |
|---|
| 609 | ] |
|---|
| 610 | [markup fix to Data.HashTable |
|---|
| 611 | Ross Paterson <ross@soi.city.ac.uk>**20060812103835] |
|---|
| 612 | [revert removal of ghcconfig.h from package.conf.in |
|---|
| 613 | Ross Paterson <ross@soi.city.ac.uk>**20060812082702 |
|---|
| 614 | |
|---|
| 615 | as it's preprocessed with -undef (pointed out by Esa Ilari Vuokko) |
|---|
| 616 | ] |
|---|
| 617 | [fix Data.HashTable for non-GHC |
|---|
| 618 | Ross Paterson <ross@soi.city.ac.uk>**20060811231521] |
|---|
| 619 | [remove deprecated 'withObject' |
|---|
| 620 | Simon Marlow <simonmar@microsoft.com>**20060811152350] |
|---|
| 621 | [Jan-Willem Maessen's improved implementation of Data.HashTable |
|---|
| 622 | Simon 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. |
|---|
| 625 | ] |
|---|
| 626 | [Warning police: Make some prototypes from the RTS known |
|---|
| 627 | sven.panne@aedion.de**20060811144629] |
|---|
| 628 | [Warning police: Removed useless catch-all clause |
|---|
| 629 | sven.panne@aedion.de**20060811142208] |
|---|
| 630 | [reduce dependency on ghcconfig.h |
|---|
| 631 | Ross Paterson <ross@soi.city.ac.uk>**20060811124030 |
|---|
| 632 | |
|---|
| 633 | The only remaining use is in cbits/dirUtils.h, which tests solaris2_HOST_OS |
|---|
| 634 | |
|---|
| 635 | (Also System.Info uses ghcplatform.h and several modules import MachDeps.h |
|---|
| 636 | to get SIZEOF_* and ALIGNMENT_* from ghcautoconf.h) |
|---|
| 637 | ] |
|---|
| 638 | [(non-GHC only) track MArray interface change |
|---|
| 639 | Ross Paterson <ross@soi.city.ac.uk>**20060810182902] |
|---|
| 640 | [move Text.Html to a separate package |
|---|
| 641 | Simon Marlow <simonmar@microsoft.com>**20060810113017] |
|---|
| 642 | [bump version to 2.0 |
|---|
| 643 | Simon Marlow <simonmar@microsoft.com>**20060810112833] |
|---|
| 644 | [Remove deprecated Data.FiniteMap and Data.Set interfaces |
|---|
| 645 | Simon Marlow <simonmar@microsoft.com>**20060809153810] |
|---|
| 646 | [move altzone test from ghc to base package |
|---|
| 647 | Ross Paterson <ross@soi.city.ac.uk>**20060809124259] |
|---|
| 648 | [remove unnecessary #include "ghcconfig.h" |
|---|
| 649 | Ross Paterson <ross@soi.city.ac.uk>**20060809123812] |
|---|
| 650 | [Change the API of MArray to allow resizable arrays |
|---|
| 651 | Simon Marlow <simonmar@microsoft.com>**20060809100548 |
|---|
| 652 | See #704 |
|---|
| 653 | |
|---|
| 654 | The MArray class doesn't currently allow a mutable array to change its |
|---|
| 655 | size, because of the pure function |
|---|
| 656 | |
|---|
| 657 | bounds :: (HasBounds a, Ix i) => a i e -> (i,i) |
|---|
| 658 | |
|---|
| 659 | This patch removes the HasBounds class, and adds |
|---|
| 660 | |
|---|
| 661 | getBounds :: (MArray a e m, Ix i) => a i e -> m (i,i) |
|---|
| 662 | |
|---|
| 663 | to the MArray class, and |
|---|
| 664 | |
|---|
| 665 | bounds :: (IArray a e, Ix i) => a i e -> (i,i) |
|---|
| 666 | |
|---|
| 667 | to the IArray class. |
|---|
| 668 | |
|---|
| 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. |
|---|
| 674 | ] |
|---|
| 675 | [deprecate this module. |
|---|
| 676 | Simon Marlow <simonmar@microsoft.com>**20060808100708] |
|---|
| 677 | [add traceShow (see #474) |
|---|
| 678 | Simon Marlow <simonmar@microsoft.com>**20060807155545] |
|---|
| 679 | [remove spurious 'extern "C" {' |
|---|
| 680 | Simon Marlow <simonmar@microsoft.com>**20060724160258] |
|---|
| 681 | [Fix unsafeIndex for large ranges |
|---|
| 682 | Simon Marlow <simonmar@microsoft.com>**20060721100225] |
|---|
| 683 | [disambiguate uses of foldr for nhc98 to compile without errors |
|---|
| 684 | Malcolm.Wallace@cs.york.ac.uk**20060711161614] |
|---|
| 685 | [make Control.Monad.Instances compilable by nhc98 |
|---|
| 686 | Malcolm.Wallace@cs.york.ac.uk**20060711160941] |
|---|
| 687 | [breakpointCond |
|---|
| 688 | Lemmih <lemmih@gmail.com>**20060708055528] |
|---|
| 689 | [UNDO: Merge "unrecognized long opt" fix from 6.4.2 |
|---|
| 690 | Simon 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. |
|---|
| 694 | |
|---|
| 695 | See bug #473. |
|---|
| 696 | ] |
|---|
| 697 | [Avoid strictness in accumulator for unpackFoldr |
|---|
| 698 | Don Stewart <dons@cse.unsw.edu.au>**20060703091806 |
|---|
| 699 | |
|---|
| 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. |
|---|
| 704 | |
|---|
| 705 | ] |
|---|
| 706 | [Disable unpack/build fusion |
|---|
| 707 | Don Stewart <dons@cse.unsw.edu.au>**20060702083913 |
|---|
| 708 | |
|---|
| 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. |
|---|
| 711 | |
|---|
| 712 | I'll investigate further, but best to disable this for now (its not |
|---|
| 713 | often used anyway). |
|---|
| 714 | |
|---|
| 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. |
|---|
| 717 | |
|---|
| 718 | ] |
|---|
| 719 | [Import Data.ByteString.Lazy, improve ByteString Fusion, and resync with FPS head |
|---|
| 720 | Don Stewart <dons@cse.unsw.edu.au>**20060701084345 |
|---|
| 721 | |
|---|
| 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. |
|---|
| 727 | |
|---|
| 728 | ] |
|---|
| 729 | [Wibble in docs for new ForeignPtr functionsn |
|---|
| 730 | Don Stewart <dons@cse.unsw.edu.au>**20060609075924] |
|---|
| 731 | [comments for Applicative and Traversable |
|---|
| 732 | Ross Paterson <ross@soi.city.ac.uk>**20060622170436] |
|---|
| 733 | [default to NoBuffering on Windows for a read/write text file |
|---|
| 734 | Simon Marlow <simonmar@microsoft.com>**20060622144446 |
|---|
| 735 | Fixes (works around) #679 |
|---|
| 736 | ] |
|---|
| 737 | [remove dead code |
|---|
| 738 | Simon Marlow <simonmar@microsoft.com>**20060622144433] |
|---|
| 739 | [clarify and expand docs |
|---|
| 740 | Simon Marlow <simonmar@microsoft.com>**20060622112911] |
|---|
| 741 | [Add minView and maxView to Map and Set |
|---|
| 742 | jeanphilippe.bernardy@gmail.com**20060616180121] |
|---|
| 743 | [add signature for registerDelay |
|---|
| 744 | Ross Paterson <ross@soi.city.ac.uk>**20060614114456] |
|---|
| 745 | [a few doc comments |
|---|
| 746 | Ross Paterson <ross@soi.city.ac.uk>**20060613142704] |
|---|
| 747 | [Optimised foreign pointer representation, for heap-allocated objects |
|---|
| 748 | Don Stewart <dons@cse.unsw.edu.au>**20060608015011] |
|---|
| 749 | [Add the inline function, and many comments |
|---|
| 750 | simonpj@microsoft.com**20060605115814 |
|---|
| 751 | |
|---|
| 752 | This commit adds the 'inline' function described in the |
|---|
| 753 | related patch in the compiler. |
|---|
| 754 | |
|---|
| 755 | I've also added comments about the 'lazy' function. |
|---|
| 756 | |
|---|
| 757 | ] |
|---|
| 758 | [small intro to exceptions |
|---|
| 759 | Ross Paterson <ross@soi.city.ac.uk>**20060525111604] |
|---|
| 760 | [export breakpoint |
|---|
| 761 | Simon Marlow <simonmar@microsoft.com>**20060525090456] |
|---|
| 762 | [Merge in changes from fps head. Highlights: |
|---|
| 763 | Don Stewart <dons@cse.unsw.edu.au>**20060525065012 |
|---|
| 764 | |
|---|
| 765 | Wed May 24 15:49:38 EST 2006 sjanssen@cse.unl.edu |
|---|
| 766 | * instance Monoid ByteString |
|---|
| 767 | |
|---|
| 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 |
|---|
| 770 | |
|---|
| 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 |
|---|
| 773 | |
|---|
| 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 |
|---|
| 781 | |
|---|
| 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. |
|---|
| 785 | |
|---|
| 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 |
|---|
| 788 | |
|---|
| 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 |
|---|
| 791 | |
|---|
| 792 | Tue May 23 14:00:51 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 793 | * elemIndexLast -> elemIndexEnd |
|---|
| 794 | |
|---|
| 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 |
|---|
| 798 | |
|---|
| 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 |
|---|
| 801 | |
|---|
| 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. |
|---|
| 804 | |
|---|
| 805 | Tue May 23 11:00:31 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 806 | * Simplify the join() implementation. Spotted by Duncan. |
|---|
| 807 | |
|---|
| 808 | ] |
|---|
| 809 | [add a way to ask the IO manager thread to exit |
|---|
| 810 | Simon Marlow <simonmar@microsoft.com>**20060524121823] |
|---|
| 811 | [Sync with FPS head, including the following patches: |
|---|
| 812 | Don Stewart <dons@cse.unsw.edu.au>**20060520030436 |
|---|
| 813 | |
|---|
| 814 | Thu May 18 15:45:46 EST 2006 sjanssen@cse.unl.edu |
|---|
| 815 | * Export unsafeTake and unsafeDrop |
|---|
| 816 | |
|---|
| 817 | Fri May 19 11:53:08 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 818 | * Add foldl1' |
|---|
| 819 | |
|---|
| 820 | Fri May 19 13:41:24 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 821 | * Add fuseable scanl, scanl1 + properties |
|---|
| 822 | |
|---|
| 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) |
|---|
| 825 | |
|---|
| 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 |
|---|
| 828 | |
|---|
| 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. |
|---|
| 831 | |
|---|
| 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. |
|---|
| 839 | |
|---|
| 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. |
|---|
| 842 | |
|---|
| 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 |
|---|
| 845 | |
|---|
| 846 | Tue May 16 21:34:11 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 847 | * mapF -> map', filterF -> filter' |
|---|
| 848 | |
|---|
| 849 | ] |
|---|
| 850 | [haddock fix |
|---|
| 851 | Ross Paterson <ross@soi.city.ac.uk>**20060518154723] |
|---|
| 852 | [simplify indexing in Data.Sequence |
|---|
| 853 | Ross Paterson <ross@soi.city.ac.uk>**20060518154316] |
|---|
| 854 | [Move Eq, Ord, Show instances for ThreadId to GHC.Conc |
|---|
| 855 | Simon Marlow <simonmar@microsoft.com>**20060518113339 |
|---|
| 856 | Eliminates orphans. |
|---|
| 857 | ] |
|---|
| 858 | [Better error handling in the IO manager thread |
|---|
| 859 | Simon 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. |
|---|
| 863 | ] |
|---|
| 864 | [#define _REENTRANT 1 (needed to get the right errno on some OSs) |
|---|
| 865 | Simon 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). |
|---|
| 868 | ] |
|---|
| 869 | [copyCString* should be in IO. Spotted by Tomasz Zielonka |
|---|
| 870 | Don Stewart <dons@cse.unsw.edu.au>**20060518012154] |
|---|
| 871 | [add import Prelude to get dependencies right for Data/Fixed.hs |
|---|
| 872 | Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060517222044 |
|---|
| 873 | Hopefully this fixes parallel builds. |
|---|
| 874 | ] |
|---|
| 875 | [Fix negative index handling in splitAt, replicate and unfoldrN. Move mapF, filterF -> map', filter' while we're here |
|---|
| 876 | Don 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. |
|---|
| 878 | Don Stewart <dons@cse.unsw.edu.au>**20060513051736] |
|---|
| 879 | [Last two CInt fixes for 64 bit, and bracket writeFile while we're here |
|---|
| 880 | Don Stewart <dons@cse.unsw.edu.au>**20060512050750] |
|---|
| 881 | [Some small optimisations, generalise the type of unfold |
|---|
| 882 | Don Stewart <dons@cse.unsw.edu.au>**20060510043309 |
|---|
| 883 | |
|---|
| 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. |
|---|
| 886 | |
|---|
| 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. |
|---|
| 889 | |
|---|
| 890 | Tue May 9 23:28:09 EST 2006 Duncan Coutts <duncan.coutts@worc.ox.ac.uk> |
|---|
| 891 | * Generalise the type of unfoldrN |
|---|
| 892 | |
|---|
| 893 | The type of unfoldrN was overly constrained: |
|---|
| 894 | unfoldrN :: Int -> (Word8 -> Maybe (Word8, Word8)) -> Word8 -> ByteString |
|---|
| 895 | |
|---|
| 896 | if we compare that to unfoldr: |
|---|
| 897 | unfoldr :: (b -> Maybe (a, b)) -> b -> [a] |
|---|
| 898 | |
|---|
| 899 | So we can generalise unfoldrN to this type: |
|---|
| 900 | unfoldrN :: Int -> (a -> Maybe (Word8, a)) -> a -> ByteString |
|---|
| 901 | |
|---|
| 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. |
|---|
| 904 | |
|---|
| 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 |
|---|
| 908 | |
|---|
| 909 | **END OF DESCRIPTION*** |
|---|
| 910 | |
|---|
| 911 | Place the long patch description above the ***END OF DESCRIPTION*** marker. |
|---|
| 912 | The first line of this file will be the patch name. |
|---|
| 913 | |
|---|
| 914 | |
|---|
| 915 | This patch contains the following changes: |
|---|
| 916 | |
|---|
| 917 | M ./Data/ByteString.hs -8 +38 |
|---|
| 918 | M ./Data/ByteString/Char8.hs -6 +12 |
|---|
| 919 | ] |
|---|
| 920 | [portable implementation of WordPtr/IntPtr for non-GHC |
|---|
| 921 | Ross Paterson <ross@soi.city.ac.uk>**20060510001826 |
|---|
| 922 | |
|---|
| 923 | plus much tweaking of imports to avoid cycles |
|---|
| 924 | ] |
|---|
| 925 | [add WordPtr and IntPtr types to Foreign.Ptr, with associated conversions |
|---|
| 926 | Simon Marlow <simonmar@microsoft.com>**20060509092606 |
|---|
| 927 | |
|---|
| 928 | As suggested by John Meacham. |
|---|
| 929 | |
|---|
| 930 | I had to move the Show instance for Ptr into GHC.ForeignPtr to avoid |
|---|
| 931 | recursive dependencies. |
|---|
| 932 | ] |
|---|
| 933 | [add CIntPtr, CUIntPtr, CIntMax, CUIntMax types |
|---|
| 934 | Simon Marlow <simonmar@microsoft.com>**20060509092427] |
|---|
| 935 | [add GHC.Dynamic |
|---|
| 936 | Simon 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 |
|---|
| 938 | Don Stewart <dons@cse.unsw.edu.au>**20060509023425] |
|---|
| 939 | [Make length a good consumer |
|---|
| 940 | simonpj@microsoft**20060508142726 |
|---|
| 941 | |
|---|
| 942 | Make length into a good consumer. Fixes Trac bug #707. |
|---|
| 943 | |
|---|
| 944 | (Before length simply didn't use foldr.) |
|---|
| 945 | |
|---|
| 946 | ] |
|---|
| 947 | [Trim imports |
|---|
| 948 | simonpj@microsoft**20060508142557] |
|---|
| 949 | [Make unsafePerformIO lazy |
|---|
| 950 | simonpj@microsoft**20060508142507 |
|---|
| 951 | |
|---|
| 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. |
|---|
| 963 | |
|---|
| 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. |
|---|
| 969 | |
|---|
| 970 | So the new plan is to define unsafePerformIO using the 'lazy' combinator: |
|---|
| 971 | |
|---|
| 972 | unsafePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r) |
|---|
| 973 | |
|---|
| 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. |
|---|
| 977 | |
|---|
| 978 | ] |
|---|
| 979 | [Sync with FPS head. |
|---|
| 980 | Don Stewart <dons@cse.unsw.edu.au>**20060508122322 |
|---|
| 981 | |
|---|
| 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 |
|---|
| 985 | |
|---|
| 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 |
|---|
| 988 | |
|---|
| 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 |
|---|
| 991 | |
|---|
| 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 |
|---|
| 994 | |
|---|
| 995 | ] |
|---|
| 996 | [Fix all uses for Int that should be CInt or CSize in ffi imports. Spotted by Duncan and Ian |
|---|
| 997 | Don Stewart <dons@cse.unsw.edu.au>**20060508010311] |
|---|
| 998 | [Fixed import list syntax |
|---|
| 999 | Sven Panne <sven.panne@aedion.de>**20060507155008] |
|---|
| 1000 | [Faster filterF, filterNotByte |
|---|
| 1001 | dons@cse.unsw.edu.au**20060507042301] |
|---|
| 1002 | [Much faster find, findIndex. Hint from sjanssen |
|---|
| 1003 | dons@cse.unsw.edu.au**20060507033048] |
|---|
| 1004 | [Merge "unrecognized long opt" fix from 6.4.2 |
|---|
| 1005 | Sven Panne <sven.panne@aedion.de>**20060506110519] |
|---|
| 1006 | [ |
|---|
| 1007 | dons@cse.unsw.edu.au**20060506061029 |
|---|
| 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 |
|---|
| 1010 | |
|---|
| 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 |
|---|
| 1013 | |
|---|
| 1014 | Sat May 6 15:59:31 EST 2006 Don Stewart <dons@cse.unsw.edu.au> |
|---|
| 1015 | * dcoutt's packByte bug squashed |
|---|
| 1016 | |
|---|
| 1017 | With inlinePerformIO, ghc head was compiling: |
|---|
| 1018 | |
|---|
| 1019 | packByte 255 `compare` packByte 127 |
|---|
| 1020 | |
|---|
| 1021 | into roughly |
|---|
| 1022 | |
|---|
| 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) |
|---|
| 1030 | |
|---|
| 1031 | which is rather stunning. unsafePerformIO seems to prevent whatever |
|---|
| 1032 | magic inlining was leading to this. Only affected the head. |
|---|
| 1033 | |
|---|
| 1034 | ] |
|---|
| 1035 | [Add array fusion versions of map, filter and foldl |
|---|
| 1036 | dons@cse.unsw.edu.au**20060505060858 |
|---|
| 1037 | |
|---|
| 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, |
|---|
| 1041 | |
|---|
| 1042 | Pipelines of maps, filters and folds should now need to walk the |
|---|
| 1043 | bytestring once only, and intermediate bytestrings won't be constructed. |
|---|
| 1044 | |
|---|
| 1045 | ] |
|---|
| 1046 | [fix for non-GHC |
|---|
| 1047 | Ross Paterson <ross@soi.city.ac.uk>**20060504093044] |
|---|
| 1048 | [use bracket in appendFile (like writeFile) |
|---|
| 1049 | Ross Paterson <ross@soi.city.ac.uk>**20060504091528] |
|---|
| 1050 | [writeFile: close the file on error |
|---|
| 1051 | Simon Marlow <simonmar@microsoft.com>**20060504084505 |
|---|
| 1052 | Suggested by Ross Paterson, via Neil Mitchell |
|---|
| 1053 | |
|---|
| 1054 | ] |
|---|
| 1055 | [Sync with FPS head |
|---|
| 1056 | dons@cse.unsw.edu.au**20060503105259 |
|---|
| 1057 | |
|---|
| 1058 | This patch brings Data.ByteString into sync with the FPS head. |
|---|
| 1059 | The most significant of which is the new Haskell counting sort. |
|---|
| 1060 | |
|---|
| 1061 | Changes: |
|---|
| 1062 | |
|---|
| 1063 | Sun Apr 30 18:16:29 EST 2006 sjanssen@cse.unl.edu |
|---|
| 1064 | * Fix foldr1 in Data.ByteString and Data.ByteString.Char8 |
|---|
| 1065 | |
|---|
| 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 |
|---|
| 1068 | |
|---|
| 1069 | Mon May 1 16:42:04 EST 2006 sjanssen@cse.unl.edu |
|---|
| 1070 | * Fix groupBy to match Data.List.groupBy. |
|---|
| 1071 | |
|---|
| 1072 | Wed May 3 15:01:07 EST 2006 sjanssen@cse.unl.edu |
|---|
| 1073 | * Migrate to counting sort. |
|---|
| 1074 | |
|---|
| 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! |
|---|
| 1078 | |
|---|
| 1079 | ] |
|---|
| 1080 | [improve performance of Integer->String conversion |
|---|
| 1081 | Simon Marlow <simonmar@microsoft.com>**20060503113306 |
|---|
| 1082 | See |
|---|
| 1083 | http://www.haskell.org//pipermail/libraries/2006-April/005227.html |
|---|
| 1084 | |
|---|
| 1085 | Submitted by: bertram.felgenhauer@googlemail.com |
|---|
| 1086 | |
|---|
| 1087 | |
|---|
| 1088 | ] |
|---|
| 1089 | [inline withMVar, modifyMVar, modifyMVar_ |
|---|
| 1090 | Simon Marlow <simonmar@microsoft.com>**20060503111152] |
|---|
| 1091 | [Fix string truncating in hGetLine -- it was a pasto from Simon's code |
|---|
| 1092 | Simon Marlow <simonmar@microsoft.com>**20060503103504 |
|---|
| 1093 | (from Don Stewart) |
|---|
| 1094 | ] |
|---|
| 1095 | [Merge in Data.ByteString head. Fixes ByteString+cbits in hugs |
|---|
| 1096 | Don Stewart <dons@cse.unsw.edu.au>**20060429040733] |
|---|
| 1097 | [Import Data.ByteString from fps 0.5. |
|---|
| 1098 | Don Stewart <dons@cse.unsw.edu.au>**20060428130718 |
|---|
| 1099 | Fast, packed byte vectors, providing a better PackedString. |
|---|
| 1100 | |
|---|
| 1101 | ] |
|---|
| 1102 | [fix previous patch |
|---|
| 1103 | Ross Paterson <ross@soi.city.ac.uk>**20060501154847] |
|---|
| 1104 | [fixes for non-GHC |
|---|
| 1105 | Ross Paterson <ross@soi.city.ac.uk>**20060501144322] |
|---|
| 1106 | [fix imports for mingw32 && !GHC |
|---|
| 1107 | Ross Paterson <ross@soi.city.ac.uk>**20060427163248] |
|---|
| 1108 | [RequireOrder: do not collect unrecognised options after a non-opt |
|---|
| 1109 | Simon 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. |
|---|
| 1116 | |
|---|
| 1117 | eg. before: |
|---|
| 1118 | |
|---|
| 1119 | Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"] |
|---|
| 1120 | ([],["bar","--foo"],["--foo"],[]) |
|---|
| 1121 | |
|---|
| 1122 | after: |
|---|
| 1123 | |
|---|
| 1124 | Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"] |
|---|
| 1125 | ([],["bar","--foo"],[],[]) |
|---|
| 1126 | ] |
|---|
| 1127 | [fix for Haddock 0.7 |
|---|
| 1128 | Ashley Yakeley <ashley@semantic.org>**20060426072521] |
|---|
| 1129 | [add Data.Fixed module |
|---|
| 1130 | Ashley Yakeley <ashley@semantic.org>**20060425071853] |
|---|
| 1131 | [add instances |
|---|
| 1132 | Ross Paterson <ross@soi.city.ac.uk>**20060424102146] |
|---|
| 1133 | [add superclasses to Applicative and Traversable |
|---|
| 1134 | Ross Paterson <ross@soi.city.ac.uk>**20060411144734 |
|---|
| 1135 | |
|---|
| 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. |
|---|
| 1140 | ] |
|---|
| 1141 | [add Functor and Monad instances for Prelude types |
|---|
| 1142 | Ross Paterson <ross@soi.city.ac.uk>**20060410111443] |
|---|
| 1143 | [GHC.Base.breakpoint |
|---|
| 1144 | Lemmih <lemmih@gmail.com>**20060407125827] |
|---|
| 1145 | [Track the GHC source tree reorganisation |
|---|
| 1146 | Simon Marlow <simonmar@microsoft.com>**20060407041631] |
|---|
| 1147 | [in the show instance for Exception, print the type of dynamic exceptions |
|---|
| 1148 | Simon Marlow <simonmar@microsoft.com>**20060406112444 |
|---|
| 1149 | Unfortunately this requires some recursve module hackery to get at |
|---|
| 1150 | the show instance for Typeable. |
|---|
| 1151 | ] |
|---|
| 1152 | [implement ForeignEnvPtr, newForeignPtrEnv, addForeignPtrEnv for GHC |
|---|
| 1153 | Simon Marlow <simonmar@microsoft.com>**20060405155448] |
|---|
| 1154 | [add forkOnIO :: Int -> IO () -> IO ThreadId |
|---|
| 1155 | Simon Marlow <simonmar@microsoft.com>**20060327135018] |
|---|
| 1156 | [Rework previous: not a gcc bug after all |
|---|
| 1157 | Simon 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. |
|---|
| 1161 | ] |
|---|
| 1162 | [work around a gcc 4.1.0 codegen bug in -O2 by forcing -O1 for GHC.Show |
|---|
| 1163 | Simon Marlow <simonmar@microsoft.com>**20060323134514 |
|---|
| 1164 | See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26824 |
|---|
| 1165 | ] |
|---|
| 1166 | [commit mysteriously missing parts of "runIOFastExit" patch |
|---|
| 1167 | Simon Marlow <simonmar@microsoft.com>**20060321101535] |
|---|
| 1168 | [add runIOFastExit :: IO a -> IO a |
|---|
| 1169 | Simon 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. |
|---|
| 1172 | ] |
|---|
| 1173 | [Fix a broken invariant |
|---|
| 1174 | Simon 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)" |
|---|
| 1177 | ] |
|---|
| 1178 | [Add unsafeSTToIO :: ST s a -> IO a |
|---|
| 1179 | Simon 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. |
|---|
| 1182 | ] |
|---|
| 1183 | [Added 'alter' |
|---|
| 1184 | jeanphilippe.bernardy@gmail.com**20060315143539 |
|---|
| 1185 | Added 'alter :: (Maybe a -> Maybe a) -> k -> Map k a -> Map k a' to IntMap and Map |
|---|
| 1186 | This addresses ticket #665 |
|---|
| 1187 | ] |
|---|
| 1188 | [deprecate FunctorM in favour of Foldable and Traversable |
|---|
| 1189 | Ross Paterson <ross@soi.city.ac.uk>**20060315092942 |
|---|
| 1190 | as discussed on the libraries list. |
|---|
| 1191 | ] |
|---|
| 1192 | [Simplify Eq, Ord, and Show instances for UArray |
|---|
| 1193 | Simon 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). |
|---|
| 1198 | |
|---|
| 1199 | Suggestion by: Frederik Eaton <frederik@ofb.net> |
|---|
| 1200 | |
|---|
| 1201 | ] |
|---|
| 1202 | [Oops typo in intSet notMember |
|---|
| 1203 | jeanphilippe.bernardy@gmail.com**20060311224713] |
|---|
| 1204 | [IntMap lookup now returns monad instead of Maybe. |
|---|
| 1205 | jeanphilippe.bernardy@gmail.com**20060311224502] |
|---|
| 1206 | [Added notMember to Data.IntSet and Data.IntMap |
|---|
| 1207 | jeanphilippe.bernardy@gmail.com**20060311085221] |
|---|
| 1208 | [add Data.Set.notMember and Data.Map.notMember |
|---|
| 1209 | John Meacham <john@repetae.net>**20060309191806] |
|---|
| 1210 | [addToClockTime: handle picoseconds properly |
|---|
| 1211 | Simon Marlow <simonmar@microsoft.com>**20060310114532 |
|---|
| 1212 | fixes #588 |
|---|
| 1213 | ] |
|---|
| 1214 | [make head/build rule apply to all types, not just Bool. |
|---|
| 1215 | John Meacham <john@repetae.net>**20060303045753] |
|---|
| 1216 | [Avoid overflow when normalising clock times |
|---|
| 1217 | Ian Lynagh <igloo@earth.li>**20060210144638] |
|---|
| 1218 | [Years have 365 days, not 30*365 |
|---|
| 1219 | Ian Lynagh <igloo@earth.li>**20060210142853] |
|---|
| 1220 | [declare blkcmp() static |
|---|
| 1221 | Simon Marlow <simonmar@microsoft.com>**20060223134317] |
|---|
| 1222 | [typo in comment in Foldable class |
|---|
| 1223 | Ross Paterson <ross@soi.city.ac.uk>**20060209004901] |
|---|
| 1224 | [simplify fmap |
|---|
| 1225 | Ross Paterson <ross@soi.city.ac.uk>**20060206095048] |
|---|
| 1226 | [update ref in comment |
|---|
| 1227 | Ross Paterson <ross@soi.city.ac.uk>**20060206095139] |
|---|
| 1228 | [Give -foverlapping-instances to Data.Typeable |
|---|
| 1229 | simonpj@microsoft**20060206133439 |
|---|
| 1230 | |
|---|
| 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.) |
|---|
| 1236 | |
|---|
| 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) |
|---|
| 1239 | |
|---|
| 1240 | |
|---|
| 1241 | ] |
|---|
| 1242 | [Add -fno-bang-patterns to modules using both bang and glasgow-exts |
|---|
| 1243 | simonpj@microsoft.com**20060203175759] |
|---|
| 1244 | [When splitting a bucket, keep the contents in the same order |
|---|
| 1245 | Simon Marlow <simonmar@microsoft.com>**20060201130427 |
|---|
| 1246 | To retain the property that multiple inserts shadow each other |
|---|
| 1247 | (see ticket #661, test hash001) |
|---|
| 1248 | ] |
|---|
| 1249 | [add foldr/build optimisation for take and replicate |
|---|
| 1250 | Simon 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. |
|---|
| 1256 | |
|---|
| 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). |
|---|
| 1260 | ] |
|---|
| 1261 | [Generate PrimopWrappers.hs with Haddock docs |
|---|
| 1262 | Simon Marlow <simonmar@microsoft.com>**20060124131121 |
|---|
| 1263 | Patch originally from Dinko Tenev <dinko.tenev@gmail.com>, modified |
|---|
| 1264 | to add log message by me. |
|---|
| 1265 | ] |
|---|
| 1266 | [[project @ 2006-01-19 14:47:15 by ross] |
|---|
| 1267 | ross**20060119144715 |
|---|
| 1268 | backport warning avoidance from Haddock |
|---|
| 1269 | ] |
|---|
| 1270 | [[project @ 2006-01-18 11:45:47 by malcolm] |
|---|
| 1271 | malcolm**20060118114547 |
|---|
| 1272 | Fix import of Ix for nhc98. |
|---|
| 1273 | ] |
|---|
| 1274 | [[project @ 2006-01-17 09:38:38 by ross] |
|---|
| 1275 | ross**20060117093838 |
|---|
| 1276 | add Ix instance for GeneralCategory. |
|---|
| 1277 | ] |
|---|
| 1278 | [TAG Initial conversion from CVS complete |
|---|
| 1279 | John Goerzen <jgoerzen@complete.org>**20060112154126] |
|---|
| 1280 | Patch bundle hash: |
|---|
| 1281 | 8fac7252d6ba6ccf59c1b3e9a872a1b887f0088d |
|---|