Ticket #885: prevent-windows-dep-violations-caused-by-ByteCodeFFi.dpatch

File prevent-windows-dep-violations-caused-by-ByteCodeFFi.dpatch, 117.6 KB (added by briansmith, 8 years ago)
Line 
1
2New patches:
3
4[Prevent Windows DEP violations caused by ByteCodeFFI
5brianlsmith@gmail.com**20061003164734] {
6hunk ./compiler/ghci/ByteCodeFFI.lhs 20
7-import Foreign         ( newArray )
8hunk ./compiler/ghci/ByteCodeFFI.lhs 23
9-import Foreign         ( Ptr )
10+import Foreign         ( Ptr, pokeArray )
11+import Foreign.C       ( CUInt )
12+import Foreign.Storable        (Storable(sizeOf))
13hunk ./compiler/ghci/ByteCodeFFI.lhs 78
14-     in  Foreign.newArray bytes
15-
16+     in  newExecutableArray bytes
17+   where
18+   newExecutableArray vals = do
19+       ptr <- doMalloc undefined (length vals)
20+        pokeArray ptr vals
21+        return ptr
22+   doMalloc            :: Storable a' => a' -> Int -> IO (Ptr a')
23+   doMalloc dummy size  = _allocateExec (fromIntegral (size * sizeOf dummy))
24hunk ./compiler/ghci/ByteCodeFFI.lhs 87
25+foreign import ccall unsafe "allocateExec"
26+  _allocateExec :: CUInt -> IO (Ptr a)
27}
28
29Context:
30
31[rejig library include/ files
32sof@galois.com**20060929225751]
33[add :edit to the release notes, and improve the docs a bit
34Simon Marlow <simonmar@microsoft.com>**20060929112108]
35[:edit runs notepad by default on Windows
36Simon Marlow <simonmar@microsoft.com>**20060929102739]
37[unbreak :edit patch on Windows
38Simon Marlow <simonmar@microsoft.com>**20060928155951]
39[Fix #906, and do #914 while I'm in here (it wasn't too hard)
40Simon Marlow <simonmar@microsoft.com>**20060928151705]
41[Add basic :edit support
42Simon Marlow <simonmar@microsoft.com>**20060928135156
43 Without jumping to line numbers or %-expansion, we could add that later.
44]
45[tiny fix in porting docs I just spotted
46Simon Marlow <simonmar@microsoft.com>**20060928105611]
47[only make stdin/stdout unbuffered in GHCi, not runghc or ghc -e.
48Simon Marlow <simonmar@microsoft.com>**20060928105403]
49[testsuite *is* boring
50Simon Marlow <simonmar@microsoft.com>**20060928105342]
51[Fix mulIntMayOflo on 64-bit arches; fixes trac #867
52Ian Lynagh <igloo@earth.li>**20060928004806
53 We were assuming we could multiply 2 32-bit numbers without overflowing
54 a 64-bit number, but we can't as the top bit is the sign bit.
55]
56[Handle clock_gettime failing
57Ian Lynagh <igloo@earth.li>**20060927234630]
58[fix typo in comment
59Andres Loeh <mail@andres-loeh.de>**20060914235648]
60[remove non-boring directories
61Norman Ramsey <nr@eecs.harvard.edu>**20060915234902]
62[Modify toArgs to parse quotes/escapes like /bin/sh
63rjmccall@gmail.com**20060917003641
64 Addresses ticket #197, which asks for escape sequences to be supported directly (i.e.
65 not only in dquoted strings) on :load commands in GHCI.  Fix modifies the toArgs
66 function to parse its input like /bin/sh does, i.e. recognizing escapes anywhere
67 and treating quoted strings as atomic chunks.  Thus:
68   :load a\ b c\"d e" "f
69 would parse with three arguments, namely 'a b', 'c"d', and 'e f'.
70 
71 toArgs is used to parse arguments for both :load and :main, but doesn't appear to
72 be used elsewhere.  I see no harm in modifying both to be consistent -- in fact,
73 the functionality is probably more useful for :main than for :load.
74]
75[Rename -no-recomp to -fforce-recomp, and document it
76Simon Marlow <simonmar@microsoft.com>**20060927132707]
77[Make printing of binding results optional in GHCi, and document it
78Simon Marlow <simonmar@microsoft.com>**20060927132550
79 You can say :set -fno-print-bind-result in GHCi to disable this behaviour.
80 Addresses #887
81]
82[Various documentation improvements suggested by Bulat Ziganshin
83Ian Lynagh <igloo@earth.li>**20060925231855]
84[Fix comment/code inconsistency spotted by Bulat Ziganshin
85Ian Lynagh <igloo@earth.li>**20060925195925
86 I'm not sure if this is the example that was intended, but it's at least
87 now consistent.
88]
89[Document -F in the flag reference
90Ian Lynagh <igloo@earth.li>**20060925134816]
91[Remove duplicate call to getDOpts
92simonpj@microsoft.com**20060922190350]
93[64bit fixes for the symbol lookup table
94sven.panne@aedion.de**20060923162408]
95[Fix Linker import when BREAKPOINT is off
96Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20060921210029]
97[Use --export-dynamic to ensure ghci works on newer openbsds
98Don Stewart <dons@cse.unsw.edu.au>**20060921010155
99 
100 Changes to the RTLD_DEFAULT semantics broke the trick we used to ensure
101 libc symbols were available to the ghci linker, in OpenBSD 4.0. We can
102 fix this by linking the ghc binary itself with --export-dynamic on this
103 system, removing the need for any magic Linker.c games.
104 
105 GHCi now works on OpenBSD 4.0
106 
107 Contributed by Eric Mertens <emertens at gmail.com>
108 
109]
110[Currently we don't build cabal-setup
111sven.panne@aedion.de**20060919081759]
112[Packages cleanup, and allow new packages to be loaded with :set again
113Simon Marlow <simonmar@microsoft.com>**20060919012448
114 
115 This cleans up the package subsystem a little.  There are some
116 changes to the GHC API as a result.
117 
118   - GHC.init and GHC.initFromArgs are no longer necessary.
119 
120   - GHC.newSession takes the root of the GHC tree as an argument
121     (previously passed to GHC.init).
122 
123   - You *must* do GHC.setSessionDynFlags after GHC.newSession,
124     this is what loads the package database.
125 
126   - Several global vars removed from SysTools
127 
128   - The :set command in GHCi can now cause new packages to be loaded,
129     or can hide/ignore existing packages.
130]
131[one more boring file
132Simon Marlow <simonmar@microsoft.com>**20060919011849]
133[fix one boring file
134Simon Marlow <simonmar@microsoft.com>**20060919011823]
135[unused imports
136Simon Marlow <simonmar@microsoft.com>**20060919011746]
137[add boring files from a build tree
138Simon Marlow <simonmar@microsoft.com>**20060919011722]
139[remove old comment
140Simon Marlow <simonmar@microsoft.com>**20060919010333]
141[unused import
142Simon Marlow <simonmar@microsoft.com>**20060919010303]
143[some updates
144Simon Marlow <simonmar@microsoft.com>**20060918232924]
145[use ghc-pkg --force-files, and update command-line syntax
146Simon Marlow <simonmar@microsoft.com>**20060918232903]
147[add --force-files, like --force but doesn't allow missing dependencies
148Simon Marlow <simonmar@microsoft.com>**20060918232834]
149[emit an error if the user ran autoconf instead of autoreconf
150Simon Marlow <simonmar@microsoft.com>**20060916084205]
151[Sanity check that all the core packages are present
152Simon Marlow <simonmar@microsoft.com>**20060916070529
153 To catch the case of not running darcs-all get.
154]
155[reformat import
156Simon Marlow <simonmar@microsoft.com>**20060913103512]
157[minor reformatting
158Simon Marlow <simonmar@microsoft.com>**20060913103427]
159[compiler/ isn't boring
160Simon Marlow <simonmar@microsoft.com>**20060913021300]
161[Added parsing rule for BangPattern in case expr
162Markus Lauer <markus.lauer@acm.org>**20060918161850]
163[Fix a bug in subsumption, and tweak error messages
164simonpj@microsoft.com**20060918005223
165 
166 This commit does two largely-unrelated things, but they hit the same code.
167 
168 First, I tweaked the error messages a bit, to give better errors
169 for impredicative polymorphism.  This added the mb_fun argument to
170 tc_sub.
171 
172 Second, I fixed a long-standing bug in tc_sub.  In the isBoxyTyVar case
173 of tc_sub (rule F2) I was not recursing to tc_sub as the rule suggests,
174 but rather calling u_tys.  This is plain wrong, because the first
175 arugment might have more foralls.   
176 
177 The solution is to recurse to tc_sub, but that in turn requires a parameter,
178 exp_ib, which says when we are inside a box.
179 
180 Test is tc210.
181 
182]
183[Comments
184simonpj@microsoft.com**20060918005142]
185[Ensure that only zonked poly_ids are passed to tcSpecPrag
186simonpj@microsoft.com**20060918004805
187 
188 This is a long-standing bug really (Trac #900).  The poly_id passed
189 to tcSpecPrag should be zonked, else it calls tcSubExp with a non-zonked
190 type; but that contradicts the latter's invariant.
191 
192 I ended up doing a bit of refactoring too.  The extra lines are
193 comments I think; the code line count is reduced.
194 
195 Test is tc212.hs
196 
197]
198[Comments only
199simonpj@microsoft.com**20060918004109]
200[Add a missing renamer dump (related to Template Haskell)
201simonpj@microsoft.com**20060917171707]
202[Instantiate data constructor type variables with the type constructor type variables in constraints for derived class instances. Fixes instance deriving for GADTs which declar H98 types, closing ticket #902.
203bringert@cs.chalmers.se**20060915233315]
204[Fixed error in user's manual, gadt section, part about deriving. Data constructor type was Maybe, should be Maybe1.
205bringert@cs.chalmers.se**20060915230517]
206[remove generated files in a 'finally' manner
207sof@galois.com**20060909144432]
208[Replace "&" with "and" as this also gets pulled into the docbook docs
209Ian Lynagh <igloo@earth.li>**20060912125617]
210[Another s/autrijus/audreyt/ in comments.
211audreyt@audreyt.org**20060912121323]
212[Take away XXXs in GADT records related code that are no longer TODOs.
213audreyt@audreyt.org**20060912120942]
214[Add postfix ops to the release notes
215simonpj@microsoft.com**20060912081104]
216[Document postfix operators
217simonpj@microsoft.com**20060911162843]
218[Fix ~2000 second profiling time wrapping bug
219Ian Lynagh <igloo@earth.li>**20060911223210]
220[move the "meat" into the wiki, this file just contains pointers now
221Simon Marlow <simonmar@microsoft.com>**20060911135037]
222[Simplify desugaring of left sections
223simonpj@microsoft.com**20060911083510
224 
225        MERGE TO 6.6 branch!
226 
227 Some while ago I made the type checker a tiny bit more lenient about
228 left sections, so that
229        (x !)
230 would typecheck iff
231        ((!) x)
232 typechecks. 
233 
234 Strictly, Haskell 98 requires that the section typechecks iff
235        (\y. (!) x y)
236 typechecks, and I should really have made the relaxation dependent on a
237 flag, but I didn't.
238 
239 Anyway, this commit fixes the *desugarer* so that it correctly desugars
240 the programs that the typechecker passes.
241 
242 
243]
244[Add comment
245simonpj@microsoft.com**20060911083440]
246[adapt stylesheet to example-contents class used by xsltproc
247Ross Paterson <ross@soi.city.ac.uk>**20060910143941]
248[Fix warnings traceBegin/traceEnd implicitly declared
249Ian Lynagh <igloo@earth.li>**20060910200611]
250[Fix linking to expf on Windows
251Ian Lynagh <igloo@earth.li>**20060910141506]
252[8 byte align data. Fixes SIBGUSs on HPPA/Linux.
253Ian Lynagh <igloo@earth.li>**20060909102445]
254[We now need alex >= 2.0.1
255Ian Lynagh <igloo@earth.li>**20060908191706]
256[Add source code links to Haddock docs
257Simon Marlow <simonmar@microsoft.com>**20060908112725
258 
259 Right now we can only manage to add a source code link for the module,
260 but that's better than nothing.
261 
262 I had to put the list of core packages in a Makefile variable,
263 $(CorePackages), so we'll have to be careful to keep this up to date.
264 (I could have slurped it out of libraries/core-packages with $(shell),
265 but that's ugly and really slow on Windows).
266 
267 There are a couple of new tweakables: CorePackageSourceURL and
268 ExtraPackageSourceURL in config.mk.in, set these to the appropriate
269 patterns for generating source links.
270 
271 (when we merge this patch onto the HEAD we'll have to tweak these
272 settings).
273 
274 Unfortunately it still doesn't work for all the modules, because
275 modules compiled without -cpp don't get any #line directives.  More
276 hackery required...
277]
278[Catch errors in pattern matching for unboxed tuples
279simonpj@microsoft.com**20060908095217
280 
281 When fiddling with pattern-matching for unboxed tuples, I'd messed up
282 the slightly-tricky tests for pattern matching on unboxed tuples, notably
283        case (# foo, bar #) of r -> ...r...
284 
285 The fix is in TcPat, and test are tcfail115, tcfail120, and tc209
286 
287]
288[Fixed typo in users guide section about lexically scoped type variables.
289bringert@cs.chalmers.se**20060907214626]
290[Typo, spotted by Bulat Ziganshin
291Ian Lynagh <igloo@earth.li>**20060908014947]
292[Release note tweaks suggested by Bulat Ziganshin
293Ian Lynagh <igloo@earth.li>**20060908014050]
294[Doc fix: generic classes are no longer broken
295Ian Lynagh <igloo@earth.li>**20060907205426
296 Spotted by Bulat Ziganshin.
297]
298[If we get an unknown or unimplemented opcode, say what it is
299Ian Lynagh <igloo@earth.li>**20060907171038]
300[remove __HUGS__ #if's (Hugs uses the standalone version)
301Ross Paterson <ross@soi.city.ac.uk>**20060907152930]
302[Fix the handling of names in declaration brackets
303simonpj@microsoft.com**20060907141845
304 
305 The handling of top-level names in declaration brackets is a bit tricky.
306 This commit fixes Trac #977;  test is TH_spliceD2.
307 
308 The changes are commented in RnExpr.rnBracket and RdrName.hideSomeUnquals
309 
310 
311]
312[Remove the -optP-P from .raw-hs generation
313Simon Marlow <simonmar@microsoft.com>**20060907151855
314 We need the #line directives left in, so that Haddock can figure out
315 what the name of the original source file was called, which is
316 necessary for generating source links.  You probably now need an
317 updated Haddock to generate HTML from the libraries, but a release
318 will be forthcoming shortly.
319 
320]
321[urk, the dependencies added in the last commit don't really work properly
322Simon Marlow <simonmar@microsoft.com>**20060907113702
323 first, I got the dependencies wrong (should be the .o file, not the
324 .hs), and secondly GHC's recompilation checker refuses to recompile
325 these files anyway.  I haven't done anything about the second problem
326 yet, except to comment it.
327 
328]
329[Add dependencies on .h files #included into Haskell source
330Simon Marlow <simonmar@microsoft.com>**20060907094751
331 Our .depend machinery doesn't automatically generate these, so we have
332 to add them manually.  (this fixes one instance of missing
333 dependencies in the GHC build tree, there are lots more...).
334]
335[Remove CONSTR_CHARLIKE and CONSTR_INTLIKE closure types
336Simon Marlow <simonmar@microsoft.com>**20060907093005
337 These closure types aren't used/needed, as far as I can tell.  The
338 commoning up of Chars/Ints happens by comparing info pointers, and
339 the info table for a dynamic C#/I# is CONSTR_0_1.  The RTS seemed
340 a little confused about whether CONSTR_CHARLIKE/CONSTR_INTLIKE were
341 supposed to be static or dynamic closures, too.
342]
343[Documentation for impredicative polymorphism
344simonpj@microsoft.com**20060907111540]
345[Comments only
346simonpj@microsoft.com**20060907105705]
347[Remove result type signatures from documentation
348simonpj@microsoft.com**20060907104301]
349[Fix bug in error message
350simonpj@microsoft.com**20060907103052]
351[Result type signatures are no longer supported (partial)
352simonpj@microsoft.com**20060907102718
353 
354 I had failed to remove the bit where result type signatures bind
355 lexical type variables.  And now we are planning to remove them entirely.
356 
357 This commit therefore does a partial removal (to avoid destablising 6.6).
358 It also arranges that
359        f :: sig = rhs
360 means a *pattern* binding (not a function binding with no arguments
361 and a result signature), which makes sense.
362 
363]
364[Remove trailing CRs with sed rather than relying on diff in nofib
365Ian Lynagh <igloo@earth.li>**20060907112027
366 Some diffs don't understand --strip-trailing-cr.
367]
368[document -V in the +RTS --help outpout
369Simon Marlow <simonmar@microsoft.com>**20060907084445]
370[Pattern-match warning police
371simonpj@microsoft.com**20060906220417]
372[Improve error reporting for SigTvs, and add comments
373simonpj@microsoft.com**20060906220309]
374[Check that top-level binders are unqualified names
375simonpj@microsoft.com**20060906220101
376 
377 Not having this check led to strange error messages.
378 See test rnfail046.
379 
380]
381[Documentation for lexically-scoped type variables
382simonpj@microsoft.com**20060906164103
383 
384 GHC's design for lexically scoped type variables has changed.
385 Here, belatedly, is the documentation.
386 
387]
388[Make record selection look cheap
389simonpj@microsoft.com**20060906115242
390 
391 exprIsCheap was already making record selection look cheap, esp for
392 dictionary selection; e.g.
393    (==) dEq
394 
395 The idea is to allow those record selections to migrate inside a
396 lambda, because on the whole it's more expensive to share than
397 repeat them.
398 
399 But sometimes dictionary selection is nested; e.g.
400    (==) ($p1Num dNum)
401 
402 This turned out to make a (fragile) rewrite rule fire a little
403 more robustly, but it seems like a good idea in any case.
404 
405 This patch makes nested record selections also look cheap.
406 
407]
408[Now in the wiki
409Simon Marlow <simonmar@microsoft.com>**20060906104022]
410[-threaded and -prof do not currently work together
411Simon Marlow <simonmar@microsoft.com>**20060906093158]
412[Don't fail on missing happy/alex if we don't need them
413Ian Lynagh <igloo@earth.li>**20060906195415]
414[Fix the Windows "VirtualAlloc MEM_COMMIT failed" bug
415Ian Lynagh <igloo@earth.li>**20060906112750
416 We had
417     base=01100000 size=1048576 size_delta=0 it->size=2097152
418     it->base=00F00000 base-it->base=00200000
419 in commitBlocks.
420 Esa Ilari Vuokko identified this inequality test as the cause.
421]
422[Tell the 6.6 branch where to find extralibs
423Ian Lynagh <igloo@earth.li>**20060906124640]
424[Correct the Cabal version number and remove features.
425Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060905232047
426 We're not going to include cabal-setup and cabal-install in this release.
427]
428[Strip trailing CRs when comparing output for nofib. Fixes #797.
429Ian Lynagh <igloo@earth.li>**20060905184910]
430[Fix dependency analysis (notably bindInstsOfLocalFuns) in TcBinds
431simonpj@microsoft.com**20060905105143
432 
433 GHC 6.5 does enhanced dependency analysis for recursive bindings, to
434 maximise polymorphism based on type signatures.  (See Mark Jones's
435 THIH paper.) 
436 
437 I didn't do the bindInstsOfLocalFuns part correctly though, and jhc
438 showed up the bug.  (It only matters when you have a recursive group
439 of two or more functions with a type signature, not at top level, which
440 is why it hasn't shown up till now.)
441 
442 Test is tc207.hs
443 
444 
445]
446[Add note about overlapping instances
447simonpj@microsoft.com**20060905092201]
448[Record that TH doesn't support pattern types signature
449simonpj@microsoft.com**20060905091834]
450[new RTS flag: -V to modify the resolution of the RTS timer
451Ian Lynagh <igloo@earth.li>**20060905141545
452 Fixed version of an old patch by Simon Marlow. His description read:
453  Also, now an arbitrarily short context switch interval may now be
454  specified, as we increase the RTS ticker's resolution to match the
455  requested context switch interval.  This also applies to +RTS -i (heap
456  profiling) and +RTS -I (the idle GC timer).  +RTS -V is actually only
457  required for increasing the resolution of the profile timer.
458]
459[Refactoring for derived Read
460simonpj@microsoft.com**20060904132212
461 
462 There are no functional changes in this commit.  But the code for
463 derived Read is refactored to make it tidier --- and also to make
464 it very easy if we want derived Read to parse the prefix form of
465 infix ocnstructors. 
466 
467 For example,
468        data T = Int `T1` Int
469 According to the H98 report, the derived Read instance will parse
470 infix uses of T1, but not prefix uses (T1 4 3).  It's arguable that it
471 should parse both -- and easy to implement, but it would cause a little bit
472 of code bloat.
473 
474 Similarly records.
475 
476 Anyway this commit doesn't implement the change; just makes it easy
477 to do so.
478 
479]
480[Improve pretty-printing for HsExpr
481simonpj@microsoft.com**20060904131334]
482[Fix typos.
483Ian Lynagh <igloo@earth.li>**20060904190958]
484[Enable bang-patterns only when the flag says so (had missed a case before)
485simonpj@microsoft.com**20060904131412]
486[Remove linear implicit parameters, and document in release notes
487simonpj@microsoft.com**20060904125105]
488[Release notes should mention better newtype-deriving
489simonpj@microsoft.com**20060904124458]
490[Documentation for bang patterns, and other improvements
491simonpj@microsoft.com**20060904123438]
492[Add a hint on tab completion
493Ian Lynagh <igloo@earth.li>**20060903224823]
494[Add :main docs to ghci commands page
495Ian Lynagh <igloo@earth.li>**20060903223107]
496[Ambiguities are now allowed in ghci command names
497Ian Lynagh <igloo@earth.li>**20060903222115]
498[More output updates
499Ian Lynagh <igloo@earth.li>**20060903221933]
500[Add docs for :main
501Ian Lynagh <igloo@earth.li>**20060903220130]
502[More doc output fixes
503Ian Lynagh <igloo@earth.li>**20060903215748]
504[Update ghci output in docs
505Ian Lynagh <igloo@earth.li>**20060903214128]
506[Fix typo
507Ian Lynagh <igloo@earth.li>**20060903212651]
508[Update ghci output in docs
509Ian Lynagh <igloo@earth.li>**20060903210805]
510[Remove a tab causing ghci's :? alignment to go wrong
511Ian Lynagh <igloo@earth.li>**20060903210349]
512[Change default repo root for the 6.6 branch
513Ian Lynagh <igloo@earth.li>**20060902174936]
514[Don't lose linked list tail
515Esa Ilari Vuokko <ei@vuokko.info>**20060831223315]
516[Fix Windows MBlock alloctor bookkeeping bug
517Esa Ilari Vuokko <ei@vuokko.info>**20060830185540]
518[-fglasgow-exts no longer implies -fbang-patterns
519simonpj@microsoft.com**20060901125714]
520[Fix error in release notes, spotted by Esa Ilari Vuokko
521Ian Lynagh <igloo@earth.li>**20060901125841]
522[Remove changes in packages we don't build
523Ian Lynagh <igloo@earth.li>**20060901125436]
524[Don't enable SMP if we are unregisterised
525Ian Lynagh <igloo@earth.li>**20060829123228]
526[Add a pointer to the fundeps paper
527simonpj@microsoft.com**20060831135511]
528[free the task *after* calling closeCond and closeMutex
529Simon Marlow <simonmar@microsoft.com>**20060831103648]
530[add missing ghc_ge_605
531Simon Marlow <simonmar@microsoft.com>**20060831101813]
532[don't closeMutex() the Capability lock
533Simon Marlow <simonmar@microsoft.com>**20060831085728
534 There might be threads in foreign calls that will attempt to return
535 via resumeThread() and grab this lock, so we can't safely destroy it.
536 
537 Fixes one cause of
538 
539    internal error: ASSERTION FAILED: file Capability.c, line 90
540 
541 although I haven't repeated that assertion failure in the wild, only
542 with a specially crafted test case, so I can't be sure I really got
543 it.
544]
545[fix Unix build
546Simon Marlow <simonmar@microsoft.com>**20060830141529]
547[add sysErrorBelch() for reporting system call errors
548Simon Marlow <simonmar@microsoft.com>**20060830140252]
549[call ShutdownIOManager() before closing handles
550Simon Marlow <simonmar@microsoft.com>**20060830123131
551 To avoid IO requests completing only to discover that the
552 completed_table_sema has been CloseHandle()'d.  This all looks a bit
553 wrong, though: we shouldn't really be waiting for these requests to
554 complete, they might take forever.
555]
556[Windows: make some soft failures into fatal errors
557Simon Marlow <simonmar@microsoft.com>**20060830091859
558 Some of the memory allocation calls were being checked for error, but
559 the RTS was printing a message and continuing.  These error cases
560 lead to crashes later, so better to just fail immediately.
561]
562[MAYBE_GC: initialise HpAlloc
563Simon Marlow <simonmar@microsoft.com>**20060830091529
564 HpAlloc was not being set when returning to the scheduler via MAYBE_GC(),
565 which at the least was just wrong (the scheduler might allocate a large
566 block more than once), and at worst could lead to crashes if HpAlloc contains
567 garbage.
568 
569 Fixes at least one threaded2 test on Windows.
570]
571[FILL_SLOP: don't fill slop for BLACKHOLE/CAF_BLACKHOLE
572Simon Marlow <simonmar@microsoft.com>**20060830083311
573 This affects -debug only, avoids crash with test conc012.
574]
575[oops, got the sense of the error case wrong
576Simon Marlow <simonmar@microsoft.com>**20060829151751]
577[fix some rerrors in the worker counting
578Simon Marlow <simonmar@microsoft.com>**20060829135150]
579[add missing case for BlockedOnDoProc
580Simon Marlow <simonmar@microsoft.com>**20060829113345]
581[omit HGL on Windows
582Simon Marlow <simonmar@microsoft.com>**20060829104921]
583[Don't trust "ln -sf" to do the right thing (it doesn't on Solaris)
584Simon Marlow <simonmar@microsoft.com>**20060829093735
585 Patch from: Roman Leshchinskiy
586]
587[don't include HaXml, Japi and monads in a GHC checkout
588Simon Marlow <simonmar@microsoft.com>**20060829085946
589 They aren't built as part of a GHC build anyway, it doesn't make much
590 sense to include them in checkouts or source tarballs.
591]
592[don't include .depend (attempt to fix Windows stage2 build failure)
593Simon Marlow <simonmar@microsoft.com>**20060829083842]
594[Add mipsel case to configure.ac
595Ian Lynagh <igloo@earth.li>**20060825193603]
596[incremented versions of arrows and X11
597Ross Paterson <ross@soi.city.ac.uk>**20060825162415]
598[omit Control.Sequential.STM
599Ross Paterson <ross@soi.city.ac.uk>**20060825161645
600 
601 It's an internal module used by non-GHC implementations only.
602]
603[various minor tweaks, and rearrange to put "important" changes near the top
604Simon Marlow <simonmar@microsoft.com>**20060825154955]
605[mention -fno-mono-pat-binds, since this is a diversion from Haskell 98
606Simon Marlow <simonmar@microsoft.com>**20060825152613]
607[Document SMP support
608Simon Marlow <simonmar@microsoft.com>**20060825151236]
609[Load the target of a dynamic foreign call into a temporary
610Simon Marlow <simonmar@microsoft.com>**20060825140906
611 Fixes ffi011(opt) on x86_64.  I don't know why this has only just
612 appeared today, it's apparently been broken for some time.
613]
614[Sparc supports SMP too
615Simon Marlow <simonmar@microsoft.com>**20060825133628]
616[Fix rewriting of Control.Exception.Assert; fixes 875
617Ian Lynagh <igloo@earth.li>**20060825010219]
618[Add the regex reshuffle to the release notes
619Ian Lynagh <igloo@earth.li>**20060825110520]
620[parsec is now a core library
621Ian Lynagh <igloo@earth.li>**20060825102418]
622[Add a default case to pprDynamicLinkerAsmLabel
623Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101846
624 
625 This is mainly for the benefit of Solaris. I'll fix this properly later.
626]
627[Reserve a register for REG_Base on the Sparc
628Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101820]
629[Add atomic SMP primitives for the Sparc
630Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101753]
631[Make sure GCC uses the Sparc V9 instruction set
632Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101646
633 
634 We only support Sparc V9 and better as V8 lacks an atomic CAS instruction
635 which we need for SMP. This means that we have to pass -mcpu=v9 to GCC when
636 compiling and assembling. Hardcoding the flag is hackish but seems to be
637 our best bet at the moment. It can still be overridden by the user as GCC
638 picks the best -mcpu flag regardless of the ordering.
639]
640[shutdownCapability(): don't bail out after 50 iterations
641Simon Marlow <simonmar@microsoft.com>**20060825100244
642 See comments for details.  Fixes assertion failures in stage 3 build
643 which appeared after recent closeMutex() addidion.  May fix other
644 shutdown issues.
645]
646[add dependency on regex-compat
647Simon Marlow <simonmar@microsoft.com>**20060825093226]
648[move parsec into $(GhcBootLibs); tidy up
649Simon Marlow <simonmar@microsoft.com>**20060825091013]
650[Mips registerised support
651Simon Marlow <simonmar@microsoft.com>**20060825085712
652 Contributed by: Thiemo Seufer <ths@networkno.de>
653]
654[parsec is required to be a core package, genprimopcode uses it
655Simon Marlow <simonmar@microsoft.com>**20060825084607]
656[Free Win32 Handles on shutdown
657Simon Marlow <simonmar@microsoft.com>**20060825084435
658 patch from #878
659]
660[Fix unregisterised builds, and building on non-x86/amd64/powerpc
661Ian Lynagh <igloo@earth.li>**20060825003945]
662[Release notes for GHC 6.6
663Ian Lynagh <igloo@earth.li>**20060824211646]
664[Update for changes to packages
665Simon Marlow <simonmar@microsoft.com>**20060824153500
666 Not much has changed really: just the removal of the overlap
667 restriction, and the re-instatement of the requirement that
668 -package-name must be used when compiling a package now.
669]
670[somehow I lost the unix subdir; recover it
671Simon Marlow <simonmar@microsoft.com>**20060824152529]
672[expand the section on getting the source.
673Simon Marlow <simonmar@microsoft.com>**20060824150647]
674[config in regex-posix too
675Simon Marlow <simonmar@microsoft.com>**20060824145717]
676[make all AC_CONFIG_SUBDIRS optional
677Simon Marlow <simonmar@microsoft.com>**20060824143016]
678[Add dynCompileExpr
679Esa Ilari Vuokko <ei@vuokko.info>**20060823221828]
680[Remove duplicate documentation of -package flag
681Ian Lynagh <igloo@earth.li>**20060824121806]
682[Remove a reference to -fglobalise-toplev-names that got left behind
683Ian Lynagh <igloo@earth.li>**20060824121442]
684[Add closeMutex and use it on clean up
685Esa Ilari Vuokko <ei@vuokko.info>**20060823194604]
686[Add shared Typeable support
687Esa Ilari Vuokko <ei@vuokko.info>**20060823003041]
688[Ignore sections generated from .ident
689Esa Ilari Vuokko <ei@vuokko.info>**20060823155023]
690[update with respect to darcs-all changes
691Simon Marlow <simonmar@microsoft.com>**20060824115535]
692[divide packages into "core" and "extra" packages
693Simon Marlow <simonmar@microsoft.com>**20060824114902
694 The following packages are now "core" packages:
695 
696   base, Cabal, haskell98, readline, regex-base, regex-compat
697   regex-posix, stm, template-haskell, unix, Win32
698 
699 Core packages are those packages required to bootstrap GHC, or are
700 closely tied to GHC (stm, template-haskell).  These are the packages
701 that will be provided in a source distribution from now on.
702 
703 All other packages are classified as "extra" packages.  As far as
704 binary distributions and nightly builds go, nothing will change -
705 we'll still build and include all these packages in the distributions.
706 
707 NOTE: 'sh darcs-all get' will now get the core packages only.  To get
708 the extra packages too, use 'sh darcs-all --extra get'.
709]
710[Sparc fix: work around gcc optimising away the reserved stack chunk
711Simon Marlow <simonmar@microsoft.com>**20060824113750
712 This bug causes crashse on Sparc when calling foreign functions with
713 more than 13 arguments.
714]
715[add new regex packages
716Simon Marlow <simonmar@microsoft.com>**20060824094443]
717[Clean up coding style
718Esa Ilari Vuokko <ei@vuokko.info>**20060823075822]
719[Use stgMallc and stgFree instead of malloc/free
720Esa Ilari Vuokko <ei@vuokko.info>**20060823002902]
721[Remove wrong VirtualAlloc MEM_DECOMMITs on cleanup
722Esa Ilari Vuokko <ei@vuokko.info>**20060821180332]
723[Remove few format-warnings by adding casts
724Esa Ilari Vuokko <ei@vuokko.info>**20060813111029]
725[Remove warning: Correct includes for mingw
726Esa Ilari Vuokko <ei@vuokko.info>**20060813002216]
727[Add few more guesses where to find bits of mingw-gcc
728Esa Ilari Vuokko <ei@vuokko.info>**20060812020901]
729[in the GHCi prompt, print ModuleNames not Modules
730Simon Marlow <simonmar@microsoft.com>**20060823095258]
731[In the Compiling/Skipping message, print ModuleNames not Modules
732Simon Marlow <simonmar@microsoft.com>**20060823095225
733 These modules are always home modules, by definition, so the package
734 name is redundant.
735 
736]
737[Fix typo
738Ian Lynagh <igloo@earth.li>**20060822163300]
739[Fix typo
740Ian Lynagh <igloo@earth.li>**20060822163212]
741[FastString and StringBuffer need -funbox-strict-fields too
742Simon Marlow <simonmar@microsoft.com>**20060822143337
743 For the benefit of old GHCs that don't understand {-# UNPACK #-}
744]
745[minor fix to the clashing export error message
746Simon Marlow <simonmar@microsoft.com>**20060822112518
747 The ordering of items in the parsed export list is now correct, so we
748 have to compensate to get the right output again.
749]
750[findModule: add a fallthrough error case
751Simon Marlow <simonmar@microsoft.com>**20060822112409]
752[notes about which versions of GHC can be used to bootstrap
753Simon Marlow <simonmar@microsoft.com>**20060822093554]
754[disable .ident generation on darwin_TARGET_OS
755Simon Marlow <simonmar@microsoft.com>**20060822090349]
756[fix typo
757Simon Marlow <simonmar@microsoft.com>**20060822073731]
758[fixes to PPC version of cas(), from David Kirkman <dkirkman@gmail.com>
759Simon Marlow <simonmar@microsoft.com>**20060821153136
760 
761 From David's email:
762 The problem is that the inline assembler code was placing the result
763 of an operation in a register that is used as input later in the code.
764 At the bottom of this message I've extracted a short short code
765 fragment that you can run through gcc (on a powerpc machine) to see
766 the generated assembly output.
767 
768 The changes to fix the problem are fairly simple.  The first adds an
769 ampersand to the output list of the assembly fragment ("=r" (result)
770 --> "=&r" (result)) The ampersand just tells gcc that result can not
771 be placed in a register used for any of the input parameters (o, n, or
772 p).  Otherwise, it feels free to place output parameters in the same
773 registers used by the inputs -- but because of the flow of control
774 here we need everything in a distinct register.  This change fixes the
775 TVar program above.
776 
777 The second change adds a clobber list (the :"cc", "memory").  This
778 tells gcc that the condition code (due to the compare) and memory (due
779 to the store) might be changed during the asm execution.  The lack of
780 a clobber list did not seem to be causing any trouble, but without it
781 gcc is free to assume that no state is changed during the execution.
782]
783[Always use -funbox-strict-fields for Binary
784Simon Marlow <simonmar@microsoft.com>**20060821152111
785 For some reason this was only enabled when $(bootstrapped)=YES.  This
786 would be one reason why the stage1 compiler is slow.  I guess we'll
787 find out if anything goes wrong.
788]
789[disable automagic building of GHCi in stage1
790Simon Marlow <simonmar@microsoft.com>**20060821151957]
791[remove ancient file with incorrect information
792Simon Marlow <simonmar@microsoft.com>**20060821141946]
793[new option -a (append) for hasktags
794Martin Grabmueller <magr@cs.tu-berlin.de>**20060816091427]
795[ugly hack to cause ghc_boot_platform.h to be built before primops.txt
796Simon Marlow <simonmar@microsoft.com>**20060821120630]
797[add libraries/cgi and libraries/xhtml
798Simon Marlow <simonmar@microsoft.com>**20060821102908]
799[(temp) #814 - More flexible memory allocation in Windows
800Esa Ilari Vuokko <ei@vuokko.info>**20060820150720]
801[fix export/import list parsing (allow (,)), and remove unnecessary reverses
802Simon Marlow <simonmar@microsoft.com>**20060821102633]
803[comply with Haskell 98 by not allowing extra commas in import/export lists
804Simon Marlow <simonmar@microsoft.com>**20060821095912]
805[Missing stage1's in hc-build
806Ian Lynagh <igloo@earth.li>**20060821092226
807 Add mising stage1/ directories to object files touched by hc-build, and
808 give stage=1 as an argument to make install.
809]
810[remove spurious commas in imports
811Ross Paterson <ross@soi.city.ac.uk>**20060819173423]
812[whitespace cleanup only
813Ross Paterson <ross@soi.city.ac.uk>**20060818224014]
814[remove gcj libs from bin dist
815sof@galois.com**20060818214155]
816[I don't thing we want to add a call-context here; it just clutters the output
817simonpj@microsoft.com**20060818160729]
818[Avoid duplicate "In type ..." in error messages
819simonpj@microsoft.com**20060818160611]
820[Better pretty-printing for TvSubst
821simonpj@microsoft.com**20060818160551]
822[Fall over more gracefully when there's a Template Haskell error
823simonpj@microsoft.com**20060818110702
824 
825 For a long time, Template Haskell has fallen over in a very un-graceful
826 way (i.e. panic) even when it encounters a programmer error.  In particular,
827 when DsMeta converts HsSyn to TH syntax, it may find Haskell code that
828 TH does not understand. This should be reported as a normal programmer
829 error, not with a compiler panic!
830 
831 Originally the desugarer was supposed to never generate error
832 messages, but this TH desugaring thing does make it do so.  And in
833 fact, for other reasons, the desugarer now uses the TcRnIf monad, the
834 common monad used by the renamer, typechecker, interface checker, and
835 desugarer. 
836 
837 This patch completes the job, by
838  - allowing the desugarer to generate errors
839  - re-plumbing the error handling to take account of this
840  - making DsMeta use the new facilities to report error gracefully
841 
842 Quite a few lines of code are touched, but nothing deep is going on.
843 
844 Fixes Trac# 760.
845 
846]
847[Fix typo (fst --> head) in docs on implicit parameters
848simonpj@microsoft.com**20060818075937]
849[One last hs-boot update
850simonpj@microsoft.com**20060817134216]
851[Missing import for stage 2
852simonpj@microsoft.com**20060817133247]
853[One more hs-boot file
854simonpj@microsoft.com**20060817133220]
855[Refactoring for valid rule checking
856simonpj@microsoft.com**20060817130141]
857[Do not CSE in INLINE and NOINLINE things
858simonpj@microsoft.com**20060817130005
859 
860 See extensive comments with Note [INLINE and NOINLINE] in this file.
861 
862]
863[Update lhs-boot files
864simonpj@microsoft.com**20060817132003
865 
866 A consequence of my recent meddling with hs-boot files is that GHC is
867 more picky about the correpondence between the hs-boot file and the hs file.
868 In particular, you must use the same type synonyms.
869 
870 This patche fixes up GHC's own hs-boot files to match the restriction.
871 
872]
873[Add ad-hoc typing checks for tagToEnum#
874simonpj@microsoft.com**20060816203156
875 
876 The problem with tagToEnum# is that it is not overloaded (in the
877 Haskell sense) but you are only supposed to apply it to a TyCon
878 that is an enumeration (isEnumerationTyCon).
879 
880 The Real Way to do this is to have some special kind of type constraint
881 for the purpose, but that is wild overkill. So this patch adds a small
882 rather ad-hoc check to TcExpr.instFun.  Crude, simple, but it works fine.
883 
884 Fixes Trac #786
885 Test is tcfail164
886 
887]
888[Get dead-ness right in knownCon
889simonpj@microsoft.com**20060816164216]
890[Tuning for argToPat
891simonpj@microsoft.com**20060816164103
892 
893 argToPat is a crucial function for SpecConstr, because it decides
894 what patterns are worth specialising.  I was being much too gung-ho about
895 constants.  This patch makes it much better.
896 
897]
898[Re-factor mkAtomicArgs and completeNonRecX
899simonpj@microsoft.com**20060816163645
900 
901 This refactoring ensures that when mkAtomicArgs adds new bindings,
902 it does so using completeNonRecX, which adds unfoldings etc.  More
903 modular, and saves passes too.
904 
905 (This was important when getting rules to work right.  We want tob
906 fire a rule as soon as possible, taking into account all inlinings,
907 else a less-good rule applies.  That's what I found when doing
908 stream fusion anyway.)
909 
910 Regardless, this is an improvement.
911 
912]
913[Another try at the continuation-swapping stuff
914simonpj@microsoft.com**20060816105042
915 
916 I have spent altogether too long on my attempt to avoid case-of-case
917 in situations where it is a Bad Thing.  All the action is in the
918 case for mkDupableAlt that handles cases with a single alternative.
919 
920 I've added rather extensive comments, and it finally seems to be working
921 more or less right.  If you compile (say) GHC/Real.o you'll see quite a
922 few case-of-cases remain (which didn't happen before), and they mostly look
923 pretty sensible to me.
924 
925]
926[Don't build unnecessary lets in knownCon
927simonpj@microsoft.com**20060816104831
928 
929 Faced with
930        case x of y { (a,b) -> rhs }
931 
932 where x is bound to (c,d), we were generating
933       
934        let y = (c,d) in rhs
935 
936 and thenn hoping to get rid of the y binding by CSE or some such.  It's
937 better simply not to build it in the first place, by generating
938 
939        let y = x in rhs
940 
941 This patch does the job.
942 
943]
944[Comments only
945simonpj@microsoft.com**20060816104817]
946[Refactoring, plus record recursive-function *components* as RecArg too
947simonpj@microsoft.com**20060816085809]
948[Record constructor arg occs correctly (bug-fix)
949simonpj@microsoft.com**20060816085628
950 
951 I was forgetting the non-pattern-matched type args of a constructor.
952 
953]
954[Disable form-checking for rule LHSs
955simonpj@microsoft.com**20060816085612
956 
957 Previously we checked the form of the arguments of a RULE lhs, to
958 ensure that they were simple applications. There was no good reason
959 for that, save to prevent you writing LHSs that were unlikely to match.
960 
961 And Don Stewart found he wanted to do something we didn't allow (a section,
962 I think).  So I have just disabled the check.
963 
964]
965[Allow class and instance decls in hs-boot files
966simonpj@microsoft.com**20060815123402
967 
968 For some reason, in 6.5 the manual said you could put a class decl in
969 an interface file, but not an instance decl; whereas the implementation
970 was exactly the othe way round.
971 
972 This patch makes it possible to put *both* class and instance decls
973 in an interface file.
974 
975 I also did a bit of re-factoring; comparing the declarations in the
976 hs-boot and hs file is now done by converting to IfaceSyn, because we
977 have good comparison operations for IfaceSyn already implemented.
978 This fixed a bug that previously let through an inconsistent declaration
979 of a data type.
980 
981 The remaining infelicity concerns "abstract" TyCons.  They are a bit
982 of a hack anyway; and Classes are not handled in the same way.  Need
983 to think about this, but I think it's probably ok as it stands.
984 
985 
986]
987[Reject derivable type classes with higher-rank methods
988simonpj@microsoft.com**20060815075928
989 
990 Trac #864 suggested a derivable type class with a higher-rank method.
991 
992 In principle this is quite do-able, but in practice the mechanism works
993 by generating source code and then doing type inference.  To make this work
994 with higher-rank types would require impredicative polymorphism. And we
995 do have that, so it could probably be made to work by generating (source-level)
996 type annotations.  But it's real work, so I'm settling for generating a
997 decent error message rather than crashing.
998 
999 
1000]
1001[SpecConstr now specialises on constants and lambdas
1002simonpj@microsoft.com**20060815162605
1003 
1004 Roman inspired me to beef up SpecConstr to deal with
1005 a) constant arguments
1006 b) lambda arguments
1007 
1008 This is described in elaborate comments in the file:
1009        Note [Specialising for constant parameters]
1010        Note [Specialising for lambda parameters]
1011 
1012 I also took the opportunity to fix the usage analysis done by
1013 SpecConstr, which was only handling the top-level correctly.
1014 Now it does nesting too.
1015 
1016 
1017]
1018[Fix two bugs in rule-matching
1019simonpj@microsoft.com**20060815162030
1020 
1021 These two typo-like bugs have been there for a long time!
1022 
1023   One concerns the selection of overlapping rules,
1024   which was back to front
1025 
1026   The other was name-lining-up bug in the Case case of matching
1027 
1028 This patch also arranges to export matchN.
1029   (Not a good name, but still!)
1030 
1031 
1032]
1033[Moving list-length code from one place in the file to another
1034simonpj@microsoft.com**20060815161947]
1035[Make UniqSM into a proper monad
1036simonpj@microsoft.com**20060815161829]
1037[Typo in patch that dealt with duplicating continuations in Simplify
1038simonpj@microsoft.com**20060815070246]
1039[Be more conservative about duplicating continuations
1040simonpj@microsoft.com**20060814165424
1041 
1042 Roman found that GHC was duplicating continuations that arose (essentially)
1043 from uses of 'seq', or strict constructors.  This fixes the problem;
1044 see the comments mkDupableCont (the Select case with a single alternative).
1045 
1046 I'm a little concerned that this may also miss useful case-of-case
1047 tranformations, so I'd like to know if anyone finds that this patch
1048 makes performance worse.
1049 
1050 To make it a bit more gung-ho, one could check for all the binders
1051 being dead, before choosing this new, conservative alternative.
1052 
1053 
1054]
1055[Inline into tail-called constructor args
1056simonpj@microsoft.com**20060814165127
1057 
1058 Consider
1059        x = case y of { True -> (p,q); ... }
1060 
1061 The occurrence analyser was marking p,q as 'Many', because they args
1062 of a constructor in an RhsCtxt.  But actually they aren't in a RhsCtxt,
1063 and in this case it's better to inline.
1064 
1065]
1066[Improve exprIsCheap
1067simonpj@microsoft.com**20060814165043
1068 
1069 exprIsCheap is meant to return True iff it's ok to push the expression
1070 inside a lambda.  But the previous version would return True of a nested
1071 construtor application like (1:2:3:[]), which isn't right.
1072 
1073 This patch re-factors the code somewhat, and fixes the bug.
1074 
1075]
1076[Added xhtml and cgi as default libraries.
1077bringert@cs.chalmers.se**20060814113242]
1078[Improve error message in TcHsType
1079simonpj@microsoft.com**20060814095617
1080 
1081 Fixes Trac #863.
1082 Test is tcfail162
1083 
1084]
1085[Warning police: Removed overlapped pattern warnings
1086sven.panne@aedion.de**20060811151353]
1087[Complete -fmono-pat-binds patch
1088simonpj@microsoft.com**20060811142842
1089 
1090 When adding the experimental -fmono-pat-binds, I forgot to check
1091 for type signatures of the now-monomorphic patterns.  This patch
1092 completes the job.
1093 
1094 I documented the design too:
1095    http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/MonomorphicPatternBindings
1096 
1097]
1098[Avoid warning about overlapped pattern for Linux target
1099sven.panne@aedion.de**20060811140512]
1100[Improve error message layouts
1101simonpj@microsoft.com**20060811133317]
1102[Add type signature
1103simonpj@microsoft.com**20060811133302]
1104[Improve the "could not find module" error message
1105Simon Marlow <simonmar@microsoft.com>**20060811132135
1106 In particular, if we're searching for the profiling version of a
1107 module in another package, then suggest that perhaps it might not have
1108 been installed.
1109]
1110[On FreeBSD, use -lthr instead of -pthread for now (see comments)
1111Simon Marlow <simonmar@microsoft.com>**20060811113453]
1112[Two more error message indendations
1113simonpj@microsoft.com**20060811110435]
1114[Go back to calling type veriables t
1115simonpj@microsoft.com**20060811110412]
1116[Indent an error message
1117simonpj@microsoft.com**20060811110347]
1118[Improve error message (imported from Prelude at Implicit import declaration)
1119simonpj@microsoft.com**20060811110301]
1120[don't qualify module name for importedSrcLoc
1121Simon Marlow <simonmar@microsoft.com>**20060811101327]
1122[use "Defined in" rather than "Imported from" when printing ImportedSrcLoc
1123Simon Marlow <simonmar@microsoft.com>**20060811101159]
1124[Now that we have an "html" package, put the Haddock docs somewhere else
1125sven.panne@aedion.de**20060811092609]
1126[Nuked hschooks.h in favour of cutils.h, which has the prototypes we need
1127sven.panne@aedion.de**20060810154225]
1128[Match format strings and arguments for printf-like functions
1129sven.panne@aedion.de**20060810153624]
1130[Warning police: Make prototype for LDV_recordDead_FILL_SLOP_DYNAMIC visible
1131sven.panne@aedion.de**20060810144837]
1132[Warning police: Make strlen and friends known
1133sven.panne@aedion.de**20060810144729]
1134[Tweak GCC's inlining parameters to get thread_obj inlined
1135sven.panne@aedion.de**20060810144505]
1136[Add an IAmDead case to postInlineUnconditionally, and comments
1137simonpj@microsoft.com**20060810142034]
1138[Do not repeatedly simplify an argument more than once
1139simonpj@microsoft.com**20060810141526
1140 
1141 A very important invariant of the simplifier is that we do not simplify
1142 an arbitrarily large expression more than once in a single pass. If this
1143 can happen, then we can get exponential behaviour, when the large expression
1144 itself has a large sub-expression which is simplified twice, and so on.
1145 
1146 GHC has a long-standing bug which allows this repeated simplification to
1147 happen.  It shows up when we have a function like this
1148 
1149        f d BIG
1150 where f's unfolding looks like
1151        \x -> case x of (a,b) -> a
1152 Of course this is v common for overloaded functions.
1153 
1154 Before this patch we simplified all the args (d and BIG) before
1155 deciding to unfold f.  Then we push back the simplified BIG onto the
1156 continuation stack, inline f, so now we have
1157        (case d of (a,b) -> a) BIG
1158 After we reduce the case a bit, we'll simplify BIG a second time.  And
1159 that's the problem.
1160 
1161 The quick-and-dirty solution is to keep a flag in the ApplyTo continuation
1162 to say whather the arg has already been simplified.  An alternative would
1163 be to simplify it when first encountered, but that's a bigger change.
1164 
1165 
1166]
1167[Do not call preInlineUnconditionally in simplNonRecX
1168simonpj@microsoft.com**20060810141340
1169 
1170 This looks to me like a long-standing bug. simplNonRecX was calling
1171 preInlineUnconditionally, even though it was given an already-simplified
1172 expression.  Exponential behaviour beckons.
1173 
1174]
1175[Make postInlineUnconditaionally more conservative
1176simonpj@microsoft.com**20060810141145
1177 
1178 I'm being more paranoid about repeatedly simplifying things (to avoid
1179 exponential behaviour.)  postInlineUnconditionally looks as if it
1180 could repeated simplify the same expression; this patch stops it doing
1181 so.
1182 
1183 The extra lines are all comments!
1184 
1185 
1186]
1187[Control.Exception.unblock wasn't unblocking exceptions
1188Simon Marlow <simonmar@microsoft.com>**20060810132307]
1189[remove out of date comment
1190Simon Marlow <simonmar@microsoft.com>**20060810130154]
1191[move html before network, for now
1192Simon Marlow <simonmar@microsoft.com>**20060810121930]
1193[add html package
1194Simon Marlow <simonmar@microsoft.com>**20060810113719]
1195[Egregious bug in tcLHsConResTy
1196simonpj@microsoft.com**20060810120828
1197 
1198 This terrible bug in tcLHsConTy is pretty much guaranteed to show up
1199 on an program involving a GADT with more than one type parameter.
1200 
1201 This bug isn't present in the STABLE branch.
1202 
1203 Manuel: it is *not* necesary to merge this patch into the FC branch;
1204 just ignore it.
1205 
1206]
1207[Comments about improvements to SpecConstr
1208simonpj@microsoft.com**20060810120759]
1209[Remove HasBounds-instance and implement MArray.getBounds instead
1210Esa Ilari Vuokko <ei@vuokko.info>**20060809163012]
1211[Fix Array imports
1212Esa Ilari Vuokko <ei@vuokko.info>**20060809161341]
1213[Where we use $(GhcHcOpts), also add $(GhcStage1HcOpts)
1214Simon Marlow <simonmar@microsoft.com>**20060809144845
1215 This fixes building the compiler with -prof in $(GhcStage1HcOpts)
1216]
1217[fixes to the stage2 build following removal of old FFI syntax
1218Simon Marlow <simonmar@microsoft.com>**20060809143153]
1219[fix bug in task freeing
1220Simon Marlow <simonmar@microsoft.com>**20060809141225]
1221[add some more options to stage 2
1222Simon Marlow <simonmar@microsoft.com>**20060809141058]
1223[remove debugging code accidentally left in
1224Simon Marlow <simonmar@microsoft.com>**20060809102936]
1225[remember that old FFI syntax has been dropped
1226Simon Marlow <simonmar@microsoft.com>**20060809101655]
1227[only define GHCI if $(GhcWithInterpreter)=YES, also add -threaded
1228Simon Marlow <simonmar@microsoft.com>**20060809101634]
1229[move altzone test to base package
1230Ross Paterson <ross@soi.city.ac.uk>**20060809124215]
1231[remove unused FPTOOLS_CHECK_HTYPE macro
1232Ross Paterson <ross@soi.city.ac.uk>**20060809124036]
1233[Remove the artifical cap on the number of workers
1234Simon Marlow <simonmar@microsoft.com>**20060809095908
1235 See #805.  This was here to catch bugs that resulted in an infinite
1236 number of worker threads being created.  However, we can't put a
1237 reasonable bound on the number of worker threads, because legitimate
1238 programs may need to create large numbers of (probably blocked) worker
1239 threads.  Furthermore, the OS probably has a bound on the number of
1240 threads that a process can create in any case.
1241 
1242 
1243 
1244]
1245[Remove old FFI syntax
1246Simon Marlow <simonmar@microsoft.com>**20060809095201
1247 See #815
1248]
1249[make exit() overridable, for use in DLLs
1250Simon Marlow <simonmar@microsoft.com>**20060809092439
1251 See #753
1252]
1253[More fixes to pre-matching and pre-subsumption
1254simonpj@microsoft.com**20060808224924
1255 
1256 Actually this patch fixes two errors. one was a trivial typo in
1257 tha last patch (b_ty should be b_tau), which led to an infinite loop
1258 when compiling Data.Generic.Twins. 
1259 
1260 Fixing that revealed a more serious error in the same function.
1261 I was sloppy about dealing robsutly with name-capture for nested
1262 quantifiers in pre-subsumption and pre-matching; and sure enough
1263 I got bitten.  Sigh.  I think it is right now.
1264 
1265]
1266[Group exports so that all length functions are together; no semantic change
1267simonpj@microsoft.com**20060808224808]
1268[Check that lazy patterns are for lifted types
1269simonpj@microsoft.com**20060808135910
1270 
1271 A lazy pattern match must be for a lifted type. This is illegal:
1272 
1273        f x = case g x of
1274                 ~(# x,y #) -> ...
1275 
1276 This commit fixes the problem.  Trac #845, test is tcfail159
1277 
1278]
1279[Spelling in a comment
1280simonpj@microsoft.com**20060808123514]
1281[Remove srcSpanStartLine/srcSpanEndLine crash
1282simonpj@microsoft.com**20060808123211
1283 
1284 srcSpanStartLine/srcSpanEndLine panic on UnhelpfulLoc. They should not
1285 really be exported by SrcLoc at all, but unfortunately they are used in
1286 Lexer.x, which knows enough to avoid the panic.
1287 
1288 However the call in RnEnv didn't know, and the panic was triggered
1289 by Template Haskell spliced code.  This patch fixes it by exporting
1290 the predicate RnEnv wanted, namely isOneLineSpan.
1291 
1292]
1293[Replace deprecated AC_TRY_COMPILE macro with the reccomended replcament
1294Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060706114902
1295 See: http://www.gnu.org/software/autoconf/manual/html_node/Obsolete-Macros.html
1296]
1297[Add ghc and version number in .ident directive in NCG
1298Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060706114712
1299 Just because we can and because every other compiler does,
1300 lets stick in an identifier directive: .ident "GHC x.y.z"
1301 into the assembly output of the NCG.
1302]
1303[Support the GNU non-exec stack annotation system
1304Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060706114331
1305 On recent GNU ELF systems one can mark an object file as not
1306 requiring an executable stack. If all objects- linked into a
1307 program have this note then the program will not use an executable
1308 stack, which is good for security (and some distros have it as a
1309 QA policy). GHC generated code does not need an executable stack
1310 so add the note to the assembly output of the native code
1311 generator (conditional on a configure test).
1312]
1313[Complain more loudly if any of the hsc2hs phases fail
1314Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060703234356
1315 previously hsc2hs just exits with a non-zero exit code, now if any of
1316 the compilation, linking or runing phases fail then we get a message
1317 saying so and the failing command is printed.
1318]
1319[Remember to free() memory on exit
1320Simon Marlow <simonmar@microsoft.com>**20060808103110
1321 Patch mostly from Lennart Augustsson in #803, with additions to
1322 Task.c by me.
1323]
1324[Fix pre-subsumption and pre-matching
1325simonpj@microsoft.com**20060808091108
1326 
1327 The pre-subsuption and pre-matching functions should NEVER make bogus
1328 bindings of type variables, although they are free to bale out and make
1329 too few bindings.
1330 
1331 I hadn't been thiking carefully enough about this, and there were two
1332 separate bugs. 
1333 
1334 - Firstly, in pre-subsumption we must ignore the 'theta'
1335   part of any overloaded type. 
1336 
1337 - Second, in pre-matching, we must return the empty subustition
1338   on a mis-match, rather than returning the substitution so far.
1339 
1340 This bug showed up when compiling Data.Generics.Schemes.hs, and is
1341 imortalised in test tc206
1342 
1343]
1344[Improve error message
1345simonpj@microsoft.com**20060808080255
1346 
1347 Improve a little-used error message.  Given
1348        f :: a -> a
1349        f x y = e
1350 the error says
1351 
1352        The equations for f have two arguments
1353        but its type `a -> a' has only one
1354 
1355 (Before, it said "its type `a' has only one" which is bogus.
1356 
1357]
1358[Pull out common removal code, and detect does-not-exist correctly
1359Ian Lynagh <igloo@earth.li>**20060710214308]
1360[Create our own directory in the temporary directory to avoid various races
1361Ian Lynagh <igloo@earth.li>**20060710204424]
1362[Merge SysTools import declarations
1363Ian Lynagh <igloo@earth.li>**20060709183850]
1364[Don't freeze the dynamic flags used for filename generation before the pipeline starts
1365Ian Lynagh <igloo@earth.li>**20060709145101]
1366[#807: Removed double fclose of prof_file
1367Ian Lynagh <igloo@earth.li>**20060708152424
1368 prof_file was being fclose'd in both gen_XML_logfile and hs_exit, leading
1369 to glibc complaining of a double free.
1370]
1371[Add -fextended-default-rules and -fmono-pat-binds
1372simonpj@microsoft.com**20060807112107
1373 
1374 Add -fextended-deafult-rules (in response to Don Stewart's message below),
1375 and document them.
1376 
1377 Also doucument -fmono-pat-binds/-fno-mono-pat-binds, which has been in
1378 GHC a few weeks now.
1379 
1380 (The two are in one patch because the diffs were so close together
1381 that Darcs combined them.)
1382 
1383 Simon
1384 
1385 
1386 From: Donald Bruce Stewart [mailto:dons@cse.unsw.edu.au]
1387 Sent: 07 August 2006 10:52
1388 
1389 While we're thinking about defaulting, I have a question..
1390 
1391 ghci uses an extended defaulting system, to allow things like:
1392         Prelude> reverse []
1393         []
1394 to work, and to have the right instance of Show found. The manual says:
1395 
1396     "..it is tiresome for the user to have to specify the type, so GHCi extends
1397     Haskell's type-defaulting rules (Section 4.3.4 of the Haskell 98 Report
1398     (Revised)) as follows. If the expression yields a set of type constraints
1399     that are all from standard classes (Num, Eq etc.), and at least one is
1400     either a numeric class or the Show, Eq, or Ord class, GHCi will try to use
1401     one of the default types, just as described in the Report. The standard
1402     defaulting rules require that one of the classes is numeric; the difference
1403     here is that defaulting is also triggered at least one is Show, Eq, or Ord."
1404 
1405 Currently, there is no way to get at this "extended" defaulting for compiled
1406 modules. However, I have a use case for in fact doing this.
1407 
1408 With runtime evaluated Haskell, embedding 'interpreters' (over hs-plugins) is
1409 easy. lambdabot, for example, implements a sandboxed haskell eval system. But
1410 it doesn't have access to the defaulting mechanism of ghci, so we have:
1411 
1412     dons:: > reverse []
1413     lambdabot:: Add a type signature
1414     dons:: > reverse [] :: [()]
1415     lambdabot:: []
1416 
1417 Which is annoying -- newbies wonder why they have to add these extra
1418 constraints to get a Show instance.
1419 
1420 I'm wondering, since the extended defaulting mechanisms are already
1421 implemented, could they be made available to compiled modules as well,
1422 perhaps using a flag, -fextended-defaulting?
1423 
1424]
1425[add a comment
1426Simon Marlow <simonmar@microsoft.com>**20060807143102]
1427[Do pre-subsumption in the main subsumption check
1428simonpj@microsoft.com**20060804214942
1429 
1430 This patch improves the subsumption check (in TcUnify.tc_sub) so that
1431 it does pre-subsumption first.  The key code is in the case with
1432 guard (isSigmaTy actual_ty); note the new call to preSubType.
1433 
1434 Shorn of details, the question is this.  Should this hold?
1435 
1436        forall a. a->a   <=   Int -> (forall b. Int)
1437 
1438 Really, it should; just instantiate 'a' to Int.  This is just what
1439 the pre-subsumption phase (which used in function applications),
1440 will do.
1441 
1442 I did a bit of refactoring to achieve this.
1443 
1444 Fixes Trac #821.  Test tc205 tests.
1445 
1446]
1447[Make unification robust to a boxy type variable meeting itself
1448simonpj@microsoft.com**20060801214302
1449 
1450 Previously, the implicit assumption in unification is that a boxy
1451 type variable could never occur on both sides of the unification,
1452 so that we'd never find
1453        bx5 :=: bx5
1454 
1455 But the pre-subsumption stuff really means that the same variable
1456 can occur on both sides.  Consider
1457        forall a. a->Int <= bx5->Int
1458 Then pre-subumption will find a->bx5; and the full subsumption step
1459 will find bx5:=bx5.
1460 
1461 However, I think there is still no possiblity of a full occurs-check
1462 failure; that is,
1463        bx5 :=: Tree bx5
1464 Although I can't quite see how to prove it!  So I've added a
1465 DEBUG test in uMetaVar to check for this case.
1466 
1467]
1468[Added cabal-setup
1469sven.panne@aedion.de**20060804142149]
1470[Don't include the package name in a cost centre's module name
1471Simon Marlow <simonmar@microsoft.com>**20060803093337
1472 This is mainly to restore the old behaviour, but also we shouldn't
1473 normally need the package name in a cost centre because only the
1474 "main" package normally has cost centres.
1475]
1476[Add a new section "Getting the Source" to both HACKING and README. But what about win32 users?
1477shae@ScannedInAvian.com**20060720152929]
1478[savingOldConfig: add Exception.block for extra paranoia
1479Simon Marlow <simonmar@microsoft.com>**20060801131027
1480 
1481]
1482[Refactor ghc-pkg
1483Ian Lynagh <igloo@earth.li>**20060729192946
1484 This patch fixes a couple of issues with the
1485     Be lazier in user config creation, and don't fail on missing configs.
1486 patch. It puts the createDirectoryIfMissing back in and removes assumptions
1487 that the package.conf file already exists.
1488]
1489[No functionality changes
1490Ian Lynagh <igloo@earth.li>**20060730105256
1491 Consistently used spaces rather than tabs.
1492 Removed trailing whitespace.
1493 Wrapped comments to fit in a standard terminal.
1494]
1495[Add notes about unsafeCoerce
1496simonpj@microsoft.com**20060731080922]
1497[.hi-boot-5 is obsolete; the earliest GHC we support uses .hi-boot-6
1498Simon Marlow <simonmar@microsoft.com>**20060728140809
1499 
1500 
1501]
1502[update to match .lhs-boot
1503Simon Marlow <simonmar@microsoft.com>**20060728140607]
1504[get ReadP from the right place.
1505Simon Marlow <simonmar@microsoft.com>**20060728140444
1506 
1507]
1508[Improve error message for deriving
1509simonpj@microsoft.com**20060727160832]
1510[Lazy patterns are like wild-cards for overlap warnings
1511simonpj@microsoft.com**20060727155009
1512 
1513        MERGE TO STABLE
1514 
1515 Fixes Trac #827
1516 Test is should_compiler/ds058
1517 
1518]
1519[fix some problems with wired-in packages
1520Simon Marlow <simonmar@microsoft.com>**20060727153802]
1521[oops, remove old packages when updating
1522Simon Marlow <simonmar@microsoft.com>**20060727150650]
1523[fix symbols for GHC.PrimopWrappers
1524Simon Marlow <simonmar@microsoft.com>**20060727134755]
1525[a couple more symbols need package names
1526Simon Marlow <simonmar@microsoft.com>**20060727102129]
1527[Add missing import
1528simonpj@microsoft.com**20060727085605]
1529[Make -fcontext-stack into a dynamic flag
1530simonpj@microsoft.com**20060727080422
1531 
1532   This allows you to put -fcontext-stack into an options pragma,
1533   as requested by Trac #829
1534   
1535   While I was at it, I added OptIntPrefix to the forms allowed
1536   in CmdLineParser.
1537 
1538]
1539[Deal correctly with infix type constructors in GADT decls
1540simonpj@microsoft.com**20060726225304]
1541[Improve pretty printing of ConDecl
1542simonpj@microsoft.com**20060726225223]
1543[fix parse error (merge-o, I think)
1544Simon Marlow <simonmar@microsoft.com>**20060726103526]
1545[fix DEBUG build
1546Simon Marlow <simonmar@microsoft.com>**20060726103433]
1547[missed one symbol that needs a package name
1548Simon Marlow <simonmar@microsoft.com>**20060726085844]
1549[change wired-in Haskell symbols to include the package name
1550Simon Marlow <simonmar@microsoft.com>**20060726084659]
1551[Unbox the Unique stored in a Name
1552Simon Marlow <simonmar@microsoft.com>**20060725141747
1553 I measured that this makes the comiler allocate a bit more, but it
1554 might also make it faster and reduce residency.  The extra allocation
1555 is probably just because we're not inlining enough somewhere, so I
1556 think this change is a step in the right direction.
1557]
1558[optimisations to newUnique
1559Simon Marlow <simonmar@microsoft.com>**20060725140816
1560 
1561 It turned out that newUnique was wasting one node of the splittable
1562 uniq supply per invocation: it took the current supply, split it, used
1563 the unique from one half and stored the other half in the monad.  In
1564 other words, the unique in the supply stored in the monad was never
1565 used. 
1566 
1567 This optimisation fixes that and adds a bit of strictness, which
1568 together lead to small reduction in allocations by the compiler, and
1569 possibly an improvement in residency (hard to tell for sure when GCs
1570 move around).
1571]
1572[tiny bit of extra strictness
1573Simon Marlow <simonmar@microsoft.com>**20060725131201]
1574[Make a SplitUniqSupply contain an Int# rather than an Int
1575Simon Marlow <simonmar@microsoft.com>**20060725120252
1576 The I# constructor is always removed when we make a unique later
1577 anyway, so this just saves a bit of time and allocation.
1578]
1579[Use -package-name rather than -ignore-package
1580Simon Marlow <simonmar@microsoft.com>**20060725130913]
1581[Remove most of the conflict checking and auto-hiding
1582Simon Marlow <simonmar@microsoft.com>**20060725130850
1583 Now that the module restriction has been lifted, the auto-hiding is
1584 mostly not required.  GHC itself automatically hides old versions of a
1585 package.
1586]
1587[Generalise Package Support
1588Simon Marlow <simonmar@microsoft.com>**20060725130154
1589 
1590 This patch pushes through one fundamental change: a module is now
1591 identified by the pair of its package and module name, whereas
1592 previously it was identified by its module name alone.  This means
1593 that now a program can contain multiple modules with the same name, as
1594 long as they belong to different packages.
1595 
1596 This is a language change - the Haskell report says nothing about
1597 packages, but it is now necessary to understand packages in order to
1598 understand GHC's module system.  For example, a type T from module M
1599 in package P is different from a type T from module M in package Q.
1600 Previously this wasn't an issue because there could only be a single
1601 module M in the program.
1602 
1603 The "module restriction" on combining packages has therefore been
1604 lifted, and a program can contain multiple versions of the same
1605 package.
1606 
1607 Note that none of the proposed syntax changes have yet been
1608 implemented, but the architecture is geared towards supporting import
1609 declarations qualified by package name, and that is probably the next
1610 step.
1611 
1612 It is now necessary to specify the package name when compiling a
1613 package, using the -package-name flag (which has been un-deprecated).
1614 Fortunately Cabal still uses -package-name.
1615 
1616 Certain packages are "wired in".  Currently the wired-in packages are:
1617 base, haskell98, template-haskell and rts, and are always referred to
1618 by these versionless names.  Other packages are referred to with full
1619 package IDs (eg. "network-1.0").  This is because the compiler needs
1620 to refer to entities in the wired-in packages, and we didn't want to
1621 bake the version of these packages into the comiler.  It's conceivable
1622 that someone might want to upgrade the base package independently of
1623 GHC.
1624 
1625 Internal changes:
1626 
1627   - There are two module-related types:
1628 
1629         ModuleName      just a FastString, the name of a module
1630         Module          a pair of a PackageId and ModuleName
1631 
1632     A mapping from ModuleName can be a UniqFM, but a mapping from Module
1633     must be a FiniteMap (we provide it as ModuleEnv).
1634 
1635   - The "HomeModules" type that was passed around the compiler is now
1636     gone, replaced in most cases by the current package name which is
1637     contained in DynFlags.  We can tell whether a Module comes from the
1638     current package by comparing its package name against the current
1639     package.
1640 
1641   - While I was here, I changed PrintUnqual to be a little more useful:
1642     it now returns the ModuleName that the identifier should be qualified
1643     with according to the current scope, rather than its original
1644     module.  Also, PrintUnqual tells whether to qualify module names with
1645     package names (currently unused).
1646 
1647 Docs to follow.
1648]
1649[comment formatting
1650Simon Marlow <simonmar@microsoft.com>**20060725110519
1651 
1652]
1653[unused import
1654Simon Marlow <simonmar@microsoft.com>**20060706141349]
1655[unused import
1656Simon Marlow <simonmar@microsoft.com>**20060706141205]
1657[remove more Addr bits
1658Simon Marlow <simonmar@microsoft.com>**20060704151217]
1659[unused import
1660Simon Marlow <simonmar@microsoft.com>**20060704141319]
1661[add default cases
1662Simon Marlow <simonmar@microsoft.com>**20060704135444]
1663[redundant import
1664Simon Marlow <simonmar@microsoft.com>**20060704135435]
1665[unused imports
1666Simon Marlow <simonmar@microsoft.com>**20060704135117]
1667[unused import
1668Simon Marlow <simonmar@microsoft.com>**20060704134557]
1669[remove unused bits, mostly to do with the Addr type
1670Simon Marlow <simonmar@microsoft.com>**20060704124912]
1671[In interface files, store FastStrings rather than OccNames where possible
1672Simon Marlow <simonmar@microsoft.com>**20060724154826
1673 In all cases the namespace is known from the context, so this saves 1
1674 byte per variable binding/occurrence (a few percent per iface file).
1675]
1676[Add -fmono-pat-binds, and make it the default
1677simonpj@microsoft.com**20060722102245
1678 
1679 In Haskell 98, pattern bindings are generalised.  Thus in
1680        (f,g) = (\x->x, \y->y)
1681 both f and g will get polymorphic types.  I have become convinced
1682 that generalisation for pattern-bound variables is just a bridge
1683 toof far. It is (I claim) almost never needed, and it adds significant
1684 complication.  (All the more so if we add bang patterns.)
1685 
1686 So the flag -fmono-pat-binds switches off generalisation for pattern
1687 bindings.  (A single variable is treated as a degnerate funtction
1688 binding.) 
1689 
1690 Furthremore, as an experiment, I'm making it the default.  I want
1691 to see how many progarms fail with monomorphic pattern bindings.
1692 
1693 You can recover the standard behaviour with -fno-mono-pa-binds.
1694 
1695]
1696[Fix RULES lossage
1697simonpj@microsoft.com**20060722101756
1698 
1699 Don Stewart and Duncan Coutts encountered the following situation.
1700        f = <rhs>
1701        {-# RULES f ... #-}
1702 where f is not exported, but appears in the inlinings of other
1703 functions that are exported.  Then what happened was that the desugarer
1704 produced this:
1705        M.f = f
1706        f = <rhs>
1707 where the rules get attached to the M.f. But since M.f's RHS is trivial
1708 (just f) it was unconditionally inlinined at all its call sites,
1709 thereby losing the RULES attached to it.
1710 
1711 This *is* a fragile aspect of rules. However this fix solves the
1712 problem by instead generating
1713        f = M.f
1714        M.f = <rhs>
1715 
1716 A pretty small chanage to the desugarer does the job.  It still feels
1717 a little fragile, bt it's certainly more robust than before.
1718 
1719]
1720[Fix broken regex
1721Simon Marlow <simonmar@microsoft.com>**20060721111144
1722 Don't know how I managed to use this before... maybe a different regex
1723 library.
1724]
1725[fix bug in sample code
1726Simon Marlow <simonmar@microsoft.com>**20060721083200]
1727[fix eran error message by reordering a couple of tests
1728simonmar@microsoft.com**20060719111638]
1729[Use a recursive error handler in case the exception causes more exceptions.
1730Lemmih <lemmih@gmail.com>**20060717232553]
1731[Check for overlap-flag differences in hi files
1732simonpj@microsoft.com**20060714163843
1733 
1734        MERGE TO STABLE
1735 
1736 I'd forgotten to compare the per-instance overlap flag when
1737 comparing interface files, and that meant that consequential
1738 recompilations weren't being triggered when the only change
1739 was to add -fallow-overlapping-instances
1740 
1741 Fixes Trac bug #824
1742 
1743 
1744]
1745[Add a clarification about overlapping instances in the manual
1746simonpj@microsoft.com**20060714143220]
1747[Comments and import trimming
1748simonpj@microsoft.com**20060712153306]
1749[Experimental flag -fdicts-cheap
1750simonpj@microsoft.com**20060712153204
1751 
1752 This experimental flag, -fdicts-cheap, makes a let-binding that bind a
1753 value of dictionary type look cheap.  That in turn leads to more
1754 eta expansion.  Instead of
1755        f = /\a. \(d1:Ord a). let d2:Ord [a] = dfOrd a d1 in
1756                  \(x:a). <stuff>
1757 which has arity 1, you get
1758        f = /\a. \(d1:Ord a). \(x:a).
1759                 let d2:Ord [a] = dfOrd a d1 in <stuff>
1760 Now f has arity 2.
1761 
1762 This can cretainly waste dictionary-construction work, if f is
1763 partially applied to its dictionary argument.  However it has knock-on
1764 effects.  Because f has arity 2, we won't float (f Int d) out of
1765        \x. h (f Int d)
1766 Floating f out of this lambda makes it impossible for an h/f fusion
1767 rule to fire; and this unexpected loss of RULE application was the
1768 immediate reason for implementing this flag. (Roman Leshchinskiy came
1769 across this when working on array fusion.)
1770 
1771 
1772 I've implemented the change only in CoreUtils.arityType, which
1773 only affects eta expansion.  I thought of putting the change in
1774 exprIsCheap, which is a more systematic place (the former calls
1775 the latter) but
1776 
1777        a) I wanted this under flag control, and the flags
1778        are not readily available to all callers of exprIsCheap
1779 
1780        b) I'm not 100% convinced that this change is a good
1781        idea, so it's reasonable to do the narrowest change
1782        that solves the immediate problem.
1783]
1784[document that -fglasgow-exts is needed for RULES to work
1785Malcolm.Wallace@cs.york.ac.uk**20060712093907]
1786[do a better job of ignoring unrecognised pragmas
1787Simon Marlow <simonmar@microsoft.com>**20060712083550]
1788[Don't z-encode module names in external-core output
1789Jan Rochel <jan.rochel@stud.uka.de>**20060706131109]
1790[re-add -fvia-C
1791Simon Marlow <simonmar@microsoft.com>**20060710081522
1792 There are still some fixes required to get the threaded RTS compilable
1793 with the NCG, and apparently there are problems on 32-bit archs too.
1794 
1795]
1796[Be lazier in user config creation, and don't fail on missing configs.
1797Ian Lynagh <igloo@earth.li>**20060624230800]
1798[Z-Encode external-core output
1799Jan Rochel <jan.rochel@stud.uka.de>**20060702214438
1800 
1801 HEAD doesn't z-encode external-core output (unlike 6.4). I suppose, that
1802 this is unwanted behaviour. It probably results from this patch:
1803 
1804 ========================================================================
1805 Fri Jan  6 17:30:19 CET 2006  simonmar
1806   * [project @ 2006-01-06 16:30:17 by simonmar]
1807   Add support for UTF-8 source files
1808 
1809 [...]   
1810 
1811 Z-encoding has been moved right to the back end.  Previously we
1812 used to Z-encode every identifier on the way in for simplicity,
1813 and only decode when we needed to show something to the user.
1814 Instead, we now keep every string in its UTF-8 encoding, and
1815 Z-encode right before printing it out.
1816 
1817 [...]
1818 ========================================================================
1819 
1820 Greetings
1821 Jan
1822]
1823[Add %local-tag to external core output
1824Jan Rochel <jan.rochel@stud.uka.de>**20060702204559
1825 
1826 Hello, this is my first patch contributed to GHC. If there are any
1827 inadequacies about it (maybe like this introductory disclaimer), please
1828 let me know about it.
1829 
1830 So, the need for this patch arose, while I was involved with processing
1831 hcr files (external core output) and I noticed, that the output didn't
1832 fully conform to the specification [1].
1833 No %local-tags were used, which turned out to be a real nuisance as it
1834 was not possible to determine which VDEFs can be erased in a further
1835 optimization process and which ones are exported by the module.
1836 
1837 Since the specification does not define the meaning of the %local-tag, I
1838 assume, it makes sense, that it tags all functions, that are not
1839 exported by the module.
1840 
1841 The patch does not fully comply to the specification, as in my
1842 implementation a local tag may appear before a VDEF but not before a
1843 VDEFG.
1844 
1845 [1] An External Representation for the GHC Core Language
1846     (DRAFT for GHC5.02), page 3, line 1
1847 
1848 Greetings
1849 Jan
1850]
1851[Remove bashisms from darcs-all
1852Alec Berryman <alec@thened.net>**20060703012911
1853 
1854 darcs-all may now be run with any POSIX-compatible /bin/sh.
1855]
1856[Fix for warning message (bug #812)
1857Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060704163413
1858 say "{-# SOURCE #-}" rather than "{- SOURCE -}" in warning message.
1859 Fixes http://hackage.haskell.org/trac/ghc/ticket/812
1860]
1861[The dict-bindings in an IPBinds need not be in dependency order
1862simonpj@microsoft.com**20060703151517
1863 
1864 This appears to be a long-standing bug, discovered by BlueSpec
1865 (ravi@bluespec.com), Trac bug #795
1866 
1867 The problem was that in an IP binding group, the dict bindings
1868 aren't necessarily in dependency order; and if they aren't
1869 we get a core-lint error.
1870 
1871 Test tc203 checks this case.  (Though whether it shows up at
1872 all depends a bit on accidental factors of binding ordering.)
1873 
1874]
1875[x86 needs -fno-unit-at-a-time too
1876Simon Marlow <simonmar@microsoft.com>**20060704083308
1877 Fixes #809
1878]
1879[x86-64: fix a problem exposed by negative offsets in vector tables
1880Simon Marlow <simonmar@microsoft.com>**20060629140608
1881 static relative offsets (eg .long l1-l2) are restricted to 32 bits on
1882 x86-64 due to lack of support in the linker.  The codegen, NCG and
1883 runtime work around this, using 32-bit offsets instead of 64.
1884 However, we were missing a workaround for vector tables, and it
1885 happened to work by accident because the offsets were always positive
1886 and resolved by the assembler.  The bug was exposed by using the NCG
1887 to compile the RTS, where the offsets became negative, again by
1888 accident.
1889]
1890[No longer force -fvia-C for the RTS, it can now be compiled with the NCG
1891Simon Marlow <simonmar@microsoft.com>**20060629135836]
1892[Replace inline C functions with C-- macros in .cmm code
1893Simon Marlow <simonmar@microsoft.com>**20060629134726
1894 So that we can build the RTS with the NCG.
1895]
1896[remove conditionals from definition of StgRegTable
1897Simon Marlow <simonmar@microsoft.com>**20060629134405
1898 so that we can calculate deterministic offsets to some of the fields
1899 of Capability.
1900]
1901[mpz_foo() functions are really called __gmpz_foo() in GMP
1902Simon Marlow <simonmar@microsoft.com>**20060629122217
1903 gmp.h #defines mpz_foo to __gmpz_foo, so the real ABI is __gmpz_foo,
1904 so that is what we must invoke in order to be portable here.
1905 Similarly for mpn --> __gmpn.
1906]
1907[use the new "prim %write_barrier()" in .cmm instead of calls to wb()
1908Simon Marlow <simonmar@microsoft.com>**20060629120526]
1909[fix some problems with the fixup block code
1910Simon Marlow <simonmar@microsoft.com>**20060629120210
1911 We weren't handling InBoth properly.  InBoth needs to be expanded to
1912 appropriate InReg/InMem locations *before* building the interference
1913 graph, otherwise an InBoth will not be seen to conflict with other
1914 InReg/InMem locations.
1915]
1916[small optimisation: eliminate more register-to-register moves
1917Simon Marlow <simonmar@microsoft.com>**20060629120029]
1918[new syntax: "prim %OP (args)"  for using CallishMachOps in .cmm
1919Simon Marlow <simonmar@microsoft.com>**20060629115949
1920 
1921 
1922]
1923[add MO_WriteBarrier to CallishMachOps
1924Simon Marlow <simonmar@microsoft.com>**20060629115837
1925 This will let us express write barriers in C--
1926]
1927[Use -fno-strict-aliasing for *all* C files in the runtime
1928Simon Marlow <simonmar@microsoft.com>**20060629082902
1929 as a precautionary measure.  It is definitely required for GC.c,
1930 but it may well become necessary for other files in the future due to
1931 our (mis-)use of the C "type system".
1932]
1933[the unlifted kind
1934Simon Marlow <simonmar@microsoft.com>**20060623152626]
1935[fix a lint-o
1936Simon Marlow <simonmar@microsoft.com>**20060620151901]
1937[fix sloppy conditionals
1938Simon Marlow <simonmar@microsoft.com>**20060620151758]
1939[fix sloppy conditionals
1940Simon Marlow <simonmar@microsoft.com>**20060620151039]
1941[fix a few sloppy conditionals caught by new test in CmmLint
1942Simon Marlow <simonmar@microsoft.com>**20060620150618]
1943[flattenCgStmts: fix a case of empty code blocks being generated
1944Simon Marlow <simonmar@microsoft.com>**20060620150520]
1945[improve a panic message
1946Simon Marlow <simonmar@microsoft.com>**20060620141219]
1947[check that the argument to CmmCondBranch is really a conditional
1948Simon Marlow <simonmar@microsoft.com>**20060620141204]
1949[Generate a new unique for each label
1950Simon Marlow <simonmar@microsoft.com>**20060620140106]
1951[Remove long-redundant FieldLabel.lhs
1952simonpj@microsoft.com**20060629105321]
1953[Add comments to SpecConstr
1954simonpj@microsoft.com**20060627161520]
1955[fix up slop-overwriting for THUNK_SELECTORS in DEBUG mode
1956Simon Marlow <simonmar@microsoft.com>**20060627123951]
1957[Make SpecConstr work better for nested functions
1958simonpj@microsoft.com**20060627094742
1959 
1960 In SpecConstr.scBind, we should pass the optimised body (body') to
1961 specialise, not the un-optimised one. In this way we'll benefit from
1962 specialising any nested functions inside body.
1963 
1964 Discovered by Roman.
1965 
1966]
1967[More SpecConstr tuning
1968simonpj@microsoft.com**20060626201709
1969 
1970 For some reason, SpecConstr wasn't taking account of let-bound constructors:
1971        let v = Just 4
1972        in ...(f v)...
1973 
1974 Now it does.  An easy fix fortunately.
1975 
1976]
1977[Improve consistency checking for derived instances
1978simonpj@microsoft.com**20060626100034
1979 
1980 This patch arranges that derived instances use the same instance-decl
1981 checking code as user-defined instances.  That gives greater consistency
1982 in error messages.
1983 
1984 Furthermore, the error description if this consistency check fails is now
1985 much more explicit.  For example, drvfail003 now says
1986      Variable occurs more often in a constraint than in the instance head
1987        in the constraint: Show (v (v a))
1988      (Use -fallow-undecidable-instances to permit this)
1989      In the derived instance
1990        instance (Show (v (v a))) => Show (Square_ v w a)
1991 
1992]
1993[Slight improvement in TH error reporting
1994simonpj@microsoft.com**20060626095952]
1995[Improve location info when typechecking interface fiels
1996simonpj@microsoft.com**20060614114813]
1997[Fix a bug in the pretty printing of class declarations
1998davve@dtek.chalmers.se**20060625160826]
1999[Improve RULE matching a bit more
2000simonpj@microsoft.com**20060624160421
2001 
2002 Consider this example (provided by Roman)
2003 
2004        foo :: Int -> Maybe Int -> Int
2005        foo 0 (Just n) = n
2006        foo m (Just n) = foo (m-n) (Just n)
2007 
2008 SpecConstr sees this fragment:
2009 
2010        case w_smT of wild_Xf [Just A] {
2011          Data.Maybe.Nothing -> lvl_smf;
2012          Data.Maybe.Just n_acT [Just S(L)] ->
2013            case n_acT of wild1_ams [Just A] { GHC.Base.I# y_amr [Just L] ->
2014            $wfoo_smW (GHC.Prim.-# ds_Xmb y_amr) wild_Xf
2015            }};
2016 
2017 and correctly generates the rule
2018 
2019        RULES: "SC:$wfoo1" [0] __forall {y_amr [Just L] :: GHC.Prim.Int#
2020                                          sc_snn :: GHC.Prim.Int#}
2021          $wfoo_smW sc_snn (Data.Maybe.Just @ GHC.Base.Int (GHC.Base.I# y_amr))
2022          = $s$wfoo_sno y_amr sc_snn ;]
2023 
2024 BUT we must ensure that this rule matches in the original function!
2025 Note that the call to $wfoo is
2026            $wfoo_smW (GHC.Prim.-# ds_Xmb y_amr) wild_Xf
2027 
2028 During matching we expand wild_Xf to (Just n_acT).  But then we must also
2029 expand n_acT to (I# y_amr).  And we can only do that if we look up n_acT
2030 in the in-scope set, because in wild_Xf's unfolding it won't have an unfolding
2031 at all.
2032 
2033 Happily, fixing the bug is easy: add a call to 'lookupRnInScope' in the
2034 (Var v2) case of 'match'.
2035 
2036]
2037[--enable-src-tree-haddock and friends are no longer required
2038Simon Marlow <simonmar@microsoft.com>**20060623113303
2039 Happy, Alex and Haddock are built separately using Cabal now.
2040]
2041[fix a couple of bugs in markSparkQueue (#799)
2042Simon Marlow <simonmar@microsoft.com>**20060623092044]
2043[pull in STABLE(!) tweaks
2044sof@galois.com**20060622202734]
2045[fix for when path to GHC contains spaces, from #695
2046Simon Marlow <simonmar@microsoft.com>**20060622131700]
2047[Comment only
2048simonpj@microsoft.com**20060621223940]
2049[Transfer INLINE to specialised functions
2050simonpj@microsoft.com**20060621223637
2051 
2052 When the Specialise pass generates a specialised copy of a function,
2053 it should transfer the INLINE information to the specialised function.
2054 Otherwise, whether or not the INLNE happens can depend on whether
2055 specialisation happens, which seems wrong.  See Note [Inline specialisation]
2056 in Specialise.lhs
2057 
2058 Here's the example Roman reported
2059 
2060     primWriteMU :: UAE e => MUArr e s -> Int -> e -> ST s ()
2061     {-# INLINE primWriteMU #-}
2062     primWriteMU = writeMBU . unMUAPrim
2063     ------
2064     
2065     The problem is that primWriteMU doesn't get inlined *sometimes*, which
2066     results in code like
2067     
2068     case Data.Array.Parallel.Unlifted.Flat.UArr.$sprimWriteMU
2069            @ s11_X1nJ
2070            marr_s25s
2071            (GHC.Base.I# sc_s27F)
2072            GHC.Base.False
2073            new_s_a1Db
2074            of wild3_a1Dd { (# new_s1_X1F9, r_a1Dc #) -> ...
2075 
2076 Note the fact that we have a call to the *specialised* $sprimWriteMU.
2077 
2078]
2079[Arity and eta-expansion tuning
2080simonpj@microsoft.com**20060621205855
2081 
2082 Roman found that
2083     loop :: STRef s a -> Int -> ST s Int
2084     loop ref n = case n of
2085                    0 -> return n
2086                    n -> loop ref (n-1)
2087 wasn't eta-expanding nicely, despite the 'state hack'
2088 (see Id.isStateHackType).  The reason was two-fold:
2089 
2090   a) a bug in CoreUtils.arityType (the Var case)
2091 
2092   b) the arity of a recursive function was not being
2093        exposed in its RHS (see commments with
2094        SimplEnv.addLetIdInfo
2095 
2096 The commit fixes both. 
2097 
2098]
2099[documentation for TH w/ profiling
2100Simon Marlow <simonmar@microsoft.com>**20060621112523]
2101[Allow Template Haskell to be used with -prof
2102Simon Marlow <simonmar@microsoft.com>**20060621110436
2103 
2104 In order for this to work, you need to build the program first in the
2105 normal way (without -prof), and then again with -prof and a suitable
2106 -osuf (eg. -osuf p_o).  The compiler will pick up the object files
2107 from the normal way for running TH expressions, when it sees -prof
2108 together with -osuf.  If you omit the -osuf, you get an error message:
2109 
2110 TH_genEx.hs:12:2:
2111     Dynamic linking required, but this is a non-standard build (eg. prof).
2112     You need to build the program twice: once the normal way, and then
2113     in the desired way using -osuf to set the object file suffix.
2114 
2115 If you use -osuf, but haven't built the program the normal way first,
2116 then you see:
2117 
2118 TH_genEx.hs:12:2:
2119     cannot find normal object file `TH_genExLib.o'
2120     while linking an interpreted expression
2121 
2122 Documentation to follow.
2123 
2124 Fixes: #651
2125]
2126[add decl for stg_block_throwto_ret
2127Simon Marlow <simonmar@microsoft.com>**20060620083410]
2128[comment out a non-true assertion
2129Simon Marlow <simonmar@microsoft.com>**20060616140750]
2130[make compilation a little less noisy
2131Simon Marlow <simonmar@microsoft.com>**20060616140652]
2132[allow the max number of workers to scale with +RTS -N
2133Simon Marlow <simonmar@microsoft.com>**20060616140633]
2134[fix one-character error in stack check
2135Simon Marlow <simonmar@microsoft.com>**20060616135621]
2136[add STM support to the new throwTo mechanism
2137Simon Marlow <simonmar@microsoft.com>**20060616111937]
2138[remove duplicate way names (-debug -debug didn't work)
2139Simon Marlow <simonmar@microsoft.com>**20060616110258]
2140[Asynchronous exception support for SMP
2141Simon Marlow <simonmar@microsoft.com>**20060616103342
2142 
2143 This patch makes throwTo work with -threaded, and also refactors large
2144 parts of the concurrency support in the RTS to clean things up.  We
2145 have some new files:
2146 
2147   RaiseAsync.{c,h}     asynchronous exception support
2148   Threads.{c,h}         general threading-related utils
2149 
2150 Some of the contents of these new files used to be in Schedule.c,
2151 which is smaller and cleaner as a result of the split.
2152 
2153 Asynchronous exception support in the presence of multiple running
2154 Haskell threads is rather tricky.  In fact, to my annoyance there are
2155 still one or two bugs to track down, but the majority of the tests run
2156 now.
2157]
2158[make rmp_tmp_w an StgWord instead of StgInt
2159Simon Marlow <simonmar@microsoft.com>**20060616102311]
2160[__compat_long_path_size(): have proto and defn agree on return type
2161sof@galois.com**20060614164650]
2162[call wakeUpRts() in the correct place
2163Simon Marlow <simonmar@microsoft.com>**20060614134728]
2164[readerProc: split up text output using host's line termination convention
2165sof@galois.com**20060613232605]
2166[Improve pretty-printing for bags
2167simonpj@microsoft.com**20060612114020]
2168[Make scoped type variables work for default methods
2169simonpj@microsoft.com**20060612113855
2170 
2171 Consider
2172   class C a where
2173     op :: forall b. a -> b -> b
2174     op = <rhs>
2175 
2176 Then 'b' should be in scope in <rhs>.  I had omitted this case.
2177 This patch fixes it.
2178 
2179]
2180[And move 'Chasing ...' messages into verbosity 2 as well
2181Don Stewart <dons@cse.unsw.edu.au>**20060612084656]
2182[Emit 'linking not required' messages only with -v 2 or above.
2183Don Stewart <dons@cse.unsw.edu.au>**20060611071041
2184 
2185 Similar in philosophy to the 'Skipping' patch, this is another case of
2186 printing noisy messages when no work is being done. This patch makes the
2187 building-when-nothing-to-do case smoother.
2188 
2189]
2190[Don't emit 'Skipping' messages unless -v2 or higher is on
2191Don Stewart <dons@cse.unsw.edu.au>**20060610145713
2192 
2193 Following GNU make, this patch makes GHC not emit messages about modules
2194 its skipping. This makes builds much quieter, and its a lot easier to
2195 work out what effects a change had on the code.
2196 
2197 The current behaviour can be recovered with -v2
2198 
2199]
2200[fix the stage3 build
2201Simon Marlow <simonmar@microsoft.com>**20060612084114]
2202[oops, undo accidental commit of version number
2203Simon Marlow <simonmar@microsoft.com>**20060612083520]
2204[Move readline configuration into the readline package
2205Simon Marlow <simonmar@microsoft.com>**20060609135840]
2206[fix possible ^C problems
2207Simon Marlow <simonmar@microsoft.com>**20060608144457
2208 Calling prodAllCapabilities() from interruptStgRts() was wrong, for
2209 the same reasons that we stopped doing it in handle_tick().  We now
2210 use the same mechanism (send a byte down the pipe to the IO manager
2211 thread), but abstract it in a wakeUpRts() function in the scheduler.
2212]
2213[New tracing interface
2214Simon Marlow <simonmar@microsoft.com>**20060608144210
2215 A simple interface for generating trace messages with timestamps and
2216 thread IDs attached to them.  Most debugging output goes through this
2217 interface now, so it is straightforward to get timestamped debugging
2218 traces with +RTS -vt.  Also, we plan to use this to generate
2219 parallelism profiles from the trace output.
2220]
2221[fix warnings
2222Simon Marlow <simonmar@microsoft.com>**20060608143635]
2223[fix warnings
2224Simon Marlow <simonmar@microsoft.com>**20060608143520]
2225[Make it so that StgWord/StgInt are longs
2226Simon Marlow <simonmar@microsoft.com>**20060608143438
2227 This means we can use a %ld format specifier for StgWord/StgInt with
2228 printf and not get shouted at by gcc.
2229]
2230[more warning fixage
2231Simon Marlow <simonmar@microsoft.com>**20060608142844]
2232[fix a warning
2233Simon Marlow <simonmar@microsoft.com>**20060608141903]
2234[fix some warnings
2235Simon Marlow <simonmar@microsoft.com>**20060608140201]
2236[Add new RTS flags for tracing:
2237Simon Marlow <simonmar@microsoft.com>**20060608130101
2238 
2239   -vs       Trace scheduler events (see also -Ds with -debug)
2240   -vt       Time-stamp trace messages
2241 
2242 the intention is that we will pipe the -vs output into a
2243 profile-generating tool.  This commit includes the flags only,
2244 functionality to follow.
2245]
2246[codegen debug flag (+RTS -Dc) was unused; remove it
2247Simon Marlow <simonmar@microsoft.com>**20060607145848]
2248[add 'const' modifiers to types where appropriate
2249Simon Marlow <simonmar@microsoft.com>**20060607145800]
2250[rearrange casts to avoid gcc warnings
2251Simon Marlow <simonmar@microsoft.com>**20060607145626]
2252[warning fix
2253Simon Marlow <simonmar@microsoft.com>**20060607141013]
2254[remove //@ stuff
2255Simon Marlow <simonmar@microsoft.com>**20060607134553]
2256[Gather timing stats for a Task when it completes.
2257Simon Marlow <simonmar@microsoft.com>**20060607124407
2258 Previously we did this just for workers, now we do it for the main
2259 thread and for forkOS threads too.
2260]
2261[Remove unnecessary SCHED_INTERRUPTED scheduler state
2262Simon Marlow <simonmar@microsoft.com>**20060607115105
2263 
2264]
2265[fix a warning
2266Simon Marlow <simonmar@microsoft.com>**20060427130048]
2267[re-enable time package on Windows
2268simonmar@microsoft.com**20060606124656]
2269[fix a case of "naughty I386 byte reg"
2270Simon Marlow <simonmar@microsoft.com>**20060606112357
2271 The fix is a little hacky, because we don't have support for register
2272 classes in general, but it's an improvement.
2273]
2274[A better icon for GHCi
2275Neil Mitchell <http://www.cs.york.ac.uk/~ndm/>**20060602145913]
2276[markSignalHandlers(): implementation was unnecessary, and had a bug
2277simonmar@microsoft.com**20060606085805
2278 
2279 There's no need to mark the signal handler here, because it is stored
2280 in a StablePtr and hence is a root anyway.  Furthermore, the call to
2281 evac() was passing the address of a local variable, which turned out
2282 to be harmless for copying GC, but fatal for compacting GC: compacting
2283 GC assumes that the addresses of the roots are the same each time.
2284 
2285 Fixes: possibly #783, possibly #776, definitely #787
2286]
2287[disable time package on mingw to unblock builds.
2288sof@galois.com**20060605165125]
2289[Remove one more IfaceInlineCall
2290simonpj@microsoft.com**20060605154305]
2291[Remove InlinePlease and add inline function and RULE
2292simonpj@microsoft.com**20060605114900
2293 
2294 For a long time GHC has had some internal mechanism designed to support
2295 a call-site inline directive, thus
2296        inline f xs
2297 makes f be inlined at the call site even if f is big.
2298 
2299 However, the surface syntax seems to have gone, and in any case it
2300 can be done more neatly using a RULE.
2301 
2302 This commit:
2303   * Removes the InlineCall constructor for Note
2304     and InlinePlease for SimplCont
2305 
2306   * Adds a new known-key Id called 'inline', whose definition in
2307     GHC.Base is just the identity function
2308 
2309   * Adds a built-in RULE in PrelRules that rewrites (inline f) to
2310     the body of f, if possible
2311 
2312   * Adds documentation
2313 
2314 NOTE: I have not tested this (aeroplane work).  Give it a try!
2315 
2316]
2317[Fix typo
2318simonpj@microsoft.com**20060605114719]
2319[fix type of allocateExec
2320Simon Marlow <simonmar@microsoft.com>**20060601125406]
2321[stgMallocBytesRWX --> allocateExec
2322Simon Marlow <simonmar@microsoft.com>**20060601123314]
2323[fix non-Windows build
2324Simon Marlow <simonmar@microsoft.com>**20060601121435]
2325[Win32: set up the console code pages
2326simonmar@microsoft.com**20060601115423
2327 This may help with entering non-ASCII characters at the GHCi prompt,
2328 but as usual with Unicode there's no simple solution that just works.
2329 See commentary in InteractiveUI.hs for more details.
2330]
2331[add a type signature
2332simonmar@microsoft.com**20060601115335]
2333[improvements to lexical error reporting
2334simonmar@microsoft.com**20060601115306]
2335[commented-out debugging code
2336simonmar@microsoft.com**20060601115247]
2337[understand Latin-1 symbols
2338simonmar@microsoft.com**20060601115149]
2339[stgMallocBytesRWX --> allocateExec
2340Simon Marlow <simonmar@microsoft.com>**20060531091202
2341 Not sure how I left this out of the previous patch, oh well.
2342]
2343['time' depends on 'Win32' when Windows=YES; mirror that
2344sof@galois.com**20060530223009
2345 when setting up SUBDIRS.
2346]
2347[Win32: add _imp__tzname
2348simonmar@microsoft.com**20060530101452]
2349[fix Win32 build
2350simonmar@microsoft.com**20060530101418]
2351[replace stgMallocBytesRWX() with our own allocator
2352Simon Marlow <simonmar@microsoft.com>**20060530100211
2353 
2354 See bug #738
2355 
2356 Allocating executable memory is getting more difficult these days.  In
2357 particular, the default SELinux policy on Fedora Core 5 disallows
2358 making the heap (i.e. malloc()'d memory) executable, although it does
2359 apparently allow mmap()'ing anonymous executable memory by default.
2360 
2361 Previously, stgMallocBytesRWX() used malloc() underneath, and then
2362 tried to make the page holding the memory executable.  This was rather
2363 hacky and fails with Fedora Core 5. 
2364 
2365 This patch adds a mini-allocator for executable memory, based on the
2366 block allocator.  We grab page-sized blocks and make them executable,
2367 then allocate small objects from the page.  There's a simple free
2368 function, that will free whole pages back to the system when they are
2369 empty.
2370 
2371]
2372[add time subdir
2373Simon Marlow <simonmar@microsoft.com>**20060530070721]
2374[Make rule-matching robust to lets
2375simonpj@microsoft.com**20060525154447
2376 
2377 Consider a RULE like
2378        forall arr. splitD (joinD arr) = arr
2379 
2380 Until now, this rule would not match code of form
2381        splitD (let { d = ... } in joinD (...d...))
2382 because the 'let' got in the way.
2383 
2384 This patch makes the rule-matcher robust to lets.  See comments with
2385 the Let case of Rules.match.
2386 
2387 This improvement is highly desirable in the fusion rules for NDP
2388 stuff that Roman is working on, where we are doing fusion of *overloaded*
2389 functions (which may look lazy).  The let expression that Roman tripped
2390 up on was a dictioary binding.
2391 
2392]
2393[Improve error reporting in interface typechecking
2394simonpj@microsoft.com**20060525094545]
2395[Fix egregious and long-standing tidying bug
2396simonpj@microsoft.com**20060525094300
2397 
2398 A typo in tidyAlt meant that we could get shadowing of occurrence names
2399 in the output of tidying.  (Specifically, of existentially bound type
2400 variables.)  That in turn meant that an IfaceExpr could have shadowing, so
2401 when the IfaceExpr was read in, it meant something different.
2402 That in turn led to an obscure crash like:
2403        Panic: tcIfaceTyVar
2404 
2405 Anyway, this fixes it.  MERGE into 6.4.3.
2406 
2407 
2408]
2409[Prune imports
2410simonpj@microsoft.com**20060525094251]
2411[performGC_(): don't use the existing Task, always grab a new one
2412Simon Marlow <simonmar@microsoft.com>**20060525090035]
2413[Better control of the IO manager thread; improvements to deadlock checking
2414Simon Marlow <simonmar@microsoft.com>**20060524122839
2415     
2416 In the threaded RTS on *nix platforms:
2417     
2418  - we now start the IO manager thread eagerly at startup time
2419    (previously was started on demand).
2420 
2421  - we now ask the IO manager thread to stop at shutdown
2422     
2423  - In Timer.c:handle_tick, if it looks like we might be in a
2424    deadlock, instead of calling prodOneCapability() which was known to be
2425    wrong, we now send a byte down the IO manager's pipe to wake it up.
2426   
2427 This also avoids a case of double-acquisition of a mutex, which
2428 happened if prodOneCapability() was called while the current thread
2429 was holding a mutex.
2430]
2431[TARGET_OS ==> HOST_OS
2432Simon Marlow <simonmar@microsoft.com>**20060524122103]
2433[fix a _TARGET_ARCH that should be _HOST_ARCH
2434Simon Marlow <simonmar@microsoft.com>**20060524122022]
2435[we don't need OutOfHeapHook(), and the version in the RTS has a better message
2436Simon Marlow <simonmar@microsoft.com>**20060524112007]
2437[Bug-fix to patch "Run simplifier before SpecConstr"
2438simonpj@microsoft.com**20060523130022]
2439[Run simplifier before SpecConstr
2440simonpj@microsoft.com**20060523085546
2441 
2442 Arrange to run the simplifier before SpecConstr, to (almost entirely)
2443 eliminate shadowing.
2444 
2445 Reason: otherwise SpecConstr can generate a RULE that never
2446 files; and LiberateCase specifically *does* generate lots of shadowing.
2447 
2448 See Note [Shadowing] in SpecConstr.lhs
2449 
2450 
2451]
2452[Prune imports
2453simonpj@microsoft.com**20060522192532]
2454[Add deShadowBinds
2455simonpj@microsoft.com**20060522192404
2456 
2457 Add CoreSubst.deShadowBinds, which removes shadowing from
2458 a Core term.  I thought we wanted it for SpecConstr, but in
2459 fact decided not to use it. Nevertheless, it's a useful sort
2460 of function to have around, and it has a particularly simple
2461 definition!
2462 
2463]
2464[Inline in a call argument if the caller has RULES
2465simonpj@microsoft.com**20060522163255
2466 
2467 This is an experimental change suggested by Roman.  Consider
2468       
2469        {-# INLINE f #-}
2470        f x y = ...
2471 
2472        ....(g (f a b))...
2473 
2474 where g has RULES.  Then we'd like to inline f, even though the context of
2475 the call is otherwise 100% boring -- g is lazy and we know nothing about
2476 x and y.
2477 
2478 This patch just records in the continuation that f has rules.  And does so
2479 somewhat recursively...e.g.
2480 
2481        ...(g (h (f a b)))...
2482 
2483 where g has rules. 
2484 
2485 
2486]
2487[Add idHasRules
2488simonpj@microsoft.com**20060522163109
2489 
2490 Add Id.idHasRules :: Id -> Bool, with the obvious semantics.
2491 This patch makes sense by itself, but it's just a tidy-up.
2492 
2493 
2494]
2495[Transmit inline pragmas faithfully
2496simonpj@microsoft.com**20060522110256
2497 
2498 *** WARNING: you will need to recompile your libraries
2499 ***         when you pull this patch (make clean; make)
2500 
2501 The inline pragma on wrapper-functions was being lost; this patch
2502 makes it be transmitted faithfully.
2503 
2504 The reason is that we don't write the full inlining for a wrapper into
2505 an interface file, because it's generated algorithmically from its strictness
2506 info.  But previously the inline pragma as being written out only when we
2507 wrote out an unfolding, and hence it was lost for a wrapper.
2508 
2509 This makes a particular difference when a function has a NOINLINE[k] pragma.
2510 Then it may be w/w'd, and we must retain the pragma.  It's the only consistent
2511 thing to do really.
2512 
2513 The change does change the binary format of interface files, slightly.
2514 So you need to recompile all your libraries.
2515 
2516]
2517[Improved RULE lhs typechecking; less dictionary sharing
2518simonpj@microsoft.com**20060519103433
2519 
2520 See long comment with Simplify.tcSimplifyRuleLhs.
2521 
2522 Here's the key example:
2523 
2524   RULE "g"  forall x y z. g (x == y) (y == z) = ...
2525 
2526 Here, the two dictionaries are *identical*, but we do NOT WANT to
2527 generate the rule
2528 
2529 RULE   forall x::a, y::a, z::a, d1::Eq a
2530          f ((==) d1 x y) ((>) d1 y z) = ...
2531 
2532 Instead we want
2533 
2534 RULE   forall x::a, y::a, z::a, d1::Eq a, d2:Eq a
2535          f ((==) d1 x y) ((>) d2 y z) = ...
2536 
2537]
2538[Bug-fix for infix function definitions (parse/rename)
2539simonpj@microsoft.com**20060519095022
2540   
2541 Fix a crash provoked by
2542 
2543        x `op` y = x
2544        op       = True
2545 
2546 The trouble was that there is currently a single 'infix' flag for the
2547 whole group; and RnTypes.checkPrecMatch was therefore expecting the
2548 second eqn to have two args.
2549 
2550 This fixes the crash, and also or-s the infix flags for the various
2551 eqns together; previously it was just taken from the first eqn, which
2552 was wrong.
2553 
2554 
2555]
2556[Remove misleading comments
2557simonpj@microsoft.com**20060519094936]
2558[Fix a nasty continuation-duplication bug
2559simonpj@microsoft.com**20060518163617
2560 
2561 For a long-time mkDupableCont has had a bug that allows it to duplicate
2562 an arbitrary continuation, which it should not do, of course.
2563 
2564 The bug was that in the Select case of mkDupableCont we were calling
2565 prepareCaseCont, which did not duplicate the continuation if there is
2566 but a single alternative.  This is quite right in the case of the call
2567 in rebuildCase, but quite wrong in mkDupableCont.
2568 
2569 The bug manifest as follows. In the expression
2570        f (case ... of { ..several alts.. })
2571 (when f is strict), we should transform to
2572        f (...transformed arg...)
2573 The application of f should not be pushed down (see notes with the
2574 ArgOf case of mkDupableCont.  But that was not happening in an example
2575 like this (see how the call to f is pushed inwards).
2576 
2577 f (a `div` abs (b::Int))
2578        --->
2579     case b_afT of wild_aHa { GHC.Base.I# x_aHc ->
2580     let {
2581       $j_sIe :: GHC.Prim.Int# -> GHC.Base.Int
2582       []
2583       $j_sIe =
2584        \ (ds1_aHr [Nothing OneShot] :: GHC.Prim.Int#) ->
2585          Foo7.f
2586            (case ds1_aHr of ds2_aHq {
2587               __DEFAULT ->
2588                 case a_afS of wild1_aHM { GHC.Base.I# x_aHO ->
2589                 GHC.Base.I# (GHC.Base.divInt# x_aHO ds2_aHq)
2590                 };
2591               0 -> GHC.Err.divZeroError @ GHC.Base.Int
2592             })
2593     } in
2594       case GHC.Prim.>=# x_aHc 0 of wild1_aHe [Dead Nothing] {
2595        GHC.Base.False ->
2596          let {
2597            ds1_aHr :: GHC.Prim.Int#
2598            []
2599            ds1_aHr = GHC.Prim.negateInt# x_aHc
2600          } in  $j_sIe ds1_aHr;
2601        GHC.Base.True -> $j_sIe x_aHc
2602       }
2603     }
2604 
2605 
2606]
2607[Make simplifier report which phase it is doing in -ddump output
2608simonpj@microsoft.com**20060518163448]
2609[Comments only
2610simonpj@microsoft.com**20060518163425]
2611[take parsec out of $(GhcBootLibs)
2612Simon Marlow <simonmar@microsoft.com>**20060518131506]
2613[Improve documentation of INLINE pragmas
2614simonpj@microsoft.com**20060518113212]
2615[a couple of additions
2616Simon Marlow <simonmar@microsoft.com>**20060518104025]
2617[#define _REENTRANT 1   (needed to get the right errno on some OSs)
2618Simon Marlow <simonmar@microsoft.com>**20060518103715
2619 Partial fix for hanging problems on Solaris and possibly *BSD.
2620 A similar fix is also required to libraries/base/includes/HsBase.h.
2621]
2622[Declare this file to be POSIX
2623Simon Marlow <simonmar@microsoft.com>**20060518102858
2624 This is simpler than using _POSIX_THREAD_SEMANTICS on Solaris to get
2625 the right version of ctime_r().
2626]
2627[somewhere to keep track of release notes for 6.6
2628Simon Marlow <simonmar@microsoft.com>**20060518074415]
2629[Newtype data constructors get a compulsory unfolding
2630simonpj@microsoft.com**20060517155009
2631 
2632 With this change, newtype data constructors get a "compulsory" unfolding,
2633 which means that they *must* be inlined, and no top-level definition of
2634 the constructor is provided at all.  Since these constructors are no-ops,
2635 I'm not sure why this wasn't the case all along.
2636 
2637]
2638[White space only
2639simonpj@microsoft.com**20060517154936]
2640[Retain InlinePragInfo on wrappers
2641simonpj@microsoft.com**20060517154725
2642 
2643 For some reason, when doing the worker/wrapper split, we transferred the
2644 InlinePragInfo from the original function, but expunging it from the wrapper.
2645 This meant, for example, that a NOINLINE function would have its wrapper
2646 inlined, which isn't sensible.
2647 
2648 For a change, fixing a bug involves only deleting code!
2649 
2650]
2651[Spelling correction
2652simonpj@microsoft.com**20060517154710]
2653[Retain INLINE pragma information during indirection-shorting
2654simonpj@microsoft.com**20060517154449
2655 
2656 During indirection-shorting, we were dropping the InlinePragInfo,
2657 although were were carefully retaining strictness info etc. 
2658 I think this is a long-standing bug.
2659 
2660]
2661[Improve pretty-printing
2662simonpj@microsoft.com**20060517154349]
2663[Comments only
2664simonpj@microsoft.com**20060517154304]
2665[Improve pretty-printing slightly
2666simonpj@microsoft.com**20060517154204]
2667[Let GHCi work with with Sparc32+/V8+ .o files
2668Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060516090430
2669 Currently the GHCi linker looks exclusively for V7 ABI .o files.
2670 
2671 You can generate V8+ ABI .o files using flags to gcc such as:
2672  -optc-mcpu=ultrasparc -opta-mcpu=ultrasparc
2673 
2674 Note that this allows gcc to generate hardware integer division and
2675 hardware floating point instructions rather than using software emulation.
2676 All recent sparc hardware is V8+ or later. Perhaps we should check for the
2677 cpu generation in configure and use the later ABI if possible.
2678 
2679 Tested briefly on a SunBlade 100 (TI UltraSparc IIe) sparc-unknown-linux
2680]
2681[match up more closely with compiler/main/DynFlags.hs:machdepCCOpts
2682Simon Marlow <simonmar@microsoft.com>**20060515090031
2683 In particular, add -fno-builtin to x86 and x86_64, which was missing.
2684]
2685[set $(GhcVersion) and $(GhcPatchLevel) correctly when $(UseStage1)==YES
2686Simon Marlow <simonmar@microsoft.com>**20060510124621]
2687[.raw_s and .s live in $(odir), not the source dir
2688Simon Marlow <simonmar@microsoft.com>**20060510121524]
2689[additions from Reilly Hayes
2690Simon Marlow <simonmar@microsoft.com>**20060510120000]
2691[some tweaks to the HC bootstrapping instructions
2692Simon Marlow <simonmar@microsoft.com>**20060510115236]
2693[Ignore unboxed values in breakpoints.
2694Lemmih <lemmih@gmail.com>**20060510072722]
2695[Don't read ~/.ghci on breakpoints.
2696Lemmih <lemmih@gmail.com>**20060509223455]
2697[make it possible to define an alias for :quit
2698Simon Marlow <simonmar@microsoft.com>**20060509083124]
2699[Do not put wired-in things in interface files
2700simonpj@microsoft.com**20060508142946
2701 
2702 There is no need for wired-in things to go into interface files; the compiler
2703 knows about them anyway.  Worse, it turns ou that if they are in an interface
2704 file, they may get read in with not-quite-right type info (e.g. GHC.Err.error),
2705 and the not-quite-right thing gets into the type envt.  Than it gets used
2706 instead of the wired in thing.
2707 
2708 Best all round never to put them into interface files.  This is the way
2709 it used to be, but it looks as if it rotted away some time ago.
2710 
2711 (I noticed this when fixing unsafePerformIO stuff, becuase 'lazy' was getting
2712 an unfolding when it shouldn't.)
2713 
2714]
2715[Remove NOINLINE strictness hack
2716simonpj@microsoft.com**20060508142834
2717 
2718 The stricteness analyser used to have a HACK which ensured that NOINLNE things
2719 were not strictness-analysed.  The reason was unsafePerformIO. Left to itself,
2720 the strictness analyser would discover this strictness for unsafePerformIO:
2721        unsafePerformIO:  C(U(AV))
2722 But then consider this sub-expression
2723        unsafePerformIO (\s -> let r = f x in
2724                               case writeIORef v r s of (# s1, _ #) ->
2725                               (# s1, r #)
2726 The strictness analyser will now find that r is sure to be eval'd,
2727 and may then hoist it out.  This makes tests/lib/should_run/memo002
2728 deadlock.
2729 
2730 Solving this by making all NOINLINE things have no strictness info is overkill.
2731 In particular, it's overkill for runST, which is perfectly respectable.
2732 Consider
2733        f x = runST (return x)
2734 This should be strict in x.
2735 
2736 So the new plan is to define unsafePerformIO using the 'lazy' combinator:
2737 
2738        unsafePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r)
2739 
2740 Remember, 'lazy' is a wired-in identity-function Id, of type a->a, which is
2741 magically NON-STRICT, and is inlined after strictness analysis.  So
2742 unsafePerformIO will look non-strict, and that's what we want.
2743 
2744 Now we don't need the hack in the strictness analyser.
2745 
2746]
2747[Trim imports
2748simonpj@microsoft.com**20060508141804]
2749[Trim imports
2750simonpj@microsoft.com**20060508141713]
2751[GHC_MANGLER-->MANGLER
2752Simon Marlow <simonmar@microsoft.com>**20060508111206]
2753[Fix bug #763: Breakpoint mechanism crashes when there's a type error.
2754Lemmih <lemmih@gmail.com>**20060505232158]
2755[breakpointCond
2756Lemmih <lemmih@gmail.com>**20060502174340]
2757[Preserve type variable names during type inference
2758simonpj@microsoft.com**20060505153753
2759 
2760 During unification we attempt to preserve the print-names of type variables,
2761 so that type error messages tend to mention type variables using the
2762 programmer's vocabulary. 
2763 
2764 This had bit-rotted a bit when I added impredicative polymorphism; especially
2765 when unBoxing a boxy type variable we should not gratuitously lose its name.
2766 
2767]
2768[Trim imports
2769simonpj@microsoft.com**20060505150506]
2770[fixup for new source tree layout
2771Simon Marlow <simonmar@microsoft.com>**20060505114100]
2772[FPTOOLS_TOP-->GHC_TOP, and remove some references to "fptools"
2773Simon Marlow <simonmar@microsoft.com>**20060505110520]
2774[$(FPTOOLS_TOP) is now known as $(GHC_TOP)
2775Simon Marlow <simonmar@microsoft.com>**20060505110127
2776 I kept $(FPTOOLS_TOP) as an alias for $(GHC_TOP) while we switch
2777]
2778[update the build system documentation
2779Simon Marlow <simonmar@microsoft.com>**20060505105843]
2780[update for new source tree layout
2781Simon Marlow <simonmar@microsoft.com>**20060505102903]
2782[partial update for new source tree layout
2783Simon Marlow <simonmar@microsoft.com>**20060505030218]
2784[update for new source tree layout (untested)
2785Simon Marlow <simonmar@microsoft.com>**20060505081549]
2786[Print a more helpful error for find_thing
2787simonpj@microsoft.com**20060504153337]
2788[Fix a bug in rule matching
2789simonpj@microsoft.com**20060504112430
2790 
2791 The rule matcher uses a "rough-match" pre-filter, which was being too
2792 aggressive.  The case looked like this:
2793 
2794        rule:   f True
2795        expr:   case e of x { True -> f x }
2796 
2797 Jues because x doesn't immediately look like True, we shouldn't say
2798 "can't match", but that is exactly what ruleCantMatch was doing.
2799 
2800 
2801]
2802[Fix constructor-specialisation bug
2803simonpj@microsoft.com**20060504112131
2804 
2805 The constructor-specialisation optimisation was not dealing with the case
2806 of
2807        (letrec ... in f) a1 a2
2808 
2809 We need to apply constructor specialisation in the letrec; previously
2810 we were leaving it untouched on the grounds that the function part of
2811 an application is almost always a variable.
2812 
2813 But in fact, float-in immediately precedes SpecConstr, so we can get
2814 these odd-looking applications.
2815 
2816 
2817]
2818[Fix precedence for records in derived Read
2819simonpj@microsoft.com**20060504111804
2820 
2821 The derived instance for Read of records wasn't quite right.
2822 Consider
2823        data T = T1 T | T2 { x::Int }
2824 
2825 The string "T1 T2 { x=2 }" should parse correctly as
2826        T1 (T2 {x=2})
2827 because of Haskell's odd precedence rules (record construction binds
2828 even more tightly than application), but the derived Read didn't take
2829 account of that.
2830 
2831 drvrun020 is the regression test
2832 
2833 
2834]
2835[Make rules available in RHS
2836simonpj@microsoft.com**20060504111500
2837 
2838 After some earlier re-factoring, the code that was carefully trying
2839 to make RULES available in a function's own RHS was plain wrong.
2840 
2841 This commit fixes it.  Some programs should go faster!
2842 
2843]
2844[Pretty printing instance for Unfolding
2845simonpj@microsoft.com**20060504111429]
2846[small clarification
2847Simon Marlow <simonmar@microsoft.com>**20060504103414]
2848[small fix to booting instructions from #762
2849Simon Marlow <simonmar@microsoft.com>**20060504083104]
2850[$(ProjectNameShort) => ghc
2851Simon Marlow <simonmar@microsoft.com>**20060503102419]
2852[only pass -fno-unit-at-a-time to gcc if it is supported
2853Simon Marlow <simonmar@microsoft.com>**20060503093614]
2854[Arrange that -fth is no longer implied by -fglasgow-exts
2855simonpj@microsoft.com**20060426182114
2856 
2857 Messages involving Template Haskell are deeply puzzling
2858 if you don't know about TH, so it seems better to make
2859 -fth an explicit flag.  It is no longer switched on
2860 by -fglasgow-exts.
2861 
2862]
2863[remove code not required in the new source tree layout
2864Simon Marlow <simonmar@microsoft.com>**20060502114235]
2865[move "compat" earlier in the build for .hc bootstrapping
2866Simon Marlow <simonmar@microsoft.com>**20060502112001]
2867[fix ctime_r problem on Solaris (I hope)
2868Simon Marlow <simonmar@microsoft.com>**20060502111231]
2869[fix whitespace problem that shows up on Solaris (x86)
2870Simon Marlow <simonmar@microsoft.com>**20060502110001]
2871[libraries/time is boring
2872Simon Marlow <simonmar@microsoft.com>**20060502105524]
2873[add time package to libraries Makefile
2874Ashley Yakeley <ashley@semantic.org>**20060501092241]
2875[add time package to default-packages
2876Ashley Yakeley <ashley@semantic.org>**20060426070445]
2877[Fix stage2 segfault on openbsd.
2878dons@cse.unsw.edu.au**20060428074811
2879 
2880 Somewhere along the 6.5 branch, gcc started compiling the rts such that
2881 it triggers the stack smash handler, causing stage2 to by kill'd
2882 immediately. This turns off the stack protector, which will do for now.
2883 
2884]
2885[fix quoting around ${FPTOOLS_TOP_ABS} (fixes #749)
2886Simon Marlow <simonmar@microsoft.com>**20060428085252]
2887[Fix bug shown in the mod77 test.
2888Lemmih <lemmih@gmail.com>**20060427113313]
2889[Don't init root pointers if they aren't gonna be used.
2890Lemmih <lemmih@gmail.com>**20060426111143]
2891[Fix recompilation checking.
2892Simon Marlow <simonmar@microsoft.com>**20060425140932
2893 One-shot compilation was throwing away the old iface read by
2894 checkOldIface, with the result that version numbers were never being
2895 incremented.  Fixes the recomp001 test too.
2896]
2897[Solaris needs -lrt for the threaded RTS
2898Simon Marlow <simonmar@microsoft.com>**20060425082823]
2899[fix problem with binary-dist docs
2900Simon Marlow <simonmar@microsoft.com>**20060424090159]
2901[Enable breakpoint support.
2902Lemmih <lemmih@gmail.com>**20060421113112]
2903[Fixing some lexer errors with extcore
2904Josef Svenningsson <josef.svenningsson@gmail.com>**20060420222625]
2905[Extcore can now handle data types without constructors
2906Josef Svenningsson <josef.svenningsson@gmail.com>**20060420213622]
2907[Comments only
2908Josef Svenningsson <josef.svenningsson@gmail.com>**20060420213555]
2909[Resurrect ProjectName
2910sven.panne@aedion.de**20060421085125]
2911[Remove the section on platform support, link to the wiki page
2912Simon Marlow <simonmar@microsoft.com>**20060420125555
2913 The section in the building guide was becoming out of date, a wiki
2914 page is much more likely to be kept fresh.
2915]
2916[Fix workaround for a GHC 6.4 bug
2917rl@cse.unsw.edu.au**20060420044223]
2918[hslibs is dead, Jim...
2919sven.panne@aedion.de**20060419144609]
2920[Synched .spec file with reality
2921sven.panne@aedion.de**20060419143138]
2922[Add .spec file to source distribution
2923sven.panne@aedion.de**20060419103725]
2924[remove paragraph about mutable objects that doesn't apply now
2925Simon Marlow <simonmar@microsoft.com>**20060419082038]
2926[HsBool should be HsInt, not StgBool
2927Simon Marlow <simonmar@microsoft.com>**20060418144214
2928 StgBool is mapped to C's int type.  GHC doesn't currently know the
2929 size of a C int on the target arch, it's easier to use StgInt instead.
2930 I guess nobody ever uses Bool arguments to foreign imports/exports.
2931]
2932[handle Bool arg to foreign import "wrapper"
2933Simon Marlow <simonmar@microsoft.com>**20060418143936
2934 Fixes #746
2935]
2936[update commentry for foreign import "wrapper" handling
2937Simon Marlow <simonmar@microsoft.com>**20060418143714]
2938[remove vestiges of ByteArray and MutableByteArray, which are no more
2939Simon Marlow <simonmar@microsoft.com>**20060418143641]
2940[Comment only
2941simonpj@microsoft.com**20060418125624]
2942[Fix rank-validity testing
2943simonpj@microsoft.com**20060418125350
2944 
2945 GHC does not now do "hoisting" as it used to.  Instead, it allows
2946 foralls to the right of fuction arrows, as well as to the left.
2947 
2948 But the type-validity tester hadn't caught up.  This commit fixes
2949 it. The test is tc203.
2950 
2951 Incidentally, GHC still doesn't let you write
2952        forall a. Eq a => forall b. b -> b
2953 because we get a zillion reduce/reduce errors if we allow that.  I'm
2954 sure it's fixable.  But meanwhile you have to use an auxiliary type
2955 synonym, which is a bit stupid.
2956 
2957 
2958]
2959[Make the initial rdr and type scope available in the ghc-api.
2960Lemmih <lemmih@gmail.com>**20060418023606]
2961[Fix minor bug in Linker.withExtendedLinkEnv
2962Lemmih <lemmih@gmail.com>**20060418023518]
2963[Export 'insertSymbol' and 'insertStableSymbol'.
2964Lemmih <lemmih@gmail.com>**20060418021806
2965 
2966 'insertStableSymbol' is used for exporting closures that are affected by the GC.
2967 
2968]
2969[Allow $x, as well as $(x), at top level in TH
2970simonpj@microsoft.com**20060414121907
2971 
2972 Bulat pointed out that in Template Haskell
2973    $x
2974 is allowed instead of
2975    $(x)
2976 in expressions, but not at the top level of modules.
2977 
2978 This commit fixes the omission.  Now you can say
2979 
2980        f x = x
2981        $h
2982        data T = T
2983 
2984 and the $h will run Template Haskell just as you'd expect.
2985 
2986]
2987[Fix TH erorr recovery (test is TH_recover)
2988simonpj@microsoft.com**20060414120411]
2989[Comments only
2990simonpj@microsoft.com**20060414120359]
2991[Recover gracefully from a Template Haskell programmers error
2992simonpj@microsoft.com**20060414115831
2993 
2994 If a TH programmer uses a type constructor as a data constructor,
2995 GHC simply crashed.  This commit makes it report the error in a
2996 graceful way.
2997 
2998]
2999[Document newtype-unwrapping for IO in FFI
3000simonpj@microsoft.com**20060414105212]
3001[Cosmetics in SpecConstr
3002simonpj@microsoft.com**20060412152721
3003 
3004 SpecConstr currently uses substExpr for tiresome reasons to do with
3005 GADTs.  Unfortunately the substExpr generates some WARNINGS (when DEBUG)
3006 is on, because we aren't adding all the in-scope Ids to the in-scope
3007 set of the substitution.
3008 
3009 When we move to FC these substExprs will go away, so I'm not going to
3010 worry about this now.
3011 
3012]
3013[Improve pruning of case alternatives to account for GADTs
3014simonpj@microsoft.com**20060412152327
3015 
3016 Consider
3017 
3018   data T a where
3019     T1 :: T Int
3020     T2 :: T Bool
3021     T3 :: T Char
3022 
3023   f :: T Bool -> Int
3024   f x = case x of
3025          DEFAULT -> ...
3026          T2 -> 3
3027 
3028 Here the DEFAULT case covers multiple constructors (T1,T3), but none
3029 of them can match a scrutinee of type (T Bool).  So we can prune away
3030 the default case altogether.
3031 
3032 In implementing this, I re-factored this bit of the simplifier, elminiating
3033 prepareAlts from SimplUtils, and putting all the work into simplAlts in
3034 Simplify
3035 
3036 The proximate cause was a program written by Manuel using PArrays
3037 
3038]
3039[Fix a bug in optimising division to shift right
3040Simon Marlow <simonmar@microsoft.com>**20060412144247
3041 Division by an integral log2 can't be directly optimised to a shift
3042 right, because shift right behaves like a division that rounds to
3043 negative infinity, whereas we want one that rounds to zero.  Fix this
3044 by adding (divisor-1) to the dividend when it is negative before
3045 shifting.  We do this without jumps, generating very slightly worse
3046 code than gcc, which uses conditional moves on CPUs that support it.
3047]
3048[Omit lndir on Windows, as it used to be
3049simonpj@microsoft.com**20060411135334]
3050[remove a trace
3051Simon Marlow <simonmar@microsoft.com>**20060411131531]
3052[Allow IO to be wrapped in a newtype in foreign import/export
3053simonpj@microsoft.com**20060411120441
3054 
3055 Up to now, the silent unwrapping of newtypes in foreign import/export
3056 has been limited to data values.  But it's useful for the IO monad
3057 itself:
3058 
3059        newtype MyIO a = MIO (IO a)
3060 
3061        foreign import foo :: Int -> MyIO Int
3062 
3063 This patch allows the IO monad to be
3064 wrapped too. This applies to foreign import "dynamic" and "wrapper",
3065 thus
3066    foreign import "wrapper" foo :: MyIO () -> HisIO (FunPtr (MyIO ()))
3067 
3068 Warning: I did on the plane, and I'm no longer sure if its 100%
3069 complete, so needs more testing.  In particular the wrapper/dynamic bit.
3070 
3071]
3072[Improve newtype deriving
3073simonpj@microsoft.com**20060402215911
3074 
3075 Ross Paterson pointed out a useful generalisation of GHC's
3076 newtype-deriving mechanism.  This implements it.  The idea
3077 is to allow
3078        newtype Wrap m a = Wrap (m a) deriving (Monad, Eq)
3079 where the representation type doesn't start with a type
3080 constructor.
3081 
3082 Actually GHC already *did* implement this, but the eta-ok
3083 check in TcDeriv missed a case, so there was a lurking bug.
3084 
3085 This patches fixes the documentation too.  drvrun019 tests.
3086 
3087 
3088]
3089[add take to the list of functions deforestable
3090Simon Marlow <simonmar@microsoft.com>**20060411090131]
3091[avoid versionitis in Numeric.showHex (should fix tcrun007)
3092Simon Marlow <simonmar@microsoft.com>**20060411085009]
3093[add a note about full-laziness
3094Simon Marlow <simonmar@microsoft.com>**20060410093824]
3095[robustify the test for the top of the tree a little
3096Simon Marlow <simonmar@microsoft.com>**20060410082224]
3097[Make darcs-all work without a ghc toplevel directory
3098Josef Svenningsson <josef.svenningsson@gmail.com>**20060407161738]
3099[Fix typo in darcsall warning
3100Josef Svenningsson <josef.svenningsson@gmail.com>**20060407161335]
3101[fix source dists
3102Simon Marlow <simonmar@microsoft.com>**20060407150045]
3103[add a README for binary dists
3104Simon Marlow <simonmar@microsoft.com>**20060407143832]
3105[fix binary dists
3106Simon Marlow <simonmar@microsoft.com>**20060407143822]
3107[remove the last bits of the ghc/ subdir
3108Simon Marlow <simonmar@microsoft.com>**20060407085219]
3109[TAG 07.04.06
3110Lemmih <lemmih@gmail.com>**20060407130411]
3111Patch bundle hash:
3112f983b9c858188920fd25a287ff9c8e6e393974c6