# Ticket #4337: rationalPower.dpatch

File rationalPower.dpatch, 52.7 KB (added by daniel.is.fischer, 3 years ago)

special versions of power functions

Line
2
3Tue Oct 19 02:30:30 CEST 2010  Daniel Fischer <daniel.is.fischer@web.de>
4  * FIX #4337
5  Special versions for the power functions with a Rational base and rewrite rules.
6
7New patches:
8
9[FIX #4337
10Daniel Fischer <daniel.is.fischer@web.de>**20101019003030
11 Ignore-this: e6eee4088d63e8d72d5ca7d92f708705
12 Special versions for the power functions with a Rational base and rewrite rules.
13] {
14hunk ./GHC/Real.lhs 437
15                   | otherwise = g (x * x) ((y - 1) `quot` 2) (x * z)
16
17 -- | raise a number to an integral power
18-{-# SPECIALISE (^^) ::
19-        Rational -> Int -> Rational #-}
20 (^^)            :: (Fractional a, Integral b) => a -> b -> a
21 x ^^ n          =  if n >= 0 then x^n else recip (x^(negate n))
22
23hunk ./GHC/Real.lhs 440
24+-------------------------------------------------------
25+-- Special power functions for Rational
26+--
27+-- see #4337
28+--
29+-- Rationale:
30+-- For a legitimate Rational (n :% d), the numerator and denominator are
31+-- coprime, i.e. they have no common prime factor.
32+-- Therefore all powers (n ^ a) and (d ^ b) are also coprime, so it is
33+-- not necessary to compute the greatest common divisor, which would be
34+-- done in the default implementation at each multiplication step.
35+-- Since exponentiation quickly leads to very large numbers and
36+-- calculation of gcds is generally very slow for large numbers,
37+-- avoiding the gcd leads to an order of magnitude speedup relatively
38+-- soon (and an asymptotic improvement overall).
39+--
40+-- Note:
41+-- We cannot use these functions for general Ratio a because that would
42+-- change results in a multitude of cases.
43+-- The cause is that if a and b are coprime, their remainders by any
44+-- positive modulus generally aren't, so in the default implementation
45+-- reduction occurs.
46+--
47+-- Example:
48+-- (17 % 3) ^ 3 :: Ratio Word8
49+-- Default:
50+-- (17 % 3) ^ 3 = ((17 % 3) ^ 2) * (17 % 3)
51+--              = ((289 `mod` 256) % 9) * (17 % 3)
52+--              = (33 % 9) * (17 % 3)
53+--              = (11 % 3) * (17 % 3)
54+--              = (187 % 9)
55+-- But:
56+-- ((17^3) `mod` 256) % (3^3)   = (4913 `mod` 256) % 27
57+--                              = 49 % 27
58+--
59+-- TODO:
60+-- Find out whether special-casing for numerator, denominator or
61+-- exponent = 1 (or -1, where that may apply) gains something.
62+
63+-- Special version of (^) for Rational base
64+{-# RULES "(^)/Rational"    (^) = (^%^) #-}
65+(^%^)           :: Integral a => Rational -> a -> Rational
66+(n :% d) ^%^ e
67+    | e < 0     = error "Negative exponent"
68+    | e == 0    = 1 :% 1
69+    | otherwise = (n ^ e) :% (d ^ e)
70+
71+-- Special version of (^^) for Rational base
72+{-# RULES "(^^)/Rational"   (^^) = (^^%^^) #-}
73+(^^%^^)         :: Integral a => Rational -> a -> Rational
74+(n :% d) ^^%^^ e
75+    | e > 0     = (n ^ e) :% (d ^ e)
76+    | e == 0    = 1 :% 1
77+    | n > 0     = (d ^ (negate e)) :% (n ^ (negate e))
78+    | n == 0    = error "Ratio.%: zero denominator"
79+    | otherwise = let nn = d ^ (negate e)
80+                      dd = (negate n) ^ (negate e)
81+                  in if even e then (nn :% dd) else (negate nn :% dd)
82
83 -------------------------------------------------------
84 -- | @'gcd' x y@ is the greatest (positive) integer that divides both @x@
85}
86
87Context:
88
89[Define SpecConstrAnnotation in GHC.Exts, and import it from there
90simonpj@microsoft.com**20101018135857
91 Ignore-this: 8bf81cbc5787dbb5a3875b5622f67732
92
93 Reason: avoid having to link the entire ghc package in modules
94 that use compile-time annotations:
95
96        import GHC.Exts( SpecConstrAnnotation )
97        {-# ANN type T ForceSpecConstr #-}
98
99 It's a kind of bug that the package exporting SpecConstrAnnotation
100 is linked even though it is only needed at compile time, but putting
101 the data type declaration in GHC.Exts is a simple way to sidestep
102 the problem
103
104 See See Note [SpecConstrAnnotation] in SpecConstr
105]
106[throwTo: mention interruptible foreign calls
107Simon Marlow <marlowsd@gmail.com>**20101014084220
108 Ignore-this: dbc53d85f870cf649f87186c7185465a
109]
110[remove trailing whitespace
111Simon Marlow <marlowsd@gmail.com>**20101013101906
112 Ignore-this: b8b424540cacbbb3c6d934242e3af795
113]
114[FIX #4381
115Simon Marlow <marlowsd@gmail.com>**20101013101849
116 Ignore-this: f0daa4845eeb444231451b975b71d055
117 Fix scaleFloat by clamping the scaling parameter so that
118 exponent + scale doesn't overflow.
119
120 Patch by: Daniel Fischer <daniel.is.fischer@web.de>
121]
122[Replaced some throws to throwIOs where the type is IO
123Bas van Dijk <v.dijk.bas@gmail.com>**20100924221340
124 Ignore-this: e74191e4527ae6f7551c95fd41063335
125]
127Bas van Dijk <v.dijk.bas@gmail.com>**20101005072701
128 Ignore-this: 63628bcabfdd0b7beda4cd37daeccd89
129]
130[Lazier intersperse
131Daniel Fischer <daniel.is.fischer@web.de>**20101002231201
132 Ignore-this: a0fed65930cf19e68b4363381a5ab576
133 A lazier implementation of intersperse, and consequentially intercalate, to
134 avoid space leaks.
135]
136[FIX #4228 (atanh (-1) returns NaN instead of -Infinity)
137ghc@cainnorris.net**20100816213654
138 Ignore-this: dee89c24493e84a02bea711a1c83a73f
139]
140[Make intersectBy lazier
141Daniel Fischer <daniel.is.fischer@web.de>**20100930191731
142 Ignore-this: ef687bc75923434e85c14b57171576aa
143 Add shortcuts to intersectBy for empty list arguments.
144 In addition to being faster in that case, more inputs yield defined results.
145 Treats ticket #4323
146]
147[doc tweak for Directory file type: file names are '\0'-separated
148Simon Marlow <marlowsd@gmail.com>**20100922113811
150]
151[documentation for IODeviceType (#4317, edited by me)
152Simon Marlow <marlowsd@gmail.com>**20100915131341
153 Ignore-this: 21c50ca7a189eebcf299523b6e942bae
154]
155[Allow Data.HashTable construction with user-supplied size
156**20100722210726
157 Ignore-this: bd54880bb16a106a992f03b040dc4164
158
159 This avoids some resizing for users who know they will be inserting a
160 lot of data.
161
163]
164[some fixes for hGetBufSome
165Simon Marlow <marlowsd@gmail.com>**20100916113732
166 Ignore-this: 3e596a606c180dc4859ea8f4c9132ca1
167  - fix one case where it was blocking when it shouldn't
168  - a couple of error-message tweaks
169]
170[Windows: map ERROR_NO_DATA to EPIPE, rather than EINVAL
171Simon Marlow <marlowsd@gmail.com>**20100915142618
172 Ignore-this: 9023e5f0542419f225aef26cb6b1d88d
173 WriteFile() returns ERROR_NO_DATA when writing to a pipe that is
174 "closing", however by default the write() wrapper in the CRT maps this
175 to EINVAL so we get confusing things like
176
177   hPutChar: invalid argument (Invalid Argumnet)
178
179 when piping the output of a Haskell program into something that closes
180 the pipe early.  This was happening in the testsuite in a few place.
181
182 The solution is to map ERROR_NO_DATA to EPIPE correctly, as we
183 explicitly check for EPIPE on stdout (in GHC.TopHandler) so we can
184 exit without an error in this case.
185]
186[tighten up parsing of numbers (#1579)
187Simon Marlow <marlowsd@gmail.com>**20100913214733
188 Ignore-this: 3411bf3d2e98cfacb9e0afd11d79e722
189]
191simonpj@microsoft.com**20100914134639
192 Ignore-this: d0eef5a87e1def4cdbde92a55241c8c4
193
194 This patch accompanies the HEAD patch:
195
196   Tue Sep 14 12:38:27 BST 2010  simonpj@microsoft.com
197     * Make absent-arg wrappers work for unlifted types (fix Trac #4306)
198
199     Previously we were simply passing arguments of unlifted
200     type to a wrapper, even if they were absent, which was
201     stupid.
202
203     See Note [Absent error Id] in WwLib.
204]
205[Add missing import, fixes build on windows
206simonpj@microsoft.com**20100914122750
207 Ignore-this: 12ece15ef94982ddfbf5f9f7900619da
208]
209[Add a suitable Show instance for TextEncoding (#4273)
210Simon Marlow <marlowsd@gmail.com>**20100913154459
211 Ignore-this: 77f2235460895debd2827f34c42c3435
212]
213[don't fill a finalized handle with an error (see comment)
214Simon Marlow <marlowsd@gmail.com>**20100913153350
215 Ignore-this: c72cdb6898dffa88eca1d781171b2943
216]
217[deriving (Eq, Ord, Read, Show) for Newline and NewlineMode
218Simon Marlow <marlowsd@gmail.com>**20100913153031
219 Ignore-this: 9b9b29bfb7abf5550cfbfa7788f81bf
220]
221[fix warning on Windows
222Simon Marlow <marlowsd@gmail.com>**20100913111536
224]
225[Put the state-token argument on fill, done, adjust on the RHS
226simonpj@microsoft.com**20100913101832
227 Ignore-this: d228b492de7d4635c026ed24cbc17e34
228
229 This is so that the functions will inline when
230 applied to their normal (non-state-token) aguments.
231
232 I forget why I did this, but it seems like the right thing anyway.
233]
234[avoid Foreign.unsafePerformIO
235Ross Paterson <ross@soi.city.ac.uk>**20100909125521
236 Ignore-this: b698101119ffd1bc6311cce0736f745d
237]
238[Remove debugging code accidentally left in
239Simon Marlow <marlowsd@gmail.com>**20100909113331
240 Ignore-this: 906a14176dd37030b8203782a687936b
241]
242[Fix Windows build; patches frmo ezyang
243Ian Lynagh <igloo@earth.li>**20100908123037
244 Ignore-this: 2f02986087edd7da8382221012c27cd0
245]
246[More accurate isatty test for MinGW.
247Edward Z. Yang <ezyang@mit.edu>**20100907154144
248 Ignore-this: 93bdc2b2a8e65a7c4c7d3906bdda01db
249]
250[Fix the build when HAVE_KQUEUE but not HAVE_KEVENT64
251Ian Lynagh <igloo@earth.li>**20100904223703]
252[Fix warnings
253benl@ouroborus.net**20100830044741
254 Ignore-this: 8397aaec7c36046c9ace403e65f32d32
255]
256[fix cache variable name used by FP_SEARCH_LIBS_PROTO
257Ross Paterson <ross@soi.city.ac.uk>**20100819204858
258 Ignore-this: b8113cb3c6f0e03c507297c99d3d82b7
259]
260[Add a missing castPtr (only shows up in -DDEBUG)
261simonpj@microsoft.com**20100815145127
262 Ignore-this: 30b9c42cd3ce7837bdabd254fe66078d
263]
264[Fixed a rounding error in threadDelay
265Johan Tibell <johan.tibell@gmail.com>**20100813124043
266 Ignore-this: 1cb77d0852233ffffb144b134064ee3c
267]
268[export allocaBytesAligned; make allocaArray use the correct alignment (#2917)
269Simon Marlow <marlowsd@gmail.com>**20100812105524
270 Ignore-this: deb6495f7b7b84deaf02b88927a5ba8c
271]
272[deprecate unGetChan and isEmptyChan (see #4154)
273Simon Marlow <marlowsd@gmail.com>**20100705125952
274 Ignore-this: b4e769959f131b2d0001eb7202bc1b92
275]
276[Add type signatures to cope with lack of local generalisation
277simonpj@microsoft.com**20100728124847
278 Ignore-this: d3af9a47c2821c6081bde05a135a92fb
279]
280[Add type signature in local where
281simonpj@microsoft.com**20100727151532
283]
284[Integrated new I/O manager
285Simon Marlow <marlowsd@gmail.com>**20100810082248
286 Ignore-this: ed70a9066ac9b676a446fe99978fef7a
287 (patch originally by Johan Tibell <johan.tibell@gmail.com>, minor merging by me)
288]
290jon.fairbairn@cl.cam.ac.uk**20090917145616
291 Ignore-this: de4240b60684f3065b29378df3ea98f2
292
293 Straightforward MonadPlus version of List.filter. I would
294 prefer to call it filter, but the current naming scheme for
296
297]
299Ross Paterson <ross@soi.city.ac.uk>**20100729122449
300 Ignore-this: b0f8cd8643679948d1da43bd7c08c5aa
301
302 The Monad and MonadFix instances for Either (formerly in the mtl
304 respectively.  The Monad instance is still an orphan, to retain Haskell
305 98 compatibility, but the MonadFix instance is together with its class.
306 The Error constraint is removed from both instances, and the default
307 definition of fail is used.
308]
309[Remove egregious ghc-ish from Foreign.Marshal
310Malcolm.Wallace@me.com**20100722075449]
311[add numSparks :: IO Int (#4167)
312Simon Marlow <marlowsd@gmail.com>**20100720153858
313 Ignore-this: 4543f57a7f137f8cae1c3efc5c023a9b
314]
316Simon Marlow <marlowsd@gmail.com>**20100720082819
317 Ignore-this: dcd79fb546ebe29ddff4df279ec2f38
318]
319[docs: mention that Foreign.unsafePerformIO is deprecated
320Simon Marlow <marlowsd@gmail.com>**20100720082804
321 Ignore-this: 4cfebb8f2a1cddc7d15e94e31b2befa4
322 We can't actually deprecate it without introducing a name clash
323 between Foreign.unsafePerformIO and System.IO.Unsafe.unsafePerformIO
324]
325[doc formatting fix
326Simon Marlow <marlowsd@gmail.com>**20100714151347
327 Ignore-this: 255edef607dcd290e198015240b5d125
328]
330Simon Marlow <marlowsd@gmail.com>**20100714115853
331 Ignore-this: 59b5a07507a059ccccdff2dfb6490a27
332]
333[document exception-overriding behaviour in withFile
334Simon Marlow <marlowsd@gmail.com>**20100714104107
335 Ignore-this: f99e641ea2f46d872cb7420a62fa50dc
336]
337[doc: use "finalizer" consistently
338Simon Marlow <marlowsd@gmail.com>**20100714103649
339 Ignore-this: bdfea40f31dc5045fdbc6e12266dda93
340]
341[clarify meaning of bit
342Simon Marlow <marlowsd@gmail.com>**20100714103310
343 Ignore-this: 521b031f1e83ef34ca03d9aa9273df8a
344]
345[note shortcutting behaviour of any/all/elem
346Simon Marlow <marlowsd@gmail.com>**20100714103304
348]
350Simon Marlow <marlowsd@gmail.com>**20100713132515
351 Ignore-this: 9b1da827016c7b08668078b45964e9de
352]
353[mention that IntPtr and WordPtr can be marshalled to/from intptr_t and uintptr_t
354Simon Marlow <marlowsd@gmail.com>**20100713132403
355 Ignore-this: dcc112a72746ba117a84fa29e71b6800
356]
357[Partial fix for Trac #4136
358simonpj@microsoft.com**20100707135725
359 Ignore-this: 9548eeb3187d9779d4e5c858a0f35354
360
361 In 'choose' (which is a library function designed specifically
362 to support derived instances of Read), we must match Symbol
363 as well as Ident, for nullary constructors that (wierdly) are
364 symbols.
365]
366[Fix typo in documentation
367Simon Hengel <simon.hengel@wiktory.org>**20100711141648
369]
370[Remove duplicated word in documentation
371Simon Hengel <simon.hengel@wiktory.org>**20100711072703
372 Ignore-this: fb3732dc57be55f14168792f923433
373]
374[Allow nhc98 to cope with recent changes to Control.Exception.
375Malcolm.Wallace@me.com**20100710170940]
376[ New asynchronous exception control API (base parts)
377Simon Marlow <marlowsd@gmail.com>**20100708152735
378 Ignore-this: 71a4811804f04259f1fe739f8863beaf
379
380 As discussed on the libraries/haskell-cafe mailing lists
382
383 This is a replacement for block/unblock in the asychronous exceptions
384 API to fix a problem whereby a function could unblock asynchronous
385 exceptions even if called within a blocked context.
386
387 The new terminology is "mask" rather than "block" (to avoid confusion
388 due to overloaded meanings of the latter).
389
390 The following is the new API; the old API is deprecated but still
391 available for the time being.
392
393 Control.Exception
394 -----------------
395
396 mask  :: ((forall a. IO a -> IO a) -> IO b) -> IO b
397 mask_ :: IO a -> IO a
398
399 uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b
400 uninterruptibleMask_ :: IO a -> IO
401
403
408
409
410 Control.Concurrent
411 ------------------
412
414]
415[Async-exception safety, and avoid space leaks
416Simon Marlow <marlowsd@gmail.com>**20100708145819
417 Ignore-this: dbfd0e61551e9e7b4fc1c6fe9b9a83de
418 Patch submitted by: Bas van Dijk <v.dijk.bas@gmail.com>
419 Modified slightly by me to remove non-functional changes.
420]
421[Async-exception safety, and avoid space leaks
422Simon Marlow <marlowsd@gmail.com>**20100708103154
423 Ignore-this: 190c3ac8f6633231624da8cf1316588
424 Patch submitted by: Bas van Dijk <v.dijk.bas@gmail.com>
425 Modified slightly by me to remove non-functional changes.
426]
427[Fix a few places where we forgot to close the text codecs (#4029)
428Simon Marlow <marlowsd@gmail.com>**20100702130210
429 Ignore-this: 2e81a4b4cb343181cef34b0f9e2ded47
430 Each time you invoke :load in GHCi it resets the CAFs, including
431 stdin/stdout/stderr, and each of these was allocating a new iconv_t.
432]
433[remove docs from Monad that belonged on the instance for MonadPlus IO
434Simon Marlow <marlowsd@gmail.com>**20100701154203
435 Ignore-this: 59df02542a7ac9421552a2155d848d27
436]
437[docs: unqualify Prelude.IO
438Simon Marlow <marlowsd@gmail.com>**20100701153817
439 Ignore-this: 73b0202876c827e7a5b4a5ce74e724c4
440]
441[unqualify Float and Double
442Simon Marlow <marlowsd@gmail.com>**20100701142727
443 Ignore-this: cbe89d31a00bf49996a33933324fca17
444]
445[extract information about Data.Time from docs for CTime
446Simon Marlow <marlowsd@gmail.com>**20100701142415
447 Ignore-this: c48c9609b8d36e43e033a7bea81d6f17
448]
449[doc typo
450Simon Marlow <marlowsd@gmail.com>**20100701142354
451 Ignore-this: 17a1fd703831c888975ff63fbfa3a9b2
452]
453[peekArray docs: remove mentions of "this version" and "previous version"
454Simon Marlow <marlowsd@gmail.com>**20100701125333
455 Ignore-this: 39a744874258670bd935ba9e38390939
456]
457[doc typo
458Simon Marlow <marlowsd@gmail.com>**20100701124154
460]
461[doc typo
462Simon Marlow <marlowsd@gmail.com>**20100701124128
463 Ignore-this: 10a4314ec7aed336701fc616fb574ebc
464]
465[doc typo
466Simon Marlow <marlowsd@gmail.com>**20100701123715
467 Ignore-this: c4909a7bf7163460ee5d32f58812041e
468]
469[doc wibble: Haskell 98 I/O Error -> 'IOError'
470Simon Marlow <marlowsd@gmail.com>**20100701123612
471 Ignore-this: bf373df781acbc575e4ffe3b7e6059ae
472]
473[doc typo
474Simon Marlow <marlowsd@gmail.com>**20100701123014
476]
477[Haddock hacks to fix whitespace consistency
478Simon Marlow <marlowsd@gmail.com>**20100701121631
479 Ignore-this: 61c58dec52a31fd2d3f331a87d2f903f
480]
481[use '==' consistently rather than '->' in examples
482Simon Marlow <marlowsd@gmail.com>**20100701121616
483 Ignore-this: 472b0a05a85d34d9712186040e1636d9
484]
485[doc wibble: remove confusing mention of "Prelude"
486Simon Marlow <marlowsd@gmail.com>**20100701113308
487 Ignore-this: 232283d0096d01cd45e9b3c5c1e63a6d
488]
489[doc wibble: nonstrict -> non-strict
490Simon Marlow <marlowsd@gmail.com>**20100701113253
491 Ignore-this: 4264f0ab23a0835fc13c6e8601d6b743
492]
493[doc whitespace
494Simon Marlow <marlowsd@gmail.com>**20100701112242
495 Ignore-this: 777a95b1d1140c61d3ab95d5eb5809e7
496]
497[move the doc for 'Char' to its new home in ghc-prim:GHC.Types
498Simon Marlow <marlowsd@gmail.com>**20100629134150
499 Ignore-this: 7687db0077a29498349bfb4b44983985
500]
501[doc wibble
502Simon Marlow <marlowsd@gmail.com>**20100629122608
503 Ignore-this: 9a909e5d015332dc445bd9592e6e386d
504]
506Simon Marlow <marlowsd@gmail.com>**20100629122118
507 Ignore-this: 2257ec1cc4cdb8b7804cfa1f3cf32753
508]
509[doc wibble
510Simon Marlow <marlowsd@gmail.com>**20100625134858
511 Ignore-this: 64c50f29df6c389273b818918fe7033a
512]
513[doc wibbles
514Simon Marlow <marlowsd@gmail.com>**20100624154614
516]
518Ian Lynagh <igloo@earth.li>**20100625222623]
519[Give nub's complexity in the haddock docs; fixes #4086
520Ian Lynagh <igloo@earth.li>**20100625222059]
521[correct docs for exitWith: only stdout/stderr are flushed, not all Handles
522Simon Marlow <marlowsd@gmail.com>**20100624130506
524]
525[fix docs for isSpace
526Simon Marlow <marlowsd@gmail.com>**20100624130444
527 Ignore-this: b35ff080dbb9833176f08e39dbd9ff6d
528]
529[make the hGetBuf/hPutBuf family work with non-FD Handles (#4144)
530Simon Marlow <marlowsd@gmail.com>**20100624130425
531 Ignore-this: 8200f0208a9b1b1cf4824f343d75819a
532]
533[nit in docs for accumArray
534Simon Marlow <marlowsd@gmail.com>**20100622121131
535 Ignore-this: c066a456c40907e767df10c3990f35ff
536]
537[add doc for the ExitCode type
538Simon Marlow <marlowsd@gmail.com>**20100622120930
539 Ignore-this: 99c34332be7f3565da844528b470054a
540]
541[remove extraneous info from docs for Array
542Simon Marlow <marlowsd@gmail.com>**20100622120921
543 Ignore-this: e2a3f5e84fc23eb7bae911f0680e805e
544]
545[add an INLINE to the list version of traverse, to enable fusion
546Simon Marlow <marlowsd@gmail.com>**20100608082531
547 Ignore-this: ea98cdc3308b406bb04c0f7a38c4424b
548]
549[Don't define the C localeEncoding on Windows
550Ian Lynagh <igloo@earth.li>**20100620202342
551 Ignore-this: c4992f6832a391b0cccc5a9b7d643976
552 (it causes warnings, and isn't used)
553]
554[add Applicative instance for Either (proposal #4095)
555Ross Paterson <ross@soi.city.ac.uk>**20100617225110
556 Ignore-this: 50262ec4700dc16efec5755be5b308c5
557
558 This is not the only possible instance for Either, but this one is
559 compatible with the usual Monad instance.
560]
561[Use libcharset instead of nl_langinfo(CODESET) if possible.
562pho@cielonegro.org**20100519013112
563 Ignore-this: 4c1e278e022a3d276848afc1dcba4425
564
565 nl_langinfo(CODESET) doesn't always return standardized variations of the encoding names. Use libcharset if possible, which is shipped together with GNU libiconv.
566]
568Simon Marlow <marlowsd@gmail.com>**20100615112720
569 Ignore-this: ae9fabe95310d7c364e95f7784793485
570]
571[docs: note that hGetBufNonBlocking isn't non-blocking on Windows
572Simon Marlow <marlowsd@gmail.com>**20100615112547
573 Ignore-this: 4f3e5213e142149affe08c5123d6efea
574]
575[don't depend on Prelude (#4122)
576Simon Marlow <marlowsd@gmail.com>**20100615105631
577 Ignore-this: 1a3fd49b103fe31cbb453f302c18767f
578]
579[Don't depend on Prelude (#4123)
580Simon Marlow <marlowsd@gmail.com>**20100615105401
581 Ignore-this: cc7616d85a1637bc7621b4f2bc181c0e
582]
584Simon Marlow <marlowsd@gmail.com>**20100601144831
585 Ignore-this: 7c3cf7574499c4267372493f2636dc0
586]
587[Moved MonadPlus instance for STM from Control.Monad.STM to GHC.Conc to avoid an orphaned instance
588Bas van Dijk <v.dijk.bas@gmail.com>**20100516160651
589 Ignore-this: 651b852942b2fae2b93f996e39239b8f
590]
591[Added Applicative and Alternative instances for STM
592Bas van Dijk <v.dijk.bas@gmail.com>**20100516171756
593 Ignore-this: 567003bc4040bc97105cda4d31ebf04a
594]
595[expand Foldable instance for Array
596Ross Paterson <ross@soi.city.ac.uk>**20100602212154
597 Ignore-this: 9bd9e9666a9400431eb92352244fe7e7
598]
599[doc comment illustrating Foldable(foldr)
600Ross Paterson <ross@soi.city.ac.uk>**20100527150833
601 Ignore-this: 8f27d889379803f3ba86d6e928428f3c
602]
604Ross Paterson <ross@soi.city.ac.uk>**20100527150757
605 Ignore-this: cb78da51d60ff6863dc395f1a892c103
606]
607[export hGetBufSome (#4046)
608Simon Marlow <marlowsd@gmail.com>**20100520093538
610]
611[hWaitForInput: don't try to read from the device (#4078)
612Simon Marlow <marlowsd@gmail.com>**20100517133741
613 Ignore-this: 55ec33b03397380259b91e4ca62207a6
614 readTextDeviceNonBlocking is not non-blocking on Windows
615]
616[hSetEncoding: change the encoding on both read and write sides (#4066)
617Simon Marlow <marlowsd@gmail.com>**20100514124628
618 Ignore-this: 5b9e9caef06356d0296c584159709ebb
619]
622 Ignore-this: d2622339302048fda48080f7d5ce4a2f
623]
624[Fix for hGetBufSome
625Simon Marlow <marlowsd@gmail.com>**20100505135637
626 Ignore-this: 2019680f8fb223956cacfcf0d046f133
627]
628[improve the documentation for throwTo and killThread (#3884)
629Simon Marlow <marlowsd@gmail.com>**20100505135600
630 Ignore-this: ce881d96ddb729acb6ca09c779975e7d
631]
632[elaborate the docs for unsafePerformIO a bit
633Simon Marlow <marlowsd@gmail.com>**20100505101249
634 Ignore-this: 1cec3f67560b672c64c5a0dcf9a79eb7
635]
637Simon Marlow <marlowsd@gmail.com>**20100504152815
638 Ignore-this: 6d9cf9d62f0ef17fa459bf213a04098
639]
641Simon Marlow <marlowsd@gmail.com>**20100504152759
642 Ignore-this: 195c905b43f8d9505029364e2c5b18e
643]
645Simon Marlow <marlowsd@gmail.com>**20100504095339
646 Ignore-this: 13b007dc4594ce252997ec6fa0bbd976
647]
648[inline allocaArray0, to fix withCString benchmark
649Simon Marlow <marlowsd@gmail.com>**20100423124729
650 Ignore-this: 35c96816acc2f3aaf9dd29f7995fa6f0
651]
652[raise asynchronous exceptions asynchronously (#3997)
653Simon Marlow <marlowsd@gmail.com>**20100421094932
654 Ignore-this: 6d987d93d382c0f69c68c326312abd6b
655]
657Simon Marlow <marlowsd@gmail.com>**20100421082041
658 Ignore-this: 3fc130268ec786f28d945858d6690986
659]
660[INLINE alloca and malloc
661Simon Marlow <marlowsd@gmail.com>**20100419135333
662 Ignore-this: b218bd611f18721b1505a8c0b9e6a16a
665]
666[Move comment closer to the offending line
667Matthias Kilian <kili@outback.escape.de>**20100419155421
668 Ignore-this: b34a1d7affd66f67d210df2377b585d9
669]
670[Ignore the return code of c_fcntl_write again
671Matthias Kilian <kili@outback.escape.de>**20100415140452
672 Ignore-this: 266d8ba02cc3cb79c85629b3528261c9
673
674 The return code has been ignored in the past on purpose, because
675 O_NONBLOCK will fail on BSDs for some special files. This fixes the
676 problem mentioned in
678
679]
680[Fix bitrot in IO debugging code
681Ian Lynagh <igloo@earth.li>**20100413134339
682 Also switched to using Haskell Bools (rather than CPP) to en/disable it,
683 so it shouldn't break again in the future.
684]
685[Tiny code tidy-up
686Ian Lynagh <igloo@earth.li>**20100413011147]
687[remove old/wrong comment
688Simon Marlow <marlowsd@gmail.com>**20100325161403
689 Ignore-this: e6e377d44af48c4162d17d55bdf3f821
690]
691[withThread: block asynchronous exceptions before installing exception handler.
692Bas van Dijk <v.dijk.bas@gmail.com>**20100329131624
693 Ignore-this: be5aeb47dbd73807b5f94df11afbb81c
694 Note that I don't unblock the given io computation. Because AFAICS
695 withThread is only called with 'waitFd' which only performs an FFI
696 call which can't receive asynchronous exceptions anyway.
697]
698[runInUnboundThread: block asynchronous exceptions before installing exception handler
699Bas van Dijk <v.dijk.bas@gmail.com>**20100329131549
700 Ignore-this: a00c5e32fe3981ff87bedd367a69051e
701]
702[fix the deprecation message (GHC.IO.Handle.Base -> GHC.IO.Handle)
703Simon Marlow <marlowsd@gmail.com>**20100330121137
704 Ignore-this: 4ca8500a01ac93454507aa8f9dd001f9
705]
706[Make SampleVar an abstract newtype
707Bas van Dijk <v.dijk.bas@gmail.com>**20100318200349
708 Ignore-this: 27939e2a064b75e71cb146117346be30
709]
710[Fix bugs regarding asynchronous exceptions and laziness in Control.Concurrent.SampleVar
711Bas van Dijk <v.dijk.bas@gmail.com>**20100318200104
712 Ignore-this: 7376b2a3afe155daf233a8f1ddc0a7a
713  - Block asynchronous exceptions at the right places
714  - Force thunks before putting them in a MVar
715]
716[Write the thunk 'next' to the MVar
717Bas van Dijk <v.dijk.bas@gmail.com>**20100319125951
718 Ignore-this: dd25636cf220131385ff2fd32493d456
719]
720[change to use STM, fixing 4 things
721Simon Marlow <marlowsd@gmail.com>**20100318104436
722 Ignore-this: 551d30280a7941c08f5c3b14576bdd70
723   1. there was no async exception protection
724   2. there was a space leak (now new value is strict)
725   3. using atomicModifyIORef would be slightly quicker, but can
726      suffer from adverse scheduling issues (see #3838)
727   4. also, the STM version is faster.
728]
729[Tweak docs
730Ian Lynagh <igloo@earth.li>**20100312214129]
732Bas van Dijk <v.dijk.bas@gmail.com>**20100308222415
733 Ignore-this: 7deb8fd064c867fbede2a6b2e9da4f15
734]
735[Documentation fixes in Control.Exception
736Bas van Dijk <v.dijk.bas@gmail.com>**20100301220442
737 Ignore-this: 761fcba401cbd1f47276ddfc9b5b80f2
738]
739[Plug two race conditions that could lead to deadlocks in the IO manager
740Simon Marlow <marlowsd@gmail.com>**20100225120255
741 Ignore-this: e6983d6b953104d370278ab3e4617e8b
742]
743[FIX #3866: improve documentation of Data.Data.Constr
744jpm@cs.uu.nl**20100224125506
745 Ignore-this: 3818c5d8fee012a3cf322fb455b6e5dc
746]
747[UNDO: Handle NaN, -Infinity and Infinity in the toRational for Float/Double (#3676)
748Simon Marlow <marlowsd@gmail.com>**20100223101603
749 Ignore-this: 78becb2d39b3cd9a1a473a5811ca7d92
750]
751[Put the complexity in the length docs. Fixes trac #3680
752Ian Lynagh <igloo@earth.li>**20100221191425]
753[nhc98 should build Data.Functor.
754Malcolm.Wallace@cs.york.ac.uk**20100221163218]
755[Update the exitWith docs
756Ian Lynagh <igloo@earth.li>**20100213140004
757 Error pointed out by Volker Wysk <vw@volker-wysk.de>
758]
759[Handle NaN, -Infinity and Infinity in the toRational for Float/Double (#3676)
760Simon Marlow <marlowsd@gmail.com>**20100211101955
761 Ignore-this: 261415363303efca265e80290eac5f28
762]
763[For nhc98, import unsafeInterleaveIO rather than defining it here.
764Malcolm.Wallace@cs.york.ac.uk**20100204171021]
765[Stifle warning about unused return value
766benl@cse.unsw.edu.au**20100203025537]
767[fix #3832: use the locale encoding in openTempFile
768Simon Marlow <marlowsd@gmail.com>**20100120211830
769 Ignore-this: df4f778cc5fefb32290c798db722632c
770 Also while I was here fix an XXX: the Handle contained an
771 uninformative string like <fd: 4> for error messages rather than the
772 real file path.
773]
774[Fix the build: export void, so it doesn't give an unused binding warning
775Ian Lynagh <igloo@earth.li>**20100116174451]
776[hIsEOF: don't do any decoding (#3808)
777Simon Marlow <marlowsd@gmail.com>**20100112230317
779]
780[Control.Monad: +void :: f a -> f ()
781gwern0@gmail.com**20100108214455
782 Ignore-this: 4dc07452315f2d1b4941903ff42fc45f
784 Turns m a -> m (). Lets one call functions for their side-effects without
785 having to get rid of their return values with '>> return ()'. Very useful
786 in many contexts (parsing, IO etc.); particularly good for 'forkIO' and 'forM_',
787 as they demand return types of 'IO ()' though most interesting IO functions
788 return non-().
789]
790[Replace the implementation of mergesort with a 2x faster one.
791Malcolm.Wallace@cs.york.ac.uk**20091224152014
793]
794[Restore previous Data.Typeable.typeOf*Default implementations for non-ghc.
795Malcolm.Wallace@cs.york.ac.uk**20091223142625
796 Not all compilers have ScopedTypeVariables.
797]
799simonpj@microsoft.com**20091218165655
800 Ignore-this: ea0849419dc00927aba4bd410b1cc58d
801
802 See Note [Double bounds-checking of index values] for the details.
803
804 The fast paths omit the doubled checks for cases we know about
805]
806[Fix Trac #3245: memoising typeOf
807simonpj@microsoft.com**20091218155117
808 Ignore-this: 5a178a7f2222293c5ee0c3c43bd1b625
809
810 The performance bug in #3245 was caused by computing the typeRep
811 once for each call of typeOf, rather than once for each dictionary
812 contruction.  (Computing TypeReps is reasonably expensive, because
813 of the hash-consing machinery.)
814
815 This is readily fixed by putting the TypeRep construction outside
816 the lambda.  (Arguably GHC might have worked that out itself,
817 but it involves floating something between a type lambda and a
818 value lambda, which GHC doesn't currently do. If it happens a lot
819 we could fix that.)
820]
821[Mark 'index' as INLINE in GHC.Arr
822simonpj@microsoft.com**20091216170441
823 Ignore-this: a4df9d8acf496c8e0e9ce5a520509a2a
824
825 This makes indexing much faster. See Trac #1216
826]
827[Comment the remaining orphan instance modules
828Ian Lynagh <igloo@earth.li>**20091206125021]
829[De-orphan Eq/Ord Float/Double
830Ian Lynagh <igloo@earth.li>**20091205181238]
832Ian Lynagh <igloo@earth.li>**20091205165854]
833[Data.Either.partitionEithers was insufficiently lazy.
834Malcolm.Wallace@cs.york.ac.uk**20091202032807
835 Ignore-this: 77e1b3288f66608c71458d8a91bcbe12
836 Spotted by Daniel Fischer.
837]
838[fix the docs regarding finalizer guarantees
839Simon Marlow <marlowsd@gmail.com>**20091130144409
840 Ignore-this: d1ab9532c74a002b8075ff60febcbe2d
841]
842[x86_64 requires more stack
843Malcolm.Wallace@cs.york.ac.uk**20091201033745]
844[check for size < 0 in mallocForeignPtrBytes and friends (#3514)
845Simon Marlow <marlowsd@gmail.com>**20091125143822
846 Ignore-this: 91077d01da2bbe1dfed5155e8b40da9
847]
848[hGetContents: close the handle properly on error
849Simon Marlow <marlowsd@gmail.com>**20091125123435
850 Ignore-this: bc37ff678acc6e547dc390285e056eb9
851
852 When hGetContents caught an error it was closing the handle and then
853 throwing the exception, without updating the handle with the new
854 closed state.  This lead to a double-closed, which was the cause of
855
856 *** glibc detected *** ./Setup: double free or corruption
857
858 when iconv_close was called twice on the decoder.
859
861]
862[Fix arities of mapFB and zipFB
863Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091126232219
864 Ignore-this: c4e14cd0a92622549c86e67237a40865
865]
866[Remove an unnecessary -fno-warn-orphans flag
867Ian Lynagh <igloo@earth.li>**20091126123404]
868[Tweak layout to work with alternative layout rule
869Ian Lynagh <igloo@earth.li>**20091125232349]
870[Tweak layout to be accepted by the alternative layout rul
871Ian Lynagh <igloo@earth.li>**20091125194147]
872[Make sure zipWithFB has arity 2
873Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091125010003
874 Ignore-this: 4cf60c55666f03d22a9f5a6e07f52d36
875
876 It gets 2 arguments in the "zipWith" rule but its arity was higher and the new
877 inliner didn't inline it sometimes, for instance here:
878
879 mpp ::  [Double] -> [Double] -> [Double] -> [Double] -> [Double]
880 mpp as bs cs ds = zipWith (*) (zipWith (+) as bs) (zipWith (+) cs ds)
881
882 This was a regression vs. 6.10.
883]
884[Remove an old comment
885Ian Lynagh <igloo@earth.li>**20091124134647]
886[De-orphan the Eq/Ord Integer instances
887Ian Lynagh <igloo@earth.li>**20091124133639]
888[Whitespace only
889Ian Lynagh <igloo@earth.li>**20091124133421]
890[Derive some more instances, rather than writing them by hand
891Ian Lynagh <igloo@earth.li>**20091124011747]
892[We can now derive Ord ()
893Ian Lynagh <igloo@earth.li>**20091124011416]
894[De-orphan tuple Eq/Ord instances
895Ian Lynagh <igloo@earth.li>**20091123233343]
896[Control.Exception.Base no longer has any orphans
897Ian Lynagh <igloo@earth.li>**20091123224905]
898[De-orphan the MonadFix ST instance for GHC
899Ian Lynagh <igloo@earth.li>**20091123223544]
900[Rearrange the contents of Control.Monad.ST; no functionality changes
901Ian Lynagh <igloo@earth.li>**20091123222702]
902[De-orphan the Eq/Ord [a] instances
903Ian Lynagh <igloo@earth.li>**20091123215635]
904[De-orphan the Eq/Ord Char instances
905Ian Lynagh <igloo@earth.li>**20091123202253]
906[De-orphan the Eq/Ord Bool instances
907Ian Lynagh <igloo@earth.li>**20091123201817]
908[Move Eq/Ord Ordering instances to de-orphan them
909Ian Lynagh <igloo@earth.li>**20091123194310]
910[Remove ffi warnings for nhc98.
911Malcolm.Wallace@cs.york.ac.uk**20091123063743]
912[Second attempt to fix #1185 (forkProcess and -threaded)
913Simon Marlow <marlowsd@gmail.com>**20091111151915
914 Ignore-this: fa5f5d5e4e080d4b612a37244f937f9c
915
916 Patch 2/2: first patch is to ghc
917
919 existing rts/Globals.c to cache more CAFs, specifically those in
920 GHC.Conc.  We were already using this trick for signal handlers, I
921 should have realised before.
922
923 It's still quite unsavoury, but we can do away with rts/Globals.c in
924 the future when we switch to a dynamically-linked GHCi.
925]
926[Rollback #1185 fix
927Simon Marlow <marlowsd@gmail.com>**20091106140629
928 Ignore-this: cd5667e8474e37e01ba26a1984274811
929
930 rolling back:
931
932 Tue Nov  3 16:05:40 GMT 2009  Simon Marlow <marlowsd@gmail.com>
933   * Fix #1185: restart the IO manager after fork()
934
935   This is the libraries/base part of the patch; there is a corresponding
936   patch to GHC itself.
937
938   The main change is that we now keep track of the IO manager's ThreadId
939   in a top-level MVar, and ensureIOManagerIsRunning checks whether a
940   previous IO manager thread is alive before starting one.  In the child
941   of fork(), we can hence call ensureIOManagerIsRunning to restart the
942   IO manager.
943
944     M ./GHC/Conc.lhs -46 +44
945
946 Wed Nov  4 17:49:45 GMT 2009  Ian Lynagh <igloo@earth.li>
947   * Fix the build on Windows
948
949     M ./GHC/Conc.lhs -6 +4
950]
951[Fix the build on Windows
952Ian Lynagh <igloo@earth.li>**20091104174945]
953[Fix #1185: restart the IO manager after fork()
954Simon Marlow <marlowsd@gmail.com>**20091103160540
955 Ignore-this: 6dc05464f1500104554637f4759738cc
956
957 This is the libraries/base part of the patch; there is a corresponding
958 patch to GHC itself.
959
960 The main change is that we now keep track of the IO manager's ThreadId
961 in a top-level MVar, and ensureIOManagerIsRunning checks whether a
962 previous IO manager thread is alive before starting one.  In the child
963 of fork(), we can hence call ensureIOManagerIsRunning to restart the
964 IO manager.
965]
966[improve the documentation for throwErrnoIfRetry
967Simon Marlow <marlowsd@gmail.com>**20091016112404
968 Ignore-this: b77275cacf730e15757946027168f63e
969]
970[Don't inline unpackFoldrCString ever
971simonpj@microsoft.com**20091029135350
972 Ignore-this: 85d672649b1b776efc7e97500b05d4f9
973]
974[Inline more default methods
975simonpj@microsoft.com**20091029135330
976 Ignore-this: 289c44b0afd6d5631c2a4e0664275ca9
977
979        Eq:    (==), (/=)
980        Num:   (-), negate
981        Real:  quot, rem, div, mod, recip, (/), truncate
982        Float: (**), logBase, sqrt, tan, tanh
983]
984[Move error messages out of INLINEd default methods
985simonpj@microsoft.com**20091029135118
986 Ignore-this: 9e35dc947f94827a3529eb53a41575fd
987
988 No need to duplicate the error generation!
989]
990[Exploit now-working default-method INLINE pragmas for Data.Bits
991simonpj@microsoft.com**20091029135041
993
994 * Add INLINE pragmas to default methods for class Bits
995
996 * Remove redundant instance methods elsewhere, now that
997   the default method will do the job
998]
999[Tidy up and comment imports
1000simonpj@microsoft.com**20091029134414
1001 Ignore-this: bf2be31035de975d8995e988933cc940
1002]
1003[Inline foldr and (.) when applied to two arguments not three
1004simonpj@microsoft.com**20091029134335
1005 Ignore-this: fccb6f3e90e15f44cb465814be85ede2
1006
1007 The new INLINE story is (by design) arity-sensitive, so we must
1008 put fewer argument on the LHS for foldr and (.)
1009]
1010[dirUtils.c no longer available
1011Malcolm.Wallace@cs.york.ac.uk**20091013093833]
1012[Make hGetContents throw an exception if an error is encountered
1013Simon Marlow <marlowsd@gmail.com>**20091012152955
1014 Ignore-this: 9f7a7176193eab25c9daaacd9261f2de
1015
1016 Strictly speaking this breaks Haskell 98 compatibility, which requires
1017 hGetContents to just end the lazy stream silently if an error is
1018 encountered.  However, for a few reasons we think it will make
1019 everyone's life a bit easier if we make this change
1020
1021  1. Errors will be a lot more common in GHC 6.12.1, in the form
1022     of Unicode decoding errors.
1023
1024  2. When Haskell 98 was designed, we didn't know how to throw
1025     exceptions from inside lazy I/O, but now we do.
1026
1027  3. If anyone is actually relying on the previous behaviour, their
1028     code is arguably broken.
1029]
1030[Re-instate System.Console.Getopt for nhc98 builds.
1031Malcolm.Wallace@cs.york.ac.uk**20091013092843
1032 Although it was split out of base a while back, that change was
1033 reverted for ghc soon afterwards, but nhc98 never noticed.
1034]
1035[Roll back "Another instance of nhc98's strange import semantics."
1036Ian Lynagh <igloo@earth.li>**20091009185618
1037 Fri Oct  9 14:50:51 BST 2009  Malcolm.Wallace@cs.york.ac.uk
1038 GHC (correctly) warns about the unused import, which breaks the validate
1039 build.
1040]
1041[Roll back "Cope with nhc98's (occasionally-strange) import semantics"
1042Ian Lynagh <igloo@earth.li>**20091009184704
1043 Fri Oct  9 14:43:51 BST 2009  Malcolm.Wallace@cs.york.ac.uk
1044 GHC (correctly) warns about the unused import, which breaks the validate
1045 build.
1046]
1047[It seems that nhc98 needs defaulting in Data.Fixed.
1048Malcolm.Wallace@cs.york.ac.uk**20091009135242]
1049[Another instance of nhc98's strange import semantics.
1050Malcolm.Wallace@cs.york.ac.uk**20091009135051]
1051[Make Data.Functor compatible with non-GHC compilers.
1052Malcolm.Wallace@cs.york.ac.uk**20091009134821]
1053[Cope with nhc98's (occasionally-strange) import semantics.
1054Malcolm.Wallace@cs.york.ac.uk**20091009134351]
1055[Fix gratuitous breakage of nhc98 in System.IO.
1056Malcolm.Wallace@cs.york.ac.uk**20091009134001]
1057[Fix gratuitous breakage of nhc98 in Control.Exception.Base.
1058Malcolm.Wallace@cs.york.ac.uk**20091009133615]
1059[Fix gratuitous breakage of non-GHC in Data.Fixed.
1060Malcolm.Wallace@cs.york.ac.uk**20091009133330]
1061[Fix gratuitous breakage for non-GHC in Data.Bits.
1062Malcolm.Wallace@cs.york.ac.uk**20091009133257]
1064Simon Marlow <marlowsd@gmail.com>**20091006100207
1065 Ignore-this: 7f881e36543d250ef848c9f60d67655a
1066 The latter is not recognised by some iconv implementations.
1067]
1068[Strip any Byte Order Mark (BOM) from the front of decoded streams.
1069Ben.Lippmeier@anu.edu.au*-20090930084229
1070 Ignore-this: d0d0c3ae87b31d71ef1627c8e1786445
1071 When decoding to UTF-32, Solaris iconv inserts a BOM at the front
1072 of the stream, but Linux iconv doesn't.
1073]
1075Simon Marlow <marlowsd@gmail.com>**20091005101554
1076 Ignore-this: 2aef5e9bec421e714953b7aa1bdfc1b3
1077]
1078[Strip any Byte Order Mark (BOM) from the front of decoded streams.
1079Ben.Lippmeier@anu.edu.au**20090930084229
1080 Ignore-this: d0d0c3ae87b31d71ef1627c8e1786445
1081 When decoding to UTF-32, Solaris iconv inserts a BOM at the front
1082 of the stream, but Linux iconv doesn't.
1083]
1084[Add traceEvent :: String -> IO ()
1085Simon Marlow <marlowsd@gmail.com>**20090925141257
1086 Ignore-this: 8b1888bbf9682ffba13f815b6000e4b1
1087 For emitting an event via the RTS tracing framework
1088]
1089[Fix the error message when flushing the read buffer of a non-seekable Handle
1090Simon Marlow <marlowsd@gmail.com>**20090923090536
1091 Ignore-this: 4342026df93759d99480f4e13f80a492
1092]
1093[Fix #3534: No need to flush the byte buffer when setting binary mode
1094Simon Marlow <marlowsd@gmail.com>**20090923090445
1095 Ignore-this: 625817ed7ae2c12291eb993a99dc640a
1096]
1097[Use let !y = x in .. x .. instead of seq in \$! and evaluate (#2273)
1098Simon Marlow <marlowsd@gmail.com>**20090916140454]
1099[make some Applicative functions into methods, and split off Data.Functor (proposal #3335)
1100Ross Paterson <ross@soi.city.ac.uk>**20090915173109
1101 Ignore-this: a0cff4de6dfdbcbd56a66101bc4855a9
1102
1103 The following functions
1104
1105     (<\$) :: Functor f => a -> f b -> f a
1106     (*>) :: Applicative f => f a -> f b -> f b
1107     (<*) :: Applicative f => f a -> f b -> f a
1108     some :: Alternative f => f a -> f [a]
1109     many :: Alternative f => f a -> f [a]
1110
1111 are moved into the corresponding classes, with the existing implementations
1112 as default definitions.  This gives people creating instances the option of
1113 defining specialized implementations of these functions, though they should
1114 be equivalent to the default definitions.
1115
1116 Although (<\$) is now a method of the Functor class, it is hidden in the
1118 Data.Functor exposes the full class, plus the function (<\$>).  These are
1119 also re-exported by Control.Applicative.
1120]
1121[On Windows, use the console code page for text file encoding/decoding.
1122Judah Jacobson <judah.jacobson@gmail.com>**20090913022126
1123 Ignore-this: 86c2f2db8ef92b751599795d3195187b
1124
1125 We keep all of the code page tables in the module
1126 GHC.IO.Encoding.CodePage.Table.  That file was generated automatically
1127 by running codepages/MakeTable.hs; more details are in the comments at the
1128 start of that script.
1129
1131 this only increases the size of a "hello world" program by about 7%.
1132
1133 Currently we do not support double-byte encodings (Chinese/Japanese/Korean), since
1134 including those codepages would increase the table size to 400KB.  It will be
1135 straightforward to implement them once the work on library DLLs is finished.
1136]
1137[Fix "init" docs: the input list need not be finite. Fixes trac #3465
1138Ian Lynagh <igloo@earth.li>**20090911210437]
1139[Bump base version to 4.2.0.0
1140Ian Lynagh <igloo@earth.li>**20090911153913]
1142Simon Marlow <marlowsd@gmail.com>**20090830152850
1143 Ignore-this: 40c7f7c171ee299a83092fd360a952b7
1144
1145  - Rename BlockedOnDeadMVar   -> BlockedIndefinitelyOnMVar
1146  - Rename BlockedIndefinitely -> BlockedIndefinitelyOnSTM
1147  - instance Show BlockedIndefinitelyOnMVar is now
1148      "blocked indefinitely in an MVar operation"
1149  - instance Show BlockedIndefinitelyOnSTM is now
1150      "blocked indefinitely in an STM transaction"
1151
1152 clients using Control.OldException will be unaffected (the new
1153 exceptions are mapped to the old names).  However, for base4-compat
1154 we'll need to make a version of catch/try that does a similar
1155 mapping.
1156]
1157[Fix unicode conversion for MSB architectures
1158Ben.Lippmeier@anu.edu.au**20090830130028
1159 This fixes the SPARC/Solaris build.
1160]
1161[Fix #3441: detect errors in partial sequences
1162Simon Marlow <marlowsd@gmail.com>**20090830075909
1163 Ignore-this: d12a75d95e0cae5eb1555266810ec281
1164]
1165[Fix hWaitForInput
1166Simon Marlow <marlowsd@gmail.com>**20090827152116
1167 Ignore-this: 2550e911f1a4d4357a5aa8d1764238ce
1168 It was erroneously waiting when there were bytes to decode waiting in
1169 the byte buffer.
1170]
1171[fix debugging code
1172Simon Marlow <marlowsd@gmail.com>**20090827150628
1173 Ignore-this: e1c82fdc19a22e247cd69ff6fa11921d
1174]
1175[Allow for configurable iconv include and library locations.
1176Matthias Kilian <kili@outback.escape.de>**20090826154406
1177 Ignore-this: be95fab611a5534cf184b508964ed498
1178 This should help to fix the build on OpenBSD.
1179]
1180[typo in comment
1181Simon Marlow <marlowsd@gmail.com>**20090826085252
1182 Ignore-this: 1903ee0f354157a6ed3871c100f6b1b9
1183]
1184[un-hide some modules from the Haddock docs
1185Simon Marlow <marlowsd@gmail.com>**20090825152457
1186 Ignore-this: dce6606f93cf977fb24ebe99082dfa62
1187]
1188[Apply fix for #1548, from squadette@gmail.com
1189Simon Marlow <marlowsd@gmail.com>**20090819120700
1190 Ignore-this: 31c237c46a6445f588ed4b8c51bb6231
1191]
1192[improvements to Data.Fixed: instances for Typeable and Data, more predefined types
1193Ashley Yakeley <ashley@semantic.org>**20090812055058
1194 Ignore-this: feeece36d5632f02a05d137d2a39ab78
1195]
1196[Fix "Cabal check" warnings
1197Ian Lynagh <igloo@earth.li>**20090811215856]
1198[Add a GHC.Constants module; fixes trac #3094
1199Ian Lynagh <igloo@earth.li>**20090809183252]
1200[Apply proposal #3393
1201Ian Lynagh <igloo@earth.li>**20090809134717
1203 openBinaryTempFileWithDefaultPermissions.
1204]
1205[Add some more C wrappers; patch from Krister Walfridsson
1206Ian Lynagh <igloo@earth.li>**20090807200631
1207 Fixes 21 testsuite errors on NetBSD 5.99.
1208]
1209[Fixing configure for autoconf 2.64
1210Alexander Dunlap <alexander.dunlap@gmail.com>**20090805060748
1211 Ignore-this: 992ab91ae3d68c12dbb265776e33e243
1212]
1214Ross Paterson <ross@soi.city.ac.uk>**20090806142853
1215 Ignore-this: aba16aabb17d5dca44f15d188945680e
1216
1217 In anticipation of the fixing of #2353.
1218]
1220Simon Marlow <marlowsd@gmail.com>**20090805134045
1221 Ignore-this: b0ffbdd38fbba121e8bcba37c4082a60
1222]
1223[Tweak the BufferedIO class to enable a memory-mapped file implementation
1224Simon Marlow <marlowsd@gmail.com>**20090805134036
1225 Ignore-this: ec67d7a0a6d977438deaa342503f77e0
1226 We have to eliminate the assumption that an empty write buffer can be
1227 constructed by setting the buffer pointers to zero: this isn't
1228 necessarily the case when the buffer corresponds to a memory-mapped
1229 file, or other in-memory device implementation.
1230]
1231[Deprecate Control.OldException
1232Ian Lynagh <igloo@earth.li>**20090804143910]
1233[Windows build fix, following RTS tidyup
1234Simon Marlow <marlowsd@gmail.com>**20090803131121
1235 Ignore-this: ce862fb91c2b234211a8757f98690778
1236]
1238Simon Marlow <marlowsd@gmail.com>**20090801220743
1239 Ignore-this: 6e92412df93a66c12d75344053d5634
1240 C functions like isDoubleNaN moved here (primFloat.c)
1241]
1242[Add integer-simple as a build option
1243Ian Lynagh <igloo@earth.li>**20090722013151]
1244[Use shift[LR]Integer in the Bits Integer instance
1245Ian Lynagh <igloo@earth.li>**20090721222440]
1246[depend directly on integer-gmp, rather than indirecting through integer
1247Ian Lynagh <igloo@earth.li>**20090721185228]
1248[Move the instances of Functor and Monad IO to GHC.Base, to avoid orphans
1249Simon Marlow <marlowsd@gmail.com>**20090722102130
1250 Ignore-this: a7d85ac0025d559674249de0108dbcf4
1251]
1252[move "instance Exception Dynamic" so it isn't an orphan
1253Simon Marlow <marlowsd@gmail.com>**20090721093854
1254 Ignore-this: 5ede91ecfec2112c91b699d4de87cd02
1255]
1256[Improve the index checking for array accesses; fixes #2120 #2669
1257Ian Lynagh <igloo@earth.li>**20090719153228
1258 As well as checking that offset we are reading is actually inside the
1259 array, we now also check that it is "in range" as defined by the Ix
1260 instance. This fixes confusing behaviour (#2120) and improves some error
1261 messages (#2669).
1262]
1263[Make chr say what its argument was, if it's a bad argument
1264Ian Lynagh <igloo@earth.li>**20090718151049]
1265[remove unused warning
1266Simon Marlow <marlowsd@gmail.com>**20090715124416
1267 Ignore-this: 31f613654089d0f4a44363946087b41e
1268]
1269[warning fix: -fno-implicit-prelude -> -XNoImplicitPrelude
1270Simon Marlow <marlowsd@gmail.com>**20090715122839
1272]
1273[Add hGetEncoding :: Handle -> IO (Maybe TextEncoding)
1274Simon Marlow <marlowsd@gmail.com>**20090715122519
1275 Ignore-this: 14c3eff996db062da1199739781e4708
1276 as suggested during the discussion on the libraries list
1277]
1279Simon Marlow <marlowsd@gmail.com>**20090715122414
1280 Ignore-this: 97253b2624267df3a246a18121e8ea81
1281 noting that "//IGNORE" and "//TRANSLIT" suffixes can be used with GNU
1282 iconv.
1283]
1285Simon Marlow <marlowsd@gmail.com>**20090715122257
1286 Ignore-this: 1c9396cd805201fe873a39382ced79c7
1287 as suggested during the discussion on the libraries list.
1288]
1289[Export Unicode and newline functionality from System.IO; update Haddock docs
1290Simon Marlow <marlowsd@gmail.com>**20090713113104
1291 Ignore-this: c3f017a555335aa55d106253393f72e2
1292]
1294Simon Marlow <marlowsd@gmail.com>**20090707124406
1295 Ignore-this: 98d00411b68d688b3b4cffc9507b1f35
1296]
1297[Fix build on Windows
1298Ian Lynagh <igloo@earth.li>**20090711004351]
1299[Fix some "warn-unused-do-bind" warnings where we want to ignore the value
1300Ian Lynagh <igloo@earth.li>**20090710204513]
1301[Use throwErrnoIfMinus1_ when calling getrusage
1302Ian Lynagh <igloo@earth.li>**20090710204221]
1303[Remove an unused import
1304Ian Lynagh <igloo@earth.li>**20090710153345]
1305[reportStackOverflow now returns IO ()
1306Ian Lynagh <igloo@earth.li>**20090710153257
1307 It used to do "return undefined" to return IO a.
1308]
1309[GHC.Conc.reportError now returns IO ()
1310Ian Lynagh <igloo@earth.li>**20090710152646
1311 It used to return IO a, by "return undefined".
1312]
1313[Fix some "warn-unused-do-bind" warnings where we want to ignore the value
1314Ian Lynagh <igloo@earth.li>**20090710152526]
1315[Minor SampleVar refactoring
1316Ian Lynagh <igloo@earth.li>**20090710151438]
1317[Fix "warn-unused-do-bind" warnings in GHC/IO/Handle/Text.hs
1318Ian Lynagh <igloo@earth.li>**20090710122905]
1319[Fix some "warn-unused-do-bind" warnings where we just want to ignore the result
1320Ian Lynagh <igloo@earth.li>**20090710005638]
1321[Use the result of writeCharBuf in GHC/IO/Encoding/Latin1.hs too
1322Ian Lynagh <igloo@earth.li>**20090710004032]
1323[Minor code tidyups in GHC.Conc
1324Ian Lynagh <igloo@earth.li>**20090710003801]
1325[Fix "warn-unused-do-bind" warning in GHC.Conc
1326Ian Lynagh <igloo@earth.li>**20090710003530
1327 If we fail to communicate with the IO manager then we print a warning
1328 using debugErrLn from the ghc-prim package.
1329]
1330[Fix "warn-unused-do-bind" warnings in System.Posix.Internals
1331Ian Lynagh <igloo@earth.li>**20090709164546]
1332[Fix "warn-unused-do-bind" warnings where we really do want to ignore the result
1333Ian Lynagh <igloo@earth.li>**20090709163912]
1334[Add back imports needed on Windows
1335Ian Lynagh <igloo@earth.li>**20090707181924]
1336[Remove unused imports
1337Ian Lynagh <igloo@earth.li>**20090707115810]
1338[Remove unused imports from base
1339simonpj@microsoft.com**20090706111842
1340 Ignore-this: f9b5f353e3bb820f787c56d615b28765
1341
1342 These unused imports are detected by the new unused-import code
1343
1344]
1345[Use the result of writeCharBuf
1346Simon Marlow <marlowsd@gmail.com>**20090706133303
1347 Ignore-this: 52288dd559bf4c4f313df6197091d935
1348
1349 This only makes a difference when CHARBUF_UTF16 is in use, which it
1350 normally isn't.  I suspect CHARBUF_UTF16 doesn't currently work for
1351 other reasons (CHARBUF_UTF16 was an experiment before I wrote the
1352 GHC.IO.Encoding.UTF* codecs), but this patch at least makes it
1353 slightly closer to working.
1354]
1355[Remove some cruft from Data.HashTable
1356Ian Lynagh <igloo@earth.li>**20090706181630]
1358simonpj@microsoft.com**20090706111801
1360
1361 Add a ReadP parser that succeeds at the end of input. Very useful!
1362
1363]
1364[Don't export CLDouble for GHC; fixes trac #2793
1365Ian Lynagh <igloo@earth.li>**20090705155120
1366 We never really supported CLDouble (it was a plain old double underneath),
1367 and pretending that we do does more harm than good.
1368]
1369[a byte between 0x80 and 0xBF is illegal immediately (#3341)
1370Simon Marlow <marlowsd@gmail.com>**20090702081415
1371 Ignore-this: dc19ef59a1a21118d5a7dd38aa2f611c
1372]
1373[avoid a warning
1374Simon Marlow <marlowsd@gmail.com>**20090630084134
1375 Ignore-this: c92a45ee216faf01327feae9fe06d6e2
1376]
1378Matthias Kilian <kili@outback.escape.de>**20090629183634
1379 Ignore-this: 23c6047c0d71b745b495cc223574a47f
1380]
1381[#include <sys/times.h> if we have it (should fix build problems)
1382Simon Marlow <marlowsd@gmail.com>**20090629085351
1383 Ignore-this: a35e93b37ca9595c73460243180f4b9d
1384]
1385[set binary mode for existing FDs on Windows (fixes some GHCi test failures)
1386Simon Marlow <marlowsd@gmail.com>**20090626120522
1387 Ignore-this: 580cf636e9c77d8427aff6861d089481
1388]
1389[Move directory-related stuff to the unix package
1390Simon Marlow <marlowsd@gmail.com>**20090625120325