# Ticket #4381: scaleFloat.dpatch

File scaleFloat.dpatch, 57.4 KB (added by daniel.is.fischer, 6 years ago) |
---|

Line | |
---|---|

1 | 1 patch for repository /home/dafis/Haskell/Hacking/ghc/libraries/base: |

2 | |

3 | Tue Oct 12 13:44:50 CEST 2010 Daniel Fischer <daniel.is.fischer@web.de> |

4 | * FIX #4381 |

5 | Fix scaleFloat by clamping the scaling parameter so that |

6 | exponent + scale doesn't overflow. |

7 | |

8 | Also, lots of trailing whitespace removed. |

9 | |

10 | New patches: |

11 | |

12 | [FIX #4381 |

13 | Daniel Fischer <daniel.is.fischer@web.de>**20101012114450 |

14 | Ignore-this: ce510d2d30b5a14099115448215a725b |

15 | Fix scaleFloat by clamping the scaling parameter so that |

16 | exponent + scale doesn't overflow. |

17 | |

18 | Also, lots of trailing whitespace removed. |

19 | ] { |

20 | hunk ./GHC/Float.lhs 12 |

21 | -- Module : GHC.Float |

22 | -- Copyright : (c) The University of Glasgow 1994-2002 |

23 | -- License : see libraries/base/LICENSE |

24 | --- |

25 | +-- |

26 | -- Maintainer : cvs-ghc@haskell.org |

27 | -- Stability : internal |

28 | -- Portability : non-portable (GHC Extensions) |

29 | hunk ./GHC/Float.lhs 134 |

30 | significand x = encodeFloat m (negate (floatDigits x)) |

31 | where (m,_) = decodeFloat x |

32 | |

33 | - scaleFloat k x = encodeFloat m (n+k) |

34 | + scaleFloat k x = encodeFloat m (n + clamp b k) |

35 | where (m,n) = decodeFloat x |

36 | hunk ./GHC/Float.lhs 136 |

37 | - |

38 | + (l,h) = floatRange x |

39 | + d = floatDigits x |

40 | + b = h - l + 4*d |

41 | + -- n+k may overflow, which would lead |

42 | + -- to wrong results, hence we clamp the |

43 | + -- scaling parameter. |

44 | + -- If n + k would be larger than h, |

45 | + -- n + clamp b k must be too, simliar |

46 | + -- for smaller than l - d. |

47 | + -- Add a little extra to keep clear |

48 | + -- from the boundary cases. |

49 | + |

50 | atan2 y x |

51 | | x > 0 = atan (y/x) |

52 | | x == 0 && y > 0 = pi/2 |

53 | hunk ./GHC/Float.lhs 151 |

54 | - | x < 0 && y > 0 = pi + atan (y/x) |

55 | + | x < 0 && y > 0 = pi + atan (y/x) |

56 | |(x <= 0 && y < 0) || |

57 | (x < 0 && isNegativeZero y) || |

58 | (isNegativeZero x && isNegativeZero y) |

59 | hunk ./GHC/Float.lhs 282 |

60 | (m,_) -> encodeFloat m (negate (floatDigits x)) |

61 | |

62 | scaleFloat k x = case decodeFloat x of |

63 | - (m,n) -> encodeFloat m (n+k) |

64 | + (m,n) -> encodeFloat m (n + clamp bf k) |

65 | + where bf = FLT_MAX_EXP - (FLT_MIN_EXP) + 4*FLT_MANT_DIG |

66 | + |

67 | isNaN x = 0 /= isFloatNaN x |

68 | isInfinite x = 0 /= isFloatInfinite x |

69 | isDenormalized x = 0 /= isFloatDenormalized x |

70 | hunk ./GHC/Float.lhs 293 |

71 | |

72 | instance Show Float where |

73 | showsPrec x = showSignedFloat showFloat x |

74 | - showList = showList__ (showsPrec 0) |

75 | + showList = showList__ (showsPrec 0) |

76 | \end{code} |

77 | |

78 | %********************************************************* |

79 | hunk ./GHC/Float.lhs 411 |

80 | (m,_) -> encodeFloat m (negate (floatDigits x)) |

81 | |

82 | scaleFloat k x = case decodeFloat x of |

83 | - (m,n) -> encodeFloat m (n+k) |

84 | + (m,n) -> encodeFloat m (n + clamp bd k) |

85 | + where bd = DBL_MAX_EXP - (DBL_MIN_EXP) + 4*DBL_MANT_DIG |

86 | |

87 | isNaN x = 0 /= isDoubleNaN x |

88 | isInfinite x = 0 /= isDoubleInfinite x |

89 | hunk ./GHC/Float.lhs 422 |

90 | |

91 | instance Show Double where |

92 | showsPrec x = showSignedFloat showFloat x |

93 | - showList = showList__ (showsPrec 0) |

94 | + showList = showList__ (showsPrec 0) |

95 | \end{code} |

96 | |

97 | %********************************************************* |

98 | hunk ./GHC/Float.lhs 440 |

99 | |

100 | NOTE: The instances for Float and Double do not make use of the default |

101 | methods for @enumFromTo@ and @enumFromThenTo@, as these rely on there being |

102 | -a `non-lossy' conversion to and from Ints. Instead we make use of the |

103 | +a `non-lossy' conversion to and from Ints. Instead we make use of the |

104 | 1.2 default methods (back in the days when Enum had Ord as a superclass) |

105 | for these (@numericEnumFromTo@ and @numericEnumFromThenTo@ below.) |

106 | |

107 | hunk ./GHC/Float.lhs 476 |

108 | |

109 | \begin{code} |

110 | -- | Show a signed 'RealFloat' value to full precision |

111 | --- using standard decimal notation for arguments whose absolute value lies |

112 | +-- using standard decimal notation for arguments whose absolute value lies |

113 | -- between @0.1@ and @9,999,999@, and scientific notation otherwise. |

114 | showFloat :: (RealFloat a) => a -> ShowS |

115 | showFloat x = showString (formatRealFloat FFGeneric Nothing x) |

116 | hunk ./GHC/Float.lhs 491 |

117 | | isInfinite x = if x < 0 then "-Infinity" else "Infinity" |

118 | | x < 0 || isNegativeZero x = '-':doFmt fmt (floatToDigits (toInteger base) (-x)) |

119 | | otherwise = doFmt fmt (floatToDigits (toInteger base) x) |

120 | - where |

121 | + where |

122 | base = 10 |

123 | |

124 | doFmt format (is, e) = |

125 | hunk ./GHC/Float.lhs 572 |

126 | -- This version uses a much slower logarithm estimator. It should be improved. |

127 | |

128 | -- | 'floatToDigits' takes a base and a non-negative 'RealFloat' number, |

129 | --- and returns a list of digits and an exponent. |

130 | +-- and returns a list of digits and an exponent. |

131 | -- In particular, if @x>=0@, and |

132 | -- |

133 | -- > floatToDigits base x = ([d1,d2,...,dn], e) |

134 | hunk ./GHC/Float.lhs 588 |

135 | floatToDigits :: (RealFloat a) => Integer -> a -> ([Int], Int) |

136 | floatToDigits _ 0 = ([0], 0) |

137 | floatToDigits base x = |

138 | - let |

139 | + let |

140 | (f0, e0) = decodeFloat x |

141 | (minExp0, _) = floatRange x |

142 | p = floatDigits x |

143 | hunk ./GHC/Float.lhs 596 |

144 | minExp = minExp0 - p -- the real minimum exponent |

145 | -- Haskell requires that f be adjusted so denormalized numbers |

146 | -- will have an impossibly low exponent. Adjust for this. |

147 | - (f, e) = |

148 | + (f, e) = |

149 | let n = minExp - e0 in |

150 | if n > 0 then (f0 `div` (b^n), e0+n) else (f0, e0) |

151 | (r, s, mUp, mDn) = |

152 | hunk ./GHC/Float.lhs 613 |

153 | (f*2, b^(-e)*2, 1, 1) |

154 | k :: Int |

155 | k = |

156 | - let |

157 | + let |

158 | k0 :: Int |

159 | k0 = |

160 | if b == 2 && base == 10 then |

161 | hunk ./GHC/Float.lhs 623 |

162 | -- Haskell promises that p-1 <= logBase b f < p. |

163 | (p - 1 + e0) * 3 `div` 10 |

164 | else |

165 | - -- f :: Integer, log :: Float -> Float, |

166 | + -- f :: Integer, log :: Float -> Float, |

167 | -- ceiling :: Float -> Int |

168 | ceiling ((log (fromInteger (f+1) :: Float) + |

169 | fromIntegral e * log (fromInteger b)) / |

170 | hunk ./GHC/Float.lhs 649 |

171 | (False, True) -> dn+1 : ds |

172 | (True, True) -> if rn' * 2 < sN then dn : ds else dn+1 : ds |

173 | (False, False) -> gen (dn:ds) rn' sN mUpN' mDnN' |

174 | - |

175 | - rds = |

176 | + |

177 | + rds = |

178 | if k >= 0 then |

179 | gen [] r (s * expt base k) mUp mDn |

180 | else |

181 | hunk ./GHC/Float.lhs 693 |

182 | fromRat x = x' |

183 | where x' = f e |

184 | |

185 | --- If the exponent of the nearest floating-point number to x |

186 | +-- If the exponent of the nearest floating-point number to x |

187 | -- is e, then the significand is the integer nearest xb^(-e), |

188 | -- where b is the floating-point radix. We start with a good |

189 | -- guess for e, and if it is correct, the exponent of the |

190 | hunk ./GHC/Float.lhs 756 |

191 | |

192 | -- Scale x until xMin <= x < xMax, or p (the exponent) <= minExp. |

193 | scaleRat :: Rational -> Int -> Rational -> Rational -> Int -> Rational -> (Rational, Int) |

194 | -scaleRat b minExp xMin xMax p x |

195 | +scaleRat b minExp xMin xMax p x |

196 | | p <= minExp = (x, p) |

197 | | x >= xMax = scaleRat b minExp xMin xMax (p+1) (x/b) |

198 | | x < xMin = scaleRat b minExp xMin xMax (p-1) (x*b) |

199 | hunk ./GHC/Float.lhs 939 |

200 | Don found that the RULES for realToFrac/Int->Double and simliarly |

201 | Float made a huge difference to some stream-fusion programs. Here's |

202 | an example |

203 | - |

204 | + |

205 | import Data.Array.Vector |

206 | hunk ./GHC/Float.lhs 941 |

207 | - |

208 | + |

209 | n = 40000000 |

210 | hunk ./GHC/Float.lhs 943 |

211 | - |

212 | + |

213 | main = do |

214 | let c = replicateU n (2::Double) |

215 | a = mapU realToFrac (enumFromToU 0 (n-1) ) :: UArr Double |

216 | hunk ./GHC/Float.lhs 948 |

217 | print (sumU (zipWithU (*) c a)) |

218 | - |

219 | + |

220 | Without the RULE we get this loop body: |

221 | hunk ./GHC/Float.lhs 950 |

222 | - |

223 | + |

224 | case $wtoRational sc_sY4 of ww_aM7 { (# ww1_aM9, ww2_aMa #) -> |

225 | case $wfromRat ww1_aM9 ww2_aMa of tpl_X1P { D# ipv_sW3 -> |

226 | Main.$s$wfold |

227 | hunk ./GHC/Float.lhs 957 |

228 | (+# sc_sY4 1) |

229 | (+# wild_X1i 1) |

230 | (+## sc2_sY6 (*## 2.0 ipv_sW3)) |

231 | - |

232 | + |

233 | And with the rule: |

234 | hunk ./GHC/Float.lhs 959 |

235 | - |

236 | + |

237 | Main.$s$wfold |

238 | (+# sc_sXT 1) |

239 | (+# wild_X1h 1) |

240 | hunk ./GHC/Float.lhs 964 |

241 | (+## sc2_sXV (*## 2.0 (int2Double# sc_sXT))) |

242 | - |

243 | + |

244 | The running time of the program goes from 120 seconds to 0.198 seconds |

245 | with the native backend, and 0.143 seconds with the C backend. |

246 | hunk ./GHC/Float.lhs 967 |

247 | - |

248 | -A few more details in Trac #2251, and the patch message |

249 | + |

250 | +A few more details in Trac #2251, and the patch message |

251 | "Add RULES for realToFrac from Int". |

252 | |

253 | %********************************************************* |

254 | hunk ./GHC/Float.lhs 988 |

255 | = showParen (p > 6) (showChar '-' . showPos (-x)) |

256 | | otherwise = showPos x |

257 | \end{code} |

258 | + |

259 | +We need to prevent over/underflow of the exponent in encodeFloat when |

260 | +called from scaleFloat, hence we clamp the scaling parameter. |

261 | +We must have a large enough range to cover the maximum difference of |

262 | +exponents returned by decodeFloat. |

263 | +\begin{code} |

264 | +clamp :: Int -> Int -> Int |

265 | +clamp bd k = max (-bd) (min bd k) |

266 | +\end{code} |

267 | } |

268 | |

269 | Context: |

270 | |

271 | [Added initial .authorspellings |

272 | Bas van Dijk <v.dijk.bas@gmail.com>**20101005072701 |

273 | Ignore-this: 63628bcabfdd0b7beda4cd37daeccd89 |

274 | ] |

275 | [Lazier intersperse |

276 | Daniel Fischer <daniel.is.fischer@web.de>**20101002231201 |

277 | Ignore-this: a0fed65930cf19e68b4363381a5ab576 |

278 | A lazier implementation of intersperse, and consequentially intercalate, to |

279 | avoid space leaks. |

280 | ] |

281 | [FIX #4228 (atanh (-1) returns NaN instead of -Infinity) |

282 | ghc@cainnorris.net**20100816213654 |

283 | Ignore-this: dee89c24493e84a02bea711a1c83a73f |

284 | ] |

285 | [Make intersectBy lazier |

286 | Daniel Fischer <daniel.is.fischer@web.de>**20100930191731 |

287 | Ignore-this: ef687bc75923434e85c14b57171576aa |

288 | Add shortcuts to intersectBy for empty list arguments. |

289 | In addition to being faster in that case, more inputs yield defined results. |

290 | Treats ticket #4323 |

291 | ] |

292 | [doc tweak for Directory file type: file names are '\0'-separated |

293 | Simon Marlow <marlowsd@gmail.com>**20100922113811 |

294 | Ignore-this: 96b7b004bd6e5bc3e958ad55bf238ba1 |

295 | ] |

296 | [documentation for IODeviceType (#4317, edited by me) |

297 | Simon Marlow <marlowsd@gmail.com>**20100915131341 |

298 | Ignore-this: 21c50ca7a189eebcf299523b6e942bae |

299 | ] |

300 | [Allow Data.HashTable construction with user-supplied size |

301 | **20100722210726 |

302 | Ignore-this: bd54880bb16a106a992f03b040dc4164 |

303 | |

304 | This avoids some resizing for users who know they will be inserting a |

305 | lot of data. |

306 | |

307 | http://hackage.haskell.org/trac/ghc/ticket/4193 |

308 | ] |

309 | [some fixes for hGetBufSome |

310 | Simon Marlow <marlowsd@gmail.com>**20100916113732 |

311 | Ignore-this: 3e596a606c180dc4859ea8f4c9132ca1 |

312 | - fix one case where it was blocking when it shouldn't |

313 | - a couple of error-message tweaks |

314 | ] |

315 | [Windows: map ERROR_NO_DATA to EPIPE, rather than EINVAL |

316 | Simon Marlow <marlowsd@gmail.com>**20100915142618 |

317 | Ignore-this: 9023e5f0542419f225aef26cb6b1d88d |

318 | WriteFile() returns ERROR_NO_DATA when writing to a pipe that is |

319 | "closing", however by default the write() wrapper in the CRT maps this |

320 | to EINVAL so we get confusing things like |

321 | |

322 | hPutChar: invalid argument (Invalid Argumnet) |

323 | |

324 | when piping the output of a Haskell program into something that closes |

325 | the pipe early. This was happening in the testsuite in a few place. |

326 | |

327 | The solution is to map ERROR_NO_DATA to EPIPE correctly, as we |

328 | explicitly check for EPIPE on stdout (in GHC.TopHandler) so we can |

329 | exit without an error in this case. |

330 | ] |

331 | [tighten up parsing of numbers (#1579) |

332 | Simon Marlow <marlowsd@gmail.com>**20100913214733 |

333 | Ignore-this: 3411bf3d2e98cfacb9e0afd11d79e722 |

334 | ] |

335 | [Add absentError. |

336 | simonpj@microsoft.com**20100914134639 |

337 | Ignore-this: d0eef5a87e1def4cdbde92a55241c8c4 |

338 | |

339 | This patch accompanies the HEAD patch: |

340 | |

341 | Tue Sep 14 12:38:27 BST 2010 simonpj@microsoft.com |

342 | * Make absent-arg wrappers work for unlifted types (fix Trac #4306) |

343 | |

344 | Previously we were simply passing arguments of unlifted |

345 | type to a wrapper, even if they were absent, which was |

346 | stupid. |

347 | |

348 | See Note [Absent error Id] in WwLib. |

349 | ] |

350 | [Add missing import, fixes build on windows |

351 | simonpj@microsoft.com**20100914122750 |

352 | Ignore-this: 12ece15ef94982ddfbf5f9f7900619da |

353 | ] |

354 | [Add a suitable Show instance for TextEncoding (#4273) |

355 | Simon Marlow <marlowsd@gmail.com>**20100913154459 |

356 | Ignore-this: 77f2235460895debd2827f34c42c3435 |

357 | ] |

358 | [don't fill a finalized handle with an error (see comment) |

359 | Simon Marlow <marlowsd@gmail.com>**20100913153350 |

360 | Ignore-this: c72cdb6898dffa88eca1d781171b2943 |

361 | ] |

362 | [deriving (Eq, Ord, Read, Show) for Newline and NewlineMode |

363 | Simon Marlow <marlowsd@gmail.com>**20100913153031 |

364 | Ignore-this: 9b9b29bfb7abf5550cfbfa7788f81bf |

365 | ] |

366 | [fix warning on Windows |

367 | Simon Marlow <marlowsd@gmail.com>**20100913111536 |

368 | Ignore-this: dacc5448c452daad60ed37a1a5ed096e |

369 | ] |

370 | [Put the state-token argument on fill, done, adjust on the RHS |

371 | simonpj@microsoft.com**20100913101832 |

372 | Ignore-this: d228b492de7d4635c026ed24cbc17e34 |

373 | |

374 | This is so that the functions will inline when |

375 | applied to their normal (non-state-token) aguments. |

376 | |

377 | I forget why I did this, but it seems like the right thing anyway. |

378 | ] |

379 | [avoid Foreign.unsafePerformIO |

380 | Ross Paterson <ross@soi.city.ac.uk>**20100909125521 |

381 | Ignore-this: b698101119ffd1bc6311cce0736f745d |

382 | ] |

383 | [Remove debugging code accidentally left in |

384 | Simon Marlow <marlowsd@gmail.com>**20100909113331 |

385 | Ignore-this: 906a14176dd37030b8203782a687936b |

386 | ] |

387 | [Fix Windows build; patches frmo ezyang |

388 | Ian Lynagh <igloo@earth.li>**20100908123037 |

389 | Ignore-this: 2f02986087edd7da8382221012c27cd0 |

390 | ] |

391 | [More accurate isatty test for MinGW. |

392 | Edward Z. Yang <ezyang@mit.edu>**20100907154144 |

393 | Ignore-this: 93bdc2b2a8e65a7c4c7d3906bdda01db |

394 | ] |

395 | [Fix the build when HAVE_KQUEUE but not HAVE_KEVENT64 |

396 | Ian Lynagh <igloo@earth.li>**20100904223703] |

397 | [Fix warnings |

398 | benl@ouroborus.net**20100830044741 |

399 | Ignore-this: 8397aaec7c36046c9ace403e65f32d32 |

400 | ] |

401 | [fix cache variable name used by FP_SEARCH_LIBS_PROTO |

402 | Ross Paterson <ross@soi.city.ac.uk>**20100819204858 |

403 | Ignore-this: b8113cb3c6f0e03c507297c99d3d82b7 |

404 | ] |

405 | [Add a missing castPtr (only shows up in -DDEBUG) |

406 | simonpj@microsoft.com**20100815145127 |

407 | Ignore-this: 30b9c42cd3ce7837bdabd254fe66078d |

408 | ] |

409 | [Fixed a rounding error in threadDelay |

410 | Johan Tibell <johan.tibell@gmail.com>**20100813124043 |

411 | Ignore-this: 1cb77d0852233ffffb144b134064ee3c |

412 | ] |

413 | [export allocaBytesAligned; make allocaArray use the correct alignment (#2917) |

414 | Simon Marlow <marlowsd@gmail.com>**20100812105524 |

415 | Ignore-this: deb6495f7b7b84deaf02b88927a5ba8c |

416 | ] |

417 | [deprecate unGetChan and isEmptyChan (see #4154) |

418 | Simon Marlow <marlowsd@gmail.com>**20100705125952 |

419 | Ignore-this: b4e769959f131b2d0001eb7202bc1b92 |

420 | ] |

421 | [Add type signatures to cope with lack of local generalisation |

422 | simonpj@microsoft.com**20100728124847 |

423 | Ignore-this: d3af9a47c2821c6081bde05a135a92fb |

424 | ] |

425 | [Add type signature in local where |

426 | simonpj@microsoft.com**20100727151532 |

427 | Ignore-this: 1c57063ad32d13e0d1ec8daf968bf055 |

428 | ] |

429 | [Integrated new I/O manager |

430 | Simon Marlow <marlowsd@gmail.com>**20100810082248 |

431 | Ignore-this: ed70a9066ac9b676a446fe99978fef7a |

432 | (patch originally by Johan Tibell <johan.tibell@gmail.com>, minor merging by me) |

433 | ] |

434 | [Add mfilter to Control.Monad |

435 | jon.fairbairn@cl.cam.ac.uk**20090917145616 |

436 | Ignore-this: de4240b60684f3065b29378df3ea98f2 |

437 | |

438 | Straightforward MonadPlus version of List.filter. I would |

439 | prefer to call it filter, but the current naming scheme for |

440 | Control.Monad implies mfilter. |

441 | |

442 | ] |

443 | [move Monad and MonadFix instances for Either from mtl (proposal #4159) |

444 | Ross Paterson <ross@soi.city.ac.uk>**20100729122449 |

445 | Ignore-this: b0f8cd8643679948d1da43bd7c08c5aa |

446 | |

447 | The Monad and MonadFix instances for Either (formerly in the mtl |

448 | package) are moved to Control.Monad.Instances and Control.Monad.Fix |

449 | respectively. The Monad instance is still an orphan, to retain Haskell |

450 | 98 compatibility, but the MonadFix instance is together with its class. |

451 | The Error constraint is removed from both instances, and the default |

452 | definition of fail is used. |

453 | ] |

454 | [Remove egregious ghc-ish from Foreign.Marshal |

455 | Malcolm.Wallace@me.com**20100722075449] |

456 | [add numSparks :: IO Int (#4167) |

457 | Simon Marlow <marlowsd@gmail.com>**20100720153858 |

458 | Ignore-this: 4543f57a7f137f8cae1c3efc5c023a9b |

459 | ] |

460 | [add unsafeLocalState from Haskell 2010, and docs |

461 | Simon Marlow <marlowsd@gmail.com>**20100720082819 |

462 | Ignore-this: dcd79fb546ebe29ddff4df279ec2f38 |

463 | ] |

464 | [docs: mention that Foreign.unsafePerformIO is deprecated |

465 | Simon Marlow <marlowsd@gmail.com>**20100720082804 |

466 | Ignore-this: 4cfebb8f2a1cddc7d15e94e31b2befa4 |

467 | We can't actually deprecate it without introducing a name clash |

468 | between Foreign.unsafePerformIO and System.IO.Unsafe.unsafePerformIO |

469 | ] |

470 | [doc formatting fix |

471 | Simon Marlow <marlowsd@gmail.com>**20100714151347 |

472 | Ignore-this: 255edef607dcd290e198015240b5d125 |

473 | ] |

474 | [add module intro from Haskell 2010 |

475 | Simon Marlow <marlowsd@gmail.com>**20100714115853 |

476 | Ignore-this: 59b5a07507a059ccccdff2dfb6490a27 |

477 | ] |

478 | [document exception-overriding behaviour in withFile |

479 | Simon Marlow <marlowsd@gmail.com>**20100714104107 |

480 | Ignore-this: f99e641ea2f46d872cb7420a62fa50dc |

481 | ] |

482 | [doc: use "finalizer" consistently |

483 | Simon Marlow <marlowsd@gmail.com>**20100714103649 |

484 | Ignore-this: bdfea40f31dc5045fdbc6e12266dda93 |

485 | ] |

486 | [clarify meaning of bit |

487 | Simon Marlow <marlowsd@gmail.com>**20100714103310 |

488 | Ignore-this: 521b031f1e83ef34ca03d9aa9273df8a |

489 | ] |

490 | [note shortcutting behaviour of any/all/elem |

491 | Simon Marlow <marlowsd@gmail.com>**20100714103304 |

492 | Ignore-this: 1605f362ba0712ad1cea1309636f3ea1 |

493 | ] |

494 | [add cast{C,U}CharToChar and castCharTo{C,U}Char, from Haskell 2010 |

495 | Simon Marlow <marlowsd@gmail.com>**20100713132515 |

496 | Ignore-this: 9b1da827016c7b08668078b45964e9de |

497 | ] |

498 | [mention that IntPtr and WordPtr can be marshalled to/from intptr_t and uintptr_t |

499 | Simon Marlow <marlowsd@gmail.com>**20100713132403 |

500 | Ignore-this: dcc112a72746ba117a84fa29e71b6800 |

501 | ] |

502 | [Partial fix for Trac #4136 |

503 | simonpj@microsoft.com**20100707135725 |

504 | Ignore-this: 9548eeb3187d9779d4e5c858a0f35354 |

505 | |

506 | In 'choose' (which is a library function designed specifically |

507 | to support derived instances of Read), we must match Symbol |

508 | as well as Ident, for nullary constructors that (wierdly) are |

509 | symbols. |

510 | ] |

511 | [Fix typo in documentation |

512 | Simon Hengel <simon.hengel@wiktory.org>**20100711141648 |

513 | Ignore-this: c052dd8a681832ef598a323ad55eae3a |

514 | ] |

515 | [Remove duplicated word in documentation |

516 | Simon Hengel <simon.hengel@wiktory.org>**20100711072703 |

517 | Ignore-this: fb3732dc57be55f14168792f923433 |

518 | ] |

519 | [Allow nhc98 to cope with recent changes to Control.Exception. |

520 | Malcolm.Wallace@me.com**20100710170940] |

521 | [ New asynchronous exception control API (base parts) |

522 | Simon Marlow <marlowsd@gmail.com>**20100708152735 |

523 | Ignore-this: 71a4811804f04259f1fe739f8863beaf |

524 | |

525 | As discussed on the libraries/haskell-cafe mailing lists |

526 | http://www.haskell.org/pipermail/libraries/2010-April/013420.html |

527 | |

528 | This is a replacement for block/unblock in the asychronous exceptions |

529 | API to fix a problem whereby a function could unblock asynchronous |

530 | exceptions even if called within a blocked context. |

531 | |

532 | The new terminology is "mask" rather than "block" (to avoid confusion |

533 | due to overloaded meanings of the latter). |

534 | |

535 | The following is the new API; the old API is deprecated but still |

536 | available for the time being. |

537 | |

538 | Control.Exception |

539 | ----------------- |

540 | |

541 | mask :: ((forall a. IO a -> IO a) -> IO b) -> IO b |

542 | mask_ :: IO a -> IO a |

543 | |

544 | uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b |

545 | uninterruptibleMask_ :: IO a -> IO |

546 | |

547 | getMaskingState :: IO MaskingState |

548 | |

549 | data MaskingState |

550 | = Unmasked |

551 | | MaskedInterruptible |

552 | | MaskedUninterruptible |

553 | |

554 | |

555 | Control.Concurrent |

556 | ------------------ |

557 | |

558 | forkIOUnmasked :: IO () -> IO ThreadId |

559 | ] |

560 | [Async-exception safety, and avoid space leaks |

561 | Simon Marlow <marlowsd@gmail.com>**20100708145819 |

562 | Ignore-this: dbfd0e61551e9e7b4fc1c6fe9b9a83de |

563 | Patch submitted by: Bas van Dijk <v.dijk.bas@gmail.com> |

564 | Modified slightly by me to remove non-functional changes. |

565 | ] |

566 | [Async-exception safety, and avoid space leaks |

567 | Simon Marlow <marlowsd@gmail.com>**20100708103154 |

568 | Ignore-this: 190c3ac8f6633231624da8cf1316588 |

569 | Patch submitted by: Bas van Dijk <v.dijk.bas@gmail.com> |

570 | Modified slightly by me to remove non-functional changes. |

571 | ] |

572 | [Fix a few places where we forgot to close the text codecs (#4029) |

573 | Simon Marlow <marlowsd@gmail.com>**20100702130210 |

574 | Ignore-this: 2e81a4b4cb343181cef34b0f9e2ded47 |

575 | Each time you invoke :load in GHCi it resets the CAFs, including |

576 | stdin/stdout/stderr, and each of these was allocating a new iconv_t. |

577 | ] |

578 | [remove docs from Monad that belonged on the instance for MonadPlus IO |

579 | Simon Marlow <marlowsd@gmail.com>**20100701154203 |

580 | Ignore-this: 59df02542a7ac9421552a2155d848d27 |

581 | ] |

582 | [docs: unqualify Prelude.IO |

583 | Simon Marlow <marlowsd@gmail.com>**20100701153817 |

584 | Ignore-this: 73b0202876c827e7a5b4a5ce74e724c4 |

585 | ] |

586 | [unqualify Float and Double |

587 | Simon Marlow <marlowsd@gmail.com>**20100701142727 |

588 | Ignore-this: cbe89d31a00bf49996a33933324fca17 |

589 | ] |

590 | [extract information about Data.Time from docs for CTime |

591 | Simon Marlow <marlowsd@gmail.com>**20100701142415 |

592 | Ignore-this: c48c9609b8d36e43e033a7bea81d6f17 |

593 | ] |

594 | [doc typo |

595 | Simon Marlow <marlowsd@gmail.com>**20100701142354 |

596 | Ignore-this: 17a1fd703831c888975ff63fbfa3a9b2 |

597 | ] |

598 | [peekArray docs: remove mentions of "this version" and "previous version" |

599 | Simon Marlow <marlowsd@gmail.com>**20100701125333 |

600 | Ignore-this: 39a744874258670bd935ba9e38390939 |

601 | ] |

602 | [doc typo |

603 | Simon Marlow <marlowsd@gmail.com>**20100701124154 |

604 | Ignore-this: 98f5c286e38c2c34c96b05d5e8bc5ad9 |

605 | ] |

606 | [doc typo |

607 | Simon Marlow <marlowsd@gmail.com>**20100701124128 |

608 | Ignore-this: 10a4314ec7aed336701fc616fb574ebc |

609 | ] |

610 | [doc typo |

611 | Simon Marlow <marlowsd@gmail.com>**20100701123715 |

612 | Ignore-this: c4909a7bf7163460ee5d32f58812041e |

613 | ] |

614 | [doc wibble: Haskell 98 I/O Error -> 'IOError' |

615 | Simon Marlow <marlowsd@gmail.com>**20100701123612 |

616 | Ignore-this: bf373df781acbc575e4ffe3b7e6059ae |

617 | ] |

618 | [doc typo |

619 | Simon Marlow <marlowsd@gmail.com>**20100701123014 |

620 | Ignore-this: 16aaccae48ef3101adf78ea5b0d5a8fd |

621 | ] |

622 | [Haddock hacks to fix whitespace consistency |

623 | Simon Marlow <marlowsd@gmail.com>**20100701121631 |

624 | Ignore-this: 61c58dec52a31fd2d3f331a87d2f903f |

625 | ] |

626 | [use '==' consistently rather than '->' in examples |

627 | Simon Marlow <marlowsd@gmail.com>**20100701121616 |

628 | Ignore-this: 472b0a05a85d34d9712186040e1636d9 |

629 | ] |

630 | [doc wibble: remove confusing mention of "Prelude" |

631 | Simon Marlow <marlowsd@gmail.com>**20100701113308 |

632 | Ignore-this: 232283d0096d01cd45e9b3c5c1e63a6d |

633 | ] |

634 | [doc wibble: nonstrict -> non-strict |

635 | Simon Marlow <marlowsd@gmail.com>**20100701113253 |

636 | Ignore-this: 4264f0ab23a0835fc13c6e8601d6b743 |

637 | ] |

638 | [doc whitespace |

639 | Simon Marlow <marlowsd@gmail.com>**20100701112242 |

640 | Ignore-this: 777a95b1d1140c61d3ab95d5eb5809e7 |

641 | ] |

642 | [move the doc for 'Char' to its new home in ghc-prim:GHC.Types |

643 | Simon Marlow <marlowsd@gmail.com>**20100629134150 |

644 | Ignore-this: 7687db0077a29498349bfb4b44983985 |

645 | ] |

646 | [doc wibble |

647 | Simon Marlow <marlowsd@gmail.com>**20100629122608 |

648 | Ignore-this: 9a909e5d015332dc445bd9592e6e386d |

649 | ] |

650 | [doc updates in System.IO |

651 | Simon Marlow <marlowsd@gmail.com>**20100629122118 |

652 | Ignore-this: 2257ec1cc4cdb8b7804cfa1f3cf32753 |

653 | ] |

654 | [doc wibble |

655 | Simon Marlow <marlowsd@gmail.com>**20100625134858 |

656 | Ignore-this: 64c50f29df6c389273b818918fe7033a |

657 | ] |

658 | [doc wibbles |

659 | Simon Marlow <marlowsd@gmail.com>**20100624154614 |

660 | Ignore-this: b364aad53beea6e741fee2824459b6e8 |

661 | ] |

662 | [Fix haddock formatting |

663 | Ian Lynagh <igloo@earth.li>**20100625222623] |

664 | [Give nub's complexity in the haddock docs; fixes #4086 |

665 | Ian Lynagh <igloo@earth.li>**20100625222059] |

666 | [correct docs for exitWith: only stdout/stderr are flushed, not all Handles |

667 | Simon Marlow <marlowsd@gmail.com>**20100624130506 |

668 | Ignore-this: 33a938dad8f0bc061572e2ec571cacc7 |

669 | ] |

670 | [fix docs for isSpace |

671 | Simon Marlow <marlowsd@gmail.com>**20100624130444 |

672 | Ignore-this: b35ff080dbb9833176f08e39dbd9ff6d |

673 | ] |

674 | [make the hGetBuf/hPutBuf family work with non-FD Handles (#4144) |

675 | Simon Marlow <marlowsd@gmail.com>**20100624130425 |

676 | Ignore-this: 8200f0208a9b1b1cf4824f343d75819a |

677 | ] |

678 | [nit in docs for accumArray |

679 | Simon Marlow <marlowsd@gmail.com>**20100622121131 |

680 | Ignore-this: c066a456c40907e767df10c3990f35ff |

681 | ] |

682 | [add doc for the ExitCode type |

683 | Simon Marlow <marlowsd@gmail.com>**20100622120930 |

684 | Ignore-this: 99c34332be7f3565da844528b470054a |

685 | ] |

686 | [remove extraneous info from docs for Array |

687 | Simon Marlow <marlowsd@gmail.com>**20100622120921 |

688 | Ignore-this: e2a3f5e84fc23eb7bae911f0680e805e |

689 | ] |

690 | [add an INLINE to the list version of traverse, to enable fusion |

691 | Simon Marlow <marlowsd@gmail.com>**20100608082531 |

692 | Ignore-this: ea98cdc3308b406bb04c0f7a38c4424b |

693 | ] |

694 | [Don't define the C localeEncoding on Windows |

695 | Ian Lynagh <igloo@earth.li>**20100620202342 |

696 | Ignore-this: c4992f6832a391b0cccc5a9b7d643976 |

697 | (it causes warnings, and isn't used) |

698 | ] |

699 | [add Applicative instance for Either (proposal #4095) |

700 | Ross Paterson <ross@soi.city.ac.uk>**20100617225110 |

701 | Ignore-this: 50262ec4700dc16efec5755be5b308c5 |

702 | |

703 | This is not the only possible instance for Either, but this one is |

704 | compatible with the usual Monad instance. |

705 | ] |

706 | [Use libcharset instead of nl_langinfo(CODESET) if possible. |

707 | pho@cielonegro.org**20100519013112 |

708 | Ignore-this: 4c1e278e022a3d276848afc1dcba4425 |

709 | |

710 | nl_langinfo(CODESET) doesn't always return standardized variations of the encoding names. Use libcharset if possible, which is shipped together with GNU libiconv. |

711 | ] |

712 | [Add a note about the interruptibility of throwTo. |

713 | Simon Marlow <marlowsd@gmail.com>**20100615112720 |

714 | Ignore-this: ae9fabe95310d7c364e95f7784793485 |

715 | ] |

716 | [docs: note that hGetBufNonBlocking isn't non-blocking on Windows |

717 | Simon Marlow <marlowsd@gmail.com>**20100615112547 |

718 | Ignore-this: 4f3e5213e142149affe08c5123d6efea |

719 | ] |

720 | [don't depend on Prelude (#4122) |

721 | Simon Marlow <marlowsd@gmail.com>**20100615105631 |

722 | Ignore-this: 1a3fd49b103fe31cbb453f302c18767f |

723 | ] |

724 | [Don't depend on Prelude (#4123) |

725 | Simon Marlow <marlowsd@gmail.com>**20100615105401 |

726 | Ignore-this: cc7616d85a1637bc7621b4f2bc181c0e |

727 | ] |

728 | [bump version to 4.3.0.0, added instance MonadPlus STM |

729 | Simon Marlow <marlowsd@gmail.com>**20100601144831 |

730 | Ignore-this: 7c3cf7574499c4267372493f2636dc0 |

731 | ] |

732 | [Moved MonadPlus instance for STM from Control.Monad.STM to GHC.Conc to avoid an orphaned instance |

733 | Bas van Dijk <v.dijk.bas@gmail.com>**20100516160651 |

734 | Ignore-this: 651b852942b2fae2b93f996e39239b8f |

735 | ] |

736 | [Added Applicative and Alternative instances for STM |

737 | Bas van Dijk <v.dijk.bas@gmail.com>**20100516171756 |

738 | Ignore-this: 567003bc4040bc97105cda4d31ebf04a |

739 | ] |

740 | [expand Foldable instance for Array |

741 | Ross Paterson <ross@soi.city.ac.uk>**20100602212154 |

742 | Ignore-this: 9bd9e9666a9400431eb92352244fe7e7 |

743 | ] |

744 | [doc comment illustrating Foldable(foldr) |

745 | Ross Paterson <ross@soi.city.ac.uk>**20100527150833 |

746 | Ignore-this: 8f27d889379803f3ba86d6e928428f3c |

747 | ] |

748 | [fix syntax in doc comments |

749 | Ross Paterson <ross@soi.city.ac.uk>**20100527150757 |

750 | Ignore-this: cb78da51d60ff6863dc395f1a892c103 |

751 | ] |

752 | [export hGetBufSome (#4046) |

753 | Simon Marlow <marlowsd@gmail.com>**20100520093538 |

754 | Ignore-this: f467fad9722e27edfad6b3dd75290e7b |

755 | ] |

756 | [hWaitForInput: don't try to read from the device (#4078) |

757 | Simon Marlow <marlowsd@gmail.com>**20100517133741 |

758 | Ignore-this: 55ec33b03397380259b91e4ca62207a6 |

759 | readTextDeviceNonBlocking is not non-blocking on Windows |

760 | ] |

761 | [hSetEncoding: change the encoding on both read and write sides (#4066) |

762 | Simon Marlow <marlowsd@gmail.com>**20100514124628 |

763 | Ignore-this: 5b9e9caef06356d0296c584159709ebb |

764 | ] |

765 | [Correct haddock formatting. |

766 | Adam Vogt <vogt.adam@gmail.com>**20100423022103 |

767 | Ignore-this: d2622339302048fda48080f7d5ce4a2f |

768 | ] |

769 | [Fix for hGetBufSome |

770 | Simon Marlow <marlowsd@gmail.com>**20100505135637 |

771 | Ignore-this: 2019680f8fb223956cacfcf0d046f133 |

772 | ] |

773 | [improve the documentation for throwTo and killThread (#3884) |

774 | Simon Marlow <marlowsd@gmail.com>**20100505135600 |

775 | Ignore-this: ce881d96ddb729acb6ca09c779975e7d |

776 | ] |

777 | [elaborate the docs for unsafePerformIO a bit |

778 | Simon Marlow <marlowsd@gmail.com>**20100505101249 |

779 | Ignore-this: 1cec3f67560b672c64c5a0dcf9a79eb7 |

780 | ] |

781 | [add Typeable instance |

782 | Simon Marlow <marlowsd@gmail.com>**20100504152815 |

783 | Ignore-this: 6d9cf9d62f0ef17fa459bf213a04098 |

784 | ] |

785 | [Add hGetBufSome, like hGetBuf but can return short reads |

786 | Simon Marlow <marlowsd@gmail.com>**20100504152759 |

787 | Ignore-this: 195c905b43f8d9505029364e2c5b18e |

788 | ] |

789 | [Add swap (#3298) |

790 | Simon Marlow <marlowsd@gmail.com>**20100504095339 |

791 | Ignore-this: 13b007dc4594ce252997ec6fa0bbd976 |

792 | ] |

793 | [inline allocaArray0, to fix withCString benchmark |

794 | Simon Marlow <marlowsd@gmail.com>**20100423124729 |

795 | Ignore-this: 35c96816acc2f3aaf9dd29f7995fa6f0 |

796 | ] |

797 | [raise asynchronous exceptions asynchronously (#3997) |

798 | Simon Marlow <marlowsd@gmail.com>**20100421094932 |

799 | Ignore-this: 6d987d93d382c0f69c68c326312abd6b |

800 | ] |

801 | [add NOINLINE pragmas for stdin/stdout/stderr |

802 | Simon Marlow <marlowsd@gmail.com>**20100421082041 |

803 | Ignore-this: 3fc130268ec786f28d945858d6690986 |

804 | ] |

805 | [INLINE alloca and malloc |

806 | Simon Marlow <marlowsd@gmail.com>**20100419135333 |

807 | Ignore-this: b218bd611f18721b1505a8c0b9e6a16a |

808 | See discussion on glasgow-haskell-users: |

809 | http://www.haskell.org/pipermail/glasgow-haskell-users/2010-April/018740.html |

810 | ] |

811 | [Move comment closer to the offending line |

812 | Matthias Kilian <kili@outback.escape.de>**20100419155421 |

813 | Ignore-this: b34a1d7affd66f67d210df2377b585d9 |

814 | ] |

815 | [Ignore the return code of c_fcntl_write again |

816 | Matthias Kilian <kili@outback.escape.de>**20100415140452 |

817 | Ignore-this: 266d8ba02cc3cb79c85629b3528261c9 |

818 | |

819 | The return code has been ignored in the past on purpose, because |

820 | O_NONBLOCK will fail on BSDs for some special files. This fixes the |

821 | problem mentioned in |

822 | http://www.haskell.org/pipermail/glasgow-haskell-users/2010-April/018698.html |

823 | |

824 | ] |

825 | [Fix bitrot in IO debugging code |

826 | Ian Lynagh <igloo@earth.li>**20100413134339 |

827 | Also switched to using Haskell Bools (rather than CPP) to en/disable it, |

828 | so it shouldn't break again in the future. |

829 | ] |

830 | [Tiny code tidy-up |

831 | Ian Lynagh <igloo@earth.li>**20100413011147] |

832 | [remove old/wrong comment |

833 | Simon Marlow <marlowsd@gmail.com>**20100325161403 |

834 | Ignore-this: e6e377d44af48c4162d17d55bdf3f821 |

835 | ] |

836 | [withThread: block asynchronous exceptions before installing exception handler. |

837 | Bas van Dijk <v.dijk.bas@gmail.com>**20100329131624 |

838 | Ignore-this: be5aeb47dbd73807b5f94df11afbb81c |

839 | Note that I don't unblock the given io computation. Because AFAICS |

840 | withThread is only called with 'waitFd' which only performs an FFI |

841 | call which can't receive asynchronous exceptions anyway. |

842 | ] |

843 | [runInUnboundThread: block asynchronous exceptions before installing exception handler |

844 | Bas van Dijk <v.dijk.bas@gmail.com>**20100329131549 |

845 | Ignore-this: a00c5e32fe3981ff87bedd367a69051e |

846 | ] |

847 | [fix the deprecation message (GHC.IO.Handle.Base -> GHC.IO.Handle) |

848 | Simon Marlow <marlowsd@gmail.com>**20100330121137 |

849 | Ignore-this: 4ca8500a01ac93454507aa8f9dd001f9 |

850 | ] |

851 | [Make SampleVar an abstract newtype |

852 | Bas van Dijk <v.dijk.bas@gmail.com>**20100318200349 |

853 | Ignore-this: 27939e2a064b75e71cb146117346be30 |

854 | ] |

855 | [Fix bugs regarding asynchronous exceptions and laziness in Control.Concurrent.SampleVar |

856 | Bas van Dijk <v.dijk.bas@gmail.com>**20100318200104 |

857 | Ignore-this: 7376b2a3afe155daf233a8f1ddc0a7a |

858 | - Block asynchronous exceptions at the right places |

859 | - Force thunks before putting them in a MVar |

860 | ] |

861 | [Write the thunk 'next' to the MVar |

862 | Bas van Dijk <v.dijk.bas@gmail.com>**20100319125951 |

863 | Ignore-this: dd25636cf220131385ff2fd32493d456 |

864 | ] |

865 | [change to use STM, fixing 4 things |

866 | Simon Marlow <marlowsd@gmail.com>**20100318104436 |

867 | Ignore-this: 551d30280a7941c08f5c3b14576bdd70 |

868 | 1. there was no async exception protection |

869 | 2. there was a space leak (now new value is strict) |

870 | 3. using atomicModifyIORef would be slightly quicker, but can |

871 | suffer from adverse scheduling issues (see #3838) |

872 | 4. also, the STM version is faster. |

873 | ] |

874 | [Tweak docs |

875 | Ian Lynagh <igloo@earth.li>**20100312214129] |

876 | [Fixed dead links in documentation of forkIO |

877 | Bas van Dijk <v.dijk.bas@gmail.com>**20100308222415 |

878 | Ignore-this: 7deb8fd064c867fbede2a6b2e9da4f15 |

879 | ] |

880 | [Documentation fixes in Control.Exception |

881 | Bas van Dijk <v.dijk.bas@gmail.com>**20100301220442 |

882 | Ignore-this: 761fcba401cbd1f47276ddfc9b5b80f2 |

883 | ] |

884 | [Plug two race conditions that could lead to deadlocks in the IO manager |

885 | Simon Marlow <marlowsd@gmail.com>**20100225120255 |

886 | Ignore-this: e6983d6b953104d370278ab3e4617e8b |

887 | ] |

888 | [FIX #3866: improve documentation of Data.Data.Constr |

889 | jpm@cs.uu.nl**20100224125506 |

890 | Ignore-this: 3818c5d8fee012a3cf322fb455b6e5dc |

891 | ] |

892 | [UNDO: Handle NaN, -Infinity and Infinity in the toRational for Float/Double (#3676) |

893 | Simon Marlow <marlowsd@gmail.com>**20100223101603 |

894 | Ignore-this: 78becb2d39b3cd9a1a473a5811ca7d92 |

895 | ] |

896 | [Put the complexity in the length docs. Fixes trac #3680 |

897 | Ian Lynagh <igloo@earth.li>**20100221191425] |

898 | [nhc98 should build Data.Functor. |

899 | Malcolm.Wallace@cs.york.ac.uk**20100221163218] |

900 | [Update the exitWith docs |

901 | Ian Lynagh <igloo@earth.li>**20100213140004 |

902 | Error pointed out by Volker Wysk <vw@volker-wysk.de> |

903 | ] |

904 | [Handle NaN, -Infinity and Infinity in the toRational for Float/Double (#3676) |

905 | Simon Marlow <marlowsd@gmail.com>**20100211101955 |

906 | Ignore-this: 261415363303efca265e80290eac5f28 |

907 | ] |

908 | [For nhc98, import unsafeInterleaveIO rather than defining it here. |

909 | Malcolm.Wallace@cs.york.ac.uk**20100204171021] |

910 | [Stifle warning about unused return value |

911 | benl@cse.unsw.edu.au**20100203025537] |

912 | [fix #3832: use the locale encoding in openTempFile |

913 | Simon Marlow <marlowsd@gmail.com>**20100120211830 |

914 | Ignore-this: df4f778cc5fefb32290c798db722632c |

915 | Also while I was here fix an XXX: the Handle contained an |

916 | uninformative string like <fd: 4> for error messages rather than the |

917 | real file path. |

918 | ] |

919 | [Fix the build: export void, so it doesn't give an unused binding warning |

920 | Ian Lynagh <igloo@earth.li>**20100116174451] |

921 | [hIsEOF: don't do any decoding (#3808) |

922 | Simon Marlow <marlowsd@gmail.com>**20100112230317 |

923 | Ignore-this: 6a384dd2d547ffe3ad3762920e5c1671 |

924 | ] |

925 | [Control.Monad: +void :: f a -> f () |

926 | gwern0@gmail.com**20100108214455 |

927 | Ignore-this: 4dc07452315f2d1b4941903ff42fc45f |

928 | See http://hackage.haskell.org/trac/ghc/ticket/3292 |

929 | Turns m a -> m (). Lets one call functions for their side-effects without |

930 | having to get rid of their return values with '>> return ()'. Very useful |

931 | in many contexts (parsing, IO etc.); particularly good for 'forkIO' and 'forM_', |

932 | as they demand return types of 'IO ()' though most interesting IO functions |

933 | return non-(). |

934 | ] |

935 | [Replace the implementation of mergesort with a 2x faster one. |

936 | Malcolm.Wallace@cs.york.ac.uk**20091224152014 |

937 | See ticket http://hackage.haskell.org/trac/ghc/ticket/2143. |

938 | ] |

939 | [Restore previous Data.Typeable.typeOf*Default implementations for non-ghc. |

940 | Malcolm.Wallace@cs.york.ac.uk**20091223142625 |

941 | Not all compilers have ScopedTypeVariables. |

942 | ] |

943 | [Add comments about double bounds-checking, and fast paths for rectangular arrays |

944 | simonpj@microsoft.com**20091218165655 |

945 | Ignore-this: ea0849419dc00927aba4bd410b1cc58d |

946 | |

947 | See Note [Double bounds-checking of index values] for the details. |

948 | |

949 | The fast paths omit the doubled checks for cases we know about |

950 | ] |

951 | [Fix Trac #3245: memoising typeOf |

952 | simonpj@microsoft.com**20091218155117 |

953 | Ignore-this: 5a178a7f2222293c5ee0c3c43bd1b625 |

954 | |

955 | The performance bug in #3245 was caused by computing the typeRep |

956 | once for each call of typeOf, rather than once for each dictionary |

957 | contruction. (Computing TypeReps is reasonably expensive, because |

958 | of the hash-consing machinery.) |

959 | |

960 | This is readily fixed by putting the TypeRep construction outside |

961 | the lambda. (Arguably GHC might have worked that out itself, |

962 | but it involves floating something between a type lambda and a |

963 | value lambda, which GHC doesn't currently do. If it happens a lot |

964 | we could fix that.) |

965 | ] |

966 | [Mark 'index' as INLINE in GHC.Arr |

967 | simonpj@microsoft.com**20091216170441 |

968 | Ignore-this: a4df9d8acf496c8e0e9ce5a520509a2a |

969 | |

970 | This makes indexing much faster. See Trac #1216 |

971 | ] |

972 | [Comment the remaining orphan instance modules |

973 | Ian Lynagh <igloo@earth.li>**20091206125021] |

974 | [De-orphan Eq/Ord Float/Double |

975 | Ian Lynagh <igloo@earth.li>**20091205181238] |

976 | [Add comments to "OPTIONS_GHC -fno-warn-orphans" pragmas |

977 | Ian Lynagh <igloo@earth.li>**20091205165854] |

978 | [Data.Either.partitionEithers was insufficiently lazy. |

979 | Malcolm.Wallace@cs.york.ac.uk**20091202032807 |

980 | Ignore-this: 77e1b3288f66608c71458d8a91bcbe12 |

981 | Spotted by Daniel Fischer. |

982 | ] |

983 | [fix the docs regarding finalizer guarantees |

984 | Simon Marlow <marlowsd@gmail.com>**20091130144409 |

985 | Ignore-this: d1ab9532c74a002b8075ff60febcbe2d |

986 | ] |

987 | [x86_64 requires more stack |

988 | Malcolm.Wallace@cs.york.ac.uk**20091201033745] |

989 | [check for size < 0 in mallocForeignPtrBytes and friends (#3514) |

990 | Simon Marlow <marlowsd@gmail.com>**20091125143822 |

991 | Ignore-this: 91077d01da2bbe1dfed5155e8b40da9 |

992 | ] |

993 | [hGetContents: close the handle properly on error |

994 | Simon Marlow <marlowsd@gmail.com>**20091125123435 |

995 | Ignore-this: bc37ff678acc6e547dc390285e056eb9 |

996 | |

997 | When hGetContents caught an error it was closing the handle and then |

998 | throwing the exception, without updating the handle with the new |

999 | closed state. This lead to a double-closed, which was the cause of |

1000 | |

1001 | *** glibc detected *** ./Setup: double free or corruption |

1002 | |

1003 | when iconv_close was called twice on the decoder. |

1004 | |

1005 | See http://hackage.haskell.org/trac/hackage/ticket/609 |

1006 | ] |

1007 | [Fix arities of mapFB and zipFB |

1008 | Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091126232219 |

1009 | Ignore-this: c4e14cd0a92622549c86e67237a40865 |

1010 | ] |

1011 | [Remove an unnecessary -fno-warn-orphans flag |

1012 | Ian Lynagh <igloo@earth.li>**20091126123404] |

1013 | [Tweak layout to work with alternative layout rule |

1014 | Ian Lynagh <igloo@earth.li>**20091125232349] |

1015 | [Tweak layout to be accepted by the alternative layout rul |

1016 | Ian Lynagh <igloo@earth.li>**20091125194147] |

1017 | [Make sure zipWithFB has arity 2 |

1018 | Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091125010003 |

1019 | Ignore-this: 4cf60c55666f03d22a9f5a6e07f52d36 |

1020 | |

1021 | It gets 2 arguments in the "zipWith" rule but its arity was higher and the new |

1022 | inliner didn't inline it sometimes, for instance here: |

1023 | |

1024 | mpp :: [Double] -> [Double] -> [Double] -> [Double] -> [Double] |

1025 | mpp as bs cs ds = zipWith (*) (zipWith (+) as bs) (zipWith (+) cs ds) |

1026 | |

1027 | This was a regression vs. 6.10. |

1028 | ] |

1029 | [Remove an old comment |

1030 | Ian Lynagh <igloo@earth.li>**20091124134647] |

1031 | [De-orphan the Eq/Ord Integer instances |

1032 | Ian Lynagh <igloo@earth.li>**20091124133639] |

1033 | [Whitespace only |

1034 | Ian Lynagh <igloo@earth.li>**20091124133421] |

1035 | [Derive some more instances, rather than writing them by hand |

1036 | Ian Lynagh <igloo@earth.li>**20091124011747] |

1037 | [We can now derive Ord () |

1038 | Ian Lynagh <igloo@earth.li>**20091124011416] |

1039 | [De-orphan tuple Eq/Ord instances |

1040 | Ian Lynagh <igloo@earth.li>**20091123233343] |

1041 | [Control.Exception.Base no longer has any orphans |

1042 | Ian Lynagh <igloo@earth.li>**20091123224905] |

1043 | [De-orphan the MonadFix ST instance for GHC |

1044 | Ian Lynagh <igloo@earth.li>**20091123223544] |

1045 | [Rearrange the contents of Control.Monad.ST; no functionality changes |

1046 | Ian Lynagh <igloo@earth.li>**20091123222702] |

1047 | [De-orphan the Eq/Ord [a] instances |

1048 | Ian Lynagh <igloo@earth.li>**20091123215635] |

1049 | [De-orphan the Eq/Ord Char instances |

1050 | Ian Lynagh <igloo@earth.li>**20091123202253] |

1051 | [De-orphan the Eq/Ord Bool instances |

1052 | Ian Lynagh <igloo@earth.li>**20091123201817] |

1053 | [Move Eq/Ord Ordering instances to de-orphan them |

1054 | Ian Lynagh <igloo@earth.li>**20091123194310] |

1055 | [Remove ffi warnings for nhc98. |

1056 | Malcolm.Wallace@cs.york.ac.uk**20091123063743] |

1057 | [Second attempt to fix #1185 (forkProcess and -threaded) |

1058 | Simon Marlow <marlowsd@gmail.com>**20091111151915 |

1059 | Ignore-this: fa5f5d5e4e080d4b612a37244f937f9c |

1060 | |

1061 | Patch 2/2: first patch is to ghc |

1062 | |

1063 | This time without dynamic linker hacks, instead I've expanded the |

1064 | existing rts/Globals.c to cache more CAFs, specifically those in |

1065 | GHC.Conc. We were already using this trick for signal handlers, I |

1066 | should have realised before. |

1067 | |

1068 | It's still quite unsavoury, but we can do away with rts/Globals.c in |

1069 | the future when we switch to a dynamically-linked GHCi. |

1070 | ] |

1071 | [Rollback #1185 fix |

1072 | Simon Marlow <marlowsd@gmail.com>**20091106140629 |

1073 | Ignore-this: cd5667e8474e37e01ba26a1984274811 |

1074 | |

1075 | rolling back: |

1076 | |

1077 | Tue Nov 3 16:05:40 GMT 2009 Simon Marlow <marlowsd@gmail.com> |

1078 | * Fix #1185: restart the IO manager after fork() |

1079 | |

1080 | This is the libraries/base part of the patch; there is a corresponding |

1081 | patch to GHC itself. |

1082 | |

1083 | The main change is that we now keep track of the IO manager's ThreadId |

1084 | in a top-level MVar, and ensureIOManagerIsRunning checks whether a |

1085 | previous IO manager thread is alive before starting one. In the child |

1086 | of fork(), we can hence call ensureIOManagerIsRunning to restart the |

1087 | IO manager. |

1088 | |

1089 | M ./GHC/Conc.lhs -46 +44 |

1090 | |

1091 | Wed Nov 4 17:49:45 GMT 2009 Ian Lynagh <igloo@earth.li> |

1092 | * Fix the build on Windows |

1093 | |

1094 | M ./GHC/Conc.lhs -6 +4 |

1095 | ] |

1096 | [Fix the build on Windows |

1097 | Ian Lynagh <igloo@earth.li>**20091104174945] |

1098 | [Fix #1185: restart the IO manager after fork() |

1099 | Simon Marlow <marlowsd@gmail.com>**20091103160540 |

1100 | Ignore-this: 6dc05464f1500104554637f4759738cc |

1101 | |

1102 | This is the libraries/base part of the patch; there is a corresponding |

1103 | patch to GHC itself. |

1104 | |

1105 | The main change is that we now keep track of the IO manager's ThreadId |

1106 | in a top-level MVar, and ensureIOManagerIsRunning checks whether a |

1107 | previous IO manager thread is alive before starting one. In the child |

1108 | of fork(), we can hence call ensureIOManagerIsRunning to restart the |

1109 | IO manager. |

1110 | ] |

1111 | [improve the documentation for throwErrnoIfRetry |

1112 | Simon Marlow <marlowsd@gmail.com>**20091016112404 |

1113 | Ignore-this: b77275cacf730e15757946027168f63e |

1114 | ] |

1115 | [Don't inline unpackFoldrCString ever |

1116 | simonpj@microsoft.com**20091029135350 |

1117 | Ignore-this: 85d672649b1b776efc7e97500b05d4f9 |

1118 | ] |

1119 | [Inline more default methods |

1120 | simonpj@microsoft.com**20091029135330 |

1121 | Ignore-this: 289c44b0afd6d5631c2a4e0664275ca9 |

1122 | |

1123 | Namely Monad: (>>) |

1124 | Eq: (==), (/=) |

1125 | Num: (-), negate |

1126 | Real: quot, rem, div, mod, recip, (/), truncate |

1127 | Float: (**), logBase, sqrt, tan, tanh |

1128 | ] |

1129 | [Move error messages out of INLINEd default methods |

1130 | simonpj@microsoft.com**20091029135118 |

1131 | Ignore-this: 9e35dc947f94827a3529eb53a41575fd |

1132 | |

1133 | No need to duplicate the error generation! |

1134 | ] |

1135 | [Exploit now-working default-method INLINE pragmas for Data.Bits |

1136 | simonpj@microsoft.com**20091029135041 |

1137 | Ignore-this: 8adf225f31ca7a3181ee087e9e4fe535 |

1138 | |

1139 | * Add INLINE pragmas to default methods for class Bits |

1140 | |

1141 | * Remove redundant instance methods elsewhere, now that |

1142 | the default method will do the job |

1143 | ] |

1144 | [Tidy up and comment imports |

1145 | simonpj@microsoft.com**20091029134414 |

1146 | Ignore-this: bf2be31035de975d8995e988933cc940 |

1147 | ] |

1148 | [Inline foldr and (.) when applied to two arguments not three |

1149 | simonpj@microsoft.com**20091029134335 |

1150 | Ignore-this: fccb6f3e90e15f44cb465814be85ede2 |

1151 | |

1152 | The new INLINE story is (by design) arity-sensitive, so we must |

1153 | put fewer argument on the LHS for foldr and (.) |

1154 | ] |

1155 | [dirUtils.c no longer available |

1156 | Malcolm.Wallace@cs.york.ac.uk**20091013093833] |

1157 | [Make hGetContents throw an exception if an error is encountered |

1158 | Simon Marlow <marlowsd@gmail.com>**20091012152955 |

1159 | Ignore-this: 9f7a7176193eab25c9daaacd9261f2de |

1160 | |

1161 | Strictly speaking this breaks Haskell 98 compatibility, which requires |

1162 | hGetContents to just end the lazy stream silently if an error is |

1163 | encountered. However, for a few reasons we think it will make |

1164 | everyone's life a bit easier if we make this change |

1165 | |

1166 | 1. Errors will be a lot more common in GHC 6.12.1, in the form |

1167 | of Unicode decoding errors. |

1168 | |

1169 | 2. When Haskell 98 was designed, we didn't know how to throw |

1170 | exceptions from inside lazy I/O, but now we do. |

1171 | |

1172 | 3. If anyone is actually relying on the previous behaviour, their |

1173 | code is arguably broken. |

1174 | ] |

1175 | [Re-instate System.Console.Getopt for nhc98 builds. |

1176 | Malcolm.Wallace@cs.york.ac.uk**20091013092843 |

1177 | Although it was split out of base a while back, that change was |

1178 | reverted for ghc soon afterwards, but nhc98 never noticed. |

1179 | ] |

1180 | [Roll back "Another instance of nhc98's strange import semantics." |

1181 | Ian Lynagh <igloo@earth.li>**20091009185618 |

1182 | Fri Oct 9 14:50:51 BST 2009 Malcolm.Wallace@cs.york.ac.uk |

1183 | GHC (correctly) warns about the unused import, which breaks the validate |

1184 | build. |

1185 | ] |

1186 | [Roll back "Cope with nhc98's (occasionally-strange) import semantics" |

1187 | Ian Lynagh <igloo@earth.li>**20091009184704 |

1188 | Fri Oct 9 14:43:51 BST 2009 Malcolm.Wallace@cs.york.ac.uk |

1189 | GHC (correctly) warns about the unused import, which breaks the validate |

1190 | build. |

1191 | ] |

1192 | [It seems that nhc98 needs defaulting in Data.Fixed. |

1193 | Malcolm.Wallace@cs.york.ac.uk**20091009135242] |

1194 | [Another instance of nhc98's strange import semantics. |

1195 | Malcolm.Wallace@cs.york.ac.uk**20091009135051] |

1196 | [Make Data.Functor compatible with non-GHC compilers. |

1197 | Malcolm.Wallace@cs.york.ac.uk**20091009134821] |

1198 | [Cope with nhc98's (occasionally-strange) import semantics. |

1199 | Malcolm.Wallace@cs.york.ac.uk**20091009134351] |

1200 | [Fix gratuitous breakage of nhc98 in System.IO. |

1201 | Malcolm.Wallace@cs.york.ac.uk**20091009134001] |

1202 | [Fix gratuitous breakage of nhc98 in Control.Exception.Base. |

1203 | Malcolm.Wallace@cs.york.ac.uk**20091009133615] |

1204 | [Fix gratuitous breakage of non-GHC in Data.Fixed. |

1205 | Malcolm.Wallace@cs.york.ac.uk**20091009133330] |

1206 | [Fix gratuitous breakage for non-GHC in Data.Bits. |

1207 | Malcolm.Wallace@cs.york.ac.uk**20091009133257] |

1208 | [Use UTF-32LE instead of UTF32LE |

1209 | Simon Marlow <marlowsd@gmail.com>**20091006100207 |

1210 | Ignore-this: 7f881e36543d250ef848c9f60d67655a |

1211 | The latter is not recognised by some iconv implementations. |

1212 | ] |

1213 | [Strip any Byte Order Mark (BOM) from the front of decoded streams. |

1214 | Ben.Lippmeier@anu.edu.au*-20090930084229 |

1215 | Ignore-this: d0d0c3ae87b31d71ef1627c8e1786445 |

1216 | When decoding to UTF-32, Solaris iconv inserts a BOM at the front |

1217 | of the stream, but Linux iconv doesn't. |

1218 | ] |

1219 | [use UTF32BE/UTF32LE instead of UCS-4/UCS-4LE |

1220 | Simon Marlow <marlowsd@gmail.com>**20091005101554 |

1221 | Ignore-this: 2aef5e9bec421e714953b7aa1bdfc1b3 |

1222 | ] |

1223 | [Strip any Byte Order Mark (BOM) from the front of decoded streams. |

1224 | Ben.Lippmeier@anu.edu.au**20090930084229 |

1225 | Ignore-this: d0d0c3ae87b31d71ef1627c8e1786445 |

1226 | When decoding to UTF-32, Solaris iconv inserts a BOM at the front |

1227 | of the stream, but Linux iconv doesn't. |

1228 | ] |

1229 | [Add traceEvent :: String -> IO () |

1230 | Simon Marlow <marlowsd@gmail.com>**20090925141257 |

1231 | Ignore-this: 8b1888bbf9682ffba13f815b6000e4b1 |

1232 | For emitting an event via the RTS tracing framework |

1233 | ] |

1234 | [Fix the error message when flushing the read buffer of a non-seekable Handle |

1235 | Simon Marlow <marlowsd@gmail.com>**20090923090536 |

1236 | Ignore-this: 4342026df93759d99480f4e13f80a492 |

1237 | ] |

1238 | [Fix #3534: No need to flush the byte buffer when setting binary mode |

1239 | Simon Marlow <marlowsd@gmail.com>**20090923090445 |

1240 | Ignore-this: 625817ed7ae2c12291eb993a99dc640a |

1241 | ] |

1242 | [Use let !y = x in .. x .. instead of seq in $! and evaluate (#2273) |

1243 | Simon Marlow <marlowsd@gmail.com>**20090916140454] |

1244 | [make some Applicative functions into methods, and split off Data.Functor (proposal #3335) |

1245 | Ross Paterson <ross@soi.city.ac.uk>**20090915173109 |

1246 | Ignore-this: a0cff4de6dfdbcbd56a66101bc4855a9 |

1247 | |

1248 | The following functions |

1249 | |

1250 | (<$) :: Functor f => a -> f b -> f a |

1251 | (*>) :: Applicative f => f a -> f b -> f b |

1252 | (<*) :: Applicative f => f a -> f b -> f a |

1253 | some :: Alternative f => f a -> f [a] |

1254 | many :: Alternative f => f a -> f [a] |

1255 | |

1256 | are moved into the corresponding classes, with the existing implementations |

1257 | as default definitions. This gives people creating instances the option of |

1258 | defining specialized implementations of these functions, though they should |

1259 | be equivalent to the default definitions. |

1260 | |

1261 | Although (<$) is now a method of the Functor class, it is hidden in the |

1262 | re-export by the Prelude, Control.Monad and Monad. The new module |

1263 | Data.Functor exposes the full class, plus the function (<$>). These are |

1264 | also re-exported by Control.Applicative. |

1265 | ] |

1266 | [On Windows, use the console code page for text file encoding/decoding. |

1267 | Judah Jacobson <judah.jacobson@gmail.com>**20090913022126 |

1268 | Ignore-this: 86c2f2db8ef92b751599795d3195187b |

1269 | |

1270 | We keep all of the code page tables in the module |

1271 | GHC.IO.Encoding.CodePage.Table. That file was generated automatically |

1272 | by running codepages/MakeTable.hs; more details are in the comments at the |

1273 | start of that script. |

1274 | |

1275 | Storing the lookup tables adds about 40KB to each statically linked executable; |

1276 | this only increases the size of a "hello world" program by about 7%. |

1277 | |

1278 | Currently we do not support double-byte encodings (Chinese/Japanese/Korean), since |

1279 | including those codepages would increase the table size to 400KB. It will be |

1280 | straightforward to implement them once the work on library DLLs is finished. |

1281 | ] |

1282 | [Fix "init" docs: the input list need not be finite. Fixes trac #3465 |

1283 | Ian Lynagh <igloo@earth.li>**20090911210437] |

1284 | [Bump base version to 4.2.0.0 |

1285 | Ian Lynagh <igloo@earth.li>**20090911153913] |

1286 | [Address #3310 |

1287 | Simon Marlow <marlowsd@gmail.com>**20090830152850 |

1288 | Ignore-this: 40c7f7c171ee299a83092fd360a952b7 |

1289 | |

1290 | - Rename BlockedOnDeadMVar -> BlockedIndefinitelyOnMVar |

1291 | - Rename BlockedIndefinitely -> BlockedIndefinitelyOnSTM |

1292 | - instance Show BlockedIndefinitelyOnMVar is now |

1293 | "blocked indefinitely in an MVar operation" |

1294 | - instance Show BlockedIndefinitelyOnSTM is now |

1295 | "blocked indefinitely in an STM transaction" |

1296 | |

1297 | clients using Control.OldException will be unaffected (the new |

1298 | exceptions are mapped to the old names). However, for base4-compat |

1299 | we'll need to make a version of catch/try that does a similar |

1300 | mapping. |

1301 | ] |

1302 | [Fix unicode conversion for MSB architectures |

1303 | Ben.Lippmeier@anu.edu.au**20090830130028 |

1304 | This fixes the SPARC/Solaris build. |

1305 | ] |

1306 | [Fix #3441: detect errors in partial sequences |

1307 | Simon Marlow <marlowsd@gmail.com>**20090830075909 |

1308 | Ignore-this: d12a75d95e0cae5eb1555266810ec281 |

1309 | ] |

1310 | [Fix hWaitForInput |

1311 | Simon Marlow <marlowsd@gmail.com>**20090827152116 |

1312 | Ignore-this: 2550e911f1a4d4357a5aa8d1764238ce |

1313 | It was erroneously waiting when there were bytes to decode waiting in |

1314 | the byte buffer. |

1315 | ] |

1316 | [fix debugging code |

1317 | Simon Marlow <marlowsd@gmail.com>**20090827150628 |

1318 | Ignore-this: e1c82fdc19a22e247cd69ff6fa11921d |

1319 | ] |

1320 | [Allow for configurable iconv include and library locations. |

1321 | Matthias Kilian <kili@outback.escape.de>**20090826154406 |

1322 | Ignore-this: be95fab611a5534cf184b508964ed498 |

1323 | This should help to fix the build on OpenBSD. |

1324 | ] |

1325 | [typo in comment |

1326 | Simon Marlow <marlowsd@gmail.com>**20090826085252 |

1327 | Ignore-this: 1903ee0f354157a6ed3871c100f6b1b9 |

1328 | ] |

1329 | [un-hide some modules from the Haddock docs |

1330 | Simon Marlow <marlowsd@gmail.com>**20090825152457 |

1331 | Ignore-this: dce6606f93cf977fb24ebe99082dfa62 |

1332 | ] |

1333 | [Apply fix for #1548, from squadette@gmail.com |

1334 | Simon Marlow <marlowsd@gmail.com>**20090819120700 |

1335 | Ignore-this: 31c237c46a6445f588ed4b8c51bb6231 |

1336 | ] |

1337 | [improvements to Data.Fixed: instances for Typeable and Data, more predefined types |

1338 | Ashley Yakeley <ashley@semantic.org>**20090812055058 |

1339 | Ignore-this: feeece36d5632f02a05d137d2a39ab78 |

1340 | ] |

1341 | [Fix "Cabal check" warnings |

1342 | Ian Lynagh <igloo@earth.li>**20090811215856] |

1343 | [Add a GHC.Constants module; fixes trac #3094 |

1344 | Ian Lynagh <igloo@earth.li>**20090809183252] |

1345 | [Apply proposal #3393 |

1346 | Ian Lynagh <igloo@earth.li>**20090809134717 |

1347 | Add openTempFileWithDefaultPermissions and |

1348 | openBinaryTempFileWithDefaultPermissions. |

1349 | ] |

1350 | [Add some more C wrappers; patch from Krister Walfridsson |

1351 | Ian Lynagh <igloo@earth.li>**20090807200631 |

1352 | Fixes 21 testsuite errors on NetBSD 5.99. |

1353 | ] |

1354 | [Fixing configure for autoconf 2.64 |

1355 | Alexander Dunlap <alexander.dunlap@gmail.com>**20090805060748 |

1356 | Ignore-this: 992ab91ae3d68c12dbb265776e33e243 |

1357 | ] |

1358 | [add INLINE toList |

1359 | Ross Paterson <ross@soi.city.ac.uk>**20090806142853 |

1360 | Ignore-this: aba16aabb17d5dca44f15d188945680e |

1361 | |

1362 | In anticipation of the fixing of #2353. |

1363 | ] |

1364 | [fix a copyright |

1365 | Simon Marlow <marlowsd@gmail.com>**20090805134045 |

1366 | Ignore-this: b0ffbdd38fbba121e8bcba37c4082a60 |

1367 | ] |

1368 | [Tweak the BufferedIO class to enable a memory-mapped file implementation |

1369 | Simon Marlow <marlowsd@gmail.com>**20090805134036 |

1370 | Ignore-this: ec67d7a0a6d977438deaa342503f77e0 |

1371 | We have to eliminate the assumption that an empty write buffer can be |

1372 | constructed by setting the buffer pointers to zero: this isn't |

1373 | necessarily the case when the buffer corresponds to a memory-mapped |

1374 | file, or other in-memory device implementation. |

1375 | ] |

1376 | [Deprecate Control.OldException |

1377 | Ian Lynagh <igloo@earth.li>**20090804143910] |

1378 | [Windows build fix, following RTS tidyup |

1379 | Simon Marlow <marlowsd@gmail.com>**20090803131121 |

1380 | Ignore-this: ce862fb91c2b234211a8757f98690778 |

1381 | ] |

1382 | [Updates to follow the RTS tidyup |

1383 | Simon Marlow <marlowsd@gmail.com>**20090801220743 |

1384 | Ignore-this: 6e92412df93a66c12d75344053d5634 |

1385 | C functions like isDoubleNaN moved here (primFloat.c) |

1386 | ] |

1387 | [Add integer-simple as a build option |

1388 | Ian Lynagh <igloo@earth.li>**20090722013151] |

1389 | [Use shift[LR]Integer in the Bits Integer instance |

1390 | Ian Lynagh <igloo@earth.li>**20090721222440] |

1391 | [depend directly on integer-gmp, rather than indirecting through integer |

1392 | Ian Lynagh <igloo@earth.li>**20090721185228] |

1393 | [Move the instances of Functor and Monad IO to GHC.Base, to avoid orphans |

1394 | Simon Marlow <marlowsd@gmail.com>**20090722102130 |

1395 | Ignore-this: a7d85ac0025d559674249de0108dbcf4 |

1396 | ] |

1397 | [move "instance Exception Dynamic" so it isn't an orphan |

1398 | Simon Marlow <marlowsd@gmail.com>**20090721093854 |

1399 | Ignore-this: 5ede91ecfec2112c91b699d4de87cd02 |

1400 | ] |

1401 | [Improve the index checking for array accesses; fixes #2120 #2669 |

1402 | Ian Lynagh <igloo@earth.li>**20090719153228 |

1403 | As well as checking that offset we are reading is actually inside the |

1404 | array, we now also check that it is "in range" as defined by the Ix |

1405 | instance. This fixes confusing behaviour (#2120) and improves some error |

1406 | messages (#2669). |

1407 | ] |

1408 | [Make chr say what its argument was, if it's a bad argument |

1409 | Ian Lynagh <igloo@earth.li>**20090718151049] |

1410 | [remove unused warning |

1411 | Simon Marlow <marlowsd@gmail.com>**20090715124416 |

1412 | Ignore-this: 31f613654089d0f4a44363946087b41e |

1413 | ] |

1414 | [warning fix: -fno-implicit-prelude -> -XNoImplicitPrelude |

1415 | Simon Marlow <marlowsd@gmail.com>**20090715122839 |

1416 | Ignore-this: dc8957249731d5bcb71c01899e5adf2b |

1417 | ] |

1418 | [Add hGetEncoding :: Handle -> IO (Maybe TextEncoding) |

1419 | Simon Marlow <marlowsd@gmail.com>**20090715122519 |

1420 | Ignore-this: 14c3eff996db062da1199739781e4708 |

1421 | as suggested during the discussion on the libraries list |

1422 | ] |

1423 | [Add more documentation to mkTextEncoding |

1424 | Simon Marlow <marlowsd@gmail.com>**20090715122414 |

1425 | Ignore-this: 97253b2624267df3a246a18121e8ea81 |

1426 | noting that "//IGNORE" and "//TRANSLIT" suffixes can be used with GNU |

1427 | iconv. |

1428 | ] |

1429 | [Add the utf8_bom codec |

1430 | Simon Marlow <marlowsd@gmail.com>**20090715122257 |

1431 | Ignore-this: 1c9396cd805201fe873a39382ced79c7 |

1432 | as suggested during the discussion on the libraries list. |

1433 | ] |

1434 | [Export Unicode and newline functionality from System.IO; update Haddock docs |

1435 | Simon Marlow <marlowsd@gmail.com>**20090713113104 |

1436 | Ignore-this: c3f017a555335aa55d106253393f72e2 |

1437 | ] |

1438 | [add a comment about the non-workingness of CHARBUF_UTF16 |

1439 | Simon Marlow <marlowsd@gmail.com>**20090707124406 |

1440 | Ignore-this: 98d00411b68d688b3b4cffc9507b1f35 |

1441 | ] |

1442 | [Fix build on Windows |

1443 | Ian Lynagh <igloo@earth.li>**20090711004351] |

1444 | [Fix some "warn-unused-do-bind" warnings where we want to ignore the value |

1445 | Ian Lynagh <igloo@earth.li>**20090710204513] |

1446 | [Use throwErrnoIfMinus1_ when calling getrusage |

1447 | Ian Lynagh <igloo@earth.li>**20090710204221] |

1448 | [Remove an unused import |

1449 | Ian Lynagh <igloo@earth.li>**20090710153345] |

1450 | [reportStackOverflow now returns IO () |

1451 | Ian Lynagh <igloo@earth.li>**20090710153257 |

1452 | It used to do "return undefined" to return IO a. |

1453 | ] |

1454 | [GHC.Conc.reportError now returns IO () |

1455 | Ian Lynagh <igloo@earth.li>**20090710152646 |

1456 | It used to return IO a, by "return undefined". |

1457 | ] |

1458 | [Fix some "warn-unused-do-bind" warnings where we want to ignore the value |

1459 | Ian Lynagh <igloo@earth.li>**20090710152526] |

1460 | [Minor SampleVar refactoring |

1461 | Ian Lynagh <igloo@earth.li>**20090710151438] |

1462 | [Fix "warn-unused-do-bind" warnings in GHC/IO/Handle/Text.hs |

1463 | Ian Lynagh <igloo@earth.li>**20090710122905] |

1464 | [Fix some "warn-unused-do-bind" warnings where we just want to ignore the result |

1465 | Ian Lynagh <igloo@earth.li>**20090710005638] |

1466 | [Use the result of writeCharBuf in GHC/IO/Encoding/Latin1.hs too |

1467 | Ian Lynagh <igloo@earth.li>**20090710004032] |

1468 | [Minor code tidyups in GHC.Conc |

1469 | Ian Lynagh <igloo@earth.li>**20090710003801] |

1470 | [Fix "warn-unused-do-bind" warning in GHC.Conc |

1471 | Ian Lynagh <igloo@earth.li>**20090710003530 |

1472 | If we fail to communicate with the IO manager then we print a warning |

1473 | using debugErrLn from the ghc-prim package. |

1474 | ] |

1475 | [Fix "warn-unused-do-bind" warnings in System.Posix.Internals |

1476 | Ian Lynagh <igloo@earth.li>**20090709164546] |

1477 | [Fix "warn-unused-do-bind" warnings where we really do want to ignore the result |

1478 | Ian Lynagh <igloo@earth.li>**20090709163912] |

1479 | [Add back imports needed on Windows |

1480 | Ian Lynagh <igloo@earth.li>**20090707181924] |

1481 | [Remove unused imports |

1482 | Ian Lynagh <igloo@earth.li>**20090707115810] |

1483 | [Remove unused imports from base |

1484 | simonpj@microsoft.com**20090706111842 |

1485 | Ignore-this: f9b5f353e3bb820f787c56d615b28765 |

1486 | |

1487 | These unused imports are detected by the new unused-import code |

1488 | |

1489 | ] |

1490 | [Use the result of writeCharBuf |

1491 | Simon Marlow <marlowsd@gmail.com>**20090706133303 |

1492 | Ignore-this: 52288dd559bf4c4f313df6197091d935 |

1493 | |

1494 | This only makes a difference when CHARBUF_UTF16 is in use, which it |

1495 | normally isn't. I suspect CHARBUF_UTF16 doesn't currently work for |

1496 | other reasons (CHARBUF_UTF16 was an experiment before I wrote the |

1497 | GHC.IO.Encoding.UTF* codecs), but this patch at least makes it |

1498 | slightly closer to working. |

1499 | ] |

1500 | [Remove some cruft from Data.HashTable |

1501 | Ian Lynagh <igloo@earth.li>**20090706181630] |

1502 | [Add 'eof' to Text.ParserCombinators.ReadP |

1503 | simonpj@microsoft.com**20090706111801 |

1504 | Ignore-this: 2aea7b848e00c894761bc4011adaa95d |

1505 | |

1506 | Add a ReadP parser that succeeds at the end of input. Very useful! |

1507 | |

1508 | ] |

1509 | [Don't export CLDouble for GHC; fixes trac #2793 |

1510 | Ian Lynagh <igloo@earth.li>**20090705155120 |

1511 | We never really supported CLDouble (it was a plain old double underneath), |

1512 | and pretending that we do does more harm than good. |

1513 | ] |

1514 | [a byte between 0x80 and 0xBF is illegal immediately (#3341) |

1515 | Simon Marlow <marlowsd@gmail.com>**20090702081415 |

1516 | Ignore-this: dc19ef59a1a21118d5a7dd38aa2f611c |

1517 | ] |

1518 | [avoid a warning |

1519 | Simon Marlow <marlowsd@gmail.com>**20090630084134 |

1520 | Ignore-this: c92a45ee216faf01327feae9fe06d6e2 |

1521 | ] |

1522 | [Add a wrapper for libiconv. |

1523 | Matthias Kilian <kili@outback.escape.de>**20090629183634 |

1524 | Ignore-this: 23c6047c0d71b745b495cc223574a47f |

1525 | ] |

1526 | [#include <sys/times.h> if we have it (should fix build problems) |

1527 | Simon Marlow <marlowsd@gmail.com>**20090629085351 |

1528 | Ignore-this: a35e93b37ca9595c73460243180f4b9d |

1529 | ] |

1530 | [set binary mode for existing FDs on Windows (fixes some GHCi test failures) |

1531 | Simon Marlow <marlowsd@gmail.com>**20090626120522 |

1532 | Ignore-this: 580cf636e9c77d8427aff6861d089481 |

1533 | ] |

1534 | [Move directory-related stuff to the unix package |

1535 | Simon Marlow <marlowsd@gmail.com>**20090625120325 |

1536 | Ignore-this: b997b3cbce0a46ca87ad825bbdc0a411 |

1537 | now that it isn't used on Windows any more. |

1538 | ] |

1539 | [TAG 2009-06-25 |

1540 | Ian Lynagh <igloo@earth.li>**20090625160056] |

1541 | Patch bundle hash: |

1542 | ce6b093dc137be1926ce9b87fa91262d0c23d0a4 |