# Ticket #1434: rules1434.dpatch

File rules1434.dpatch, 65.9 KB (added by , 7 years ago) |
---|

Line | |
---|---|

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

2 | |

3 | Tue Oct 19 23:40:33 CEST 2010 Daniel Fischer <daniel.is.fischer@web.de> |

4 | * FIX #1434 |

5 | Rewrite rules for RealFrac methods with sized Int and Word targets. |

6 | For all types whose range is contained in Int's range, there are now |

7 | rewrite rules for properFraction, truncate, floor, ceiling and round |

8 | from Double and Float, going through the specialised methods for Int. |

9 | |

10 | Unfortunately, we can't have a rewrite rule for Word. |

11 | |

12 | New patches: |

13 | |

14 | [FIX #1434 |

15 | Daniel Fischer <daniel.is.fischer@web.de>**20101019214033 |

16 | Ignore-this: 6ff19abd382e691bcf02ff740acf6d65 |

17 | Rewrite rules for RealFrac methods with sized Int and Word targets. |

18 | For all types whose range is contained in Int's range, there are now |

19 | rewrite rules for properFraction, truncate, floor, ceiling and round |

20 | from Double and Float, going through the specialised methods for Int. |

21 | |

22 | Unfortunately, we can't have a rewrite rule for Word. |

23 | ] { |

24 | hunk ./GHC/Int.hs 8 |

25 | -- Module : GHC.Int |

26 | -- Copyright : (c) The University of Glasgow 1997-2002 |

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

28 | --- |

29 | +-- |

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

31 | -- Stability : internal |

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

33 | hunk ./GHC/Int.hs 43 |

34 | import GHC.Err |

35 | import GHC.Word hiding (uncheckedShiftL64#, uncheckedShiftRL64#) |

36 | import GHC.Show |

37 | +import GHC.Float () -- for RealFrac methods |

38 | |

39 | ------------------------------------------------------------------------ |

40 | -- type Int8 |

41 | hunk ./GHC/Int.hs 140 |

42 | | i# >=# 0# = I8# (narrow8Int# (x# `iShiftL#` i#)) |

43 | | otherwise = I8# (x# `iShiftRA#` negateInt# i#) |

44 | (I8# x#) `rotate` (I# i#) |

45 | - | i'# ==# 0# |

46 | + | i'# ==# 0# |

47 | = I8# x# |

48 | | otherwise |

49 | = I8# (narrow8Int# (word2Int# ((x'# `uncheckedShiftL#` i'#) `or#` |

50 | hunk ./GHC/Int.hs 157 |

51 | "fromIntegral/Int8->a" fromIntegral = \(I8# x#) -> fromIntegral (I# x#) |

52 | #-} |

53 | |

54 | +{-# RULES |

55 | +"properFraction/Float->(Int8,Float)" |

56 | + forall x. properFraction (x :: Float) = |

57 | + case properFraction x of { |

58 | + (n, y) -> ((fromIntegral :: Int -> Int8) n, y) } |

59 | +"truncate/Float->Int8" |

60 | + forall x. truncate (x :: Float) = (fromIntegral :: Int -> Int8) (truncate x) |

61 | +"floor/Float->Int8" |

62 | + forall x. floor (x :: Float) = (fromIntegral :: Int -> Int8) (floor x) |

63 | +"ceiling/Float->Int8" |

64 | + forall x. ceiling (x :: Float) = (fromIntegral :: Int -> Int8) (ceiling x) |

65 | +"round/Float->Int8" |

66 | + forall x. round (x :: Float) = (fromIntegral :: Int -> Int8) (round x) |

67 | + #-} |

68 | + |

69 | +{-# RULES |

70 | +"properFraction/Double->(Int8,Double)" |

71 | + forall x. properFraction (x :: Double) = |

72 | + case properFraction x of { |

73 | + (n, y) -> ((fromIntegral :: Int -> Int8) n, y) } |

74 | +"truncate/Double->Int8" |

75 | + forall x. truncate (x :: Double) = (fromIntegral :: Int -> Int8) (truncate x) |

76 | +"floor/Double->Int8" |

77 | + forall x. floor (x :: Double) = (fromIntegral :: Int -> Int8) (floor x) |

78 | +"ceiling/Double->Int8" |

79 | + forall x. ceiling (x :: Double) = (fromIntegral :: Int -> Int8) (ceiling x) |

80 | +"round/Double->Int8" |

81 | + forall x. round (x :: Double) = (fromIntegral :: Int -> Int8) (round x) |

82 | + #-} |

83 | + |

84 | ------------------------------------------------------------------------ |

85 | -- type Int16 |

86 | ------------------------------------------------------------------------ |

87 | hunk ./GHC/Int.hs 282 |

88 | | i# >=# 0# = I16# (narrow16Int# (x# `iShiftL#` i#)) |

89 | | otherwise = I16# (x# `iShiftRA#` negateInt# i#) |

90 | (I16# x#) `rotate` (I# i#) |

91 | - | i'# ==# 0# |

92 | + | i'# ==# 0# |

93 | = I16# x# |

94 | | otherwise |

95 | = I16# (narrow16Int# (word2Int# ((x'# `uncheckedShiftL#` i'#) `or#` |

96 | hunk ./GHC/Int.hs 302 |

97 | "fromIntegral/Int16->a" fromIntegral = \(I16# x#) -> fromIntegral (I# x#) |

98 | #-} |

99 | |

100 | +{-# RULES |

101 | +"properFraction/Float->(Int16,Float)" |

102 | + forall x. properFraction (x :: Float) = |

103 | + case properFraction x of { |

104 | + (n, y) -> ((fromIntegral :: Int -> Int16) n, y) } |

105 | +"truncate/Float->Int16" |

106 | + forall x. truncate (x :: Float) = (fromIntegral :: Int -> Int16) (truncate x) |

107 | +"floor/Float->Int16" |

108 | + forall x. floor (x :: Float) = (fromIntegral :: Int -> Int16) (floor x) |

109 | +"ceiling/Float->Int16" |

110 | + forall x. ceiling (x :: Float) = (fromIntegral :: Int -> Int16) (ceiling x) |

111 | +"round/Float->Int16" |

112 | + forall x. round (x :: Float) = (fromIntegral :: Int -> Int16) (round x) |

113 | + #-} |

114 | + |

115 | +{-# RULES |

116 | +"properFraction/Double->(Int16,Double)" |

117 | + forall x. properFraction (x :: Double) = |

118 | + case properFraction x of { |

119 | + (n, y) -> ((fromIntegral :: Int -> Int16) n, y) } |

120 | +"truncate/Double->Int16" |

121 | + forall x. truncate (x :: Double) = (fromIntegral :: Int -> Int16) (truncate x) |

122 | +"floor/Double->Int16" |

123 | + forall x. floor (x :: Double) = (fromIntegral :: Int -> Int16) (floor x) |

124 | +"ceiling/Double->Int16" |

125 | + forall x. ceiling (x :: Double) = (fromIntegral :: Int -> Int16) (ceiling x) |

126 | +"round/Double->Int16" |

127 | + forall x. round (x :: Double) = (fromIntegral :: Int -> Int16) (round x) |

128 | + #-} |

129 | + |

130 | ------------------------------------------------------------------------ |

131 | -- type Int32 |

132 | ------------------------------------------------------------------------ |

133 | hunk ./GHC/Int.hs 445 |

134 | | i# >=# 0# = I32# (x# `iShiftL32#` i#) |

135 | | otherwise = I32# (x# `iShiftRA32#` negateInt# i#) |

136 | (I32# x#) `rotate` (I# i#) |

137 | - | i'# ==# 0# |

138 | + | i'# ==# 0# |

139 | = I32# x# |

140 | | otherwise |

141 | = I32# (word32ToInt32# ((x'# `shiftL32#` i'#) `or32#` |

142 | hunk ./GHC/Int.hs 467 |

143 | "fromIntegral/Int32->Int32" fromIntegral = id :: Int32 -> Int32 |

144 | #-} |

145 | |

146 | -#else |

147 | +-- No rules for RealFrac methods if Int32 is larger than Int |

148 | +#else |

149 | |

150 | -- Int32 is represented in the same way as Int. |

151 | #if WORD_SIZE_IN_BITS > 32 |

152 | hunk ./GHC/Int.hs 556 |

153 | | i# >=# 0# = I32# (narrow32Int# (x# `iShiftL#` i#)) |

154 | | otherwise = I32# (x# `iShiftRA#` negateInt# i#) |

155 | (I32# x#) `rotate` (I# i#) |

156 | - | i'# ==# 0# |

157 | + | i'# ==# 0# |

158 | = I32# x# |

159 | | otherwise |

160 | = I32# (narrow32Int# (word2Int# ((x'# `uncheckedShiftL#` i'#) `or#` |

161 | hunk ./GHC/Int.hs 577 |

162 | "fromIntegral/Int32->a" fromIntegral = \(I32# x#) -> fromIntegral (I# x#) |

163 | #-} |

164 | |

165 | -#endif |

166 | +{-# RULES |

167 | +"properFraction/Float->(Int32,Float)" |

168 | + forall x. properFraction (x :: Float) = |

169 | + case properFraction x of { |

170 | + (n, y) -> ((fromIntegral :: Int -> Int32) n, y) } |

171 | +"truncate/Float->Int32" |

172 | + forall x. truncate (x :: Float) = (fromIntegral :: Int -> Int32) (truncate x) |

173 | +"floor/Float->Int32" |

174 | + forall x. floor (x :: Float) = (fromIntegral :: Int -> Int32) (floor x) |

175 | +"ceiling/Float->Int32" |

176 | + forall x. ceiling (x :: Float) = (fromIntegral :: Int -> Int32) (ceiling x) |

177 | +"round/Float->Int32" |

178 | + forall x. round (x :: Float) = (fromIntegral :: Int -> Int32) (round x) |

179 | + #-} |

180 | + |

181 | +{-# RULES |

182 | +"properFraction/Double->(Int32,Double)" |

183 | + forall x. properFraction (x :: Double) = |

184 | + case properFraction x of { |

185 | + (n, y) -> ((fromIntegral :: Int -> Int32) n, y) } |

186 | +"truncate/Double->Int32" |

187 | + forall x. truncate (x :: Double) = (fromIntegral :: Int -> Int32) (truncate x) |

188 | +"floor/Double->Int32" |

189 | + forall x. floor (x :: Double) = (fromIntegral :: Int -> Int32) (floor x) |

190 | +"ceiling/Double->Int32" |

191 | + forall x. ceiling (x :: Double) = (fromIntegral :: Int -> Int32) (ceiling x) |

192 | +"round/Double->Int32" |

193 | + forall x. round (x :: Double) = (fromIntegral :: Int -> Int32) (round x) |

194 | + #-} |

195 | + |

196 | +#endif |

197 | |

198 | instance Real Int32 where |

199 | toRational x = toInteger x % 1 |

200 | hunk ./GHC/Int.hs 731 |

201 | | i# >=# 0# = I64# (x# `iShiftL64#` i#) |

202 | | otherwise = I64# (x# `iShiftRA64#` negateInt# i#) |

203 | (I64# x#) `rotate` (I# i#) |

204 | - | i'# ==# 0# |

205 | + | i'# ==# 0# |

206 | = I64# x# |

207 | | otherwise |

208 | = I64# (word64ToInt64# ((x'# `uncheckedShiftL64#` i'#) `or64#` |

209 | hunk ./GHC/Int.hs 752 |

210 | a `iShiftL64#` b | b >=# 64# = intToInt64# 0# |

211 | | otherwise = a `uncheckedIShiftL64#` b |

212 | |

213 | -a `iShiftRA64#` b | b >=# 64# = if a `ltInt64#` (intToInt64# 0#) |

214 | - then intToInt64# (-1#) |

215 | +a `iShiftRA64#` b | b >=# 64# = if a `ltInt64#` (intToInt64# 0#) |

216 | + then intToInt64# (-1#) |

217 | else intToInt64# 0# |

218 | | otherwise = a `uncheckedIShiftRA64#` b |

219 | |

220 | hunk ./GHC/Int.hs 767 |

221 | "fromIntegral/Int64->Int64" fromIntegral = id :: Int64 -> Int64 |

222 | #-} |

223 | |

224 | -#else |

225 | +-- No RULES for RealFrac methods if Int is smaller than Int64, we can't |

226 | +-- go through Int and whether going through Integer is faster is uncertain. |

227 | +#else |

228 | |

229 | -- Int64 is represented in the same way as Int. |

230 | -- Operations may assume and must ensure that it holds only values |

231 | hunk ./GHC/Int.hs 846 |

232 | | i# >=# 0# = I64# (x# `iShiftL#` i#) |

233 | | otherwise = I64# (x# `iShiftRA#` negateInt# i#) |

234 | (I64# x#) `rotate` (I# i#) |

235 | - | i'# ==# 0# |

236 | + | i'# ==# 0# |

237 | = I64# x# |

238 | | otherwise |

239 | = I64# (word2Int# ((x'# `uncheckedShiftL#` i'#) `or#` |

240 | hunk ./GHC/Int.hs 862 |

241 | "fromIntegral/Int64->a" fromIntegral = \(I64# x#) -> fromIntegral (I# x#) |

242 | #-} |

243 | |

244 | +{-# RULES |

245 | +"properFraction/Float->(Int64,Float)" |

246 | + forall x. properFraction (x :: Float) = |

247 | + case properFraction x of { |

248 | + (n, y) -> ((fromIntegral :: Int -> Int64) n, y) } |

249 | +"truncate/Float->Int64" |

250 | + forall x. truncate (x :: Float) = (fromIntegral :: Int -> Int64) (truncate x) |

251 | +"floor/Float->Int64" |

252 | + forall x. floor (x :: Float) = (fromIntegral :: Int -> Int64) (floor x) |

253 | +"ceiling/Float->Int64" |

254 | + forall x. ceiling (x :: Float) = (fromIntegral :: Int -> Int64) (ceiling x) |

255 | +"round/Float->Int64" |

256 | + forall x. round (x :: Float) = (fromIntegral :: Int -> Int64) (round x) |

257 | + #-} |

258 | + |

259 | +{-# RULES |

260 | +"properFraction/Double->(Int64,Double)" |

261 | + forall x. properFraction (x :: Double) = |

262 | + case properFraction x of { |

263 | + (n, y) -> ((fromIntegral :: Int -> Int64) n, y) } |

264 | +"truncate/Double->Int64" |

265 | + forall x. truncate (x :: Double) = (fromIntegral :: Int -> Int64) (truncate x) |

266 | +"floor/Double->Int64" |

267 | + forall x. floor (x :: Double) = (fromIntegral :: Int -> Int64) (floor x) |

268 | +"ceiling/Double->Int64" |

269 | + forall x. ceiling (x :: Double) = (fromIntegral :: Int -> Int64) (ceiling x) |

270 | +"round/Double->Int64" |

271 | + forall x. round (x :: Double) = (fromIntegral :: Int -> Int64) (round x) |

272 | + #-} |

273 | + |

274 | uncheckedIShiftL64# :: Int# -> Int# -> Int# |

275 | uncheckedIShiftL64# = uncheckedIShiftL# |

276 | |

277 | hunk ./GHC/Word.hs 8 |

278 | -- Module : GHC.Word |

279 | -- Copyright : (c) The University of Glasgow, 1997-2002 |

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

281 | --- |

282 | +-- |

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

284 | -- Stability : internal |

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

286 | hunk ./GHC/Word.hs 45 |

287 | import GHC.Arr |

288 | import GHC.Show |

289 | import GHC.Err |

290 | +import GHC.Float () -- for RealFrac methods |

291 | |

292 | ------------------------------------------------------------------------ |

293 | -- Helper functions |

294 | hunk ./GHC/Word.hs 191 |

295 | "fromIntegral/Word->Word" fromIntegral = id :: Word -> Word |

296 | #-} |

297 | |

298 | +-- No RULES for RealFrac unfortunately. |

299 | +-- Going through Int isn't possible because Word's range is not |

300 | +-- included in Int's, going through Integer may or may not be slower. |

301 | + |

302 | ------------------------------------------------------------------------ |

303 | -- type Word8 |

304 | ------------------------------------------------------------------------ |

305 | hunk ./GHC/Word.hs 296 |

306 | "fromIntegral/Word8->a" fromIntegral = \(W8# x#) -> fromIntegral (W# x#) |

307 | #-} |

308 | |

309 | +{-# RULES |

310 | +"properFraction/Float->(Word8,Float)" |

311 | + forall x. properFraction (x :: Float) = |

312 | + case properFraction x of { |

313 | + (n, y) -> ((fromIntegral :: Int -> Word8) n, y) } |

314 | +"truncate/Float->Word8" |

315 | + forall x. truncate (x :: Float) = (fromIntegral :: Int -> Word8) (truncate x) |

316 | +"floor/Float->Word8" |

317 | + forall x. floor (x :: Float) = (fromIntegral :: Int -> Word8) (floor x) |

318 | +"ceiling/Float->Word8" |

319 | + forall x. ceiling (x :: Float) = (fromIntegral :: Int -> Word8) (ceiling x) |

320 | +"round/Float->Word8" |

321 | + forall x. round (x :: Float) = (fromIntegral :: Int -> Word8) (round x) |

322 | + #-} |

323 | + |

324 | +{-# RULES |

325 | +"properFraction/Double->(Word8,Double)" |

326 | + forall x. properFraction (x :: Double) = |

327 | + case properFraction x of { |

328 | + (n, y) -> ((fromIntegral :: Int -> Word8) n, y) } |

329 | +"truncate/Double->Word8" |

330 | + forall x. truncate (x :: Double) = (fromIntegral :: Int -> Word8) (truncate x) |

331 | +"floor/Double->Word8" |

332 | + forall x. floor (x :: Double) = (fromIntegral :: Int -> Word8) (floor x) |

333 | +"ceiling/Double->Word8" |

334 | + forall x. ceiling (x :: Double) = (fromIntegral :: Int -> Word8) (ceiling x) |

335 | +"round/Double->Word8" |

336 | + forall x. round (x :: Double) = (fromIntegral :: Int -> Word8) (round x) |

337 | + #-} |

338 | + |

339 | ------------------------------------------------------------------------ |

340 | -- type Word16 |

341 | ------------------------------------------------------------------------ |

342 | hunk ./GHC/Word.hs 428 |

343 | "fromIntegral/Word16->a" fromIntegral = \(W16# x#) -> fromIntegral (W# x#) |

344 | #-} |

345 | |

346 | +{-# RULES |

347 | +"properFraction/Float->(Word16,Float)" |

348 | + forall x. properFraction (x :: Float) = |

349 | + case properFraction x of { |

350 | + (n, y) -> ((fromIntegral :: Int -> Word16) n, y) } |

351 | +"truncate/Float->Word16" |

352 | + forall x. truncate (x :: Float) = (fromIntegral :: Int -> Word16) (truncate x) |

353 | +"floor/Float->Word16" |

354 | + forall x. floor (x :: Float) = (fromIntegral :: Int -> Word16) (floor x) |

355 | +"ceiling/Float->Word16" |

356 | + forall x. ceiling (x :: Float) = (fromIntegral :: Int -> Word16) (ceiling x) |

357 | +"round/Float->Word16" |

358 | + forall x. round (x :: Float) = (fromIntegral :: Int -> Word16) (round x) |

359 | + #-} |

360 | + |

361 | +{-# RULES |

362 | +"properFraction/Double->(Word16,Double)" |

363 | + forall x. properFraction (x :: Double) = |

364 | + case properFraction x of { |

365 | + (n, y) -> ((fromIntegral :: Int -> Word16) n, y) } |

366 | +"truncate/Double->Word16" |

367 | + forall x. truncate (x :: Double) = (fromIntegral :: Int -> Word16) (truncate x) |

368 | +"floor/Double->Word16" |

369 | + forall x. floor (x :: Double) = (fromIntegral :: Int -> Word16) (floor x) |

370 | +"ceiling/Double->Word16" |

371 | + forall x. ceiling (x :: Double) = (fromIntegral :: Int -> Word16) (ceiling x) |

372 | +"round/Double->Word16" |

373 | + forall x. round (x :: Double) = (fromIntegral :: Int -> Word16) (round x) |

374 | + #-} |

375 | + |

376 | ------------------------------------------------------------------------ |

377 | -- type Word32 |

378 | ------------------------------------------------------------------------ |

379 | hunk ./GHC/Word.hs 557 |

380 | "fromIntegral/Word32->Word32" fromIntegral = id :: Word32 -> Word32 |

381 | #-} |

382 | |

383 | -#else |

384 | +#else |

385 | |

386 | -- Word32 is represented in the same way as Word. |

387 | #if WORD_SIZE_IN_BITS > 32 |

388 | hunk ./GHC/Word.hs 563 |

389 | -- Operations may assume and must ensure that it holds only values |

390 | -- from its logical range. |

391 | + |

392 | +-- We can use rewrite rules for the RealFrac methods |

393 | + |

394 | +{-# RULES |

395 | +"properFraction/Float->(Word32,Float)" |

396 | + forall x. properFraction (x :: Float) = |

397 | + case properFraction x of { |

398 | + (n, y) -> ((fromIntegral :: Int -> Word32) n, y) } |

399 | +"truncate/Float->Word32" |

400 | + forall x. truncate (x :: Float) = (fromIntegral :: Int -> Word32) (truncate x) |

401 | +"floor/Float->Word32" |

402 | + forall x. floor (x :: Float) = (fromIntegral :: Int -> Word32) (floor x) |

403 | +"ceiling/Float->Word32" |

404 | + forall x. ceiling (x :: Float) = (fromIntegral :: Int -> Word32) (ceiling x) |

405 | +"round/Float->Word32" |

406 | + forall x. round (x :: Float) = (fromIntegral :: Int -> Word32) (round x) |

407 | + #-} |

408 | + |

409 | +{-# RULES |

410 | +"properFraction/Double->(Word32,Double)" |

411 | + forall x. properFraction (x :: Double) = |

412 | + case properFraction x of { |

413 | + (n, y) -> ((fromIntegral :: Int -> Word32) n, y) } |

414 | +"truncate/Double->Word32" |

415 | + forall x. truncate (x :: Double) = (fromIntegral :: Int -> Word32) (truncate x) |

416 | +"floor/Double->Word32" |

417 | + forall x. floor (x :: Double) = (fromIntegral :: Int -> Word32) (floor x) |

418 | +"ceiling/Double->Word32" |

419 | + forall x. ceiling (x :: Double) = (fromIntegral :: Int -> Word32) (ceiling x) |

420 | +"round/Double->Word32" |

421 | + forall x. round (x :: Double) = (fromIntegral :: Int -> Word32) (round x) |

422 | + #-} |

423 | + |

424 | #endif |

425 | |

426 | data Word32 = W32# Word# deriving (Eq, Ord) |

427 | hunk ./GHC/Word.hs 720 |

428 | unsafeIndex (m,_) i = fromIntegral (i - m) |

429 | inRange (m,n) i = m <= i && i <= n |

430 | |

431 | -instance Read Word32 where |

432 | +instance Read Word32 where |

433 | #if WORD_SIZE_IN_BITS < 33 |

434 | readsPrec p s = [(fromInteger x, r) | (x, r) <- readsPrec p s] |

435 | #else |

436 | } |

437 | |

438 | Context: |

439 | |

440 | [Define SpecConstrAnnotation in GHC.Exts, and import it from there |

441 | simonpj@microsoft.com**20101018135857 |

442 | Ignore-this: 8bf81cbc5787dbb5a3875b5622f67732 |

443 | |

444 | Reason: avoid having to link the entire ghc package in modules |

445 | that use compile-time annotations: |

446 | |

447 | import GHC.Exts( SpecConstrAnnotation ) |

448 | {-# ANN type T ForceSpecConstr #-} |

449 | |

450 | It's a kind of bug that the package exporting SpecConstrAnnotation |

451 | is linked even though it is only needed at compile time, but putting |

452 | the data type declaration in GHC.Exts is a simple way to sidestep |

453 | the problem |

454 | |

455 | See See Note [SpecConstrAnnotation] in SpecConstr |

456 | ] |

457 | [throwTo: mention interruptible foreign calls |

458 | Simon Marlow <marlowsd@gmail.com>**20101014084220 |

459 | Ignore-this: dbc53d85f870cf649f87186c7185465a |

460 | ] |

461 | [remove trailing whitespace |

462 | Simon Marlow <marlowsd@gmail.com>**20101013101906 |

463 | Ignore-this: b8b424540cacbbb3c6d934242e3af795 |

464 | ] |

465 | [FIX #4381 |

466 | Simon Marlow <marlowsd@gmail.com>**20101013101849 |

467 | Ignore-this: f0daa4845eeb444231451b975b71d055 |

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

469 | exponent + scale doesn't overflow. |

470 | |

471 | Patch by: Daniel Fischer <daniel.is.fischer@web.de> |

472 | ] |

473 | [Replaced some throws to throwIOs where the type is IO |

474 | Bas van Dijk <v.dijk.bas@gmail.com>**20100924221340 |

475 | Ignore-this: e74191e4527ae6f7551c95fd41063335 |

476 | ] |

477 | [Added initial .authorspellings |

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

479 | Ignore-this: 63628bcabfdd0b7beda4cd37daeccd89 |

480 | ] |

481 | [Lazier intersperse |

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

483 | Ignore-this: a0fed65930cf19e68b4363381a5ab576 |

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

485 | avoid space leaks. |

486 | ] |

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

488 | ghc@cainnorris.net**20100816213654 |

489 | Ignore-this: dee89c24493e84a02bea711a1c83a73f |

490 | ] |

491 | [Make intersectBy lazier |

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

493 | Ignore-this: ef687bc75923434e85c14b57171576aa |

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

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

496 | Treats ticket #4323 |

497 | ] |

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

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

500 | Ignore-this: 96b7b004bd6e5bc3e958ad55bf238ba1 |

501 | ] |

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

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

504 | Ignore-this: 21c50ca7a189eebcf299523b6e942bae |

505 | ] |

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

507 | **20100722210726 |

508 | Ignore-this: bd54880bb16a106a992f03b040dc4164 |

509 | |

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

511 | lot of data. |

512 | |

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

514 | ] |

515 | [some fixes for hGetBufSome |

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

517 | Ignore-this: 3e596a606c180dc4859ea8f4c9132ca1 |

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

519 | - a couple of error-message tweaks |

520 | ] |

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

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

523 | Ignore-this: 9023e5f0542419f225aef26cb6b1d88d |

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

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

526 | to EINVAL so we get confusing things like |

527 | |

528 | hPutChar: invalid argument (Invalid Argumnet) |

529 | |

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

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

532 | |

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

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

535 | exit without an error in this case. |

536 | ] |

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

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

539 | Ignore-this: 3411bf3d2e98cfacb9e0afd11d79e722 |

540 | ] |

541 | [Add absentError. |

542 | simonpj@microsoft.com**20100914134639 |

543 | Ignore-this: d0eef5a87e1def4cdbde92a55241c8c4 |

544 | |

545 | This patch accompanies the HEAD patch: |

546 | |

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

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

549 | |

550 | Previously we were simply passing arguments of unlifted |

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

552 | stupid. |

553 | |

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

555 | ] |

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

557 | simonpj@microsoft.com**20100914122750 |

558 | Ignore-this: 12ece15ef94982ddfbf5f9f7900619da |

559 | ] |

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

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

562 | Ignore-this: 77f2235460895debd2827f34c42c3435 |

563 | ] |

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

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

566 | Ignore-this: c72cdb6898dffa88eca1d781171b2943 |

567 | ] |

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

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

570 | Ignore-this: 9b9b29bfb7abf5550cfbfa7788f81bf |

571 | ] |

572 | [fix warning on Windows |

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

574 | Ignore-this: dacc5448c452daad60ed37a1a5ed096e |

575 | ] |

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

577 | simonpj@microsoft.com**20100913101832 |

578 | Ignore-this: d228b492de7d4635c026ed24cbc17e34 |

579 | |

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

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

582 | |

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

584 | ] |

585 | [avoid Foreign.unsafePerformIO |

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

587 | Ignore-this: b698101119ffd1bc6311cce0736f745d |

588 | ] |

589 | [Remove debugging code accidentally left in |

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

591 | Ignore-this: 906a14176dd37030b8203782a687936b |

592 | ] |

593 | [Fix Windows build; patches frmo ezyang |

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

595 | Ignore-this: 2f02986087edd7da8382221012c27cd0 |

596 | ] |

597 | [More accurate isatty test for MinGW. |

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

599 | Ignore-this: 93bdc2b2a8e65a7c4c7d3906bdda01db |

600 | ] |

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

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

603 | [Fix warnings |

604 | benl@ouroborus.net**20100830044741 |

605 | Ignore-this: 8397aaec7c36046c9ace403e65f32d32 |

606 | ] |

607 | [fix cache variable name used by FP_SEARCH_LIBS_PROTO |

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

609 | Ignore-this: b8113cb3c6f0e03c507297c99d3d82b7 |

610 | ] |

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

612 | simonpj@microsoft.com**20100815145127 |

613 | Ignore-this: 30b9c42cd3ce7837bdabd254fe66078d |

614 | ] |

615 | [Fixed a rounding error in threadDelay |

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

617 | Ignore-this: 1cb77d0852233ffffb144b134064ee3c |

618 | ] |

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

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

621 | Ignore-this: deb6495f7b7b84deaf02b88927a5ba8c |

622 | ] |

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

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

625 | Ignore-this: b4e769959f131b2d0001eb7202bc1b92 |

626 | ] |

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

628 | simonpj@microsoft.com**20100728124847 |

629 | Ignore-this: d3af9a47c2821c6081bde05a135a92fb |

630 | ] |

631 | [Add type signature in local where |

632 | simonpj@microsoft.com**20100727151532 |

633 | Ignore-this: 1c57063ad32d13e0d1ec8daf968bf055 |

634 | ] |

635 | [Integrated new I/O manager |

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

637 | Ignore-this: ed70a9066ac9b676a446fe99978fef7a |

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

639 | ] |

640 | [Add mfilter to Control.Monad |

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

642 | Ignore-this: de4240b60684f3065b29378df3ea98f2 |

643 | |

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

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

646 | Control.Monad implies mfilter. |

647 | |

648 | ] |

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

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

651 | Ignore-this: b0f8cd8643679948d1da43bd7c08c5aa |

652 | |

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

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

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

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

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

658 | definition of fail is used. |

659 | ] |

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

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

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

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

664 | Ignore-this: 4543f57a7f137f8cae1c3efc5c023a9b |

665 | ] |

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

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

668 | Ignore-this: dcd79fb546ebe29ddff4df279ec2f38 |

669 | ] |

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

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

672 | Ignore-this: 4cfebb8f2a1cddc7d15e94e31b2befa4 |

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

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

675 | ] |

676 | [doc formatting fix |

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

678 | Ignore-this: 255edef607dcd290e198015240b5d125 |

679 | ] |

680 | [add module intro from Haskell 2010 |

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

682 | Ignore-this: 59b5a07507a059ccccdff2dfb6490a27 |

683 | ] |

684 | [document exception-overriding behaviour in withFile |

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

686 | Ignore-this: f99e641ea2f46d872cb7420a62fa50dc |

687 | ] |

688 | [doc: use "finalizer" consistently |

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

690 | Ignore-this: bdfea40f31dc5045fdbc6e12266dda93 |

691 | ] |

692 | [clarify meaning of bit |

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

694 | Ignore-this: 521b031f1e83ef34ca03d9aa9273df8a |

695 | ] |

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

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

698 | Ignore-this: 1605f362ba0712ad1cea1309636f3ea1 |

699 | ] |

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

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

702 | Ignore-this: 9b1da827016c7b08668078b45964e9de |

703 | ] |

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

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

706 | Ignore-this: dcc112a72746ba117a84fa29e71b6800 |

707 | ] |

708 | [Partial fix for Trac #4136 |

709 | simonpj@microsoft.com**20100707135725 |

710 | Ignore-this: 9548eeb3187d9779d4e5c858a0f35354 |

711 | |

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

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

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

715 | symbols. |

716 | ] |

717 | [Fix typo in documentation |

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

719 | Ignore-this: c052dd8a681832ef598a323ad55eae3a |

720 | ] |

721 | [Remove duplicated word in documentation |

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

723 | Ignore-this: fb3732dc57be55f14168792f923433 |

724 | ] |

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

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

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

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

729 | Ignore-this: 71a4811804f04259f1fe739f8863beaf |

730 | |

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

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

733 | |

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

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

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

737 | |

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

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

740 | |

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

742 | available for the time being. |

743 | |

744 | Control.Exception |

745 | ----------------- |

746 | |

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

748 | mask_ :: IO a -> IO a |

749 | |

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

751 | uninterruptibleMask_ :: IO a -> IO |

752 | |

753 | getMaskingState :: IO MaskingState |

754 | |

755 | data MaskingState |

756 | = Unmasked |

757 | | MaskedInterruptible |

758 | | MaskedUninterruptible |

759 | |

760 | |

761 | Control.Concurrent |

762 | ------------------ |

763 | |

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

765 | ] |

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

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

768 | Ignore-this: dbfd0e61551e9e7b4fc1c6fe9b9a83de |

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

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

771 | ] |

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

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

774 | Ignore-this: 190c3ac8f6633231624da8cf1316588 |

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

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

777 | ] |

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

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

780 | Ignore-this: 2e81a4b4cb343181cef34b0f9e2ded47 |

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

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

783 | ] |

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

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

786 | Ignore-this: 59df02542a7ac9421552a2155d848d27 |

787 | ] |

788 | [docs: unqualify Prelude.IO |

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

790 | Ignore-this: 73b0202876c827e7a5b4a5ce74e724c4 |

791 | ] |

792 | [unqualify Float and Double |

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

794 | Ignore-this: cbe89d31a00bf49996a33933324fca17 |

795 | ] |

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

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

798 | Ignore-this: c48c9609b8d36e43e033a7bea81d6f17 |

799 | ] |

800 | [doc typo |

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

802 | Ignore-this: 17a1fd703831c888975ff63fbfa3a9b2 |

803 | ] |

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

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

806 | Ignore-this: 39a744874258670bd935ba9e38390939 |

807 | ] |

808 | [doc typo |

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

810 | Ignore-this: 98f5c286e38c2c34c96b05d5e8bc5ad9 |

811 | ] |

812 | [doc typo |

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

814 | Ignore-this: 10a4314ec7aed336701fc616fb574ebc |

815 | ] |

816 | [doc typo |

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

818 | Ignore-this: c4909a7bf7163460ee5d32f58812041e |

819 | ] |

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

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

822 | Ignore-this: bf373df781acbc575e4ffe3b7e6059ae |

823 | ] |

824 | [doc typo |

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

826 | Ignore-this: 16aaccae48ef3101adf78ea5b0d5a8fd |

827 | ] |

828 | [Haddock hacks to fix whitespace consistency |

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

830 | Ignore-this: 61c58dec52a31fd2d3f331a87d2f903f |

831 | ] |

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

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

834 | Ignore-this: 472b0a05a85d34d9712186040e1636d9 |

835 | ] |

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

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

838 | Ignore-this: 232283d0096d01cd45e9b3c5c1e63a6d |

839 | ] |

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

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

842 | Ignore-this: 4264f0ab23a0835fc13c6e8601d6b743 |

843 | ] |

844 | [doc whitespace |

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

846 | Ignore-this: 777a95b1d1140c61d3ab95d5eb5809e7 |

847 | ] |

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

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

850 | Ignore-this: 7687db0077a29498349bfb4b44983985 |

851 | ] |

852 | [doc wibble |

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

854 | Ignore-this: 9a909e5d015332dc445bd9592e6e386d |

855 | ] |

856 | [doc updates in System.IO |

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

858 | Ignore-this: 2257ec1cc4cdb8b7804cfa1f3cf32753 |

859 | ] |

860 | [doc wibble |

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

862 | Ignore-this: 64c50f29df6c389273b818918fe7033a |

863 | ] |

864 | [doc wibbles |

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

866 | Ignore-this: b364aad53beea6e741fee2824459b6e8 |

867 | ] |

868 | [Fix haddock formatting |

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

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

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

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

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

874 | Ignore-this: 33a938dad8f0bc061572e2ec571cacc7 |

875 | ] |

876 | [fix docs for isSpace |

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

878 | Ignore-this: b35ff080dbb9833176f08e39dbd9ff6d |

879 | ] |

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

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

882 | Ignore-this: 8200f0208a9b1b1cf4824f343d75819a |

883 | ] |

884 | [nit in docs for accumArray |

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

886 | Ignore-this: c066a456c40907e767df10c3990f35ff |

887 | ] |

888 | [add doc for the ExitCode type |

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

890 | Ignore-this: 99c34332be7f3565da844528b470054a |

891 | ] |

892 | [remove extraneous info from docs for Array |

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

894 | Ignore-this: e2a3f5e84fc23eb7bae911f0680e805e |

895 | ] |

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

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

898 | Ignore-this: ea98cdc3308b406bb04c0f7a38c4424b |

899 | ] |

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

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

902 | Ignore-this: c4992f6832a391b0cccc5a9b7d643976 |

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

904 | ] |

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

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

907 | Ignore-this: 50262ec4700dc16efec5755be5b308c5 |

908 | |

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

910 | compatible with the usual Monad instance. |

911 | ] |

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

913 | pho@cielonegro.org**20100519013112 |

914 | Ignore-this: 4c1e278e022a3d276848afc1dcba4425 |

915 | |

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

917 | ] |

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

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

920 | Ignore-this: ae9fabe95310d7c364e95f7784793485 |

921 | ] |

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

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

924 | Ignore-this: 4f3e5213e142149affe08c5123d6efea |

925 | ] |

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

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

928 | Ignore-this: 1a3fd49b103fe31cbb453f302c18767f |

929 | ] |

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

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

932 | Ignore-this: cc7616d85a1637bc7621b4f2bc181c0e |

933 | ] |

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

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

936 | Ignore-this: 7c3cf7574499c4267372493f2636dc0 |

937 | ] |

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

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

940 | Ignore-this: 651b852942b2fae2b93f996e39239b8f |

941 | ] |

942 | [Added Applicative and Alternative instances for STM |

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

944 | Ignore-this: 567003bc4040bc97105cda4d31ebf04a |

945 | ] |

946 | [expand Foldable instance for Array |

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

948 | Ignore-this: 9bd9e9666a9400431eb92352244fe7e7 |

949 | ] |

950 | [doc comment illustrating Foldable(foldr) |

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

952 | Ignore-this: 8f27d889379803f3ba86d6e928428f3c |

953 | ] |

954 | [fix syntax in doc comments |

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

956 | Ignore-this: cb78da51d60ff6863dc395f1a892c103 |

957 | ] |

958 | [export hGetBufSome (#4046) |

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

960 | Ignore-this: f467fad9722e27edfad6b3dd75290e7b |

961 | ] |

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

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

964 | Ignore-this: 55ec33b03397380259b91e4ca62207a6 |

965 | readTextDeviceNonBlocking is not non-blocking on Windows |

966 | ] |

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

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

969 | Ignore-this: 5b9e9caef06356d0296c584159709ebb |

970 | ] |

971 | [Correct haddock formatting. |

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

973 | Ignore-this: d2622339302048fda48080f7d5ce4a2f |

974 | ] |

975 | [Fix for hGetBufSome |

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

977 | Ignore-this: 2019680f8fb223956cacfcf0d046f133 |

978 | ] |

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

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

981 | Ignore-this: ce881d96ddb729acb6ca09c779975e7d |

982 | ] |

983 | [elaborate the docs for unsafePerformIO a bit |

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

985 | Ignore-this: 1cec3f67560b672c64c5a0dcf9a79eb7 |

986 | ] |

987 | [add Typeable instance |

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

989 | Ignore-this: 6d9cf9d62f0ef17fa459bf213a04098 |

990 | ] |

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

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

993 | Ignore-this: 195c905b43f8d9505029364e2c5b18e |

994 | ] |

995 | [Add swap (#3298) |

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

997 | Ignore-this: 13b007dc4594ce252997ec6fa0bbd976 |

998 | ] |

999 | [inline allocaArray0, to fix withCString benchmark |

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

1001 | Ignore-this: 35c96816acc2f3aaf9dd29f7995fa6f0 |

1002 | ] |

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

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

1005 | Ignore-this: 6d987d93d382c0f69c68c326312abd6b |

1006 | ] |

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

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

1009 | Ignore-this: 3fc130268ec786f28d945858d6690986 |

1010 | ] |

1011 | [INLINE alloca and malloc |

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

1013 | Ignore-this: b218bd611f18721b1505a8c0b9e6a16a |

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

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

1016 | ] |

1017 | [Move comment closer to the offending line |

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

1019 | Ignore-this: b34a1d7affd66f67d210df2377b585d9 |

1020 | ] |

1021 | [Ignore the return code of c_fcntl_write again |

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

1023 | Ignore-this: 266d8ba02cc3cb79c85629b3528261c9 |

1024 | |

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

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

1027 | problem mentioned in |

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

1029 | |

1030 | ] |

1031 | [Fix bitrot in IO debugging code |

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

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

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

1035 | ] |

1036 | [Tiny code tidy-up |

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

1038 | [remove old/wrong comment |

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

1040 | Ignore-this: e6e377d44af48c4162d17d55bdf3f821 |

1041 | ] |

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

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

1044 | Ignore-this: be5aeb47dbd73807b5f94df11afbb81c |

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

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

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

1048 | ] |

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

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

1051 | Ignore-this: a00c5e32fe3981ff87bedd367a69051e |

1052 | ] |

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

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

1055 | Ignore-this: 4ca8500a01ac93454507aa8f9dd001f9 |

1056 | ] |

1057 | [Make SampleVar an abstract newtype |

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

1059 | Ignore-this: 27939e2a064b75e71cb146117346be30 |

1060 | ] |

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

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

1063 | Ignore-this: 7376b2a3afe155daf233a8f1ddc0a7a |

1064 | - Block asynchronous exceptions at the right places |

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

1066 | ] |

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

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

1069 | Ignore-this: dd25636cf220131385ff2fd32493d456 |

1070 | ] |

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

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

1073 | Ignore-this: 551d30280a7941c08f5c3b14576bdd70 |

1074 | 1. there was no async exception protection |

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

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

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

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

1079 | ] |

1080 | [Tweak docs |

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

1082 | [Fixed dead links in documentation of forkIO |

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

1084 | Ignore-this: 7deb8fd064c867fbede2a6b2e9da4f15 |

1085 | ] |

1086 | [Documentation fixes in Control.Exception |

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

1088 | Ignore-this: 761fcba401cbd1f47276ddfc9b5b80f2 |

1089 | ] |

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

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

1092 | Ignore-this: e6983d6b953104d370278ab3e4617e8b |

1093 | ] |

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

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

1096 | Ignore-this: 3818c5d8fee012a3cf322fb455b6e5dc |

1097 | ] |

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

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

1100 | Ignore-this: 78becb2d39b3cd9a1a473a5811ca7d92 |

1101 | ] |

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

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

1104 | [nhc98 should build Data.Functor. |

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

1106 | [Update the exitWith docs |

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

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

1109 | ] |

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

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

1112 | Ignore-this: 261415363303efca265e80290eac5f28 |

1113 | ] |

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

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

1116 | [Stifle warning about unused return value |

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

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

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

1120 | Ignore-this: df4f778cc5fefb32290c798db722632c |

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

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

1123 | real file path. |

1124 | ] |

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

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

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

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

1129 | Ignore-this: 6a384dd2d547ffe3ad3762920e5c1671 |

1130 | ] |

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

1132 | gwern0@gmail.com**20100108214455 |

1133 | Ignore-this: 4dc07452315f2d1b4941903ff42fc45f |

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

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

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

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

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

1139 | return non-(). |

1140 | ] |

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

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

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

1144 | ] |

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

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

1147 | Not all compilers have ScopedTypeVariables. |

1148 | ] |

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

1150 | simonpj@microsoft.com**20091218165655 |

1151 | Ignore-this: ea0849419dc00927aba4bd410b1cc58d |

1152 | |

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

1154 | |

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

1156 | ] |

1157 | [Fix Trac #3245: memoising typeOf |

1158 | simonpj@microsoft.com**20091218155117 |

1159 | Ignore-this: 5a178a7f2222293c5ee0c3c43bd1b625 |

1160 | |

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

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

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

1164 | of the hash-consing machinery.) |

1165 | |

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

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

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

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

1170 | we could fix that.) |

1171 | ] |

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

1173 | simonpj@microsoft.com**20091216170441 |

1174 | Ignore-this: a4df9d8acf496c8e0e9ce5a520509a2a |

1175 | |

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

1177 | ] |

1178 | [Comment the remaining orphan instance modules |

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

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

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

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

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

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

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

1186 | Ignore-this: 77e1b3288f66608c71458d8a91bcbe12 |

1187 | Spotted by Daniel Fischer. |

1188 | ] |

1189 | [fix the docs regarding finalizer guarantees |

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

1191 | Ignore-this: d1ab9532c74a002b8075ff60febcbe2d |

1192 | ] |

1193 | [x86_64 requires more stack |

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

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

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

1197 | Ignore-this: 91077d01da2bbe1dfed5155e8b40da9 |

1198 | ] |

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

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

1201 | Ignore-this: bc37ff678acc6e547dc390285e056eb9 |

1202 | |

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

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

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

1206 | |

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

1208 | |

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

1210 | |

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

1212 | ] |

1213 | [Fix arities of mapFB and zipFB |

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

1215 | Ignore-this: c4e14cd0a92622549c86e67237a40865 |

1216 | ] |

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

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

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

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

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

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

1223 | [Make sure zipWithFB has arity 2 |

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

1225 | Ignore-this: 4cf60c55666f03d22a9f5a6e07f52d36 |

1226 | |

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

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

1229 | |

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

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

1232 | |

1233 | This was a regression vs. 6.10. |

1234 | ] |

1235 | [Remove an old comment |

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

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

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

1239 | [Whitespace only |

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

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

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

1243 | [We can now derive Ord () |

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1261 | [Remove ffi warnings for nhc98. |

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

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

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

1265 | Ignore-this: fa5f5d5e4e080d4b612a37244f937f9c |

1266 | |

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

1268 | |

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

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

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

1272 | should have realised before. |

1273 | |

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

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

1276 | ] |

1277 | [Rollback #1185 fix |

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

1279 | Ignore-this: cd5667e8474e37e01ba26a1984274811 |

1280 | |

1281 | rolling back: |

1282 | |

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

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

1285 | |

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

1287 | patch to GHC itself. |

1288 | |

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

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

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

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

1293 | IO manager. |

1294 | |

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

1296 | |

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

1298 | * Fix the build on Windows |

1299 | |

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

1301 | ] |

1302 | [Fix the build on Windows |

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

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

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

1306 | Ignore-this: 6dc05464f1500104554637f4759738cc |

1307 | |

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

1309 | patch to GHC itself. |

1310 | |

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

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

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

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

1315 | IO manager. |

1316 | ] |

1317 | [improve the documentation for throwErrnoIfRetry |

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

1319 | Ignore-this: b77275cacf730e15757946027168f63e |

1320 | ] |

1321 | [Don't inline unpackFoldrCString ever |

1322 | simonpj@microsoft.com**20091029135350 |

1323 | Ignore-this: 85d672649b1b776efc7e97500b05d4f9 |

1324 | ] |

1325 | [Inline more default methods |

1326 | simonpj@microsoft.com**20091029135330 |

1327 | Ignore-this: 289c44b0afd6d5631c2a4e0664275ca9 |

1328 | |

1329 | Namely Monad: (>>) |

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

1331 | Num: (-), negate |

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

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

1334 | ] |

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

1336 | simonpj@microsoft.com**20091029135118 |

1337 | Ignore-this: 9e35dc947f94827a3529eb53a41575fd |

1338 | |

1339 | No need to duplicate the error generation! |

1340 | ] |

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

1342 | simonpj@microsoft.com**20091029135041 |

1343 | Ignore-this: 8adf225f31ca7a3181ee087e9e4fe535 |

1344 | |

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

1346 | |

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

1348 | the default method will do the job |

1349 | ] |

1350 | [Tidy up and comment imports |

1351 | simonpj@microsoft.com**20091029134414 |

1352 | Ignore-this: bf2be31035de975d8995e988933cc940 |

1353 | ] |

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

1355 | simonpj@microsoft.com**20091029134335 |

1356 | Ignore-this: fccb6f3e90e15f44cb465814be85ede2 |

1357 | |

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

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

1360 | ] |

1361 | [dirUtils.c no longer available |

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

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

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

1365 | Ignore-this: 9f7a7176193eab25c9daaacd9261f2de |

1366 | |

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

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

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

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

1371 | |

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

1373 | of Unicode decoding errors. |

1374 | |

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

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

1377 | |

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

1379 | code is arguably broken. |

1380 | ] |

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

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

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

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

1385 | ] |

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

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

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

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

1390 | build. |

1391 | ] |

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

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

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

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

1396 | build. |

1397 | ] |

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1416 | Ignore-this: 7f881e36543d250ef848c9f60d67655a |

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

1418 | ] |

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

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

1421 | Ignore-this: d0d0c3ae87b31d71ef1627c8e1786445 |

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

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

1424 | ] |

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

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

1427 | Ignore-this: 2aef5e9bec421e714953b7aa1bdfc1b3 |

1428 | ] |

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

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

1431 | Ignore-this: d0d0c3ae87b31d71ef1627c8e1786445 |

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

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

1434 | ] |

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

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

1437 | Ignore-this: 8b1888bbf9682ffba13f815b6000e4b1 |

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

1439 | ] |

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

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

1442 | Ignore-this: 4342026df93759d99480f4e13f80a492 |

1443 | ] |

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

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

1446 | Ignore-this: 625817ed7ae2c12291eb993a99dc640a |

1447 | ] |

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

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

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

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

1452 | Ignore-this: a0cff4de6dfdbcbd56a66101bc4855a9 |

1453 | |

1454 | The following functions |

1455 | |

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

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

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

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

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

1461 | |

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

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

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

1465 | be equivalent to the default definitions. |

1466 | |

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

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

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

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

1471 | ] |

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

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

1474 | Ignore-this: 86c2f2db8ef92b751599795d3195187b |

1475 | |

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

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

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

1479 | start of that script. |

1480 | |

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

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

1483 | |

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

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

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

1487 | ] |

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

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

1490 | [Bump base version to 4.2.0.0 |

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

1492 | [Address #3310 |

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

1494 | Ignore-this: 40c7f7c171ee299a83092fd360a952b7 |

1495 | |

1496 | - Rename BlockedOnDeadMVar -> BlockedIndefinitelyOnMVar |

1497 | - Rename BlockedIndefinitely -> BlockedIndefinitelyOnSTM |

1498 | - instance Show BlockedIndefinitelyOnMVar is now |

1499 | "blocked indefinitely in an MVar operation" |

1500 | - instance Show BlockedIndefinitelyOnSTM is now |

1501 | "blocked indefinitely in an STM transaction" |

1502 | |

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

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

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

1506 | mapping. |

1507 | ] |

1508 | [Fix unicode conversion for MSB architectures |

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

1510 | This fixes the SPARC/Solaris build. |

1511 | ] |

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

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

1514 | Ignore-this: d12a75d95e0cae5eb1555266810ec281 |

1515 | ] |

1516 | [Fix hWaitForInput |

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

1518 | Ignore-this: 2550e911f1a4d4357a5aa8d1764238ce |

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

1520 | the byte buffer. |

1521 | ] |

1522 | [fix debugging code |

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

1524 | Ignore-this: e1c82fdc19a22e247cd69ff6fa11921d |

1525 | ] |

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

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

1528 | Ignore-this: be95fab611a5534cf184b508964ed498 |

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

1530 | ] |

1531 | [typo in comment |

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

1533 | Ignore-this: 1903ee0f354157a6ed3871c100f6b1b9 |

1534 | ] |

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

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

1537 | Ignore-this: dce6606f93cf977fb24ebe99082dfa62 |

1538 | ] |

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

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

1541 | Ignore-this: 31c237c46a6445f588ed4b8c51bb6231 |

1542 | ] |

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

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

1545 | Ignore-this: feeece36d5632f02a05d137d2a39ab78 |

1546 | ] |

1547 | [Fix "Cabal check" warnings |

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

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

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

1551 | [Apply proposal #3393 |

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

1553 | Add openTempFileWithDefaultPermissions and |

1554 | openBinaryTempFileWithDefaultPermissions. |

1555 | ] |

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

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

1558 | Fixes 21 testsuite errors on NetBSD 5.99. |

1559 | ] |

1560 | [Fixing configure for autoconf 2.64 |

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

1562 | Ignore-this: 992ab91ae3d68c12dbb265776e33e243 |

1563 | ] |

1564 | [add INLINE toList |

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

1566 | Ignore-this: aba16aabb17d5dca44f15d188945680e |

1567 | |

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

1569 | ] |

1570 | [fix a copyright |

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

1572 | Ignore-this: b0ffbdd38fbba121e8bcba37c4082a60 |

1573 | ] |

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

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

1576 | Ignore-this: ec67d7a0a6d977438deaa342503f77e0 |

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

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

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

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

1581 | ] |

1582 | [Deprecate Control.OldException |

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

1584 | [Windows build fix, following RTS tidyup |

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

1586 | Ignore-this: ce862fb91c2b234211a8757f98690778 |

1587 | ] |

1588 | [Updates to follow the RTS tidyup |

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

1590 | Ignore-this: 6e92412df93a66c12d75344053d5634 |

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

1592 | ] |

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

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

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

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

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

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

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

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

1601 | Ignore-this: a7d85ac0025d559674249de0108dbcf4 |

1602 | ] |

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

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

1605 | Ignore-this: 5ede91ecfec2112c91b699d4de87cd02 |

1606 | ] |

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

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

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

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

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

1612 | messages (#2669). |

1613 | ] |

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

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

1616 | [remove unused warning |

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

1618 | Ignore-this: 31f613654089d0f4a44363946087b41e |

1619 | ] |

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

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

1622 | Ignore-this: dc8957249731d5bcb71c01899e5adf2b |

1623 | ] |

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

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

1626 | Ignore-this: 14c3eff996db062da1199739781e4708 |

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

1628 | ] |

1629 | [Add more documentation to mkTextEncoding |

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

1631 | Ignore-this: 97253b2624267df3a246a18121e8ea81 |

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

1633 | iconv. |

1634 | ] |

1635 | [Add the utf8_bom codec |

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

1637 | Ignore-this: 1c9396cd805201fe873a39382ced79c7 |

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

1639 | ] |

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

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

1642 | Ignore-this: c3f017a555335aa55d106253393f72e2 |

1643 | ] |

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

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

1646 | Ignore-this: 98d00411b68d688b3b4cffc9507b1f35 |

1647 | ] |

1648 | [Fix build on Windows |

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

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

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

1652 | [Use throwErrnoIfMinus1_ when calling getrusage |

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

1654 | [Remove an unused import |

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

1656 | [reportStackOverflow now returns IO () |

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

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

1659 | ] |

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

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

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

1663 | ] |

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

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

1666 | [Minor SampleVar refactoring |

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

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

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

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

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

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

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

1674 | [Minor code tidyups in GHC.Conc |

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

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

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

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

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

1680 | ] |

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

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

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

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

1685 | [Add back imports needed on Windows |

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

1687 | [Remove unused imports |

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

1689 | [Remove unused imports from base |

1690 | simonpj@microsoft.com**20090706111842 |

1691 | Ignore-this: f9b5f353e3bb820f787c56d615b28765 |

1692 | |

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

1694 | |

1695 | ] |

1696 | [Use the result of writeCharBuf |

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

1698 | Ignore-this: 52288dd559bf4c4f313df6197091d935 |

1699 | |

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

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

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

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

1704 | slightly closer to working. |

1705 | ] |

1706 | [Remove some cruft from Data.HashTable |

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

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

1709 | simonpj@microsoft.com**20090706111801 |

1710 | Ignore-this: 2aea7b848e00c894761bc4011adaa95d |

1711 | |

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

1713 | |

1714 | ] |

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

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

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

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

1719 | ] |

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

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

1722 | Ignore-this: dc19ef59a1a21118d5a7dd38aa2f611c |

1723 | ] |

1724 | [avoid a warning |

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

1726 | Ignore-this: c92a45ee216faf01327feae9fe06d6e2 |

1727 | ] |

1728 | [Add a wrapper for libiconv. |

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

1730 | Ignore-this: 23c6047c0d71b745b495cc223574a47f |

1731 | ] |

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

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

1734 | Ignore-this: a35e93b37ca9595c73460243180f4b9d |

1735 | ] |

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

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

1738 | Ignore-this: 580cf636e9c77d8427aff6861d089481 |

1739 | ] |

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

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

1742 | Ignore-this: b997b3cbce0a46ca87ad825bbdc0a411 |

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

1744 | ] |

1745 | [TAG 2009-06-25 |

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

1747 | Patch bundle hash: |

1748 | 9c4193ac79e6d43f42ad0b874f5590908bf28b7f |