Ticket #3084: allowBuiltinRedef.dpatch

File allowBuiltinRedef.dpatch, 182.2 KB (added by phercek, 9 years ago)

patch implementing this ticket

1Wed Mar 11 14:01:11 CET 2009  Peter Hercek <phercek@gmail.com>
2  * alow macros to redefine builtin GHCi commands (implements #3084)
4New patches:
6[alow macros to redefine builtin GHCi commands (implements #3084)
7Peter Hercek <phercek@gmail.com>**20090311130111
8 Ignore-this: 19f3c98717076776652076cf91a1ffb9
9] {
10hunk ./compiler/ghci/InteractiveUI.hs 128
11   ("def",      keepGoing (defineMacro False),  Nothing, completeIdentifier),
12   ("def!",     keepGoing (defineMacro True),   Nothing, completeIdentifier),
13   ("delete",    keepGoing deleteCmd,            Nothing, completeNone),
14-  ("e",        keepGoing editFile,             Just filenameWordBreakChars, completeFilename),
15   ("edit",     keepGoing editFile,             Just filenameWordBreakChars, completeFilename),
16   ("etags",    keepGoing createETagsFileCmd,   Just filenameWordBreakChars, completeFilename),
17   ("force",     keepGoing forceCmd,             Nothing, completeIdentifier),
18hunk ./compiler/ghci/InteractiveUI.hs 825
19            Nothing -> BadCommand
21 lookupCommand' :: String -> IO (Maybe Command)
22-lookupCommand' str = do
23+lookupCommand' ":" = return Nothing
24+lookupCommand' str' = do
25   macros <- readIORef macros_ref
26hunk ./compiler/ghci/InteractiveUI.hs 828
27-  let cmds = builtin_commands ++ macros
28+  let{ (str, cmds) = case str' of
29+      ':' : rest -> (rest, builtin_commands)
30+      _ -> (str', macros ++ builtin_commands) }
31   -- look for exact match first, then the first prefix match
32   return $ case [ c | c <- cmds, str == cmdName c ] of
33            c:_ -> Just c
34hunk ./compiler/ghci/InteractiveUI.hs 1010
35         fromTarget _ = Nothing -- when would we get a module target?
37 defineMacro :: Bool{-overwrite-} -> String -> GHCi ()
38+defineMacro _ (':':_) =
39+  io $ putStrLn "macro name cannot start with a colon"
40 defineMacro overwrite s = do
41   let (macro_name, definition) = break isSpace s
42   macros <- io (readIORef macros_ref)
43hunk ./compiler/ghci/InteractiveUI.hs 1737
45 completeCmd :: String -> IO [String]
46 completeCmd w = do
47-  cmds <- readIORef macros_ref
48-  return (filter (w `isPrefixOf`) (map (':':)
49-             (map cmdName (builtin_commands ++ cmds))))
50+  macros <- readIORef macros_ref
51+  let macro_names = map (':':) . map cmdName $ macros
52+  let command_names = map (':':) . map cmdName $ builtin_commands
53+  let{ candidates = case w of
54+      ':' : ':' : _ -> map (':':) command_names
55+      _ -> nub $ macro_names ++ command_names }
56+  return $ filter (w `isPrefixOf`) candidates
58 completeMacro w = do
59   cmds <- readIORef macros_ref
64[Fix a bug which sometimes caused extra major GCs to be performed
65Simon Marlow <marlowsd@gmail.com>**20090309140004
66 Ignore-this: 5127ff02153781823abb21fbb6f233f5
67 A long-running GC would cause the timer signal to declare the system
68 to be idle, which would cause a major GC immediately following the
69 current GC.  This only happened with +RTS -N2 or greater.
71[Redesign 64-bit HEAP_ALLOCED (FIX #2934 at the same time)
72Simon Marlow <marlowsd@gmail.com>**20090309121300
73 Ignore-this: 4018145c528e52995d1feb7636e34384
75 After much experimentation, I've found a formulation for HEAP_ALLOCED
76 that (a) improves performance, and (b) doesn't have any race
77 conditions when used concurrently.  GC performance on x86_64 should be
78 improved slightly.  See extensive comments in MBlock.h for the
79 details.
81[Partial fix for #2917
82Simon Marlow <marlowsd@gmail.com>**20090306100018
83 Ignore-this: d62309f9a2b682cc2b5ef0bb4376ea54
85  - add newAlignedPinnedByteArray# for allocating pinned BAs with
86    arbitrary alignment
88  - the old newPinnedByteArray# now aligns to 16 bytes
90 Foreign.alloca will use newAlignedPinnedByteArray#, and so might end
91 up wasting less space than before (we used to align to 8 by default).
92 Foreign.allocaBytes and Foreign.mallocForeignPtrBytes will get 16-byte
93 aligned memory, which is enough to avoid problems with SSE
94 instructions on x86, for example.
96 There was a bug in the old newPinnedByteArray#: it aligned to 8 bytes,
97 but would have failed if the header was not a multiple of 8
98 (fortunately it always was, even with profiling).  Also we
99 occasionally wasted some space unnecessarily due to alignment in
100 allocatePinned().
102 I haven't done anything about Foreign.malloc/mallocBytes, which will
103 give you the same alignment guarantees as malloc() (8 bytes on
104 Linux/x86 here).
106[Don't force HSCOLOUR_SRCS = YES when validating
107Ian Lynagh <igloo@earth.li>**20090308171633
108 This removes a burden from developers, and I can't remember an
109 occasion where it would have caught a regression.
111[Add CONTRACT to the pragmas that we recognise.
112Ian Lynagh <igloo@earth.li>**20090306194826
113 It's used by ESC/Haskell.
115[Generate lots of __inline_me during vectorisation
116Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090307135652]
117[Special-case desugaring of simple parallel array comprehensions
118Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090307134049]
119[Make LDV_FILL_SLOP use a forwards loop rather than a backwards loop
120Ian Lynagh <igloo@earth.li>**20090306155124]
121[Fix warning
122Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090306123645]
123[Try not to avoid vectorising purely scalar functions
124Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090306115508]
125[Package dph needs to be cleaned in stage=1, too
126Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090306031628
127 Ignore-this: b67f993abfbbe47c6bd417049955b9be
129[Add --version to runghc. Trac #2757.
130Ian Lynagh <igloo@earth.li>**20090305162045
131 We use the GHC version number, as the old runghc one doesn't seem very
132 useful.
134[add final newlines
135Simon Marlow <marlowsd@gmail.com>**20090305140014
136 My Windows build has started complaining about lacking final newlines,
137 I'm not entirely sure why.
139[remove foo.exe.manifest when --embed-manifest is on
140Simon Marlow <marlowsd@gmail.com>**20090305112726]
141[add --with-ld=c:/mingw/bin/ld
142Simon Marlow <marlowsd@gmail.com>**20090305112618]
143[Document -fwarn-unrecognised-pragmas; fixes trac #3031
144Ian Lynagh <igloo@earth.li>**20090305143128]
145[On OS X/x86, tell gcc to generate instructions for i686. Fixes trac #2983.
146Ian Lynagh <igloo@earth.li>**20090305142050
147 By default, gcc on OS X will generate SSE instructions, which need
148 things 16-byte aligned, but we don't 16-byte align things. Thus drop
149 back to generic i686 compatibility.
151[By default, only HsColour the docs if we find HsColour. Fixes trac #3004.
152Ian Lynagh <igloo@earth.li>**20090305132723
153 If you manually set HSCOLOUR_SRCS=YES then the build will fail if
154 HsColour wasn't found.
156[Make -fdicts-cheap cope with implication constraints
158 Ignore-this: 5fe66cc26e4dc6f233c73350cef7a110
160 See the Note [Dictionary-like types] in TcType for the full story here
161 Should only affect programs that use -fdicts-cheap, for
162 which you'll get better arities
165[Finally fix Trac #3066
167 Ignore-this: 8734c1799f854d9da6be76a9c134335e
169 This is a fix to
170   Tue Mar  3 17:42:58 GMT 2009  simonpj@microsoft.com
171     * Fix Trac #3066: checking argument types in foreign calls
172 which I embarassingly got wrong.
174 Have to be careful when expanding recursive newtypes.
176 Pls merge.
179[Fix a broken link. Spotted by Norman Ramsey in trac #3068.
180Ian Lynagh <igloo@earth.li>**20090304165351]
181[Fix spelling (Trac#3069)
183 Ignore-this: fee0f1d060c6c1c7a875943fe543c4fa
185[Layout only
187 Ignore-this: 4410b2b26227263b24fd5aa7d2144ea0
189[Fix a long-standing latent bug (and the build): check res_ty not sig_ty
191 Ignore-this: 3494ed3f342b63840eef791a5200695
193[Fix #3067: GHCi panics with 'initTc:LIE' while :stepping on code with funny types
194pepe iborra <mnislaih@gmail.com>**20090303193706
196 The problem is that calls to boxyUnify would panic if the types involved
197 contained type functions.
198 It looks like one should wrap these calls with getLIE, although I don't
199 really know what I am doing here
203[Fix Trac #3066: checking argument types in foreign calls
205 Ignore-this: c07b0df24b9965b190dc0e0797401c51
207 When checking argument types in a foreign call we were stupidly
208 looking through foralls.  The fix is easy.
210 Merge to 6.10.2
213[Fix Trac #3057 in deriving Functor
215 Ignore-this: 7d7783868e4684930f75c3b35c18c586
217 The universal type variables of a data constructor are not necessarily
218 identical to those of its parent type constructor, especially if the
219 data type is imported.
221 While I was at it, I did a significant refactoring to make all this
222 traversal of types more comprehensible, by adding the data type
223 FFoldType.
226[fix assertion failure with -debug non-threaded RTS (by deleting code!)
227Simon Marlow <marlowsd@gmail.com>**20090303143942
228 Ignore-this: 352f3c57979529f44ea92edbf1acbf07
230[improvements: generate LaTeX tables for more than one run
231Simon Marlow <marlowsd@gmail.com>**20090303141346
232 Ignore-this: 47588f0c4d046f2b5ff0dc7be38777c0
234[A few bug fixes; some improvements spurred by paper writing
236 Among others:
237 - Fixed Stg->C-- translation of let-no-escapes -- it's important to use the
238   right continuation...
239 - Fixed infinite recursion in X86 backend (shortcutJump mishandled infinite loops)
240 - Fixed yet another wrong calling convention -- primops take args only in vanilla regs,
241   but they may return results on the stack!
242 - Removed StackInfo from LGraph and Block -- now in LastCall and CmmZ
243 - Updated avail-variable and liveness code
246[Comments only
248 Ignore-this: 5c2a7c2a8116fb05e0e035baea9566fa
250[Filter out carriage returns in doc strings
251David Waern <david.waern@gmail.com>**20090228145351
253 We want the internal format to contain LFs only. This makes it easier to work
254 with the doc strings for clients of the GHC API.
256[z-encode digits at the start of a symbol name; fixes trac #2997
257Ian Lynagh <igloo@earth.li>**20090227180029
258 Digits already have a couple of meanings in z-encoding (Z3T is a tuple,
259 and z123U is a unicode character), so we encode digits as unicode
260 characters to avoid trying to squeeze in another meaning.
262 Also removed a little GHC < 6.2 compatibility hack.
264[Whitespace only
265Ian Lynagh <igloo@earth.li>**20090227163435]
266[Improve documentation of bang patterns
268 Ignore-this: fa7bf72db82a612d16d44a93f1537351
270[Use 'nonIOok' instead of 'True'; cosmetics only
272 Ignore-this: 80200cf3aec5abb95c6b23ef37fb590a
274[Tweak +RTS --info docs
275Ian Lynagh <igloo@earth.li>**20090227020758]
276[In +RTS --info output, use YES rather than Yes
277Ian Lynagh <igloo@earth.li>**20090227010230]
278[FIX #1891 (describe +RTS --info output in GHC user guide)
279Andrew Coppin <andrewcoppin@btinternet.com>**20090214150234]
280[If we are given -Werror, then pass -Werror to cpp
281Ian Lynagh <igloo@earth.li>**20090226001606]
282[Strip tag bits from closure pointers before trying to deference them.
284[SPARC NCG: Split out sanity checking into its own module
286[SPARC NCG: Add jumps to end of blocks when working out condition codes
288[SPARC NCG: Enforce the invariant that each block ends with a jump.
291  - If each basic block doesn't end with a jump then the register
292    liveness determinator will get the cross-block liveness info
293    wrong, resulting in a bad allocation.
295[Add targets clean.library.dph and remake.library.dph
296Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090224112037
297 Ignore-this: bc561099d9e32b6c7416bd60e5516733
298 - Package dph ist a meta package that contains a number of subpackages inside.
299 - This patch adds two targets to clean and remake all subpackages with a
300   single command.
302[:steplocal and :stepmodule should not polute trace history
303Peter Hercek <phercek@gmail.com>**20090222201002]
304[Do not print anything to stdout when stopping at a breakpoint with custom code attached
305Peter Hercek <phercek@gmail.com>**20090222195551
308[newPinnedByteArray#: align the result to 16-bytes (part of #2917)
309Simon Marlow <marlowsd@gmail.com>*-20090219103245
310 Ignore-this: 1aa4cd40aef9690760b3bf65e284efcb
312[Only use STAGE3_PACKAGE_CONF for building GHC itself
313Ian Lynagh <igloo@earth.li>**20090221151530
314 In particular, when building dph with the stage2 compiler, we want to
315 register it in the main package.conf.
317[Export blockUserSignals and unblockUserSignals (needed for #2870)
318Simon Marlow <marlowsd@gmail.com>**20090219113418
319 Ignore-this: b7c26c801e515c6848f1f8fca024198f
321[#2860: remove redundant unblocking of signals
322Simon Marlow <marlowsd@gmail.com>**20090219103258
323 Ignore-this: c603e23fbdc7f7f7de7fcd9a7aa28f0b
325[newPinnedByteArray#: align the result to 16-bytes (part of #2917)
326Simon Marlow <marlowsd@gmail.com>**20090219103245
327 Ignore-this: 1aa4cd40aef9690760b3bf65e284efcb
329[Rewrite of signal-handling (ghc patch; see also base and unix patches)
330Simon Marlow <marlowsd@gmail.com>**20090219103142
331 Ignore-this: aca7c3e258224fadc6f0f2fee86b2971
333 The API is the same (for now).  The new implementation has the
334 capability to define signal handlers that have access to the siginfo
335 of the signal (#592), but this functionality is not exposed in this
336 patch.
338 #2451 is the ticket for the new API.
340 The main purpose of bringing this in now is to fix race conditions in
341 the old signal handling code (#2858).  Later we can enable the new
342 API in the HEAD.
344 Implementation differences:
346  - More of the signal-handling is moved into Haskell.  We store the
347    table of signal handlers in an MVar, rather than having a table of
348    StablePtrs in the RTS.
350  - In the threaded RTS, the siginfo of the signal is passed down the
351    pipe to the IO manager thread, which manages the business of
352    starting up new signal handler threads.  In the non-threaded RTS,
353    the siginfo of caught signals is stored in the RTS, and the
354    scheduler starts new signal handler threads.
356[Fix an off-by-one; fixes the second bug in trac #3001
357Ian Lynagh <igloo@earth.li>**20090218235620]
358[Install libHSffi_p.a
359Ian Lynagh <igloo@earth.li>**20090218165913]
360[Fix ghc and ghci wrappers on Windows
361Ian Lynagh <igloo@earth.li>**20090218005034]
362[Make versioned ghc and ghci programs on Windows; fixes trac #2827
363Ian Lynagh <igloo@earth.li>**20090217215048]
364[SPARC NCG: Unsigned comparisons are unsigned
366[SPARC NCG: Fix word size conversions
368[SPARC NCG: Split up into chunks, and fix warnings.
370[SPARC NCG: Reorganise Reg and RegInfo
372[NCG: Cleanup old file
374[NCG: validate fixes for ppc-darwin
376[NCG: validate fixes for ghc-6.6
378[NCG: validate fixes for i386-darwin
380[NCG: validate fixes for x86_64-linux
382 Ignore-this: 1b81b402e6f7ef0c76656a15c3a9f139
384[NCG: Haddock validate fix
386[NCG: Validate fixes for x86-linux
388[SPARC NCG: Don't release top half of f6 and f8
390[NCG: Split up the native code generator into arch specific modules
393   - nativeGen/Instruction defines a type class for a generic
394     instruction set. Each of the instruction sets we have,
395     X86, PPC and SPARC are instances of it.
397   - The register alloctors use this type class when they need
398     info about a certain register or instruction, such as
399     regUsage, mkSpillInstr, mkJumpInstr, patchRegs..
401   - nativeGen/Platform defines some data types enumerating
402     the architectures and operating systems supported by the
403     native code generator.
405   - DynFlags now keeps track of the current build platform, and
406     the PositionIndependentCode module uses this to decide what
407     to do instead of relying of #ifdefs.
409   - It's not totally retargetable yet. Some info info about the
410     build target is still hardwired, but I've tried to contain
411     most of it to a single module, TargetRegs.
413   - Moved the SPILL and RELOAD instructions into LiveInstr.
415   - Reg and RegClass now have their own modules, and are shared
416     across all architectures.
418[SPARC NCG: Make linear allocator use info in SPARC.Regs again
420[SPARC NCG: Enumerate freeRegs / globalRegMaybe instead of using #ifdefery
422[NCG: Split PprMach into arch specific modules
424   - There are still some #ifdefs for choosing between i386, x86_64,
425       linux, darwin and other OS's.
426   - Also reformat SPARC.RegInfo to remove some of the visual noise.
428[Put RelaxedPolyRec in the cabal file rather than a pragma
429Ian Lynagh <igloo@earth.li>**20090213185635
430 This should fix the build with GHC 6.6
432[update Sparc store/load barrier (#3019), and fix comments
433Simon Marlow <marlowsd@gmail.com>**20090212092340
434 Ignore-this: 9d993cb743a0c015f0fc974000a7c7d7
436[comment wibbles
437Simon Marlow <marlowsd@gmail.com>**20090211152844
438 Ignore-this: b95f30df3aa53295a6dc8fd011cdfdaa
440[NCG: Use sync instead of msync for a memory barrier for powerpc
442   Darwin 9.6.0 + GCC 4.0.1 doesn't understand "msync".
443   I think "sync" means the same thing.
445[NCG: Split block reorder thing in linear allocator into separate fn
447[NCG: Validate fixes for powerpc
449[NCG: Add missing ops to powerpc isJumpish
451[Only pass --with-hscolour to cabal-bin once
452Ian Lynagh <igloo@earth.li>**20090212141023]
453[Quote some more arguments to cabal-bin
454Ian Lynagh <igloo@earth.li>**20090212141120]
455[Add more targets to the list that we need to include all libraries for
456Ian Lynagh <igloo@earth.li>**20090211173333]
457[Fix Trac #3017: ensure that we quantify over enough type variables when equalities are involved
459 Ignore-this: 92838c0a556240a8fb7744e3f29aa0f9
461 The function FunDeps.grow was not doing the right thing when type equality
462 constraints were involved.  That wasn't really its fault: its input was
463 being filtered by fdPredsOfInsts.
465 To fix this I did a bit of refactoring, so that the (revolting) fdPredsOfInsts
466 is now less important (maybe we can get rid of it in due course).  The 'grow'
467 function moves from FunDeps to
468         Inst.growInstsTyVars
469         TcMTType.growThetaTyVars
470         TcMType.growTyVars
472 The main comments are with the first of these, in
473 Note [Growing the tau-tvs using constraints] in Inst.
475 Push to the branch if conflict free.
479[general tidy up
480Simon Marlow <marlowsd@gmail.com>**20090211152429
481 Ignore-this: 9b6bbb08749b372bdd387a25405570f4
483[one more bugfix: a load/load memory barrier is required in stealWSDeque_()
484Simon Marlow <marlowsd@gmail.com>**20090211152421
485 Ignore-this: d89fff02d6b8c63272c9171e64d3510b
487[Fix trac #3001: Biographical profiling segfaults
488Ian Lynagh <igloo@earth.li>**20090211153457
489 We were zeroing the wrong memory
491[Tweak the mangler; fixes trac #2871
492Ian Lynagh <igloo@earth.li>**20090211150340
493 It was getting confused by lines like:
494  # 9 "C:\Temp\/ghc620_0/ghc620_0.hc" 1
496[On sparc, pass -mcpu=v9 when assembling with object splitting enabled
497Ian Lynagh <igloo@earth.li>**20090211141600
498 Fixes trac #2872.
500[Turn another ASSERT into a WARN (temproraily)
502 Ignore-this: 8982802501f7966ce482ef360aac6ec0
504 Fix Trac #3011 by temporarily making it only a WARN if we assign twice
505 to the same unification variable.
509[Improve documentation for LANGUAGE pragma (esp wrt cpp)
511 Ignore-this: 2c690e39766bb9c49c0e7bf8faecad47
513[Don't use the absolute path to the bindist tarball
514Ian Lynagh <igloo@earth.li>**20090210215215
515 On Windows, we end up doing something like
516     rsync c:/build/ghc-6.10.1-unknown-mingw32.tar.bz2 haskell.org:dist
517 and it thinks that it is meant to get the file from the host called "c".
518 Now we just do
519     rsync ghc-6.10.1-unknown-mingw32.tar.bz2 haskell.org:dist
520 so rsync understand what we mean.
522[Fix cleaning and installing the libraries
523Ian Lynagh <igloo@earth.li>**20090210225538
524 When cleaning or installing, we need to ignore what $stage is, and
525 just clean/install all the libraries.
527[scheduleYield(): check the wakeup queue before yielding
528Simon Marlow <marlowsd@gmail.com>**20090209112536
529 Ignore-this: d4aaf83d79ad8ca3ac2d904234eef599
531[Improvements to the "can't find module" error message (#2980)
532Simon Marlow <marlowsd@gmail.com>**20090206165743
533 Ignore-this: 2de565e20f68ebdc3865df7391c81437
534 If the module was found in multiple hidden packages, we list them all.
536 Could not find module `Data.Generics':
537   it is a member of the hidden package `base-'
538   it is a member of the hidden package `syb'
539   Use -v to see a list of the files searched for.
541[build fix: add -I../rts/parallel
542Simon Marlow <marlowsd@gmail.com>**20090206145921
543 Ignore-this: b4ab2760dd111b790421cf451289681f
545[crucial bugfix: add a store/load memory barrier to popWSDeque()
546Simon Marlow <marlowsd@gmail.com>**20090206130804
547 Ignore-this: 57d044afb7c635af2948d24d9c43a23f
549[bugfix: an unsigned comparison should be signed
550Simon Marlow <marlowsd@gmail.com>**20090206130745
551 Ignore-this: 981510f94dcb81e5896703f610b933e5
553[tiny cleanup
554Simon Marlow <marlowsd@gmail.com>**20090206130715
555 Ignore-this: 9497f8f6fbce2d0c23fd1d0eee4cdeda
557[add debugging code and comments
558Simon Marlow <marlowsd@gmail.com>**20090206130609
559 Ignore-this: 5f0e1e3fa0148da079f13eb07430c09b
561[add an assertion
562Simon Marlow <marlowsd@gmail.com>**20090206130338
563 Ignore-this: f4c0f539142c0dfdc57c70d1c6136f10
565[add a single-threaded version of cas()
566Simon Marlow <marlowsd@gmail.com>**20090206130130
567 Ignore-this: 80d5e7a3c35182d7d87e95c5c4096821
569[add a store/load memory barrier
570Simon Marlow <marlowsd@gmail.com>**20090206130115
571 Ignore-this: e0bc8f61877868ec8c2ccd9dee8f956d
573[Refactor the spark queue implementation into a generic work-stealing deque
574Simon Marlow <marlowsd@gmail.com>**20090205124648
575 Ignore-this: 1a7ee74388f30301d154d050d853a7a9
576 So we can use this abstraction elsewhere in the RTS
578[Handle the case where setitimer(ITIMER_VIRTUAL) is not always available
579Ian Lynagh <igloo@earth.li>**20090208191431
580 Patch from sthibaul. Fixes trac #2883.
582[Correct an IsFunction that should be IsData
583Ian Lynagh <igloo@earth.li>**20090207005834]
584[Fix calling maths functions when compiling via C
585Ian Lynagh <igloo@earth.li>**20090206223119]
586[Add a panic to fix the build on amd64/Linux; to be fixed properly later
587Ian Lynagh <igloo@earth.li>**20090206153135]
588[Fix the build on OS X: only understands .space, not .skip
589Ian Lynagh <igloo@earth.li>**20090206151203]
590[Fix building with GHC 6.8
591Ian Lynagh <igloo@earth.li>**20090206143432]
592[Fix the build on amd64/Linux
593Ian Lynagh <igloo@earth.li>**20090206143420]
594[When generating C, don't pretend functions are data
595Ian Lynagh <igloo@earth.li>**20090206140249
596 We used to generated things like:
597     extern StgWordArray (newCAF) __attribute__((aligned (8)));
598     ((void (*)(void *))(W_)&newCAF)((void *)R1.w);
599 (which is to say, pretend that newCAF is some data, then cast it to a
600 function and call it).
601 This goes wrong on at least IA64, where:
602     A function pointer on the ia64 does not point to the first byte of
603     code. Intsead, it points to a structure that describes the function.
604     The first quadword in the structure is the address of the first byte
605     of code
606 so we end up dereferencing function pointers one time too many, and
607 segfaulting.
609[NCG: Validate fixes
611[NCG: Split RegAllocInfo into arch specific modules
613[NCG: Move RegLiveness -> RegAlloc.Liveness
615[NCG: Rename MachRegs, MachInstrs -> Regs, Instrs to reflect arch specific naming
617[NCG: Split MachRegs.hs into arch specific modules
619[NCG: Fix validate
621[SPARC NCG: Fix some haddock problems.
623[SPARC NCG: Add Pwr callish mach op
625[NCG: Split MachInstrs into arch specific modules
627[NCG: Move the graph allocator into its own dir
629[SPARC NCG: Update cabal file
631[SPARC NCG: Give regs o0-o5 back to the allocator
633[NCG: Split out joinToTargets from linear alloctor into its own module.
636  * Also fix a nasty bug when creating fixup code that has a cyclic
637    register movement graph.
639[NCG: Split linear allocator into separate modules.
641[SPARC NCG: Keep track of destinations when doing a tabled jump
643[SPARC NCG: Do general 64 bit addition and conversion
645[SPARC NCG: Don't need a write barrier for store synchronisation on SPARC under TSO.
647[SPARC NCG: Use .skip instead of .space in assembler
650  - In the GNU assembler they mean the same thing
651  - The Solaris assembler only has .skip
654[Check -XGADTs in (a) type family decls (b) pattern matches
656 Ignore-this: 19a6268814440493eea436c48daa8414
658 Following Trac #2905, we now require -XGADTs for *pattern matches* on
659 GADTs, not just on *definitions*.
661 Also I found that -XGADTs wasn't being checked when declaring type families,
662 so I fixed that too.
665[Improve error reports for kind checking (Trac #2994)
667 Ignore-this: 402fe9f025abf8e2a3088383c23a89f6
669 I followed the suggestion in Trac #2994, which took longer than I
670 expected.  As usual I did a bit of tidying up at the same time,
671 and improved a few other error reports.
674[Further wibbles to 'deriving' for functor-like things
676 Ignore-this: 1a69dfc25f741148b5b817aa66803d5c
678[leave out rts/ from include-dirs in the inplace rts package
679Simon Marlow <marlowsd@gmail.com>**20090204104748
680 Ignore-this: 3a5c7e53121421600aa21a53b57cc9fb
681 it shouldn't be there, and might hide bugs
683[Fix Trac #2999: change an ASSERT to a WARN
685 Ignore-this: db6fdc200a06ba5f067d567ea64f89e1
687 A bug in the constraint simplifier means that an equality can be solved
688 twice.  It's harmless, and will go away with the new constraint simplifier.
689 Hence warning, to avoid unnecessary outright failure on eg Trac #2999.
692[Improve transferPolyIdInfo for value-arg abstraction
694 Ignore-this: 687def702522c3516050de1e14e5219f
696 If we float a binding out of a *value* lambda, the fixing-up of IdInfo
697 is a bit more complicated than before.  Since in principle FloatOut
698 can do this (and thus can do full lambda lifting), it's imporrtant
699 that transferPolyIdInfo does the Right Thing.
701 This doensn't matter unless you use FloatOut's abilty to lambda-lift,
702 which GHC mostly doesn't, yet.  But Max used it and tripped over this bug.
705[Two small improvements to LiberateCase
707 Ignore-this: ca41d8d9ef1b409b32761b1a69bd1400
709 Max Bolingbroke suggested these two small improvements to LiberateCase
710 (most of the size increase is comments :-)):
712 a) Do LiberateCase on small functions even if they are mutually recursive
713    See Note [Small enough]
715 b) Don't do LiberateCase on functions for which it'd be fruitless,
716    namely when a free varible is scrutinised *outside* the function
717    See Note [Avoiding fruitless liberate-case]
719 There is virtually no effect on nofib, but Max tripped over cases
720 where it mattered slightly.
724[Robustify lookupFamInstEnv, plus some refactoring
726 Ignore-this: 493fdbd370a714bf9677b16d2ba533d7
728 This patch deals with the following remark
730      Suppose we have
731             type family T a :: * -> *
732             type instance T Int = []
734      and now we encounter the type (T Int Bool).  If we call
735      lookupFamInstEnv on (T Int Bool) we'll fail, because T has arity 1.
736      Indeed, I *think* it's a precondition of lookupFamInstEnv that the
737      supplied types exactly match the arity of the type function.  But
738      that precondition is neither stated, nor is there an assertion to
739      check it.
741 With this patch, lookupFamInstEnv can take "extra" type arguments in
742 the over-saturated case, and does the Right Thing.
744 There was a nearly-identical function lookupFamInstEnvUnify, which
745 required the precisely analogous change, so I took the opportunity
746 to combine the two into one function, so that bugs can be fixed in one
747 place.  This was a bit harder than I expected, but I think the result
748 is ok.  The conflict-decision function moves from FamInst to FamInstEnv.
749 Net lines code decreases, although there are more comments.
754[Robustify lookupFamInstEnv
756 Ignore-this: ee312b2b59155102d88397a33c591ad2
758 Suppose we have
759         type family T a :: * -> *
760         type instance T Int = []
762 and now we encounter the type (T Int Bool).  That is perfectly
763 fine, even though T is over-saturated here.
765 This patch makes lookupFamInstEnv robust to such over-saturation.
766 Previously one caller (TcTyFuns.tcUnfoldSynFamInst) dealt with
767 the over-saturation case, but the others did not. It's better
768 to desl with the issue at the root, in lookupFamInstEnv itself.
771[Improve trace message
773 Ignore-this: 2276ebc89246553cbb6a1a4cd7c76fd9
775[Build dph with the stage2 compiler
776Ian Lynagh <igloo@earth.li>**20090203213613
777 It will use TH, so needs to be built with stage2.
779[Optimise writing out the .s file
780Simon Marlow <marlowsd@gmail.com>**20090202145013
781 I noticed while working on the new IO library that GHC was writing out
782 the .s file in lots of little chunks.  It turns out that this is a
783 result of using multiple printDocs to avoid space leaks in the NCG,
784 where each printDoc is finishing up with an hFlush. 
786 What's worse, is that this makes poor use of the optimisation inside
787 printDoc that uses its own buffering to avoid hitting the Handle all
788 the time.
790 So I hacked around this by making the buffering optimisation inside
791 Pretty visible from the outside, for use in the NCG.  The changes are
792 quite small.
794[better error message for missing package-qualified modules in ghc -M
795Simon Marlow <marlowsd@gmail.com>**20090123142001]
796[add wiki commentary links
797Simon Marlow <marlowsd@gmail.com>**20090130110844
798 Ignore-this: 3f27b426bc5ad54157edc06a421e28bf
800[Force the result of user-defined commands
801Simon Marlow <marlowsd@gmail.com>**20090130091919
802 Ignore-this: f756d00cc062072e1945d63cfbbeb98
803 so that exceptions are reported with "*** Exception" instead of as a panic.
805[Improve error reporting for precedence errors
807 Ignore-this: 493643a40c119ba6ad54d0f220dc4606
809 Adopt the suggestion of Trac #2993, and tidy up the reporting of
810 precedence parsing errors somewhat.
813[Add the ability to derive instances of Functor, Foldable, Traversable
815 Ignore-this: f3013fefdd65f75fb5060ef0e002f40e
817 This patch is a straightforward extension of the 'deriving' mechanism.
818 The ability to derive classes Functor, Foldable, Traverable is controlled
819 by a single flag  -XDeriveFunctor.  (Maybe that's a poor name.)
821 Still to come: documentation
823 Thanks to twanvl for developing the patch
827[Comments about injecting implicit bindings
829 Ignore-this: 7aa1a69f5a16811272bed0683234aca3
831[Warn in configure if it looks like make 3.80 is about to be used
832Ian Lynagh <igloo@earth.li>**20090201203505
833 We get caught by
834     http://savannah.gnu.org/bugs/index.php?1516
835     $(eval ...) inside conditionals causes errors
836 with make 3.80, so warn the user if it looks like they're about to
837 try to use it.
839[Fix Trac #2985: generating superclasses and recursive dictionaries
841 Ignore-this: 921ab14e850085ddbe545b078e02120b
843 The Note [Recursive instances and superclases] explains the subtle
844 issues to do with generating the bindings for superclasses when
845 we compile an instance declaration, at least if we want to do the
846 clever "recursive superclass" idea from the SYB3 paper.
848 The old implementation of tcSimplifySuperClasses stumbled when
849 type equalities entered the picture (details in the Note); this
850 patch fixes the problem using a slightly hacky trick.  When we
851 re-engineer the constraint solver we'll want to keep an eye on
852 this.
854 Probably worth merging to the 6.10 branch.
858[White space only
860 Ignore-this: fdc9c862fa91a57bdb81b7370eb482bd
862[Two more wibbles to CorePrep (fixes HTTP package and DPH)
864 Ignore-this: ee42b5f5a73a5277b5fd0e8c679e8fbe
866 Ensuring that
867   a) lambdas show up only on the RHSs of binding after CorePrep
868   b) the arity of a binding exactly matches the maifest lambdas
869 is surprisingly tricky.
871 I got it wrong (again) in my recent CorePrep shuffling, which broke
872 packages HTTP and DPH.  This patch fixes both.
875[Remove the doc/ contents from the GMP tarball
876Ian Lynagh <igloo@earth.li>**20090128200749
877 They are GFDLed, which causes problems for Debian
879[#2973: we should virtualise the CWD inside the GHC API, not in the client
880Simon Marlow <marlowsd@gmail.com>**20090127121648
881 Ignore-this: 5d57181d25a0661ad20fa48154f4a80
882 The problem is that we install the client's CWD before calling
883 runStmt, but runStmt has to load modules before running the code.  We
884 need to install the CWD just before running the code instead, which
885 means it has to be done inside runStmt (and resume).
887[Fix detection of i386 vs. x86_64 for -pc-solaris
888Simon Marlow <marlowsd@gmail.com>**20090127095343
889 Ignore-this: b415138105477e7edab96994babbe6d2
890 From #2951
892[Implement #2191 (traceCcs# -- prints CCS of a value when available -- take 3)
893Samuel Bronson <naesten@gmail.com>**20090127084825
894 Ignore-this: ede3f18c70cfb7979ef21d7e8077dad6
895 In this version, I untag R1 before using it, and even enter R2 at the
896 end rather than simply returning it (which didn't work right when R2
897 was a thunk).
899[add comment for ASSERT_LOCK_HELD()
900Simon Marlow <marlowsd@gmail.com>**20090126140030
901 Ignore-this: c3ce1e8df9d94eb92a17f4f58c496a41
903[Fix #2961: we lost some of the generated code for stack args in genCCall
904Simon Marlow <marlowsd@gmail.com>**20090126150209
905 Ignore-this: 77de911bfc98ecca566f1744dfe75a7b
906 A real bug in the x86_64 native code gen: nice!
908 This bug would have been caught by -Wall, and I would have gone though
909 and Walled this file but I know Ben is hacking on this file quite
910 heavily and I don't want to create undue conflicts.  Ben: it would be
911 nice to enable -Wall here when you have time.
913[Make the libffi patch files portable
914Ian Lynagh <igloo@earth.li>**20090123180015
915 Solaris's patch can't apply them if the lines beginning "---" aren't
916 preceeded by a "diff -ur foo bar" line.
918[SPARC NCG: Also do misaligned reads (this time for sure!)
920[SPARC NCG: Also do misaligned reads
922[When converting TH syntax to GHC syntax, need to put sections in parentheses
923Ian Lynagh <igloo@earth.li>**20090121141706
924 Fixes trac #2956
926[SPARC NCG: Add a SPARC version of rts_mkInt64 that handles misaligned closure payloads.
928[SPARC NCG: Reenable out of line 32 bit float ops
930[SPARC NCG: Clean up formatting and add comments in genCCall
932[SPARC NCG: Fix format problem when converting float to int
934[SPARC NCG: fill branch delay slot after tabled jump (doh!)
936[SPARC NCG: Add tabled switch
938[SPARC NCG: Fix 64bit integers returned from ccalls
940[#2875: Correct SYB's representation of Char
941'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20090119112321]
942[Fix #2759: add ability to serialize Rational
943'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081209125551]
944[SPARC NCG: Fix warnings
946[SPARC NCG: Remove a comment that was confusing haddock
948[SPARC NCG: ppr 64 bit store sizes
950[SPARC NCG: Fix generation of 64 bit ops on 32 bit sparc
952[SPARC NCG: Add support for hardware divide
954[SPARC NCG: Redo code for integer sign extension
956[SPARC NCG: Fix signed/unsigned operand format bug
958[More fixes to the SPARC native code generator
961  * Fix loading of 64bit floats
962  * Put SRT and other read only static data in the .text segment
964[Start fixing the SPARC native code generator
967   * Use BlockIds in branch instructions instead of Imms.
968   * Assign FP values returned from C calls to the right regs
969   * Fix loading of F32s
970   * Add a SPARC version of the FreeRegs map to the linear allcator.
972[Fix some holes in the SPARC native code generator.
975 This makes about half the tests in codeGen/should_run work.
977[Untag closure pointers before trying to print them.
980 In RTS tracing code, need to untag the pointer before trying
981 to load the info table in printClosure()
983[Add missing documention of -Da DEBUG: apply flag to RTS help.
985[Better panic message in RegAllocLinear
987[Make the SPARC NCG compile again - it's still broken though.
989[Enable the native code generator for SPARC
991[Always use PTHREAD_MUTEX_ERRORCHECK to create mutexes when -DDEBUG
992Ian Lynagh <igloo@earth.li>**20090118193328
994 anyway, so there's no need to special-case it.
996[Use error-checking mutexes on all platforms when DEBUG is on
997Ian Lynagh <igloo@earth.li>**20090117215931
998 Otherwise ASSERT_LOCK_HELD will cause deadlocks
1000[Reinstate: Always check the result of pthread_mutex_lock() and pthread_mutex_unlock().
1001Ian Lynagh <igloo@earth.li>**20090117200955
1002 Sun Jan  4 19:24:43 GMT 2009  Matthias Kilian <kili@outback.escape.de>
1003     Don't check pthread_mutex_*lock() only on Linux and/or only if DEBUG
1004     is defined. The return values of those functions are well defined
1005     and should be supported on all operation systems with pthreads. The
1006     checks are cheap enough to do them even in the default build (without
1007     -DDEBUG).
1009     While here, recycle an unused macro ASSERT_LOCK_NOTHELD, and let
1010     the debugBelch part enabled with -DLOCK_DEBUG work independently
1011     of -DDEBUG.
1013[Initialise and deinitialise the file_lock_mutex
1014Ian Lynagh <igloo@earth.li>**20090117023947]
1015[Create package.conf when installing a bindist
1016Ian Lynagh <igloo@earth.li>**20090118110654]
1017[validate fix on 32-bit
1018Simon Marlow <marlowsd@gmail.com>**20090114162834]
1019[fix validate on Windows
1020Simon Marlow <marlowsd@gmail.com>**20090114155842]
1021[UNDO: Always check the result of pthread_mutex_lock() and pthread_mutex_unlock().
1022Simon Marlow <marlowsd@gmail.com>**20090116114339
1023 Ignore-this: 6cc82d384582097785d78fba46ca29d2
1024 This patch caused problems on Mac OS X, undoing until we can do it better.
1026 rolling back:
1028 Sun Jan  4 19:24:43 GMT 2009  Matthias Kilian <kili@outback.escape.de>
1029   * Always check the result of pthread_mutex_lock() and pthread_mutex_unlock().
1031   Don't check pthread_mutex_*lock() only on Linux and/or only if DEBUG
1032   is defined. The return values of those functions are well defined
1033   and should be supported on all operation systems with pthreads. The
1034   checks are cheap enough to do them even in the default build (without
1035   -DDEBUG).
1037   While here, recycle an unused macro ASSERT_LOCK_NOTHELD, and let
1038   the debugBelch part enabled with -DLOCK_DEBUG work independently
1039   of -DDEBUG.
1042     M ./includes/OSThreads.h -30 +10
1044[Update config.guess, config.sub and install.sh from automake-1.10.2
1045Simon Marlow <marlowsd@gmail.com>**20090116095311
1046 Ignore-this: cdc19dd28053a6a71283776ecb802c62
1047 In particular, config.guess should now know about x86_64-pc-solaris2
1049[More useful error message when a package .hi file cannot be found:
1050Simon Marlow <marlowsd@gmail.com>**20090115122524
1051 Ignore-this: b595e2fac5d9b5214340f83a7d7dd730
1053 > import System.Process
1054 Could not find module `System.Process':
1055   There are files missing in the process- package,
1056   try running 'ghc-pkg check'.
1057   Use -v to see a list of the files searched for.
1059[soup-up "ghc-pkg check"
1060Simon Marlow <marlowsd@gmail.com>**20090115122143
1061 Ignore-this: 6d29af258eb31d417d01fed167cd5d47
1063 We now look for missing files (including .hi files), and report all
1064 the packages that are transitively broken.
1066 $ ghc-pkg check
1067 There are problems in package syb-
1068   dependency foo- doesn't exist
1069 There are problems in package process-
1070   file System/Process.hi is missing
1072 The following packages are broken, either because they have a problem
1073 listed above, or because they depend on a broken package.
1074 syb-
1075 process-
1076 base-
1077 Cabal-1.7.0
1078 haskell98-
1079 haddock-2.4.2
1080 ghc-6.11
1082[document -feager-blackholing
1083Simon Marlow <marlowsd@gmail.com>**20090115093922
1084 Ignore-this: 5958a16c7148cb5df0f4b3f1e1dee6d6
1086[External Core: re-add code I removed mistakenly in last commit
1087Tim Chevalier <chevalier@alum.wellesley.edu>**20090115002612]
1088[External Core lib: lots of cleanup
1089Tim Chevalier <chevalier@alum.wellesley.edu>**20090114224428
1091 - Factor out code for applying newtypes from Check into CoreUtils
1092 - Use this code in Prep, which allowed for some simplification
1093 - Change Merge and ElimDeadCode to not flatten top-level binds
1094 - Add a flag for elimDeadCode to tell it whether to keep
1095 exported bindings or not.
1096 - Other things.
1098[External Core: print out more precise dependency info
1099Tim Chevalier <chevalier@alum.wellesley.edu>**20090114221734
1101 Print out the same recursive/non-recursive binding groups
1102 that existed in internal Core in an External Core file,
1103 rather than dumping everything into one big recursive group.
1105[Fix "make install": Put "[]" in the install package.conf
1106Ian Lynagh <igloo@earth.li>**20090114205945]
1107[Remove redundant import; spotted by Thorkil Naur
1108Ian Lynagh <igloo@earth.li>**20090114181937]
1109[Remove a redundant import
1110Ian Lynagh <igloo@earth.li>**20090114181212]
1111[Detect when a C finalizer calls back to Haskell
1112Simon Marlow <marlowsd@gmail.com>**20090114121526
1113 Ignore-this: e361d7278e2478da2f300625076cc0ae
1114 This is illegal now, after the fix for #1364, but it turns out that
1115 the existing check for dodgy callbacks doesn't catch finalizers
1116 calling back, so we need another test.  This will be particularly
1117 important for 6.10.2, because the behaviour has changed.
1119[Fix Trac #2931
1121 Ignore-this: 6ff0207627165f3f7bd145171e59b533
1123 Fix the lexical analyser when it encounters 'x<EOF> and Template
1124 Haskell is on.
1127[Rewrite CorePrep and improve eta expansion
1129 Ignore-this: 910d1d613592c116714c324618b1e45c
1131 This patch does two main things
1133 a) Rewrite most of CorePrep to be much easier to understand (I hope!).
1134    The invariants established by CorePrep are now written out, and
1135    the code is more perspicuous.  It is surpringly hard to get right,
1136    and the old code had become quite incomprehensible.
1138 b) Rewrite the eta-expander so that it does a bit of simplifying
1139    on-the-fly, and thereby guarantees to maintain the CorePrep
1140    invariants.  This make it much easier to use from CorePrep, and
1141    is a generally good thing anyway.
1143 A couple of pieces of re-structuring:
1145 *  I moved the eta-expander and arity analysis stuff into a new
1146    module coreSyn/CoreArity.
1148    Max will find that the type CoreArity.EtaInfo looks strangely
1149    familiar.
1151 *  I moved a bunch of comments from Simplify to OccurAnal; that's
1152    why it looks as though there's a lot of lines changed in those
1153    modules.
1155 On the way I fixed various things
1157   - Function arguments are eta expanded
1158        f (map g)  ===>  let s = \x. map g x in f s
1160   - Trac #2368
1162 The result is a modest performance gain, I think mainly due
1163 to the first of these changes:
1165 --------------------------------------------------------------------------------
1166         Program           Size    Allocs   Runtime   Elapsed
1167 --------------------------------------------------------------------------------
1168             Min          -1.0%    -17.4%    -19.1%    -46.4%
1169             Max          +0.3%     +0.5%     +5.4%    +53.8%
1170  Geometric Mean          -0.1%     -0.3%     -7.0%    -10.2%
1175[Rename isIdentityCoercion to isIdentityCoI; add Coercion.isIdentityCoercion
1177 Ignore-this: ac05f38a092959c08972c768fe427e06
1179[Spelling in comment only
1181 Ignore-this: 2eb6372f996b9133683918aecad1a5aa
1183[Make the ASSERT more informative
1185 Ignore-this: 4059e33cf594403e03c0eb4169dc300f
1187[Export mapOL from OrdList
1189 Ignore-this: 3debd81ae00d3745ec248197b97d312f
1191[Improve error messages slightly
1193 Ignore-this: 89090ec03d8ea201f64105c0dbb8d5f9
1195[Do not do SpecConstr on functions that unconditionally diverge
1197 Ignore-this: cb0c210b936941b241c312c72545bfe2
1199 There is no point in specialising a function that is guaranteed to
1200 diverge, and doing so screwed up arity stuff. 
1202 See Note [Do not specialise diverging functions].
1206[Make -XTypeFamilies imply -XRelaxedPolyRec (Trac #2944)
1208 Ignore-this: 8ab21566045c8bc8050ed7dda04e2df
1210[Fix Trac #2937: deserialising assoicated type definitions
1212 Ignore-this: 7d7852a70a34fc22773757709735cc24
1214 The deserialiser (TcIface) for associated type definitions wasn't
1215 taking into account that the class decl brings into scope some
1216 type variables that scope over the data/type family declaration.
1218 Easy to fix: the new function is TcIface.bindIfaceTyVars_AT
1221[Always check the result of pthread_mutex_lock() and pthread_mutex_unlock().
1222Matthias Kilian <kili@outback.escape.de>**20090104192443
1224 Don't check pthread_mutex_*lock() only on Linux and/or only if DEBUG
1225 is defined. The return values of those functions are well defined
1226 and should be supported on all operation systems with pthreads. The
1227 checks are cheap enough to do them even in the default build (without
1228 -DDEBUG).
1230 While here, recycle an unused macro ASSERT_LOCK_NOTHELD, and let
1231 the debugBelch part enabled with -DLOCK_DEBUG work independently
1232 of -DDEBUG.
1235[sanity checking fixes
1236Simon Marlow <marlowsd@gmail.com>**20090112121042]
1237[Keep the remembered sets local to each thread during parallel GC
1238Simon Marlow <marlowsd@gmail.com>**20090112121024
1239 This turns out to be quite vital for parallel programs:
1241   - The way we discover which threads to traverse is by finding
1242     dirty threads via the remembered sets (aka mutable lists).
1244   - A dirty thread will be on the remembered set of the capability
1245     that was running it, and we really want to traverse that thread's
1246     stack using the GC thread for the capability, because it is in
1247     that CPU's cache.  If we get this wrong, we get penalised badly by
1248     the memory system.
1250 Previously we had per-capability mutable lists but they were
1251 aggregated before GC and traversed by just one of the GC threads.
1252 This resulted in very poor performance particularly for parallel
1253 programs with deep stacks.
1255 Now we keep per-capability remembered sets throughout GC, which also
1256 removes a lock (recordMutableGen_sync).
1258[indicate which TSOs are dirty in the printAllThreads() output
1259Simon Marlow <marlowsd@gmail.com>**20090107151449]
1260[Fix Trac #2584: Pretty printing of types with HsDocTy
1261David Waern <david.waern@gmail.com>**20090109191713
1263 The pretty printing clause for HsDocTy was wrong, causing brackets to be left
1264 out. We now print Haddock comments on types as if they were postfix type
1265 operators.
1267[Add "Word size" to the +RTS --info output
1268Ian Lynagh <igloo@earth.li>**20090109160454]
1269[Check that make supports eval
1270Ian Lynagh <igloo@earth.li>**20090109151006]
1271[Add some more fields to +RTS --info
1272Ian Lynagh <igloo@earth.li>**20090108131101]
1273[FIX BUILD on Windows (fix for #2873 broke it)
1274Simon Marlow <marlowsd@gmail.com>**20090109090658]
1275[when calling mmap() with MAP_ANON, the fd argument should be -1
1276Simon Marlow <marlowsd@gmail.com>**20090108155341
1277 might fix #2925
1279[Fix Trac #2914: record wild cards and assoicated types
1281[Fix #2873: should fail if a package DB desn't exist
1282Simon Marlow <marlowsd@gmail.com>**20090108095628
1283 We allowed non-existence before because the user DB is allowed to not
1284 exist, so now we have an explicit exception for that case.
1286[Close the races between throwTo and thread completion
1287Simon Marlow <marlowsd@gmail.com>**20090107140507
1288 Any threads we missed were being caught by the GC (possibly the idle
1289 GC if the system was otherwise inactive), but that's not ideal.  The
1290 fix (from Bertram Felgenhauer) is to use lockTSO to synchronise,
1291 imposing an unconditional lockTSO on thread exit.  I couldn't measure
1292 any performance overhead from doing this, so it seems reasonable.
1294[add comment
1295Simon Marlow <marlowsd@gmail.com>**20090107121142]
1296[Fix two more locking issues in throwTo()
1297Bertram Felgenhauer <int-e@gmx.de>**20090107120808]
1298[maybePerformBlockedException() should handle ThreadComplete/ThreadKilled
1299Simon Marlow <marlowsd@gmail.com>**20090107120734
1300 Part of the fix for #2910
1302[fix a race where the timer signal could remain turned off, leading to deadlock
1303Simon Marlow <marlowsd@gmail.com>**20090107120652]
1304[putMVar and takeMVar: add write_barrier() to fix race with throwTo
1305Simon Marlow <marlowsd@gmail.com>**20090107112026]
1306[cruft removal
1307Simon Marlow <marlowsd@gmail.com>**20090106154408]
1308[wake up the blocked exception queue on ThreadFinished; fixes #2910
1309Simon Marlow <marlowsd@gmail.com>**20090106153254]
1310[bump GHC's max stack size to 512M
1311Simon Marlow <marlowsd@gmail.com>**20081219112211
1312 To accomodate compiling very long static lists (#2002)
1314[ext-core: change .cabal file so we can build with either GHC 6.8 or 6.10
1315Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192757]
1316[ext-core: fix some Prep bugs
1317Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192734]
1318[ext-core: use shorter names when combining modules
1319Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192645]
1320[ext-core: twiddle primitive things
1321Tim Chevalier <chevalier@alum.wellesley.edu>**20090105192434]
1322[Don't pin a register for gc_thread on SPARC.
1325 This makes the build work again.
1327[Require HsColour by default
1328Ian Lynagh <igloo@earth.li>**20090104214647
1329 This should stop us ending up without HsColour'ed sources on some
1330 platforms.
1332 We also now tell Cabal where to find HsColour, rather than it finding
1333 it itself.
1335[Fix build
1336Ian Lynagh <igloo@earth.li>**20090104211810]
1337[Add GHCi completions to :set and :show
1338Ori Avtalion <ori@avtalion.name>**20081209194210]
1339[Fix sync-all: Check for --complete/partial before --<anything>
1340Ian Lynagh <igloo@earth.li>**20090104184652
1341 Patch from megacz in trac #2857
1343[Remove time from extralibs at request of maintainer
1344Ian Lynagh <igloo@earth.li>**20090104115509]
1345[validate fix: InteractiveEval no longer needs to import  IdInfo
1346Ian Lynagh <igloo@earth.li>**20090103154754]
1347[Fix validate: strs is no longer used in IfaceSyn
1348Ian Lynagh <igloo@earth.li>**20090103153624]
1349[Remove trailing whitespace from HaddockUtils
1350Ian Lynagh <igloo@earth.li>**20081229191727]
1351[Fix warnings in HaddockUtils
1352Ian Lynagh <igloo@earth.li>**20081229191657]
1353[Remove dead code from HaddockUtils
1354Ian Lynagh <igloo@earth.li>**20081229191430]
1355[Make record selectors into ordinary functions
1358 This biggish patch addresses Trac #2670.  The main effect is to make
1359 record selectors into ordinary functions, whose unfoldings appear in
1360 interface files, in contrast to their previous existence as magic
1361 "implicit Ids".  This means that the usual machinery of optimisation,
1362 analysis, and inlining applies to them, which was failing before when
1363 the selector was somewhat complicated.  (Which it can be when
1364 strictness annotations, unboxing annotations, and GADTs are involved.)
1366 The change involves the following points
1368 * Changes in Var.lhs to the representation of Var.  Now a LocalId can
1369   have an IdDetails as well as a GlobalId.  In particular, the
1370   information that an Id is a record selector is kept in the
1371   IdDetails.  While compiling the current module, the record selector
1372   *must* be a LocalId, so that it participates properly in compilation
1373   (free variables etc).
1375   This led me to change the (hidden) representation of Var, so that there
1376   is now only one constructor for Id, not two.
1378 * The IdDetails is persisted into interface files, so that an
1379   importing module can see which Ids are records selectors.
1381 * In TcTyClDecls, we generate the record-selector bindings in renamed,
1382   but not typechecked form.  In this way, we can get the typechecker
1383   to add all the types and so on, which is jolly helpful especially
1384   when GADTs or type families are involved.  Just like derived
1385   instance declarations.
1387   This is the big new chunk of 180 lines of code (much of which is
1388   commentary).  A call to the same function, mkAuxBinds, is needed in
1389   TcInstDcls for associated types.
1391 * The typechecker therefore has to pin the correct IdDetails on to
1392   the record selector, when it typechecks it.  There was a neat way
1393   to do this, by adding a new sort of signature to HsBinds.Sig, namely
1394   IdSig.  This contains an Id (with the correct Name, Type, and IdDetails);
1395   the type checker uses it as the binder for the final binding.  This
1396   worked out rather easily.
1398 * Record selectors are no longer "implicit ids", which entails changes to
1399      IfaceSyn.ifaceDeclSubBndrs
1400      HscTypes.implicitTyThings
1401      TidyPgm.getImplicitBinds
1402   (These three functions must agree.)
1404 * MkId.mkRecordSelectorId is deleted entirely, some 300+ lines (incl
1405   comments) of very error prone code.  Happy days.
1407 * A TyCon no longer contains the list of record selectors:
1408   algTcSelIds is gone
1410 The renamer is unaffected, including the way that import and export of
1411 record selectors is handled.
1413 Other small things
1415 * IfaceSyn.ifaceDeclSubBndrs had a fragile test for whether a data
1416   constructor had a wrapper.  I've replaced that with an explicit flag
1417   in the interface file. More robust I hope.
1419 * I renamed isIdVar to isId, which touched a few otherwise-unrelated files.
1423[Fix Trac #2721: reject newtype deriving if the class has associated types
1425[-XImpredicativeTypes implies -XRankNTypes, and improve error msg in TcMType
1428 If you are going for impredicative types you almost certainly want RankN
1429 too. The change to TcMType improves the error when you say
1430      T (forall a. blah)
1431 where T is a type synonym.  This doesn't necessarily need impredicativity,
1432 if you have LiberalTypeSynonyms.
1435[Fix Trac #2856: make deriving work for type families
1438 Darn, but TcDeriv is complicated, when type families get in on
1439 the act!  This patch makes GeneralisedNewtypeDeriving work
1440 properly for type families.  I think.
1442 In order to do so, I found that GeneralisedNewtypeDeriving can
1443 work for recursive newtypes too -- and since families are conservatively
1444 marked recursive, that's a crucial part of the fix, and useful too.
1445 See Note [Recursive newtypes] in TcDeriv.
1448[White space and spelling in comments
1450[Remove -XImpredicativeTypes from -fglasgow-exts
1453 See Trac #2846: impredicative types are far from stable, so
1454 -fglasgow-exts should not imply them.  Maybe we should merge
1455 this into 6.10?
1458[Improve error reporting for 'deriving'
1461 a) Improve the extra suggested fix when there's a "no instance"
1462    error in a deriving clause.
1464 b) Improve error location recording in tcInstDecl2
1466 Many of the changes in tcInstDecl2 are simple reformatting.
1470[Improve error message in deriving (fix Trac #2851)
1472[Avoid nasty name clash with associated data types (fixes Trac #2888)
1475 The main bug was in TcHsType; see Note [Avoid name clashes for
1476 associated data types].  However I did a bit of re-factoring while
1477 I was abouut it.
1479 I'm still a but unhappy with the use of TyCon.setTyConArgPoss; it'd
1480 be better to construct the TyCon correctly in the first place.  But
1481 that means passing an extra parameter to tcTyDecl1... maybe we should
1482 do this.
1486[Refactor RnEnv to fix Trac #2901
1489 This tidy-up fixes Trac #2901, and eliminates 20 lines of code.
1490 Mainly this is done by making a version of lookupGlobalOccRn that
1491 returns (Maybe Name); this replaces lookupSrcOccRn but does more.
1494[Add quotes to error message
1496[Tidy up treatment of big lambda (fixes Trac #2898)
1499 There was a leftover big lambda in the CorePrep'd code, which confused
1500 the bytecode generator.  Actually big lambdas are harmless.  This patch
1501 refactors ByteCodeGen so that it systemantically used 'bcView' to eliminate
1502 junk.  I did a little clean up in CorePrep too.
1504 See comments in Trac #2898.
1507[Fix warnings in ByteCodeAsm
1508Ian Lynagh <igloo@earth.li>**20081229174726]
1509[Fix warnings in ByteCodeInstr
1510Ian Lynagh <igloo@earth.li>**20081229173331]
1511[Fix warnings in Rules
1512Ian Lynagh <igloo@earth.li>**20081229171832]
1513[Fix warnings in StgCmmForeign
1514Ian Lynagh <igloo@earth.li>**20081229165957]
1515[Fix warnings in CgCallConv
1516Ian Lynagh <igloo@earth.li>**20081229165402]
1517[Fix warnings in SMRep
1518Ian Lynagh <igloo@earth.li>**20081229164959]
1519[Fix warnings in ClosureInfo
1520Ian Lynagh <igloo@earth.li>**20081229164618]
1521[Fix warnings in CgTicky
1522Ian Lynagh <igloo@earth.li>**20081229153416]
1523[Fix warnings in CgCon
1524Ian Lynagh <igloo@earth.li>**20081229151733]
1525[Fix warnings in WorkWrap
1526Ian Lynagh <igloo@earth.li>**20081229150406]
1527[Fix warnings in NCGMonad
1528Ian Lynagh <igloo@earth.li>**20081229145627]
1529[Fix warnings in CmmInfo
1530Ian Lynagh <igloo@earth.li>**20081229145307]
1531[Fix warnings in CmmCPSGen
1532Ian Lynagh <igloo@earth.li>**20081229145119]
1533[Fix warnings in CmmProcPoint
1534Ian Lynagh <igloo@earth.li>**20081229144214]
1535[Fix warnings in CmmCallConv
1536Ian Lynagh <igloo@earth.li>**20081229141924]
1537[Fix warnings in CmmLive
1538Ian Lynagh <igloo@earth.li>**20081229141035]
1539[Fix warnings in CmmCPS
1540Ian Lynagh <igloo@earth.li>**20081229133158]
1541[Fix warnings in CmmUtils
1542Ian Lynagh <igloo@earth.li>**20081229132637]
1543[Comment out dead function breakProc
1544Ian Lynagh <igloo@earth.li>**20081229115647]
1545[Fix warnings in CmmBrokenBlock
1546Ian Lynagh <igloo@earth.li>**20081229115527]
1547[Comments only.  Haddockify parts of TcRnTypes.
1548Thomas Schilling <nominolo@googlemail.com>**20081211154657]
1549[Comments only.  Fix typo.
1550Thomas Schilling <nominolo@googlemail.com>**20081211153104]
1551[Include PprTyThings in tags file.
1552Thomas Schilling <nominolo@googlemail.com>**20081211153005]
1553[Use DynFlags to work out if we are doing ticky ticky profiling
1554Ian Lynagh <igloo@earth.li>**20081218161928
1555 We used to use StaticFlags
1557[Fix warnings in CgExpr
1558Ian Lynagh <igloo@earth.li>**20081217201152]
1559[Fix warnings in CgBindery
1560Ian Lynagh <igloo@earth.li>**20081217194607]
1561[Fix warnings in CgStackery
1562Ian Lynagh <igloo@earth.li>**20081217191713]
1563[Fix warnings in CgCase
1564Ian Lynagh <igloo@earth.li>**20081217190848]
1565[Remove some dead code from CgCase
1566Ian Lynagh <igloo@earth.li>**20081217184755]
1567[Fix warnings in StgCmmProf
1568Ian Lynagh <igloo@earth.li>**20081217182236]
1569[Fix warnings in CgProf
1570Ian Lynagh <igloo@earth.li>**20081217181711]
1571[Fix warnings in CgInfoTbls
1572Ian Lynagh <igloo@earth.li>**20081217180144]
1573[Remove dead function srtLabelAndLength from CgInfoTbls
1574Ian Lynagh <igloo@earth.li>**20081217180044]
1575[Fix warnings in CgHeapery
1576Ian Lynagh <igloo@earth.li>**20081217175726]
1577[Fix warnings in CgTailCall
1578Ian Lynagh <igloo@earth.li>**20081217175040]
1579[Remove a little dead code from CgTailCall
1580Ian Lynagh <igloo@earth.li>**20081217174947]
1581[Fix warnings in CodeGen
1582Ian Lynagh <igloo@earth.li>**20081217165904]
1583[Fix warnings in StgCmmTicky
1584Ian Lynagh <igloo@earth.li>**20081217165433]
1585[Remove dead code from CgUtils
1586Ian Lynagh <igloo@earth.li>**20081217163920]
1587[Fix warnings in CgPrimOp
1588Ian Lynagh <igloo@earth.li>**20081217163912]
1589[Fix warnings in CgMonad
1590Ian Lynagh <igloo@earth.li>**20081217163903]
1591[Fix warnings in CgClosure
1592Ian Lynagh <igloo@earth.li>**20081217163850]
1593[Fix warnings in CgForeignCall
1594Ian Lynagh <igloo@earth.li>**20081215222515]
1595[Remove some redundant code
1596Ian Lynagh <igloo@earth.li>**20081215194047
1597 We were looking at opt_DoTickyProfiling, and if it was set claling ifTicky
1598 which looks at opt_DoTickyProfiling itself.
1600[Fix warnings in CgLetNoEscape
1601Ian Lynagh <igloo@earth.li>**20081215173752]
1602[Workaround for #2262, from Barney Stratford
1603Simon Marlow <marlowsd@gmail.com>**20081216124706
1604 See http://www.haskell.org/pipermail/glasgow-haskell-users/2008-December/016333.html
1606[UNDO: Add -fpass-case-bndr-to-join-points
1607Simon Marlow <marlowsd@gmail.com>**20081216114235
1609 rolling back:
1611 Fri Dec  5 10:51:59 GMT 2008  simonpj@microsoft.com
1612   * Add -fpass-case-bndr-to-join-points
1614   See Note [Passing the case binder to join points] in Simplify.lhs
1615   The default now is *not* to pass the case binder.  There are some
1616   nofib results with the above note; the effect is almost always
1617   negligible.
1619   I don't expect this flag to be used by users (hence no docs). It's just
1620   there to let me try the performance effects of switching on and off.
1623     M ./compiler/main/StaticFlagParser.hs +1
1624     M ./compiler/main/StaticFlags.hs +4
1625     M ./compiler/simplCore/Simplify.lhs -14 +73
1627[Rollback INLINE patches
1628Simon Marlow <marlowsd@gmail.com>**20081216103556
1630 rolling back:
1632 Fri Dec  5 16:54:00 GMT 2008  simonpj@microsoft.com
1633   * Completely new treatment of INLINE pragmas (big patch)
1635   This is a major patch, which changes the way INLINE pragmas work.
1636   Although lots of files are touched, the net is only +21 lines of
1637   code -- and I bet that most of those are comments!
1639   HEADS UP: interface file format has changed, so you'll need to
1640   recompile everything.
1642   There is not much effect on overall performance for nofib,
1643   probably because those programs don't make heavy use of INLINE pragmas.
1645           Program           Size    Allocs   Runtime   Elapsed
1646               Min         -11.3%     -6.9%     -9.2%     -8.2%
1647               Max          -0.1%     +4.6%     +7.5%     +8.9%
1648    Geometric Mean          -2.2%     -0.2%     -1.0%     -0.8%
1650   (The +4.6% for on allocs is cichelli; see other patch relating to
1651   -fpass-case-bndr-to-join-points.)
1653   The old INLINE system
1654   ~~~~~~~~~~~~~~~~~~~~~
1655   The old system worked like this. A function with an INLINE pragam
1656   got a right-hand side which looked like
1657        f = __inline_me__ (\xy. e)
1658   The __inline_me__ part was an InlineNote, and was treated specially
1659   in various ways.  Notably, the simplifier didn't inline inside an
1660   __inline_me__ note. 
1662   As a result, the code for f itself was pretty crappy. That matters
1663   if you say (map f xs), because then you execute the code for f,
1664   rather than inlining a copy at the call site.
1666   The new story: InlineRules
1667   ~~~~~~~~~~~~~~~~~~~~~~~~~~
1668   The new system removes the InlineMe Note altogether.  Instead there
1669   is a new constructor InlineRule in CoreSyn.Unfolding.  This is a
1670   bit like a RULE, in that it remembers the template to be inlined inside
1671   the InlineRule.  No simplification or inlining is done on an InlineRule,
1672   just like RULEs. 
1674   An Id can have an InlineRule *or* a CoreUnfolding (since these are two
1675   constructors from Unfolding). The simplifier treats them differently:
1677     - An InlineRule is has the substitution applied (like RULES) but
1678       is otherwise left undisturbed.
1680     - A CoreUnfolding is updated with the new RHS of the definition,
1681       on each iteration of the simplifier.
1683   An InlineRule fires regardless of size, but *only* when the function
1684   is applied to enough arguments.  The "arity" of the rule is specified
1685   (by the programmer) as the number of args on the LHS of the "=".  So
1686   it makes a difference whether you say
1687        {-# INLINE f #-}
1688        f x = \y -> e     or     f x y = e
1689   This is one of the big new features that InlineRule gives us, and it
1690   is one that Roman really wanted.
1692   In contrast, a CoreUnfolding can fire when it is applied to fewer
1693   args than than the function has lambdas, provided the result is small
1694   enough.
1697   Consequential stuff
1698   ~~~~~~~~~~~~~~~~~~~
1699   * A 'wrapper' no longer has a WrapperInfo in the IdInfo.  Instead,
1700     the InlineRule has a field identifying wrappers.
1702   * Of course, IfaceSyn and interface serialisation changes appropriately.
1704   * Making implication constraints inline nicely was a bit fiddly. In
1705     the end I added a var_inline field to HsBInd.VarBind, which is why
1706     this patch affects the type checker slightly
1708   * I made some changes to the way in which eta expansion happens in
1709     CorePrep, mainly to ensure that *arguments* that become let-bound
1710     are also eta-expanded.  I'm still not too happy with the clarity
1711     and robustness fo the result.
1713   * We now complain if the programmer gives an INLINE pragma for
1714     a recursive function (prevsiously we just ignored it).  Reason for
1715     change: we don't want an InlineRule on a LoopBreaker, because then
1716     we'd have to check for loop-breaker-hood at occurrence sites (which
1717     isn't currenlty done).  Some tests need changing as a result.
1719   This patch has been in my tree for quite a while, so there are
1720   probably some other minor changes.
1723     M ./compiler/basicTypes/Id.lhs -11
1724     M ./compiler/basicTypes/IdInfo.lhs -82
1725     M ./compiler/basicTypes/MkId.lhs -2 +2
1726     M ./compiler/coreSyn/CoreFVs.lhs -2 +25
1727     M ./compiler/coreSyn/CoreLint.lhs -5 +1
1728     M ./compiler/coreSyn/CorePrep.lhs -59 +53
1729     M ./compiler/coreSyn/CoreSubst.lhs -22 +31
1730     M ./compiler/coreSyn/CoreSyn.lhs -66 +92
1731     M ./compiler/coreSyn/CoreUnfold.lhs -112 +112
1732     M ./compiler/coreSyn/CoreUtils.lhs -185 +184
1733     M ./compiler/coreSyn/MkExternalCore.lhs -1
1734     M ./compiler/coreSyn/PprCore.lhs -4 +40
1735     M ./compiler/deSugar/DsBinds.lhs -70 +118
1736     M ./compiler/deSugar/DsForeign.lhs -2 +4
1737     M ./compiler/deSugar/DsMeta.hs -4 +3
1738     M ./compiler/hsSyn/HsBinds.lhs -3 +3
1739     M ./compiler/hsSyn/HsUtils.lhs -2 +7
1740     M ./compiler/iface/BinIface.hs -11 +25
1741     M ./compiler/iface/IfaceSyn.lhs -13 +21
1742     M ./compiler/iface/MkIface.lhs -24 +19
1743     M ./compiler/iface/TcIface.lhs -29 +23
1744     M ./compiler/main/TidyPgm.lhs -55 +49
1745     M ./compiler/parser/ParserCore.y -5 +6
1746     M ./compiler/simplCore/CSE.lhs -2 +1
1747     M ./compiler/simplCore/FloatIn.lhs -6 +1
1748     M ./compiler/simplCore/FloatOut.lhs -23
1749     M ./compiler/simplCore/OccurAnal.lhs -36 +5
1750     M ./compiler/simplCore/SetLevels.lhs -59 +54
1751     M ./compiler/simplCore/SimplCore.lhs -48 +52
1752     M ./compiler/simplCore/SimplEnv.lhs -26 +22
1753     M ./compiler/simplCore/SimplUtils.lhs -28 +4
1754     M ./compiler/simplCore/Simplify.lhs -91 +109
1755     M ./compiler/specialise/Specialise.lhs -15 +18
1756     M ./compiler/stranal/WorkWrap.lhs -14 +11
1757     M ./compiler/stranal/WwLib.lhs -2 +2
1758     M ./compiler/typecheck/Inst.lhs -1 +3
1759     M ./compiler/typecheck/TcBinds.lhs -17 +27
1760     M ./compiler/typecheck/TcClassDcl.lhs -1 +2
1761     M ./compiler/typecheck/TcExpr.lhs -4 +6
1762     M ./compiler/typecheck/TcForeign.lhs -1 +1
1763     M ./compiler/typecheck/TcGenDeriv.lhs -14 +13
1764     M ./compiler/typecheck/TcHsSyn.lhs -3 +2
1765     M ./compiler/typecheck/TcInstDcls.lhs -5 +4
1766     M ./compiler/typecheck/TcRnDriver.lhs -2 +11
1767     M ./compiler/typecheck/TcSimplify.lhs -10 +17
1768     M ./compiler/vectorise/VectType.hs +7
1770 Mon Dec  8 12:43:10 GMT 2008  simonpj@microsoft.com
1771   * White space only
1773     M ./compiler/simplCore/Simplify.lhs -2
1775 Mon Dec  8 12:48:40 GMT 2008  simonpj@microsoft.com
1776   * Move simpleOptExpr from CoreUnfold to CoreSubst
1778     M ./compiler/coreSyn/CoreSubst.lhs -1 +87
1779     M ./compiler/coreSyn/CoreUnfold.lhs -72 +1
1781 Mon Dec  8 17:30:18 GMT 2008  simonpj@microsoft.com
1782   * Use CoreSubst.simpleOptExpr in place of the ad-hoc simpleSubst (reduces code too)
1784     M ./compiler/deSugar/DsBinds.lhs -50 +16
1786 Tue Dec  9 17:03:02 GMT 2008  simonpj@microsoft.com
1787   * Fix Trac #2861: bogus eta expansion
1789   Urghlhl!  I "tided up" the treatment of the "state hack" in CoreUtils, but
1790   missed an unexpected interaction with the way that a bottoming function
1791   simply swallows excess arguments.  There's a long
1792        Note [State hack and bottoming functions]
1793   to explain (which accounts for most of the new lines of code).
1796     M ./compiler/coreSyn/CoreUtils.lhs -16 +53
1798 Mon Dec 15 10:02:21 GMT 2008  Simon Marlow <marlowsd@gmail.com>
1799   * Revert CorePrep part of "Completely new treatment of INLINE pragmas..."
1801   The original patch said:
1803   * I made some changes to the way in which eta expansion happens in
1804     CorePrep, mainly to ensure that *arguments* that become let-bound
1805     are also eta-expanded.  I'm still not too happy with the clarity
1806     and robustness fo the result.
1808   Unfortunately this change apparently broke some invariants that were
1809   relied on elsewhere, and in particular lead to panics when compiling
1810   with profiling on.
1812   Will re-investigate in the new year.
1814     M ./compiler/coreSyn/CorePrep.lhs -53 +58
1815     M ./configure.ac -1 +1
1817 Mon Dec 15 12:28:51 GMT 2008  Simon Marlow <marlowsd@gmail.com>
1818   * revert accidental change to configure.ac
1820     M ./configure.ac -1 +1
1822[revert accidental change to configure.ac
1823Simon Marlow <marlowsd@gmail.com>**20081215122851]
1824[Revert CorePrep part of "Completely new treatment of INLINE pragmas..."
1825Simon Marlow <marlowsd@gmail.com>**20081215100221
1827 The original patch said:
1829 * I made some changes to the way in which eta expansion happens in
1830   CorePrep, mainly to ensure that *arguments* that become let-bound
1831   are also eta-expanded.  I'm still not too happy with the clarity
1832   and robustness fo the result.
1834 Unfortunately this change apparently broke some invariants that were
1835 relied on elsewhere, and in particular lead to panics when compiling
1836 with profiling on.
1838 Will re-investigate in the new year.
1840[wake up other Capabilities even when there is only one spark (see #2868)
1841Simon Marlow <marlowsd@gmail.com>**20081210164644]
1842[Document new GC options -q1 and -qg<n>
1843Simon Marlow <marlowsd@gmail.com>**20081210164557]
1844[SysTools no longer needs -fno-cse
1845Ian Lynagh <igloo@earth.li>**20081211182327]
1846[Make the lists of files and directories to be cleaned-up non-global
1847Ian Lynagh <igloo@earth.li>**20081211180739
1848 They still need to be stored in IORefs, as the exception handler needs
1849 to know what they all are.
1851[The default cleanup handler should /always/ delete the temp files
1852Ian Lynagh <igloo@earth.li>**20081211170006
1853 Not only if there has been an exception. It worked for GHC anyway,
1854 as it was getting an ExitSuccess exception, but GHC API clients
1855 shouldn't be required to do that.
1857[Fix user guide typesetting
1858Ian Lynagh <igloo@earth.li>**20081210165434]
1859[FIX #1364: added support for C finalizers that run as soon as the value is not longer reachable.
1860Simon Marlow <marlowsd@gmail.com>**20081210150425
1862 Patch originally by Ivan Tomac <tomac@pacific.net.au>, amended by
1863 Simon Marlow:
1865   - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv#
1866   - GC parameters to ALLOC_PRIM fixed
1868[On FreeBSD, try MAP_FIXED if ordinary mmap() fails to give us suitable memory
1869Simon Marlow <marlowsd@gmail.com>**20081210115751
1870 This appears to be necessary on FreeBSD.  It might be necessary on
1871 other OSs too, but I'm being cautious because using MAP_FIXED can lead
1872 to crashes by overwriting existing mappings, and we have no (easy) way
1873 to prevent that.
1875[Document hs_init() infelicity (#2863)
1876Simon Marlow <marlowsd@gmail.com>**20081209164322]
1877[Improve documentation for data family instances (cf Trac #1968)
1880 The HEAD allows GADT syntax for data/newtype family instances.
1881 (GHC 6.10 does not seem to.)
1884[Make some profiling flags dynamic
1885Ian Lynagh <igloo@earth.li>**20081209230157
1886 In particular:
1887     -fauto-sccs-on-all-toplevs          -auto-all   -no-auto-all
1888     -fauto-sccs-on-exported-toplevs     -auto       -no-auto
1889     -fauto-sccs-on-individual-cafs      -caf-all    -no-caf-all
1891[Fix warnings in StgCmmGran
1892Ian Lynagh <igloo@earth.li>**20081209222413]
1893[Add OPTIONS_CATCH,DERIVE,YHC to those that GHC knows about; trac #2847
1894Ian Lynagh <igloo@earth.li>**20081209191724]
1895[Fix warnings in CgHpc
1896Ian Lynagh <igloo@earth.li>**20081209191713]
1897[Parse pragma names better; trac #2847
1898Ian Lynagh <igloo@earth.li>**20081209190318
1899 We require that pragma names are not followed by pragma character,
1900 defined as
1901     isAlphaNum c || c == '_'
1903[Fix warnings in CgParallel
1904Ian Lynagh <igloo@earth.li>**20081209184402]
1905[Fix warnings in StgCmmHpc
1906Ian Lynagh <igloo@earth.li>**20081209184004]
1907[Remove an unnecessary -w flag
1908Ian Lynagh <igloo@earth.li>**20081209183812]
1909[Fix Trac #2861: bogus eta expansion
1912 Urghlhl!  I "tided up" the treatment of the "state hack" in CoreUtils, but
1913 missed an unexpected interaction with the way that a bottoming function
1914 simply swallows excess arguments.  There's a long
1915      Note [State hack and bottoming functions]
1916 to explain (which accounts for most of the new lines of code).
1919[Fix #2592: do an orderly shutdown when the heap is exhausted
1920Simon Marlow <marlowsd@gmail.com>**20081209105919
1921 Really we should be raising an exception in this case, but that's
1922 tricky (see comments).  At least now we shut down the runtime
1923 correctly rather than just exiting.
1925[Fix #2848: avoid overflow during time calculation
1926Simon Marlow <marlowsd@gmail.com>**20081209105600]
1927[Fix #2838: we should narrow a CmmInt before converting to ImmInteger
1928Simon Marlow <marlowsd@gmail.com>**20081209105515]
1929[fix an assertion failure in prof/threaded/debug mode
1930Simon Marlow <marlowsd@gmail.com>**20081204101201]
1931[Inject implicit bindings after CoreTidy, not before Simplify
1934 Originally I inject the "implicit bindings" (record selectors, class
1935 method selectors, data con wrappers...) after CoreTidy.  However, in a
1936 misguided attempt to fix Trac #2070, I moved the injection point to
1937 before the Simplifier, so that record selectors would be optimised by
1938 the simplifier.
1940 This was misguided because record selectors (indeed all implicit bindings)
1941 are GlobalIds, whose IdInfo is meant to be frozen.  But the Simplifier,
1942 and other Core-to-Core optimisations, merrily change the IdInfo.  That
1943 ultimately made Trac #2844 happen, where a record selector got arity 2,
1944 but the GlobalId (which importing scopes re-construct from the class decl
1945 rather than reading from the interface file) has arity 1.
1947 So this patch moves the injection back to CoreTidy. Happily #2070 should
1948 still be OK because we now use CoreSubst.simpleOptExpr on the unfoldings
1949 for implict things, which gets rid of the most gratuitous infelicities.
1951 Still, there's a strong case for stoppping record selectors from being
1952 GlobalIds, and treating them much more like dict-funs.  I'm thinking
1953 about that.  Meanwhile, #2844 is ok now.
1956[Add assertion for arity match (checks Trac #2844)
1959 The exported arity of a function must match the arity for the
1960 STG function.  Trac #2844 was a pretty obscure manifestation of
1961 the failure of this invariant. This patch doesn't cure the bug;
1962 rather it adds an assertion to CoreToStg to check the invariant
1963 so we should get an earlier and less obscure warning if this
1964 fails in future.
1967[Use CoreSubst.simpleOptExpr in place of the ad-hoc simpleSubst (reduces code too)
1969[Move simpleOptExpr from CoreUnfold to CoreSubst
1971[White space only
1973[Comments only
1975[Completely new treatment of INLINE pragmas (big patch)
1978 This is a major patch, which changes the way INLINE pragmas work.
1979 Although lots of files are touched, the net is only +21 lines of
1980 code -- and I bet that most of those are comments!
1982 HEADS UP: interface file format has changed, so you'll need to
1983 recompile everything.
1985 There is not much effect on overall performance for nofib,
1986 probably because those programs don't make heavy use of INLINE pragmas.
1988         Program           Size    Allocs   Runtime   Elapsed
1989             Min         -11.3%     -6.9%     -9.2%     -8.2%
1990             Max          -0.1%     +4.6%     +7.5%     +8.9%
1991  Geometric Mean          -2.2%     -0.2%     -1.0%     -0.8%
1993 (The +4.6% for on allocs is cichelli; see other patch relating to
1994 -fpass-case-bndr-to-join-points.)
1996 The old INLINE system
1997 ~~~~~~~~~~~~~~~~~~~~~
1998 The old system worked like this. A function with an INLINE pragam
1999 got a right-hand side which looked like
2000      f = __inline_me__ (\xy. e)
2001 The __inline_me__ part was an InlineNote, and was treated specially
2002 in various ways.  Notably, the simplifier didn't inline inside an
2003 __inline_me__ note. 
2005 As a result, the code for f itself was pretty crappy. That matters
2006 if you say (map f xs), because then you execute the code for f,
2007 rather than inlining a copy at the call site.
2009 The new story: InlineRules
2010 ~~~~~~~~~~~~~~~~~~~~~~~~~~
2011 The new system removes the InlineMe Note altogether.  Instead there
2012 is a new constructor InlineRule in CoreSyn.Unfolding.  This is a
2013 bit like a RULE, in that it remembers the template to be inlined inside
2014 the InlineRule.  No simplification or inlining is done on an InlineRule,
2015 just like RULEs. 
2017 An Id can have an InlineRule *or* a CoreUnfolding (since these are two
2018 constructors from Unfolding). The simplifier treats them differently:
2020   - An InlineRule is has the substitution applied (like RULES) but
2021     is otherwise left undisturbed.
2023   - A CoreUnfolding is updated with the new RHS of the definition,
2024     on each iteration of the simplifier.
2026 An InlineRule fires regardless of size, but *only* when the function
2027 is applied to enough arguments.  The "arity" of the rule is specified
2028 (by the programmer) as the number of args on the LHS of the "=".  So
2029 it makes a difference whether you say
2030        {-# INLINE f #-}
2031        f x = \y -> e     or     f x y = e
2032 This is one of the big new features that InlineRule gives us, and it
2033 is one that Roman really wanted.
2035 In contrast, a CoreUnfolding can fire when it is applied to fewer
2036 args than than the function has lambdas, provided the result is small
2037 enough.
2040 Consequential stuff
2041 ~~~~~~~~~~~~~~~~~~~
2042 * A 'wrapper' no longer has a WrapperInfo in the IdInfo.  Instead,
2043   the InlineRule has a field identifying wrappers.
2045 * Of course, IfaceSyn and interface serialisation changes appropriately.
2047 * Making implication constraints inline nicely was a bit fiddly. In
2048   the end I added a var_inline field to HsBInd.VarBind, which is why
2049   this patch affects the type checker slightly
2051 * I made some changes to the way in which eta expansion happens in
2052   CorePrep, mainly to ensure that *arguments* that become let-bound
2053   are also eta-expanded.  I'm still not too happy with the clarity
2054   and robustness fo the result.
2056 * We now complain if the programmer gives an INLINE pragma for
2057   a recursive function (prevsiously we just ignored it).  Reason for
2058   change: we don't want an InlineRule on a LoopBreaker, because then
2059   we'd have to check for loop-breaker-hood at occurrence sites (which
2060   isn't currenlty done).  Some tests need changing as a result.
2062 This patch has been in my tree for quite a while, so there are
2063 probably some other minor changes.
2066[Add -fpass-case-bndr-to-join-points
2069 See Note [Passing the case binder to join points] in Simplify.lhs
2070 The default now is *not* to pass the case binder.  There are some
2071 nofib results with the above note; the effect is almost always
2072 negligible.
2074 I don't expect this flag to be used by users (hence no docs). It's just
2075 there to let me try the performance effects of switching on and off.
2078[Add static flag -fsimple-list-literals
2081 The new static flag -fsimple-list-literals makes ExplicitList literals
2082 be desugared in the straightforward way, rather than using 'build' as
2083 now.  See SLPJ comments with Note [Desugaring explicit lists].
2085 I don't expect this flag to be used by users (hence no docs). It's just
2086 there to let me try the performance effects of switching on and off.
2089[Comments only in OccurAnal
2091[Comments only
2093[Layout only
2095[Comments only (Note [Entering error thunks])
2097[Make CoreToStg a little more robust to eta expansion
2099[Add no-op case for addIdSpecialisations (very minor optimisation)
2101[Trim redundant import
2103[Make CoreTidy retain deadness info (better -ddump-simpl)
2106 GHC now retains more robust information about dead variables; but
2107 CoreTidy was throwing it away.  This patch makes CoreTidy retain it,
2108 which gives better output for -ddump-simpl.
2110 New opportunity: shrink interface files by using wildcards for dead variables.
2114[Remove INLINE pragmas on recursive functions
2117 INLINE pragmas on recursive functions are ignored; and this
2118 is checked in my upcoming patch for inlinings.
2121[Comments only (on Activation)
2123[We need to tell cabal-bin which version of Cabal to use
2124Ian Lynagh <igloo@earth.li>**20081203123208
2125 Otherwise, if the bootstrapping compiler has a newer version, we get
2126 a mismatch between the version used to compile ghc-prim's Setup.hs and
2127 the version that installPackage uses.
2129[Document 'loadModule'.
2130Thomas Schilling <nominolo@googlemail.com>**20081202154800]
2131[Add 'needsTemplateHaskell' utility function and document why one might
2132Thomas Schilling <nominolo@googlemail.com>**20081202152358
2133 want to use it.
2135[Documentation only.
2136Thomas Schilling <nominolo@googlemail.com>**20081202150158]
2137[Export 'succeeded' and 'failed' helper functions.
2138Thomas Schilling <nominolo@googlemail.com>**20081202144451]
2139[Put full ImportDecls in ModSummary instead of just ModuleNames
2140Simon Marlow <marlowsd@gmail.com>**20081202133736
2141 ... and use it to make ghc -M generate correct cross-package
2142 dependencies when using package-qualified imports (needed for the new
2143 build system).  Since we're already parsing the ImportDecl from the
2144 source file, there seems no good reason not to keep it in the
2145 ModSummary, it might be useful for other things too.
2147[ghc -M: need to add a dep on Prelude unless -fno-implicit-prelude is on
2148Simon Marlow <marlowsd@gmail.com>**20081128165707]
2149[make -include-pkg-deps work (not sure when this got lost)
2150Simon Marlow <marlowsd@gmail.com>**20081128135746]
2151[Fix more problems caused by padding in the Capability structure
2152Simon Marlow <marlowsd@gmail.com>**20081202120735
2153 Fixes crashes on Windows and Sparc
2155[add missing case to Ord GlobalReg (EagerBlackhole == EagerBlackhole)
2156Simon Marlow <marlowsd@gmail.com>**20081128130106]
2157[Better error message for fundep conflict
2159[Fix typo in quasi-quote documentation's sample.
2160shelarcy <shelarcy@gmail.com>**20081129024344]
2161[Remove the v_Split_info global variable and use a field of dflags instead
2162Ian Lynagh <igloo@earth.li>**20081130152403]
2163[Document the --machine-readable RTS flag
2164Ian Lynagh <igloo@earth.li>**20081130152311]
2165[Let 'loadModule' generate proper code depending on the 'hscTarget'.
2166Thomas Schilling <nominolo@googlemail.com>**20081128164412
2168 With this change it should be possible to perform something similar to
2169 'load' by traversing the module graph in dependency order and calling
2170 '{parse,typecheck,load}Module' on each.  Of course, if you want smart
2171 recompilation checking you should still use 'load'.
2173[Expose a separate 'hscBackend' phase for 'HsCompiler' and change
2174Thomas Schilling <nominolo@googlemail.com>**20081128163746
2175 parameter to 'InteractiveStatus' to a 'Maybe'.
2177[Whoops, *don't* reset the complete session in 'withLocalCallbacks'.
2178Thomas Schilling <nominolo@googlemail.com>**20081128150727]
2179[Use a record instead of a typeclass for 'HsCompiler'.  This is mostly
2180Thomas Schilling <nominolo@googlemail.com>**20081128121947
2181 equivalent to a typeclass implementation that uses a functional
2182 dependency from the target mode to the result type.
2184[Remove dead code
2185Ian Lynagh <igloo@earth.li>**20081128193831]
2186[Update docs not to talk about deprecated -optdep-* flags; fixes trac #2773
2187Ian Lynagh <igloo@earth.li>**20081128193633]
2188[Use relative URLs in the GHC API haddock docs; fixes #2755
2189Ian Lynagh <igloo@earth.li>**20081128184511]
2190[Teach runghc about --help; fixes trac #2757
2191Ian Lynagh <igloo@earth.li>**20081128191706]
2192[Use a per-session data structure for callbacks.  Make 'WarnErrLogger'
2193Thomas Schilling <nominolo@googlemail.com>**20081128103628
2194 part of it.
2196 Part of the GHC API essentially represents a compilation framework.
2197 The difference of a *framework* as opposed to a *library* is that the
2198 overall structure of the functionality is pre-defined but certain
2199 details can be customised via callbacks.  (Also known as the Hollywood
2200 Principle: "Don't call us, we'll call you.")
2202 This patch introduces a per-session data structure that contains all
2203 the callbacks instead of adding lots of small function arguments
2204 whenever we want to give the user more control over certain parts of
2205 the API.  This should also help with future changes: Adding a new
2206 callback doesn't break old code since code that doesn't know about the
2207 new callback will use the (hopefully sane) default implementation.
2209 Overall, however, we should try and keep the number of callbacks small
2210 and well-defined (and provide useful defaults) and use simple library
2211 routines for the rest.
2213[Improve error message for #2739 (but no fix).
2214Thomas Schilling <nominolo@googlemail.com>**20081127135725
2216 This patch changes 'loadModule' to define a fake linkable.  The
2217 previous implementation of providing no linkable at all violated a
2218 pre-condition in the ByteCode linker.  This doesn't fix #2739, but it
2219 improves the error message a bit.
2221[Remove the packing I added recently to the Capability structure
2222Simon Marlow <marlowsd@gmail.com>**20081128105046
2223 The problem is that the packing caused some unaligned loads, which
2224 lead to bus errors on Sparc (and reduced performance elsewhere,
2225 presumably).
2227[don't emit CmmComments for now
2228Simon Marlow <marlowsd@gmail.com>**20081127090145
2229   - if the string contains */, we need to fix it (demonstrated by
2230     building Cabal with -fvia-C)
2231   - the strings can get quite large, so we probably only want to
2232     inject comments when some debugging option is on.
2234[Collect instead of print warnings in 'warnUnnecessarySourceImports'.
2235Thomas Schilling <nominolo@googlemail.com>**20081127102534]
2236[Force recompilation of BCOs when they were compiled in HscNothing mode.
2237Thomas Schilling <nominolo@googlemail.com>**20081126183402
2239 Previously, loading a set of modules in HscNothing mode and then
2240 switching to HscInterpreted could lead to crashes since modules
2241 compiled with HscNothing were thought to be valid bytecode objects.
2243 This patch forces recompilation in these cases, hence switching between
2244 HscNothing and HscInterpreted should be safe now.
2246[Documentation only: Add module description for HscMain.
2247Thomas Schilling <nominolo@googlemail.com>**20081126134344]
2248[Include GHCi files in ctags/etags.
2249Thomas Schilling <nominolo@googlemail.com>**20081126122801]
2250[drop some debugging traces and use only one flag for new codegen
2252[one more missing patch from new codegen path
2254[Fix Trac #2817 (TH syntax -> HsSyn conversion)
2256[Fix Trac #2756: CorePrep strictness bug
2258[Format output for :t more nicely
2260[Fix Trac #2766: printing operator type variables
2262[Fix build following codegen patch
2264[Removed warnings, made Haddock happy, added examples in documentation
2266 The interesting examples talk about our story with heap checks in
2267 case alternatives and our story with the case scrutinee as a Boolean.
2269[Fixed linear regalloc bug, dropped some tracing code
2271 o The linear-scan register allocator sometimes allocated a block
2272   before allocating one of its predecessors, which could lead
2273   to inconsistent allocations. Now, we allocate a block only
2274   if a predecessor has set the "incoming" assignments for the block
2275   (or if it's the procedure's entry block).
2276 o Also commented out some tracing code on the new codegen path.
2278[Keep update frames live even in functions that never return
2280 An unusual case, but without it:
2281 (a) we had an assertion failure
2282 (b) we can overwrite the caller's infotable, which might cause
2283     the garbage collector to collect live data.
2284 Better to keep the update frame live at all call sites,
2285 not just at returns.
2287[Removed space and time inefficiency in procpoint splitting
2289 I was adding extra jumps to every procpoint, even when the split-off graph
2290 referred to only some of the procpoints. No effect on correctness,
2291 but a big effect on space/time efficiency when there are lots of procpoints...
2293[Clarify the SRT building process
2295 Before: building a closure that would build an SRT given the top-level
2296 SRT. It was somewhat difficult to understand the control flow, and it
2297 may have had held onto some data structures long after they should be dead.
2298 Now, I just bundle the info we need about CAFs along with the procedure
2299 and directly call a new top-level function to build the SRTs later.
2301[Don't adjust hp up when the case scrutinee won't allocate
2304 If the case scrutinee can't allocate, we don't need to do a heap
2305 check in the case alternatives. (A previous patch got that right.)
2306 In that case, we had better not adjust the heap pointer to recover
2307 unused stack space before evaluating the scrutinee -- because we
2308 aren't going to reallocate for the case alternative.
2310[Floating infotables were reversed in C back end
2312[forgot a few files
2314[Big collection of patches for the new codegen branch.
2316 o Fixed bug that emitted the copy-in code for closure entry
2317   in the wrong place -- at the initialization of the closure.
2318 o Refactored some of the closure entry code.
2319 o Added code to check that no LocalRegs are live-in to a procedure
2320    -- trip up some buggy programs earlier
2321 o Fixed environment bindings for thunks
2322    -- we weren't (re)binding the free variables in a thunk
2323 o Fixed a bug in proc-point splitting that dropped some updates
2324   to the entry block in a procedure.
2325 o Fixed improper calls to code that generates CmmLit's for strings
2326 o New invariant on cg_loc in CgIdInfo: the expression is always tagged
2327 o Code to load free vars on entry to a thunk was (wrongly) placed before
2328   the heap check.
2329 o Some of the StgCmm code was redundantly passing around Id's
2330   along with CgIdInfo's; no more.
2331 o Initialize the LocalReg's that point to a closure before allocating and
2332   initializing the closure itself -- otherwise, we have problems with
2333   recursive closure bindings
2334 o BlockEnv and BlockSet types are now abstract.
2335 o Update frames:
2336   - push arguments in Old call area
2337   - keep track of the return sp in the FCode monad
2338   - keep the return sp in every call, tail call, and return
2339       (because it might be different at different call sites,
2340        e.g. tail calls to the gc after a heap check are performed
2341             before pushing the update frame)
2342   - set the sp appropriately on returns and tail calls
2343 o Reduce call, tail call, and return to a single LastCall node
2344 o Added slow entry code, using different calling conventions on entry and tail call
2345 o More fixes to the calling convention code.
2346   The tricky stuff is all about the closure environment: it must be passed in R1,
2347   but in non-closures, there is no such argument, so we can't treat all arguments
2348   the same way: the closure environment is special. Maybe the right step forward
2349   would be to define a different calling convention for closure arguments.
2350 o Let-no-escapes need to be emitted out-of-line -- otherwise, we drop code.
2351 o Respect RTS requirement of word alignment for pointers
2352   My stack allocation can pack sub-word values into a single word on the stack,
2353   but it wasn't requiring word-alignment for pointers. It does now,
2354   by word-aligning both pointer registers and call areas.
2355 o CmmLint was over-aggresively ruling out non-word-aligned memory references,
2356   which may be kosher now that we can spill small values into a single word.
2357 o Wrong label order on a conditional branch when compiling switches.
2358 o void args weren't dropped in many cases.
2359   To help prevent this kind of mistake, I defined a NonVoid wrapper,
2360   which I'm applying only to Id's for now, although there are probably
2361   other good candidates.
2362 o A little code refactoring: separate modules for procpoint analysis splitting,
2363   stack layout, and building infotables.
2364 o Stack limit check: insert along with the heap limit check, using a symbolic
2365   constant (a special CmmLit), then replace it when the stack layout is known.
2366 o Removed last node: MidAddToContext
2367 o Adding block id as a literal: means that the lowering of the calling conventions
2368   no longer has to produce labels early, which was inhibiting common-block elimination.
2369   Will also make it easier for the non-procpoint-splitting path.
2370 o Info tables: don't try to describe the update frame!
2371 o Over aggressive use of NonVoid!!!!
2372   Don't drop the non-void args before setting the type of the closure!!!
2373 o Sanity checking:
2374   Added a pass to stub dead dead slots on the stack
2375   (only ~10 lines with the dataflow framework)
2376 o More sanity checking:
2377   Check that incoming pointer arguments are non-stubbed.
2378   Note: these checks are still subject to dead-code removal, but they should
2379   still be quite helpful.
2380 o Better sanity checking: why stop at function arguments?
2381   Instead, in mkAssign, check that _any_ assignment to a pointer type is non-null
2382   -- the sooner the crash, the easier it is to debug.
2383   Still need to add the debugging flag to turn these checks on explicitly.
2384 o Fixed yet another calling convention bug.
2385   This time, the calls to the GC were wrong. I've added a new convention
2386   for GC calls and invoked it where appropriate.
2387   We should really straighten out the calling convention stuff:
2388     some of the code (and documentation) is spread across the compiler,
2389     and there's some magical use of the node register that should really
2390     be handled (not avoided) by calling conventions.
2391 o Switch bug: the arms in mkCmmLitSwitch weren't returning to a single join point.
2392 o Environment shadowing problem in Stg->Cmm:
2393   When a closure f is bound at the top-level, we should not bind f to the
2394   node register on entry to the closure.
2395   Why? Because if the body of f contains a let-bound closure g that refers
2396   to f, we want to make sure that it refers to the static closure for f.
2397   Normally, this would all be fine, because when we compile a closure,
2398   we rebind free variables in the environment. But f doesn't look like
2399   a free variable because it's a static value. So, the binding for f
2400   remains in the environment when we compile g, inconveniently referring
2401   to the wrong thing.
2402   Now, I bind the variable in the local environment only if the closure is not
2403   bound at the top level. It's still okay to make assumptions about the
2404   node holding the closure environment; we just won't find the binding
2405   in the environment, so code that names the closure will now directly
2406   get the label of the static closure, not the node register holding a
2407   pointer to the static closure.
2408 o Don't generate bogus Cmm code containing SRTs during the STG -> Cmm pass!
2409   The tables made reference to some labels that don't exist when we compute and
2410   generate the tables in the back end.
2411 o Safe foreign calls need some special treatment (at least until we have the integrated
2412   codegen). In particular:
2413   o they need info tables
2414   o they are not procpoints -- the successor had better be in the same procedure
2415   o we cannot (yet) implement the calling conventions early, which means we have
2416     to carry the calling-conv info all the way to the end
2417 o We weren't following the old convention when registering a module.
2418   Now, we use update frames to push any new modules that have to be registered
2419   and enter the youngest one on the stack.
2420   We also use the update frame machinery to specify that the return should pop
2421   the return address off the stack.
2422 o At each safe foreign call, an infotable must be at the bottom of the stack,
2423   and the TSO->sp must point to it.
2424 o More problems with void args in a direct call to a function:
2425   We were checking the args (minus voids) to check whether the call was saturated,
2426   which caused problems when the function really wasn't saturated because it
2427   took an extra void argument.
2428 o Forgot to distinguish integer != from floating != during Stg->Cmm
2429 o Updating slotEnv and areaMap to include safe foreign calls
2430   The dataflow analyses that produce the slotEnv and areaMap give
2431   results for each basic block, but we also need the results for
2432   a safe foreign call, which is a middle node.
2433   After running the dataflow analysis, we have another pass that
2434   updates the results to includ any safe foreign calls.
2435 o Added a static flag for the debugging technique that inserts
2436   instructions to stub dead slots on the stack and crashes when
2437   a stubbed value is loaded into a pointer-typed LocalReg.
2438 o C back end expects to see return continuations before their call sites.
2439   Sorted the flowgraphs appropriately after splitting.
2440 o PrimOp calling conventions are special -- unlimited registers, no stack
2441   Yet another calling convention...
2442 o More void value problems: if the RHS of a case arm is a void-typed variable,
2443   don't try to return it.
2444 o When calling some primOp, they may allocate memory; if so, we need to
2445   do a heap check when we return from the call.
2448[Merging in the new codegen branch
2450 This merge does not turn on the new codegen (which only compiles
2451 a select few programs at this point),
2452 but it does introduce some changes to the old code generator.
2454 The high bits:
2455 1. The Rep Swamp patch is finally here.
2456    The highlight is that the representation of types at the
2457    machine level has changed.
2458    Consequently, this patch contains updates across several back ends.
2459 2. The new Stg -> Cmm path is here, although it appears to have a
2460    fair number of bugs lurking.
2461 3. Many improvements along the CmmCPSZ path, including:
2462    o stack layout
2463    o some code for infotables, half of which is right and half wrong
2464    o proc-point splitting
2466[Major clean-up of HscMain.
2467Thomas Schilling <nominolo@googlemail.com>**20081125153201
2469 This patch entails a major restructuring of HscMain and a small bugfix
2470 to MkIface (which required the restructuring in HscMain).
2472 In MkIface:
2474   - mkIface* no longer outputs orphan warnings directly and also no
2475     longer quits GHC when -Werror is set.  Instead, errors are
2476     reported using the common IO (Messages, Maybe result) scheme.
2478 In HscMain:
2480   - Get rid of the 'Comp' monad.  This monad was mostly GhcMonad + two
2481     reader arguments, a ModSummary for the currently compiled module
2482     and a possible old interface.  The latter actually lead to a small
2483     space-leak since only its hash was needed (to check whether the
2484     newly-generated interface file was the same as the original one).
2486     Functions originally of type 'Comp' now only take the arguments
2487     that they actually need.  This leads to slighly longer argument
2488     lists in some places, however, it is now much easier to see what
2489     is actually going on.
2491   - Get rid of 'myParseModule'.  Rename 'parseFile' to 'hscParse'.
2493   - Join 'deSugarModule' and 'hscDesugar' (keeping the latter).
2495   - Rename 'typecheck{Rename}Module{'}' to 'hscTypecheck{Rename}'.
2496     One variant keeps the renamed syntax, the other doesn't.
2498   - Parameterise 'HscStatus', so that 'InteractiveStatus' is just a
2499     different parameterisation of 'HscStatus'.
2501   - 'hscCompile{OneShot,Batch,Nothing,Interactive}' are now
2502     implemented using a (local) typeclass called 'HsCompiler'.  The
2503     idea is to make the common structure more obvious.  Using this
2504     typeclass we now have two functions 'genericHscCompile' (original
2505     'hscCompiler') and 'genericHscRecompile' (original 'genComp')
2506     describing the default pipeline.  The methods of the typeclass
2507     describe a sort of "hook" interface (in OO-terms this would be
2508     called the "template method" pattern).
2510     One problem with this approach is that we parameterise over the
2511     /result/ type which, in fact, is not actually different for
2512     "nothing" and "batch" mode.  To avoid functional dependencies or
2513     associated types, we use type tags to make them artificially
2514     different and parameterise the type class over the result type.
2515     A perhaps better approach might be to use records instead.
2517   - Drop some redundant 'HscEnv' arguments.  These were likely
2518     different from what 'getSession' would return because during
2519     compilation we temporarily set the module's DynFlags as well as a
2520     few other fields.  We now use the 'withTempSession' combinator to
2521     temporarily change the 'HscEnv' and automatically restore the
2522     original session after the enclosed action has returned (even in
2523     case of exceptions).
2525   - Rename 'hscCompile' to 'hscGenHardCode' (since that is what it
2526     does).
2528 Calls in 'GHC' and 'DriverPipeline' accordingly needed small
2529 adaptions.
2531[Fix Trac #2799: TcType.isOverloadedTy
2534 A missing case (for equality predicates) in isOverloadedTy make
2535 bindInstsOfLocalFuns/Pats do the wrong thing.  Core Lint nailed it.
2537 Merge to 6.10 branch.
2540[Fix #2740: we were missing the free variables on some expressions
2541Simon Marlow <marlowsd@gmail.com>**20081125103113
2542 Particularly boolean expresions: the conditional of an 'if', and
2543 guards, were missing their free variables.
2545[Fix symbol macro names in Linker.c
2546Thorkil Naur <naur@post11.tele.dk>**20081121160149]
2547[Add a --machine-readable RTS flag
2548Ian Lynagh <igloo@earth.li>**20081123152127
2549 Currently it only affects the -t flag output
2551[Return errors instead of dying in myParseModule.
2552Thomas Schilling <nominolo@googlemail.com>**20081122154151]
2553[Comments/Haddockification only.
2554Thomas Schilling <nominolo@googlemail.com>**20081122143018]
2555[Report source span instead of just source location for unused names.
2556Thomas Schilling <nominolo@googlemail.com>**20081122142641]
2557[Change 'handleFlagWarnings' to throw exceptions instead of dying.
2558Thomas Schilling <nominolo@googlemail.com>**20081122130658
2560 It now uses the standard warning log and error reporting mechanism.
2562[Document exported functions in main/HeaderInfo.
2563Thomas Schilling <nominolo@googlemail.com>**20081121145307]
2564[Remove warning supression klugde in main/HeaderInfo
2565Thomas Schilling <nominolo@googlemail.com>**20081121144155]
2566[Use mutator threads to do GC, instead of having a separate pool of GC threads
2567Simon Marlow <marlowsd@gmail.com>**20081121151233
2569 Previously, the GC had its own pool of threads to use as workers when
2570 doing parallel GC.  There was a "leader", which was the mutator thread
2571 that initiated the GC, and the other threads were taken from the pool.
2573 This was simple and worked fine for sequential programs, where we did
2574 most of the benchmarking for the parallel GC, but falls down for
2575 parallel programs.  When we have N mutator threads and N cores, at GC
2576 time we would have to stop N-1 mutator threads and start up N-1 GC
2577 threads, and hope that the OS schedules them all onto separate cores.
2578 It practice it doesn't, as you might expect.
2580 Now we use the mutator threads to do GC.  This works quite nicely,
2581 particularly for parallel programs, where each mutator thread scans
2582 its own spark pool, which is probably in its cache anyway.
2584 There are some flag changes:
2586   -g<n> is removed (-g1 is still accepted for backwards compat).
2587   There's no way to have a different number of GC threads than mutator
2588   threads now.
2590   -q1       Use one OS thread for GC (turns off parallel GC)
2591   -qg<n>    Use parallel GC for generations >= <n> (default: 1)
2593 Using parallel GC only for generations >=1 works well for sequential
2594 programs.  Compiling an ordinary sequential program with -threaded and
2595 running it with -N2 or more should help if you do a lot of GC.  I've
2596 found that adding -qg0 (do parallel GC for generation 0 too) speeds up
2597 some parallel programs, but slows down some sequential programs.
2598 Being conservative, I left the threshold at 1.
2600 ToDo: document the new options.
2603[we shouldn't update topBound in discardSparks()
2604Simon Marlow <marlowsd@gmail.com>**20081121113539]
2605[Throw SourceErrors instead of ProgramErrors in main/HeaderInfo.
2606Thomas Schilling <nominolo@googlemail.com>**20081121141339
2608 Parse errors during dependency analysis or options parsing really
2609 shouldn't kill GHC; this is particularly annoying for GHC API clients.
2611[fix the build when !USE_MMAP
2612Simon Marlow <marlowsd@gmail.com>**20081121085418]
2613[round the size up to a page in mmapForLinker() instead of in the caller
2614Simon Marlow <marlowsd@gmail.com>**20081120154014]
2615[Fix a race in the deadlock-detection code
2616Simon Marlow <marlowsd@gmail.com>**20081120112438
2617 After a deadlock it was possible for the timer signal to remain off,
2618 which meant that the next deadlock would not be detected, and the
2619 system would hang.  Spotted by conc047(threaded2).
2621[error message wibble
2622Simon Marlow <marlowsd@gmail.com>**20081120084901]
2623[Fix flag name -XDisambiguateRecordFields
2625[Fix regTableToCapability() if gcc introduces padding
2626Simon Marlow <marlowsd@gmail.com>**20081119162910
2627 Also avoid padding if possible using __attribute__((packed))
2628 Fixes the Windows build
2630[Fix 32-bit breakage
2631Simon Marlow <marlowsd@gmail.com>**20081119145429]
2632[Small refactoring, and add comments
2633Simon Marlow <marlowsd@gmail.com>**20081119143702
2634 I discovered a new invariant while experimenting (blackholing is not
2635 optional when using parallel GC), so documented it.
2637[Fix some unsigned comparisions that should be signed
2638Simon Marlow <marlowsd@gmail.com>**20081119143205
2639 Fixes crashes when using reclaimSpark() (not used currently, but may
2640 be in the future).
2642[Remove incorrect assertions in steal()
2643Simon Marlow <marlowsd@gmail.com>**20081119143043]
2644[don't run sparks if there are other threads on this Capability
2645Simon Marlow <marlowsd@gmail.com>**20081114121022]
2646[Fix typo (HAVE_LIBGMP => HAVE_LIB_GMP); omit local gmp includes if HAVE_LIB_GMP
2647Simon Marlow <marlowsd@gmail.com>**20081119131056
2648 If we're using the system's installed GMP, we don't want to be picking
2649 up the local gmp.h header file.
2651 Fixes 2469(ghci) for me, because it turns out the system's GMP is more
2652 up-to-date than GHC's version and has a fix for more recent versions
2653 of gcc.  We also need to pull in a more recent GMP, but that's a
2654 separte issue.
2656[Fix some more shutdown races
2657Simon Marlow <marlowsd@gmail.com>**20081119124848
2658 There were races between workerTaskStop() and freeTaskManager(): we
2659 need to be sure that all Tasks have exited properly before we start
2660 tearing things down.  This isn't completely straighforward, see
2661 comments for details.
2663[Add help messages about --with-editline-(includes,libraries) to the ghc configure script.
2664Judah Jacobson <judah.jacobson@gmail.com>**20081114183334]
2665[Add optional eager black-holing, with new flag -feager-blackholing
2666Simon Marlow <marlowsd@gmail.com>**20081118142442
2668 Eager blackholing can improve parallel performance by reducing the
2669 chances that two threads perform the same computation.  However, it
2670 has a cost: one extra memory write per thunk entry. 
2672 To get the best results, any code which may be executed in parallel
2673 should be compiled with eager blackholing turned on.  But since
2674 there's a cost for sequential code, we make it optional and turn it on
2675 for the parallel package only.  It might be a good idea to compile
2676 applications (or modules) with parallel code in with
2677 -feager-blackholing.
2679 ToDo: document -feager-blackholing.
2681[Fix #2783: detect black-hole loops properly
2682Simon Marlow <marlowsd@gmail.com>**20081117144515
2683 At some point we regressed on detecting simple black-hole loops.  This
2684 happened due to the introduction of duplicate-work detection for
2685 parallelism: a black-hole loop looks very much like duplicate work,
2686 except it's duplicate work being performed by the very same thread.
2687 So we have to detect and handle this case.
2689[Fix warning on Windows (use deleteThread() not deleteThread_())
2690Simon Marlow <marlowsd@gmail.com>**20081117143047]
2691[fix compile breakage on Windows
2692Simon Marlow <marlowsd@gmail.com>**20081117142831]
2693[Attempt to fix #2512 and #2063;  add +RTS -xm<address> -RTS option
2694Simon Marlow <marlowsd@gmail.com>**20081117120556
2695 On x86_64, the RTS needs to allocate memory in the low 2Gb of the
2696 address space.  On Linux we can do this with MAP_32BIT, but sometimes
2697 this doesn't work (#2512) and other OSs don't support it at all
2698 (#2063).  So to work around this:
2700   - Try MAP_32BIT first, if available.
2702   - Otherwise, try allocating memory from a fixed address (by default
2703     1Gb)
2705   - We now provide an option to configure the address to allocate
2706     from.  This allows a workaround on machines where the default
2707     breaks, and also provides a way for people to test workarounds
2708     that we can incorporate in future releases.
2710[Another shutdown fix
2711Simon Marlow <marlowsd@gmail.com>**20081117094350
2712 If we encounter a runnable thread during shutdown, just kill it.  All
2713 the threads are supposed to be dead at this stage, but this catches
2714 threads that might have just returned from a foreign call, or were
2715 finalizers created by the GC.
2717 Fixes memo002(threaded1)
2719[Correct an example in the users guide
2720Ian Lynagh <igloo@earth.li>**20081116174938]
2721[Fix gen_contents_index when not run inplace; trac #2764
2722Ian Lynagh <igloo@earth.li>**20081116174122
2723 Based on a patch from juhpetersen.
2725[close the temporary Handle before removing the file
2726Simon Marlow <marlowsd@gmail.com>**20081114130958]
2727[refactor: move unlockClosure() into SMPClosureOps() where it should be
2728Simon Marlow <marlowsd@gmail.com>**20081114095817]
2729[Omit definitions of cas() and xchg() in .hc code
2730Simon Marlow <marlowsd@gmail.com>**20081114095738
2731 They cause compilation errors (correctly) with newer gccs
2732 Shows up compiling the RTS via C, which happens on Windows
2734[Don't put stdin into non-blocking mode (#2778, #2777)
2735Simon Marlow <marlowsd@gmail.com>**20081114130546
2736 This used to be necessary when our I/O library needed all FDs in
2737 O_NONBLOCK mode, and readline used to put stdin back into blocking
2738 mode.  Nowadays the I/O library can cope with FDs in blocking mode,
2739 and #2778/#2777 show why this is important.
2741[Rmoeve --enable-dotnet
2742Simon Marlow <marlowsd@gmail.com>**20081114124929]
2743[#2751: disourage --enable-shared in ./configure --help
2744Simon Marlow <marlowsd@gmail.com>**20081114124748]
2745[add a warning that --enable-shared is experimental
2746Simon Marlow <marlowsd@gmail.com>**20081114104034]
2747[lookupSymbol: revert to looking up both with and without the @N suffix
2748Simon Marlow <marlowsd@gmail.com>**20081113122927]
2749[#2768: fix compatibility problem with newer version of mingw
2750Simon Marlow <marlowsd@gmail.com>**20081113114626]
2751[notice ^C exceptions when waiting for I/O
2752Simon Marlow <marlowsd@gmail.com>**20081113114342]
2753[Fix a bug in the recompilation checking logic.
2754Thomas Schilling <nominolo@googlemail.com>**20081113162653
2756 Previously, using target HscNothing resulted in unnessesary
2757 recompilation because 'upsweep_mod' treated HscInterface specially.
2758 This patch changes relaxes this.
2760 When running GHC with debug level 5, 'upsweep_mod' will now also be
2761 more verbose about what it is doing.
2763 There is (at least) one possible remaining problem, though: When using
2764 target 'HscNothing' we generate a fake linkable to signal that we have
2765 processed a module.  When switching to 'HscInterpreted' this may cause
2766 objects to not be recompiled.  Switching from HscNothing to
2767 HscInterpreted is therefore only safe if we unload everything first.
2769[Fix another subtle shutdown deadlock
2770Simon Marlow <marlowsd@gmail.com>**20081113160005
2771 The problem occurred when a thread tries to GC during shutdown.  In
2772 order to GC it has to acquire all the Capabilities in the system, but
2773 during shutdown, some of the Capabilities have already been closed and
2774 can never be acquired.
2776[Fix an extremely subtle deadlock bug on x86_64
2777Simon Marlow <marlowsd@gmail.com>**20081113155730
2778 The recent_activity flag was an unsigned int, but we sometimes do a
2779 64-bit xchg() on it, which overwrites the next word in memory.  This
2780 happened to contain the sched_state flag, which is used to control the
2781 orderly shutdown of the system.  If the xchg() happened during
2782 shutdown, the scheduler would get confused and deadlock.  Don't you
2783 just love C?
2785[move an assertion
2786Simon Marlow <marlowsd@gmail.com>**20081113154542]
2787[Always zap the trailing @N from symbols when looking up in a DLL
2788Simon Marlow <marlowsd@gmail.com>**20081112111518
2790 Fixes win32002(ghci)
2792 Previously we only did this for references from object files, but we
2793 should do it for all symbols, including those that GHCi looks up due
2794 to FFI calls from bytecode.
2796[Only allocate a mark stack if we're actually doing marking
2797Simon Marlow <marlowsd@gmail.com>**20081112112144
2798 saves a bit of memory in major GCs
2800[Fix parse error with older gccs (#2752)
2801Simon Marlow <marlowsd@gmail.com>**20081111135344]
2802[Fix to i386_insert_ffrees (#2724, #1944)
2803Simon Marlow <marlowsd@gmail.com>**20081111125619
2804 The i386 native code generator has to arrange that the FPU stack is
2805 clear on exit from any function that uses the FPU.  Unfortunately it
2806 was getting this wrong (and has been ever since this code was written,
2807 I think): it was looking for basic blocks that used the FPU and adding
2808 the code to clear the FPU stack on any non-local exit from the block.
2809 In fact it should be doing this on a whole-function basis, rather than
2810 individual basic blocks.
2812[Fix bootstrap with 6.10.1 on Windows
2813Simon Marlow <marlowsd@gmail.com>**20081110134318
2814 ghc-pkg doesn't understand the old syntax any more, so 'ghc-pkg -l' fails
2816[Perform case-insensitive matching of path components in getBaseDir on Windows (Fixes bug 2743)
2817Neil Mitchell <ndmitchell@gmail.com>**20081105134315]
2818[Documentation only.  Clarify that 'load*' may indeed throw SourceErrors.
2819Thomas Schilling <nominolo@googlemail.com>**20081110175614
2821 I don't think errors during dependency analysis should be passed to
2822 the logger.
2824[Fix documentation (to say the opposite).
2825Thomas Schilling <nominolo@googlemail.com>**20081110153819]
2826[Fix line numbers in TAGS files.
2827Thomas Schilling <nominolo@googlemail.com>**20081110153621]
2828[Documentation only.
2829Thomas Schilling <nominolo@googlemail.com>**20081110153456]
2830[Add 'packageDbModules' function to GHC API.
2831Thomas Schilling <nominolo@googlemail.com>**20081110143510
2833 This function returns a list of all modules available through the
2834 package DB.
2836 MERGE TO 6.10
2838[We now require GHC 6.6, so we always have Applicative
2839Ian Lynagh <igloo@earth.li>**20081108144723]
2840[Remove a CPP test that's always true (__GLASGOW_HASKELL__ >= 605)
2841Ian Lynagh <igloo@earth.li>**20081108144544]
2842[Remove some dead code now that __GLASGOW_HASKELL__ >= 606
2843Ian Lynagh <igloo@earth.li>**20081108144459]
2844[Remove some flag duplication from a Makefile
2845Ian Lynagh <igloo@earth.li>**20081108144412]
2846[ghc_ge_605 is now always YES
2847Ian Lynagh <igloo@earth.li>**20081108144328]
2848[Remove the GHC 6.4 unicode compat stuff; we can now just use Data.Char
2849Ian Lynagh <igloo@earth.li>**20081108143423]
2850[Fix libffi bindist
2851Clemens Fruhwirth <clemens@endorphin.org>**20081108094725]
2852[Replace couple of fromJust with expectJust
2853Clemens Fruhwirth <clemens@endorphin.org>**20081107160735]
2854[Bugfix for patch "Do not filter the rts from linked libraries..." (#2745)
2855Simon Marlow <marlowsd@gmail.com>**20081107092925
2856 The sense of the #ifdef was wrong
2858[fix via-C compilation: import ghczmprim_GHCziBool_False_closure
2859Simon Marlow <marlowsd@gmail.com>**20081107090432]
2860[disable instance MonadPlus CoreM for GHC <= 6.6
2861Simon Marlow <marlowsd@gmail.com>**20081107085250]
2862[re-instate counting of sparks converted
2863Simon Marlow <marlowsd@gmail.com>**20081106160810
2864 lost in patch "Run sparks in batches"
2866[fix ASSERT_SPARK_POOL_INVARIANTS(): top>bottom is valid
2867Simon Marlow <marlowsd@gmail.com>**20081106155826]
2868[pruneSparkQueue(): fix bug when top>bottom
2869Simon Marlow <marlowsd@gmail.com>**20081106155648]
2870[don't yield if the system is shutting down
2871Simon Marlow <marlowsd@gmail.com>**20081106155356]
2872[leave out ATTRIBUTE_ALIGNED on Windows, it gives a warning
2873Simon Marlow <marlowsd@gmail.com>**20081106132105]
2874[Cope with ThreadRelocated when traversing the blocked_queue
2875Simon Marlow <marlowsd@gmail.com>**20081106114045
2876 Fixes "invalid what_next field" in ioref001 on Windows, and perhaps others
2878[Remove dead code.
2879Thomas Schilling <nominolo@googlemail.com>**20081031162036]
2880[Run sparks in batches, instead of creating a new thread for each one
2881Simon Marlow <marlowsd@gmail.com>**20081106113639
2882 Signficantly reduces the overhead for par, which means that we can
2883 make use of paralellism at a much finer granularity.
2885[allocateInGen(): increase alloc_blocks (#2747)
2886Simon Marlow <marlowsd@gmail.com>**20081106113714]
2887[disable MonadPlus instance that doesn't compile with 6.6
2888Simon Marlow <marlowsd@gmail.com>**20081106100411]
2889[don't yield the Capability if blackholes_need_checking
2890Simon Marlow <marlowsd@gmail.com>**20081105154928]
2891[deadlock fix: reset the flag *after* checking the blackhole queue
2892Simon Marlow <marlowsd@gmail.com>**20081105150542]
2893[retreat the top/bottom fields of the spark pool in pruneSparkPool()
2894Simon Marlow <marlowsd@gmail.com>**20081105150359]
2895[fix the :help docs for :set stop (#2737)
2896Simon Marlow <marlowsd@gmail.com>**20081104092929]
2897[bugfix: don't ingore the return value from rts_evalIO()
2898Simon Marlow <marlowsd@gmail.com>**20081104142147]
2899[Document the new SPARKS statistic, and xref from the parallelism section
2900Simon Marlow <marlowsd@gmail.com>**20081024120236]
2901[Move the freeing of Capabilities later in the shutdown sequence
2902Simon Marlow <marlowsd@gmail.com>**20081024104301
2903 Fixes a bug whereby the Capability has been freed but other
2904 Capabilities are still trying to steal sparks from its pool.
2906[Pad Capabilities and Tasks to 64 bytes
2907Simon Marlow <marlowsd@gmail.com>**20081023080749
2908 This is just good practice to avoid placing two structures heavily
2909 accessed by different CPUs on the same cache line
2911[Fix desugaring of record update (fixes Trac #2735)
2913[Refuse to register packages with unversioned dependencies; trac #1837
2914Ian Lynagh <igloo@earth.li>**20081031181746]
2915[We now require GHC 6.6 to build the HEAD (and thus 6.12)
2916Ian Lynagh <igloo@earth.li>**20081031171506]
2917[:set prompt now understand Haskell String syntax; trace #2652
2918Ian Lynagh <igloo@earth.li>**20081031145227]
2919[Comments only
2921[Quickfix for warning.
2922Thomas Schilling <nominolo@googlemail.com>**20081031113125]
2923[Export typeclasses for accessing compiler results.
2924Thomas Schilling <nominolo@googlemail.com>**20081028182310
2926 MERGE TO 6.10.
2928[Minor refactoring.
2929Thomas Schilling <nominolo@googlemail.com>**20081028182202]
2930[Include record fields in tags.
2931Thomas Schilling <nominolo@googlemail.com>**20081028180538]
2932[Fix imports
2934[Improve error reporting for non-rigid GADT matches
2937 Following suggestions from users, this patch improves the error message
2938 when a GADT match needs a rigid type:
2940  tcfail172.hs:19:10:
2941      GADT pattern match in non-rigid context for `Nil'
2942 -      Solution: add a type signature
2943 +      Probable solution: add a type signature for `is_normal'
2944      In the pattern: Nil
2945      In the definition of `is_normal': is_normal Nil = True
2947 Now GHC tries to tell you what to give a type signature *for*.
2948 Thanks to Daniel Gorin and others for the suggestions.
2951[Add (a) CoreM monad, (b) new Annotations feature
2954 This patch, written by Max Bolingbroke,  does two things
2956 1.  It adds a new CoreM monad (defined in simplCore/CoreMonad),
2957     which is used as the top-level monad for all the Core-to-Core
2958     transformations (starting at SimplCore).  It supports
2959        * I/O (for debug printing)
2960        * Unique supply
2961        * Statistics gathering
2962        * Access to the HscEnv, RuleBase, Annotations, Module
2963     The patch therefore refactors the top "skin" of every Core-to-Core
2964     pass, but does not change their functionality.
2966 2.  It adds a completely new facility to GHC: Core "annotations".
2967     The idea is that you can say
2968        {#- ANN foo (Just "Hello") #-}
2969     which adds the annotation (Just "Hello") to the top level function
2970     foo.  These annotations can be looked up in any Core-to-Core pass,
2971     and are persisted into interface files.  (Hence a Core-to-Core pass
2972     can also query the annotations of imported things.)  Furthermore,
2973     a Core-to-Core pass can add new annotations (eg strictness info)
2974     of its own, which can be queried by importing modules.
2976 The design of the annotation system is somewhat in flux.  It's
2977 designed to work with the (upcoming) dynamic plug-ins mechanism,
2978 but is meanwhile independently useful.
2980 Do not merge to 6.10! 
2983[Fix Trac #2674: in TH reject empty case expressions and function definitions
2985[Change naming conventions for compiler-generated dictionaries and type functions
2988 Up to now, the data constructor dictionary for class C as been called
2989 ":DC". But there is no reason for the colon to be at the front; indeed
2990 it confuses the (simple-minded) pretty-printer for types.  So this
2991 patch changes it to be "D:C".  This makes Core a lot easier to read.
2992 Having a colon in the middle ensures that it can't clash with a user-written
2993 data type.
2995 Similarly I changed
2997   T:C     Data type corresponding a class dictionary (was :TC)
2998   D:C     Data constructor for class dictionary (was :DC)
3000   NTCo:T   Coercion mapping from a newtype T to its representation type
3001                (was :CoT)
3003   TFCo:R   Coercion mapping from a data family to its respresentation type R
3004                (was :CoFR)
3006   Rn:T     The n'th respresentation data type for a data type T
3007                (was :RnT)
3010 Do not merge to 6.10.
3012 HEADS-UP: you'll need to recompile libraries from scratch. 
3014 ROMAN: you could do the same for OccName.mkVectTyConOcc etc, if you wanted.
3018[Fix tcrun031: yet more tidying up in TcDeriv
3020[Add Outputable instance for CoercionI
3022[Fix Trac #2720: inlining and casts
3025 The issue here is what happens when we have
3027        (f |> co) x
3029 where f is itself marked INLINE.  We want callSiteInline to "see"
3030 the fact that the function is applied, and hence have some incentive
3031 to inline.  I've done this by extending CoreUnfold.CallCtxt with
3032 ValAppCtxt.  I think that should catch this case without messing up
3033 any of the others.
3036[Clarify documentatoin
3038[Update library version numbers in the release notes
3039Ian Lynagh <igloo@earth.li>**20081023144018]
3040[various updates to the release notes
3041Simon Marlow <marlowsd@gmail.com>**20081007151647]
3042[Add library release notes
3043Ian Lynagh <igloo@earth.li>**20080920155722]
3044[Add release notes for the compiler
3045Ian Lynagh <igloo@earth.li>**20080920114857]
3046[Doc fix
3047Ian Lynagh <igloo@earth.li>**20081028150534]
3048[Rename some variables in docs
3049Ian Lynagh <igloo@earth.li>**20081028150447]
3050[Fix typos
3051Ian Lynagh <igloo@earth.li>**20081028144655]
3052[Mostly-fix Trac #2595: updates for existentials
3055 Ganesh wanted to update records that involve existentials.  That
3056 seems reasonable to me, and this patch covers existentials, GADTs,
3057 and data type families.
3059 The restriction is that
3060   The types of the updated fields may mention only the
3061   universally-quantified type variables of the data constructor
3063 This doesn't allow everything in #2595 (it allows 'g' but not 'f' in
3064 the ticket), but it gets a lot closer.
3066 Lots of the new lines are comments!
3069[Fix Trac #2723: keep track of record field names in the renamer
3072 The idea here is that with -XNamedFieldPuns and -XRecordWildCards we don't
3073 want to report shadowing errors for
3074        let fld = <blah> in C { .. }
3075 But to suppress such shadowing errors, the renamer needs to know that
3076 'fld' *is* a record selector.  Hence the new NameSet in
3077 TcRnFypes.RecFieldEnv
3080[Remove dead code
3082[Fix Trac #2713: refactor and tidy up renaming of fixity decls
3085 In fixing #2713, this patch also eliminates two almost-unused
3086 functions from RnEnv (lookupBndr and lookupBndr_maybe).  The
3087 net lines of code is prety much unchanged, but more of them
3088 are comments!
3091[Fix Trac #2701: make deriving check better for unlifted args
3094 Getting the automatic deriving mechanism to work really smoothly
3095 is surprisingly hard.  I keep finding myself in TcDeriv!
3097 Anyway, this is a nice clean fix to Trac #2701.
3100[Use pdflatex rather than latex for building
3101Ian Lynagh <igloo@earth.li>**20081024112400
3102 The Windows builder is having problems running ps2pdf, so this works
3103 aroudn the problem.
3105[Remove an unmatched } in core.tex
3106Ian Lynagh <igloo@earth.li>**20081024111750]
3107[Add a usepackage{url}
3108Ian Lynagh <igloo@earth.li>**20081024111458]
3109[Update ANNOUNCE
3110Ian Lynagh <igloo@earth.li>**20081022164423]
3111[Fix a bug in the new scheduler
3112Simon Marlow <marlowsd@gmail.com>**20081023155017
3113 If the current thread blocks, we should yield the Capability
3114 immediately, because the thread and hence possibly the current Task
3115 are now owned by someone else.  This worked in the old scheduler, but
3116 we moved where the yield happens in the new scheduler which broke it.
3118[add an assertion
3119Simon Marlow <marlowsd@gmail.com>**20081023154551]
3120[fix a warning
3121Simon Marlow <marlowsd@gmail.com>**20081023082213]
3122[traverse the spark pools only once during GC rather than twice
3123Simon Marlow <marlowsd@gmail.com>**20081022115233]
3124[Refactoring and reorganisation of the scheduler
3125Simon Marlow <marlowsd@gmail.com>**20081022092744
3127 Change the way we look for work in the scheduler.  Previously,
3128 checking to see whether there was anything to do was a
3129 non-side-effecting operation, but this has changed now that we do
3130 work-stealing.  This lead to a refactoring of the inner loop of the
3131 scheduler.
3133 Also, lots of cleanup in the new work-stealing code, but no functional
3134 changes.
3136 One new statistic is added to the +RTS -s output:
3138   SPARKS: 1430 (2 converted, 1427 pruned)
3140 lets you know something about the use of `par` in the program.
3142[Work stealing for sparks
3145    Spark stealing support for PARALLEL_HASKELL and THREADED_RTS versions of the RTS.
3147   Spark pools are per capability, separately allocated and held in the Capability
3148   structure. The implementation uses Double-Ended Queues (deque) and cas-protected
3149   access.
3151   The write end of the queue (position bottom) can only be used with
3152   mutual exclusion, i.e. by exactly one caller at a time.
3153   Multiple readers can steal()/findSpark() from the read end
3154   (position top), and are synchronised without a lock, based on a cas
3155   of the top position. One reader wins, the others return NULL for a
3156   failure.
3158   Work stealing is called when Capabilities find no other work (inside yieldCapability),
3159   and tries all capabilities 0..n-1 twice, unless a theft succeeds.
3161   Inside schedulePushWork, all considered cap.s (those which were idle and could
3162   be grabbed) are woken up. Future versions should wake up capabilities immediately when
3163   putting a new spark in the local pool, from newSpark().
3165 Patch has been re-recorded due to conflicting bugfixes in the sparks.c, also fixing a
3166 (strange) conflict in the scheduler.
3169[include an elapsed time table
3170Simon Marlow <marlowsd@gmail.com>**20081023080648]
3171[generate a valid summary for older GHC versions too
3172Simon Marlow <marlowsd@gmail.com>**20081023080629]
3173[Fix Trac #2714 (a minor wibble)
3176 In boxy_match (which is a pure function used by preSubType) we can
3177 encounter TyVars not just TcTyVars; this patch takes account of that.
3180[Reject programs with superclass equalities for now
3181Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021131721
3182 - The current implementation of type families cannot properly deal
3183   with superclass equalities.  Instead of making a half-hearted attempt at
3184   supporting them, which mostly ends in cryptic error message, rejecting
3185   right away with an appropriate message.
3187   MERGE TO 6.10
3189[Fix doc syntax
3190Ian Lynagh <igloo@earth.li>**20081021183317]
3191[Don't put the README file in the Windows installer; fixes trac #2698
3192Ian Lynagh <igloo@earth.li>**20081021162543
3193 The README file talks about getting and building the sources, which
3194 doesn't make sense for the installer.
3196[Comments and parens only
3198[Do proper cloning in worker/wrapper splitting
3201 See Note [Freshen type variables] in WwLib.  We need to clone type
3202 variables when building a worker/wrapper split, else we simply get
3203 bogus code, admittedly in rather obscure situations.  I can't quite
3204 remember what program showed this up, unfortunately, but there
3205 definitely *was* one!  (You get a Lint error.)
3208[Don't float an expression wrapped in a cast
3211 There is no point in floating out an expression wrapped in a coercion;
3212 If we do we'll transform 
3213        lvl = e |> co [_$_]
3214 to     
3215        lvl' = e; lvl = lvl' |> co
3216 and then inline lvl.  Better just to float out the payload (e).
3219[Fix Trac #2668, and refactor TcDeriv
3222 TcDeriv deals with both standalone and ordinary 'deriving';
3223 and with both data types and 'newtype deriving'.  The result
3224 is really rather compilcated and ad hoc.  Ryan discovered
3225 #2668; this patch fixes that bug, and makes the internal interfces
3226 #more uniform.  Specifically, the business of knocking off
3227 type arguments from the instance type until it matches the kind of the
3228 class, is now done by derivTyData, not mkNewTypeEqn, because the
3229 latter is shared with standalone derriving, whree the trimmed
3230 type application is what the user wrote.
3233[Spelling error in comment
3235[White space only
3237[Comments to explain strict overlap checking for type family instances
3239[Allow type families to use GADT syntax (and be GADTs)
3242 We've always intended to allow you to use GADT syntax for
3243 data families:
3244        data instance T [a] where
3245          T1 :: a -> T [a]
3246 and indeed to allow data instances to *be* GADTs
3247        data intsance T [a] where
3248          T1 :: Int -> T [Int]
3249          T2 :: a -> b -> T [(a,b)]
3251 This patch fixes the renamer and type checker to allow this.
3254[Improve crash message from applyTys and applyTypeToArgs
3256[Wibble to ungrammatical error message
3258[Comments only: replace ":=:" by "~" (notation for equality predicates)
3260[FIX #2693
3261Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021120107
3262 - As long as the first reduceContext in tcSimplifyRestricted potentially
3263   performs improvement, we need to zonk again before the second reduceContext.
3264   It would be better to prevent the improvement in the first place, but given
3265   the current situation zonking is definitely the right thing to do.
3267   MERGE TO 6.10
3269[Restore the terminal attributes even if ghci does not exit normally.
3270Judah Jacobson <judah.jacobson@gmail.com>**20081020164109]
3271[FIX #2688
3272Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081021044213
3273 - Change in TcSimplify.reduceContext:
3275      We do *not* go around for new extra_eqs.  Morally, we should,
3276      but we can't without risking non-termination (see #2688).  By
3277      not going around, we miss some legal programs mixing FDs and
3278      TFs, but we never claimed to support such programs in the
3279      current implementation anyway.
3281   MERGE TO 6.10
3283[Move documentation within 80 column boundary.
3284Thomas Schilling <nominolo@googlemail.com>**20081014134016]
3285[Improve haddock documentation for 'GHC.topSortModuleGraph'.
3286Thomas Schilling <nominolo@googlemail.com>**20081014133833]
3287[Improve haddock documentation for HsExpr module.
3288Thomas Schilling <nominolo@googlemail.com>**20081014133740]
3289[Improve Haddock-markup for HsDecls module.
3290Thomas Schilling <nominolo@googlemail.com>**20081014133556]
3291[Run Haddock with compacting GC and show RTS statistics.
3292Thomas Schilling <nominolo@googlemail.com>**20081020111410]
3293[FIX (partially) #2703: bug in stack overflow handling when inside block
3294Simon Marlow <marlowsd@gmail.com>**20081020121103
3295 As a result of a previous ticket (#767) we disabled the generation of
3296 StackOverflow exceptions when inside a Control.Exception.block, on the
3297 grounds that StackOverflow is like an asynchronous exception.  Instead
3298 we just increase the stack size.  However, the stack size calculation
3299 was wrong, and ended up not increasing the size of the stack, with the
3300 result that the runtime just kept re-allocating the stack and filling
3301 up memory.
3303[Re-export Located(..) and related functions
3304Simon Marlow <marlowsd@gmail.com>**20081020102422
3305 So that clients don't need to import SrcLoc
3307[whitespace fix
3308Simon Marlow <marlowsd@gmail.com>**20081020101241]
3309[FIX #2691: Manually reset the terminal to its initial settings; works around a bug in libedit.
3310Judah Jacobson <judah.jacobson@gmail.com>**20081016024838]
3311[Eliminate duplicate flags in the tab completion of ghci's :set command.
3312Judah Jacobson <judah.jacobson@gmail.com>**20081016015721]
3313[Add dph haddock docs to the doc index
3314Ian Lynagh <igloo@earth.li>**20081019133208]
3315[Clean the bootstrapping extensible-exceptions package
3316Ian Lynagh <igloo@earth.li>**20081017195942]
3317[Fix trac #2687
3318Ian Lynagh <igloo@earth.li>**20081015163412
3319 OtherPunctuation, ConnectorPunctuation and DashPunctuation are now
3320 treated as symbols, rather than merely graphic characters.
3322[Fix trac #2680; avoid quadratic behaviour from (++)
3323Ian Lynagh <igloo@earth.li>**20081015163235]
3324[Fix the build when the bootstrapping compiler has a newer Cabal than us
3325Ian Lynagh <igloo@earth.li>**20081015144023
3326 We need to forcibly use the in-tree Cabal, or we get version mismatch errors
3328[Fix the name of prologue.txt when making bindists
3329Ian Lynagh <igloo@earth.li>**20081014114714]
3330[Comments only
3332[Fix Trac #2497; two separate typos in Lexer.x
3335 The patch to switch on lexing of 'forall' inside a RULES pragma
3336 wasn't working.  This fixes it so that it does.
3339[Update manual: tidy up instances, say more about type families in instance decls
3341[Make tags work on Unices, too.
3342Thomas Schilling <nominolo@googlemail.com>**20081014211236]
3343[Undefine __PIC__ before defining it to work around "multiple definitions of __PIC__" warnings
3344Clemens Fruhwirth <clemens@endorphin.org>**20081014143206]
3345[Add "dyn" to GhcRTSWays when compiling --enable-shared
3346Clemens Fruhwirth <clemens@endorphin.org>**20081014125123]
3347[Fill out the ghc package's cabal file
3348Ian Lynagh <igloo@earth.li>**20081013235817]
3349[Patching libffi so it can be built as DLL
3350Clemens Fruhwirth <clemens@endorphin.org>**20081014103459
3352 libffi-dllize-3.0.6.patch should be pushed upstream
3354[Add 'etags' makefile target.
3355Thomas Schilling <nominolo@googlemail.com>**20081013170927
3357 This only works with stage2 since `ghctags' is built against stage1
3358 but not against the bootstrapping compiler.  Also note that all of GHC
3359 must typecheck for this target to succeed.  Perhaps we should not
3360 overwrite the old TAGS file by default then.
3362[Use cabal information to get GHC's flags to `ghctags'.
3363Thomas Schilling <nominolo@googlemail.com>**20081013170658
3365 By giving the dist-directory to ghctags we can get all the GHC API
3366 flags we need in order to load the required modules.  The flag name
3367 could perhaps be improved, but apart from that it seems to work well.
3369[Version bump for libffi to 3.0.6
3370Clemens Fruhwirth <clemens@endorphin.org>**20081014081300]
3371[Encode shared/static configuration into stamps to do the right thing when rebuilding
3372Clemens Fruhwirth <clemens@endorphin.org>**20081013221530]
3373[Add a link to the GHC API docs from the library haddock index
3374Ian Lynagh <igloo@earth.li>**20081013195943]
3375[Link to the GHC API documentation from the main doc page
3376Ian Lynagh <igloo@earth.li>**20081013200927]
3377[Whitespace only in docs/index.html
3378Ian Lynagh <igloo@earth.li>**20081013200625]
3379[Tweak gen_contents_index
3380Ian Lynagh <igloo@earth.li>**20081013192548
3381 It now works again after it has been installed, as well as while it is
3382 in a source tree.
3383 After it's been installed it filters out the ghc package, as that
3384 currently swamps everything else in the index.
3386[Build fixes for DLLized rts
3387Clemens Fruhwirth <clemens@endorphin.org>**20081013201608]
3388[Do not filter the rts from linked libraries in linkDynLib as Windows does not allow unresolved symbols
3389Clemens Fruhwirth <clemens@endorphin.org>**20081013201426]
3390[Add HsFFI.o to INSTALL_LIBS
3391Clemens Fruhwirth <clemens@endorphin.org>**20081013200945]
3392[Rename symbol macros to a consistant naming scheme
3393Clemens Fruhwirth <clemens@endorphin.org>**20081013162433]
3394[Fix #2685: two Bool arguments to tidyTypeEnv were the wrong way around
3395Simon Marlow <marlowsd@gmail.com>**20081013121339
3396 So -XTemplateHaskell was behaving like -fomit-interface-file-pragmas,
3397 and vice versa.
3399[Simplify the "is $bindir in $PATH" test
3400Ian Lynagh <igloo@earth.li>**20081011191008]
3401[Correct the "is $bindir in $PATH" test
3402Ian Lynagh <igloo@earth.li>**20081011191030
3403 We were testing neq instead of eq
3405[Fix a typo which was causing ghci to quit on commands errors
3406pepe <mnislaih@gmail.com>**20081011114720]
3407[Drop libm from the linker dependencies for libffi
3408Clemens Fruhwirth <clemens@endorphin.org>**20081011074524]
3409[Do not generate haddock documentation when running install-docs in libffi
3410Clemens Fruhwirth <clemens@endorphin.org>**20081010192318]
3411[When waking up thread blocked on TVars, wake oldest first (#2319)
3412Josef Svenningsson <josef.svenningsson@gmail.com>**20081010150322
3413 StgTVarWatchQueue contains the threads blocked on a TVar in order
3414 youngest first. The list has to be traversed backwards to unpark the threads
3415 oldest first.
3417 This improves the fairness when using STM in some situations.
3419[add readTVarIO :: TVar a -> IO a
3420Simon Marlow <marlowsd@gmail.com>**20081010131545]
3421[fix #2636: throw missing module errors as SourceErrors, not ErrMsg
3422Simon Marlow <marlowsd@gmail.com>**20081010131535]
3423[atomicModifyIORef: use a local cas() instead of the global lock
3424Simon Marlow <simonmar@microsoft.com>**20081008154702
3425 This should improve scaling when using atomicModifyIORef
3427[Delay building libffi until package.conf is created and fix bindist
3428Clemens Fruhwirth <clemens@endorphin.org>**20081010073106]
3429[Install a versioned ghc-pkg script; fixes trac #2662
3430Ian Lynagh <igloo@earth.li>**20081009164946]
3431[Fix bindist creation: Only the main RTS was being put in the bindists
3432Ian Lynagh <igloo@earth.li>**20081009163451]
3433[pushAtom: add missing case for MachNullAddr (#2589)
3434Simon Marlow <marlowsd@gmail.com>**20081009091118]
3435[undo incorrect assertion, and fix comments
3436Simon Marlow <marlowsd@gmail.com>**20081009085118]
3437[remove old GRAN/PARALLEL_HASKELL code
3438Simon Marlow <marlowsd@gmail.com>**20081009085051]
3439[FIX #2639
3440Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081009132328
3442   MERGE TO 6.10
3444[Cover PredTy case in Type.tyFamInsts
3445Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081009061435
3447   MERGE TO 6.10
3449[Drop ghcconfig.h/RtsConfig.h from libffi's package.conf.in
3450Clemens Fruhwirth <clemens@endorphin.org>**20081009071342]
3451[Don't use sed's -i flag as Solaris doesn't know it in libffi/Makefile
3452Clemens Fruhwirth <clemens@endorphin.org>**20081008234455]
3453[Don't use /dev/null trick to create empty object files in libffi/Makefile
3454Clemens Fruhwirth <clemens@endorphin.org>**20081008232902]
3455[Turn libffi into a Haskell package
3456Clemens Fruhwirth <clemens@endorphin.org>**20081008170443]
3457[Make 'getModSummary' deterministic.
3458Thomas Schilling <nominolo@googlemail.com>**20081008144032]
3459[Add accessors to 'HsModule' and haddockify it.
3460Thomas Schilling <nominolo@googlemail.com>**20081007235656]
3461[fix syntax errors in src-dist publish rules
3462Simon Marlow <marlowsd@gmail.com>**20081008103432]
3463[add comments and an ASSERT_LOCK_HELD()
3464Simon Marlow <marlowsd@gmail.com>**20081008112627]
3465[Fix #2663: we had a hard-wired capabilities[0]
3466Simon Marlow <marlowsd@gmail.com>**20081008112609
3467 For some unknown reason in schedulePostRunThread() we were always
3468 passing capabilities[0] rather than the current Capability to
3469 throwToSingleThreaded().  This caused all kinds of weird failures and
3470 crashes in STM code when running on multiple processors.
3472[Fix #1955 for heap profiles generated by +RTS -hT
3473Simon Marlow <marlowsd@gmail.com>**20081003150745]
3474[add a section id for +RTS -hT
3475Simon Marlow <marlowsd@gmail.com>**20081007151007]
3476[update documentation for PostfixOperators
3477Simon Marlow <marlowsd@gmail.com>**20081007150957]
3478[fix markup
3479Simon Marlow <marlowsd@gmail.com>**20081007150943]
3480[Fix bug in DPH docs
3481Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008101618]
3482[Add short DPH section to users guide
3483Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008064754
3485 MERGE TO 6.10
3487[Users Guide: added type family documentation
3488Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081008061927
3490   MERGE TO 6.10
3492[Track changes to package dph
3493Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081008032859
3495 MERGE TO 6.10
3497[Build a profiled GHC API by default if p is in GhcLibWays
3498Ian Lynagh <igloo@earth.li>**20081007152318]
3499[Check whether mk/validate.mk defines anything after validating
3500Ian Lynagh <igloo@earth.li>**20081007144855]
3501[Remove #define _BSD_SOURCE from Stg.h
3502Ian Lynagh <igloo@earth.li>**20081006101959
3503 It's no longer needed, as base no longer #includes it
3505[Make ghctags compile again.
3506Thomas Schilling <nominolo@googlemail.com>**20081007135705]
3507[Revert AutoLinkPackages change for dynamic libraries. Cabal handles that now.
3508Clemens Fruhwirth <clemens@endorphin.org>**20081007100417]
3509[Change suffix for dyn. linked executables from _real to .dyn
3510Clemens Fruhwirth <clemens@endorphin.org>**20081007100750]
3511[Add accessors to 'Target' fields and haddockify.
3512Thomas Schilling <nominolo@googlemail.com>**20081006222940
3514 MERGE TO 6.10
3516[Make 'gblock' and 'gunblock' part of 'ExceptionMonad'.  This way the
3517Thomas Schilling <nominolo@googlemail.com>**20081006222831
3518 default implementations of 'gbracket' and 'gfinally' just work.
3520 MERGE TO 6.10
3522[Add Word8 support to vectoriser
3523Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081007004416
3525 MERGE TO 6.10
3527[Fix generating OS X installers: Set COMMAND_MODE=unix2003
3528Ian Lynagh <igloo@earth.li>**20081005222715
3529 If we don't specify COMMAND_MODE=unix2003 then xcodebuild defaults
3530 to setting it to legacy, which means that ar builds archives
3531 without a table of contents. That makes the build fail later on.
3533[We need to set datadir = $(libdir) in bindists
3534Ian Lynagh <igloo@earth.li>**20081005143307
3535 We already do in the normal Makefiles.
3537 This is because GHC needs package.conf and unlit to be in the same place
3538 (and things like ghc-pkg need to agree on where package.conf is, so we
3539 just set it globally).
3541[prep-bin-dist-mingw complains if it finds a bad version of windres
3542Ian Lynagh <igloo@earth.li>**20081004175351]
3543[removed Data.Generics.Basics, added Data.Data
3544'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082808]
3545[Fix a build problem with GHC 6.4.2
3546Ian Lynagh <igloo@earth.li>**20081003195700]
3547[No AutoLinkPackages for dynamic library linking
3548Clemens Fruhwirth <clemens@endorphin.org>**20081003185304]
3549[use ghcError for error in command line
3550Clemens Fruhwirth <clemens@endorphin.org>**20081001125648]
3551[Fix warnings
3553[Always use extensible exceptions in ghc-pkg, rather than using ifdefs
3554Ian Lynagh <igloo@earth.li>**20081003161247]
3555[Use a proper exception for IOEnvFailure, not just a UserError
3556Ian Lynagh <igloo@earth.li>**20081003160129]
3557[Use an extensible-exceptions package when bootstrapping
3558Ian Lynagh <igloo@earth.li>**20081003140216
3559 Ifdefs for whether we had extensible exceptions or not were spreading
3560 through GHC's source, and things would only have got worse for the next
3561 2-3 years, so instead we now use an implementation of extensible
3562 exceptions built on top of the old exception type.
3564[Expunge ThFake, cure Trac #2632
3567 This patch fixes a dirty hack (the fake ThFake module), which in turn
3568 was causing Trac #2632.
3570 The new scheme is that the top-level binders in a TH [d| ... |] decl splice
3571 get Internal names.  That breaks a previous invariant that things like
3572 TyCons always have External names, but these TyCons are never long-lived;
3573 they live only long enough to typecheck the TH quotation; the result is
3574 discarded.  So it seems cool.
3576 Nevertheless -- Template Haskell folk: please test your code.  The testsuite
3577 is OK but it's conceivable that I've broken something in TH.  Let's see.
3580[Make a debug check more refined
3582[Add ASSERTs to all calls of nameModule
3585 nameModule fails on an InternalName.  These ASSERTS tell you
3586 which call failed.
3589[Let parseModule take a ModSummary like checkAndLoadModule did.
3590Thomas Schilling <nominolo@googlemail.com>**20081002230412
3592 To get the ModSummary for a ModuleName getModSummary can be used.
3593 It's not called find* or lookup* because it assumes that the module is
3594 in the module graph and throws an exception if it cannot be found.
3595 Overall, I'm not quite sure about the usefulness of this function
3596 since the user has no control about which filetype to grab (hs or
3597 hs-boot).
3599[Remove some out-of-date entries from .darcs-boring
3600Ian Lynagh <igloo@earth.li>**20081002201519]
3601[TFs: Allow repeated variables in left-hand sides of instances
3602Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081002134539
3604   MERGE TO 6.10
3606[Clean up some comments
3607Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081002074642
3609   MERGE TO 6.10
3611[Make the new binder-swap stuff in OccurAnal work right for GlobalIds
3614 See Note [Binder swap on GlobalId scrutinees].  I hadn't got this
3615 right before, so repeated cases on imported Ids weren't getting optimised.
3619[Minor refactoring only
3621[Comments only
3623[Zap dead-ness info appropriately in SpecConstr
3626 SpecConstr can make pattern binders come alive, so we must remember
3627 to zap their dead-variable annotation.  See extendCaseBndrs.
3629 (This was triggering a Core Lint failure in DPH.)
3632[Suppress invalid Core Lint complaint about lack of constructors
3634[add some more GC roots (fixes conc048, and possibly some others)
3635Simon Marlow <marlowsd@gmail.com>**20081001164427]
3636[Document +RTS -hT
3637Simon Marlow <marlowsd@gmail.com>**20081001163222
3638 We forgot to document this in GHC 6.8
3640[fix new-qualified-operators link
3641Simon Marlow <marlowsd@gmail.com>**20081001163105]
3642[Proper error message for unsupported pattern signatures
3643Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001144339
3644 - Pattern signatures must be identical to the type expected for the pattern;
3645   see Note [Pattern coercions]
3646 - We now signal an appropriate error if an equality coercion would be needed
3647   (instead of just generating Core that doesn't typecheck)
3649   MERGE TO 6.10
3651[Prevent excessive inlining with DPH
3652Roman Leshchinskiy <rl@cse.unsw.edu.au>**20081002012055
3654 This adds a new flag -finline-if-enough-args which disables inlining for
3655 partially applied functions. It is automatically set by -Odph. This is a
3656 temporary hack and should remain undocumented.
3658 MERGE TO 6.10
3661[On Windows, check that we have a good version of windres when configuring
3662Ian Lynagh <igloo@earth.li>**20081001171133]
3663[Call $(PERL) rather than perl when making the manpage
3664Ian Lynagh <igloo@earth.li>**20080930155054]
3665[don't install the installPackage program
3666Ian Lynagh <igloo@earth.li>**20080930145714]
3667[Fix #2637: conc032(threaded2) failure
3668Simon Marlow <marlowsd@gmail.com>**20081001135549
3669 There was a race condition whereby a thread doing throwTo could be
3670 blocked on a thread that had finished, and the GC would detect this
3671 as a deadlock rather than raising the pending exception.  We can't
3672 close the race, but we can make the right thing happen when the GC
3673 runs later.
3675[Remove outdated link to OGI webpage
3676Simon Marlow <marlowsd@gmail.com>**20080930150912]
3677[TFs: Fixed InstContextNorm (and simplification of IPs)
3678Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001131303
3680   MERGE TO 6.10
3682[TcSimplify.reduceImplication: clean up
3683Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001091315
3684 - This cleans up some of the mess in reduceImplication and documents the
3685   precondition on the form of wanted equalities properly.
3686 - I also made the back off test a bit smarter by allowing to back off in the
3687   presence of wanted equalities as long as none of them got solved in the
3688   attempt.  (That should save generating some superfluous bindings.)
3690   MERGE TO 6.10
3692[Make sure to zonk the kind of coercion variables
3693Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20081001053243
3695   MERGE TO 6.10
3697[Remover PROT_EXEC flag from mmap()
3698Simon Marlow <marlowsd@gmail.com>**20080930141842
3699 Needed for #738 fix
3701[Fix #2410: carefully generate unique names for CAF CCs
3702Simon Marlow <marlowsd@gmail.com>**20080930141812]
3703[fix #2594: we were erroneously applying masks, as the reporter suggested
3704Simon Marlow <marlowsd@gmail.com>**20080930115611
3705 My guess is that this is left over from when we represented Int8 and
3706 friends as zero-extended rather than sign-extended.  It's amazing it hasn't
3707 been noticed earlier.
3709[Unconditionalize definition of DYNAMIC_* so that libffi.so/.dll is removed even when BuildSharedLibs is reset to NO
3710Clemens Fruhwirth <clemens@endorphin.org>**20080930085449]
3711[Type families: need to instantiate flexible skolems before other flexibles
3712Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080930053559
3714 MERGE TO 6.10
3716[Fix warnings
3717Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080929142227]
3718[Type families: consider subst rules both way
3719Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080929141040
3720 - applySubstFam, applySubstVarVar & applySubstVarFam need to return their
3721   second argument -to be put into the todo list- if the rule would be
3722   applicable if the equalities would be supplied in the opposite order.
3724 MERGE TO 6.10
3726[Clean up a bit and improve an error message
3728[Don't capture error calls in tryUser
3731 A previous patch slightly changed the semantics of tryUser.
3732 This patch restores the original behaviour
3733 (as expected in :print)
3736[tweaks to this section of the docs
3737Simon Marlow <simonmar@microsoft.com>**20080927141834]
3738[Add -outputdir flag (#2295)
3739Simon Marlow <simonmar@microsoft.com>**20080927141822]
3740[oops, forgot to add -XNewQualifiedOperators to the flags table
3741Simon Marlow <simonmar@microsoft.com>**20080923140449]
3742[Fix making OS X installers from source tarballs
3743Ian Lynagh <igloo@earth.li>**20080927150507
3744 I'm not sure why it works in the HEAD, but when making an installer
3745 from the 6.10.1 beta configure hangs when doing the CHECK_HIST_ERRORS
3746 test (during rl_initialize, I believe). Giving make /dev/null as stdin
3747 fixes it.
3749[Make the matching of the filename ghc.exe case insensitive, fixes bug #2603
3750Neil Mitchell <ndmitchell@gmail.com>**20080916160311]
3751[Fix #2411: missing case for CATCH_STM_FRAME in raiseAsync()
3752Simon Marlow <simonmar@microsoft.com>**20080926232806]
3753[Fix parsing of -ignore-package flag.
3754Bertram Felgenhauer <int-e@gmx.de>**20080925053820]
3755[Add an example of how to use SCCs to the user guide
3756Ian Lynagh <igloo@earth.li>**20080926203832]
3757[Add some description of the +RTS -t/-s/-S output
3758Ian Lynagh <igloo@earth.li>**20080926200203]
3759[Remove a redundant options pragma
3760Ian Lynagh <igloo@earth.li>**20080926152731]
3761[Split ShowVersion etc off into a different type to DoInteractive etc
3762Ian Lynagh <igloo@earth.li>**20080926140539
3763 This fixes trac #1348 (ghci --help gave ghc's help), and also tidies
3764 things up a bit. Things would be even tidier if the usage.txt files were
3765 put into a .hs file, so that ShowUsage wouldn't need to be able to find
3766 the libdir.
3768[Pass SRC_HC_OPTS to GHC when building GHC's Main.hs
3769Ian Lynagh <igloo@earth.li>**20080926131609]
3770[Improve runghc docs; fixes trac #2477
3771Ian Lynagh <igloo@earth.li>**20080926124425]
3772[Type families: fixes in flattening & finalisation
3773Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080925225324
3774 * Finalisation didn't do the right thing for equalities x ~ y, where
3775   x was instantiated, but not zonked and y flexible (need to do y := x)
3776 * During flattening we weren't careful enough when turning wanteds
3777   intermediates into locals
3779 Both bugs showed up in a small example of SPJ:
3781   linear :: HasTrie (Basis v) => (Basis v, v)
3782   linear =  basisValue
3784   class HasTrie a where
3786   type family Basis u :: *
3788   basisValue :: (Basis v,v)
3789   basisValue = error "urk"
3792[Fix the behaviour of flags like --help and --version; fixes trac #2620
3793Ian Lynagh <igloo@earth.li>**20080925165618
3794 They should override other mode flags, not conflict with them
3796[Follow the integer package changes
3797Ian Lynagh <igloo@earth.li>**20080925133855]
3798[Type families: fix decomposition problem
3799Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080925084139
3800 * Fixes the problem reported in
3801   <http://www.haskell.org/pipermail/haskell-cafe/2008-July/044911.html>
3803[Don't exit ghci if :info is called on an undefined identifier.
3804Judah Jacobson <judah.jacobson@gmail.com>**20080924212422]
3805[Fix maintainer-clean
3806Ian Lynagh <igloo@earth.li>**20080924230553]
3807[Use -f when making the runhaskell symlink
3808Ian Lynagh <igloo@earth.li>**20080924124255
3809 Otherwise installation fails if runhaskell already exists.
3811[Use -perm -100 rather than -perm /a+x when looking for executable files
3812Ian Lynagh <igloo@earth.li>**20080924124137
3813 /a+x doesn't work on some Solaris and OS X machines. Spotted by
3814 Christian Maeder.
3816[Use $(FIND) rather than find, as the former may be gfind
3817Ian Lynagh <igloo@earth.li>**20080924123323]
3818[Look for gfind as well as find
3819Ian Lynagh <igloo@earth.li>**20080924123046]
3820[In configure, don't call FPTOOLS_HADDOCK
3821Ian Lynagh <igloo@earth.li>**20080924122558
3822 We now use the in-tree haddock, so we don't need to look for it.
3824[Use $(TAR) rather than tar
3825Ian Lynagh <igloo@earth.li>**20080924121759
3826 Fixes problems on Solaris, where we need to use gtar instead of tar
3828[Add $(strip) to a Makefile test
3829Ian Lynagh <igloo@earth.li>**20080924120940
3830 Fixes making bindists on solaris. Patch from Christian Maeder.
3832[Use test -f rather than test -e, for portability (Solaris)
3833Ian Lynagh <igloo@earth.li>**20080924120840]
3834[Remove some dependencies on bootstrapping.conf from libraries/Makefile
3835Ian Lynagh <igloo@earth.li>**20080923205755
3836 They were causing some unnecessary work:
3837 Running make in a built tree reregisters the GHC package in
3838 bootstrapping.conf, and the build system thought that this updated
3839 timestamp meant that the configure stamps were out of date. This is
3840 particularly bad for the libraries with configure scripts, as those
3841 take a while to run.
3843 The bootstrapping.conf is built in an earlier phase ("make boot") so
3844 one shouldn't rely on the dependencies anyway.
3846[Bump the version number to 6.11
3847Ian Lynagh <igloo@earth.li>**20080923165613]
3848[Generalise type of 'defaultErrorHandler' so it can be used inside a Ghc session.
3849Thomas Schilling <nominolo@googlemail.com>**20080921085647]
3850[Make "sh -e boot" work
3851Ian Lynagh <igloo@earth.li>**20080921111508]
3852[Use -f rather than -e for portability
3853Ian Lynagh <igloo@earth.li>**20080921111436]
3854[Add some special cases for putting dph in bindists
3855Ian Lynagh <igloo@earth.li>**20080921000406]
3856[Escape a hash in the Makefile (it was breaking source dist creation)
3857Ian Lynagh <igloo@earth.li>**20080920232945]
3858[Disallow package flags in OPTIONS_GHC pragmas (#2499)
3859Simon Marlow <simonmar@microsoft.com>**20080923173904]
3860[#2566: emit a warning for 'ghc -c foo.bar'
3861Simon Marlow <simonmar@microsoft.com>**20080923144956
3863 $ ghc -c foo.bar
3864 Warning: the following files would be used as linker inputs, but linking is not being done: foo.bar
3865 ghc: no input files
3866 Usage: For basic information, try the `--help' option.
3868[Fix to new executable allocation code (fixed print002 etc.)
3869Simon Marlow <simonmar@microsoft.com>**20080922210915
3870 The problem here is caused by the fact that info tables include a
3871 relative offset to the string naming the constructor.  Executable
3872 memory now resides at two places in the address space: one for writing
3873 and one for executing.  In the info tables generated by GHCi, we were
3874 calculating the offset relative to the writable instance, rather than
3875 the executable instance, which meant that the GHCi debugger couldn't
3876 find the names for constructors it found in the heap.
3878[clean sm/Evac_thr.c and sm/Scav_thr.c
3879Simon Marlow <simonmar@microsoft.com>**20080922152827]
3880[add -XNewQualifiedOperators (Haskell' qualified operator syntax)
3881Simon Marlow <simonmar@microsoft.com>**20080922152340]
3882[Fix Trac #2597 (first bug): correct type checking for empty list
3885 The GHC front end never generates (ExplicitList []), but TH can.
3886 This patch makes the typechecker robust to such programs.
3889[Fix Trac #2597 (second bug): complain about an empty DoE block
3892 When converting an empty do-block from TH syntax to HsSyn,
3893 complain rather than crashing.
3896[Update dependencies
3897Ian Lynagh <igloo@earth.li>**20080920183534]
3898[Fix building with GHC 6.6
3899Ian Lynagh <igloo@earth.li>**20080920162918]
3900[Remove fno-method-sharing from the list of static flags
3901Ian Lynagh <igloo@earth.li>**20080920010635
3902 It is now a dynamic flag
3904[Tidy up the treatment of dead binders
3907 This patch does a lot of tidying up of the way that dead variables are
3908 handled in Core.  Just the sort of thing to do on an aeroplane.
3910 * The tricky "binder-swap" optimisation is moved from the Simplifier
3911   to the Occurrence Analyser.  See Note [Binder swap] in OccurAnal.
3912   This is really a nice change.  It should reduce the number of
3913   simplifier iteratoins (slightly perhaps).  And it means that
3914   we can be much less pessimistic about zapping occurrence info
3915   on binders in a case expression. 
3917 * For example:
3918        case x of y { (a,b) -> e }
3919   Previously, each time around, even if y,a,b were all dead, the
3920   Simplifier would pessimistically zap their OccInfo, so that we
3921   can't see they are dead any more.  As a result virtually no
3922   case expression ended up with dead binders.  This wasn't Bad
3923   in itself, but it always felt wrong.
3925 * I added a check to CoreLint to check that a dead binder really
3926   isn't used.  That showed up a couple of bugs in CSE. (Only in
3927   this sense -- they didn't really matter.)
3929 * I've changed the PprCore printer to print "_" for a dead variable.
3930   (Use -dppr-debug to see it again.)  This reduces clutter quite a
3931   bit, and of course it's much more useful with the above change.
3933 * Another benefit of the binder-swap change is that I could get rid of
3934   the Simplifier hack (working, but hacky) in which the InScopeSet was
3935   used to map a variable to a *different* variable. That allowed me
3936   to remove VarEnv.modifyInScopeSet, and to simplify lookupInScopeSet
3937   so that it doesn't look for a fixpoint.  This fixes no bugs, but
3938   is a useful cleanup.
3940 * Roman pointed out that Id.mkWildId is jolly dangerous, because
3941   of its fixed unique.  So I've
3943      - localied it to MkCore, where it is private (not exported)
3945      - renamed it to 'mkWildBinder' to stress that you should only
3946        use it at binding sites, unless you really know what you are
3947        doing
3949      - provided a function MkCore.mkWildCase that emodies the most
3950        common use of mkWildId, and use that elsewhere
3952    So things are much better
3954 * A knock-on change is that I found a common pattern of localising
3955   a potentially global Id, and made a function for it: Id.localiseId
3958[Gix the ghcii script
3959Ian Lynagh <igloo@earth.li>**20080919174651
3960 The ghc executable name doesn't have a version number on Windows, so
3961 don't put one in the script.
3963[Create runhaskell as well as runghc
3964Ian Lynagh <igloo@earth.li>**20080919153010]
3965[On Linux use libffi for allocating executable memory (fixed #738)
3966Simon Marlow <marlowsd@gmail.com>**20080919134602]
3967[Move the context_switch flag into the Capability
3968Simon Marlow <marlowsd@gmail.com>**20080919102601
3969 Fixes a long-standing bug that could in some cases cause sub-optimal
3970 scheduling behaviour.
3972[Fix building the extralibs tarball
3973Ian Lynagh <igloo@earth.li>**20080919133555
3974 We now need to dig the appropriate lines out of packages, rather than
3975 just catting libraries/extra-packages, in order to find out what the
3976 extralibs are.
3978[Install libffi when installing frmo a bindist
3979Ian Lynagh <igloo@earth.li>**20080919130332]
3980[Fix how we put libffi into bindists
3981Ian Lynagh <igloo@earth.li>**20080919125528]
3982[TAG 6.10 branch has been forked
3983Ian Lynagh <igloo@earth.li>**20080919123437]
3984[Don't require Parser.y in a source dist
3985Ian Lynagh <igloo@earth.li>**20080919115831]
3986[Add HpcParser.hs to source dists
3987Ian Lynagh <igloo@earth.li>**20080919115816]
3988[Fix the list of generated files that need to go into the source dists
3989Ian Lynagh <igloo@earth.li>**20080919112522]
3990[Improve documentation of overlapping instances
3992[Put generated files in source dists
3993Ian Lynagh <igloo@earth.li>**20080918194424
3994 We don't want to require that users building source dists have alex/happy
3996[Add libraries/syb to .darcs-boring
3997Ian Lynagh <igloo@earth.li>**20080918190116]
3998[Fix a couple of issues with :print
4001       - Ticket #1995: Unsoundness with newtypes
4002       - Ticket #2475: "Can't unify" error when stopped at an exception
4004       In addition this patch adds the following:
4006       - Unfailingness: RTTI cannot panic anymore.
4007         In case of failure, it recovers gracefully by returning the "I know nothing" type
4008       - A -ddump-rtti flag
4012pepe <mnislaih@gmail.com>**20080418172303]
4013[RichTokenStream support
4014Chaddai Fouche <chaddai.fouche@gmail.com>**20080918165256
4016 This patch adds support for raw token streams, that contain more
4017 information than normal token streams (they contains comments at
4018 least). The "lexTokenStream" function brings this support to the
4019 Lexer module. In addition to that, functions have been added to
4020 the GHC module to make easier to recover of the token stream of
4021 a module ("getTokenStream").
4023 Building on that, I added what could be called "rich token
4024 stream": token stream to which have been added the source string
4025 corresponding to each token, the function addSourceToToken takes
4026 a StringBuffer and a starting SrcLoc and a token stream and build
4027 this rich token stream. getRichTokenStream is a convenience
4028 function to get a module rich token stream. "showRichTokenStream"
4029 use the SrcLoc information in such a token stream to get a string
4030 similar to the original source (except unsignificant
4031 whitespaces). Thus "putStrLn . showRichTokenStream =<<
4032 getRichTokenStream s mod" should print a valid module source, the
4033 interesting part being to modify the token stream between the get
4034 and the show of course.
4036[When passing gcc -B, also tell it where the mingw include directory is
4037Ian Lynagh <igloo@earth.li>**20080918143312]
4038[Don't put the mingw directory in RTS's package.conf
4039Ian Lynagh <igloo@earth.li>**20080918143118]
4040[Be more forceful when cleaning in compiler/ and ghc/
4041Ian Lynagh <igloo@earth.li>**20080918134443
4042 Now that the Cabal file is generated by configure, it would be nice
4043 if clean worked even if the cabal file is missing. So now we just rm -rf
4044 the dist directory.
4046[Generate ghc.cabal and ghc-bin.cabal with configure
4047Ian Lynagh <igloo@earth.li>**20080918133636
4048 This allows us to put the proper version number into them
4050[Make the ghci scripts point to the versioned GHC program, not just "ghc"
4051Ian Lynagh <igloo@earth.li>**20080918122516]
4052[Fix Trac #1470: improve handling of recursive instances (needed for SYB3)
4055 This bug has been hanging around for a long time, as you'll see by its
4056 number. The fix implements a feature that is really needed by SYB3, to
4057 allow an instance to (rather indirectly) refer to itself.  The trickiness
4058 comes when solving the superclass constraints.
4060 The whoel issue is explained in Note [Recursive instances and superclases]
4061 in TcSimplify.
4063 In cracking this one I found I could remove the WantSCs argument to the
4064 ReduceMe flag, which is a worthwhile simplification.  Good!
4067[Comments only
4069[Replace ASSERT with WARN, and explain why
4072 The DPH library tripped an ASSERT.  The code is actually OK, but it's
4073 badly-optimised so I changed it to WARN.  The issue here is explained
4074 in ClosureInfo, Note [Unsafe coerce complications].
4077[Add a missing "prime" (env' --> env'') thereby fixing a tripping WARN.  Hurrah!
4079[Fix nasty infelicity: do not short-cut empty substitution in the simplifier
4082 I was perplexed about why an arity-related WARN was tripping. It took
4083 me _day_ (sigh) to find that it was because SimplEnv.substExpr was taking
4084 a short cut when the substitution was empty, thereby not subsituting for
4085 Ids in scope, which must be done (CoreSubst Note [Extending the Subst]).
4087 The fix is a matter of deleting the "optimisation".  Same with
4088 CoreSubst.substSpec, although I don't know if that actually caused a
4089 probem.
4092[Avoid arity reduction when doing eta-reduce
4095 We like things with high arity, so when doing eta reduction
4096 it's probably a good idea to avoid reducing arity.
4099[Add extra WARN test
4102 This warning tests that the arity of a function does not decrease.
4103 And that it's at least as great as the strictness signature.
4105 Failing this test isn't a disater, but it's distinctly odd and
4106 usually indicates that not enough information is getting propagated
4107 around, and hence you may get more simplifier iterations.
4110[Comments only
4112[Re-adjust interaction between -ddump flags and force-recompilation
4115 If you say -ddump-xx we effectively add -fforce-recomp, so that you
4116 see your dump output.  But this works badly in --make mode, because
4117 you get the ddump output for every module, which is probably not what
4118 you want.  This patch forces recompilation with -ddump-X only in one-shot
4119 mode. 
4121 Of course, this only affects people using -ddump options.
4124[Add Outputable GhcMode instance
4126[Improve error reporting for 'deriving' (Trac #2604)
4128[Add link to GADT paper re rigid types
4130[Fix MacOS X build: don't believe __GNUC_GNU_INLINE__ on MacOS X
4131Simon Marlow <marlowsd@gmail.com>**20080918112856]
4132[require Alex version 2.1.0
4133Simon Marlow <marlowsd@gmail.com>**20080918112812
4134 Having 2.0.1 causes some unicode tests to fail
4136[Type families: fixes in the new solver
4137Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080918100934]
4138[ext-core library: Parser fixes; make it build with the HEAD
4139Tim Chevalier <chevalier@alum.wellesley.edu>**20080918090349
4141 In the ext-core parser I guess I never tested:
4142 * existential type variable bindings in case alts
4143 * empty data declarations
4145 That'll learn me!
4147[Wibble ghc-pkg imports to fix building on Windows
4148Ian Lynagh <igloo@earth.li>**20080917210813]
4149[ghc-pkg needs to make package.conf with sensible permissions
4150Ian Lynagh <igloo@earth.li>**20080917192155
4151 It was calling openTempFile which uses a 600 permissions mask.
4153[Change 'loadWithCompiler' callback argument to just print warnings.
4154Thomas Schilling <nominolo@googlemail.com>**20080917102925
4155 Rename function accordingly.
4157 The callback wasn't very flexible to begin with.  There's pretty much
4158 no way around to calling 'compile' inside that callback since
4159 'upsweep' depends on certain side effects of compile.  It therefore
4160 makes more sense to restrict the callback to its intended use only,
4161 namely to log warnings and errors.
4163[Fix: GhcStage2HcOpts were being added to stage 3 too
4164Simon Marlow <marlowsd@gmail.com>**20080917085917]
4165[Type families: unify with family apps in checking mode
4166Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080917062548]
4167[Type families: bug fixes
4168Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916151254]
4169[Keep sysnonyms folded in equalities if possible
4170Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916075700]
4171[Type families: apply flattening coercions in the right order
4172Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080916055136]
4173[TcTyFuns: tidy warning
4174Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080915031423]
4175[Signature for Inst.isValidWantedEqInst
4176Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080915030118]
4177[Remember if RewriteInst is swapped & bug fixes
4178Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080914163639]
4179[Type families: fixed all non-termination in the testsuite
4180Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080914120638]
4181[Type families: completed the new equality solver
4182Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20080913133631
4183 - Implements normalisation of class constraints containing synonym family
4184   applications or skolems refined by local equalities.
4185 - Clean up of TcSimplify.reduceContext by using the new equality solver.
4186 - Removed all the now unused code of the old algorithm.
4187 - This completes the implementation of the new algorithm, but it is largely
4188   untested => many regressions.
4190[Use the new -optdep flag replacements when building with >= GHC 6.9
4191Ian Lynagh <igloo@earth.li>**20080916220057
4192 Fix building the HEAD with itself
4194[Use "exec" when running ghc in the wrapper
4195Ian Lynagh <igloo@earth.li>**20080915100217]
4196[Add "#!/bin/sh" to runghc.wrapper
4197Ian Lynagh <igloo@earth.li>**20080914153507]
4198[Add a "#!/bin/sh" to ghc.wrapper
4199Ian Lynagh <igloo@earth.li>**20080914153344]
4200[Fixing directory creation to not create "" directories inside hpc report (harmless but needless)
4202[Fix Trac #2052 Allowing hpc to understand hsc files.
4204[Fix Trac #2311: creates subdirs for package coverage information
4206[FIX #2469: sort out our static/extern inline story
4207Simon Marlow <marlowsd@gmail.com>**20080916132222
4208 gcc has changed the meaning of "extern inline" when certain flags are
4209 on (e.g. --std=gnu99), and this broke our use of it in the header
4210 files.
4212[Fix a warning
4213Simon Marlow <marlowsd@gmail.com>**20080916130922]
4214[Stop using mremap() to allocate space for trampolines
4215Simon Marlow <marlowsd@gmail.com>**20080915145924
4217 This was causing problems because sometimes mremap() moved the memory
4218 we had allocated from the low 2Gb to above the 2Gb boundary, causing
4219 some linkages to fail.  There's no MAP_32BIT flag to mremap().
4221 So now we just use mmap(MAP_ANON|MAP_32BIT) to allocated space for the
4222 trampolines.  People without MAP_32BIT (eg. *BSD) will still have to
4223 do something else here, such as allocating memory from a fixed
4224 address; so I've made it slightly easier for those guys, but there's
4225 still work to do (#2063).
4227 One solution (that Simon PJ is advocating) is to turn on -fPIC by
4228 default on x86-64.  This is a good solution as it removes the need for
4229 MAP_32BIT, but doesn't work with -fvia-C, so probably this is for
4230 later.
4232[add $(GhcStage[123]HcOpts)
4233Simon Marlow <marlowsd@gmail.com>**20080912155549]
4234[Improve handling of -fdph-* flags
4235Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916034746]
4236[Add -fdph-this
4237Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916033710]
4238[Remove last traces of package ndp
4239Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916033428]
4240[Clean up vectorisation error messages
4241Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080916013236]
4242[Fix vectoriser bug
4243Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080915042823
4245 We were using mkWildId in situations where it cause disastrous shadowing
4247[Track changes to dph
4248Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912114028]
4249[Change desugaring of PArr literals
4250Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912015609]
4251[Expose the dph packages automatically if -dph-* is set
4252Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080912004403]
4253[Don't panic on non-vectorisable expressions
4254Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080911054333]
4255[-Odph implies -fno-spec-constr-count
4256Roman Leshchinskiy <rl@cse.unsw.edu.au>**20080910045339]
4257[Improve warning for SpecConstr
4259[White space only
4261[Minor refactoring to get rid of Type.splitNewTyConApp
4263[Refactor the desugaring of RULE lhss a bit
4266 This is just a tidy-up.  Previously we were calling occurAnalyse
4267 twice on each LHS which was silly and a bit unclean too. 
4269 This patch should have no overall effect, though.
4272[Do not use the Static Arg Transformation by default with -O2
4275 Max has some more heuristics to add, and is meanwhile worried
4276 that having SAT on by default will make some highly-tuned array
4277 programs worse.  So it's off by default. 
4279 Use -fstatic-argument-transformation to switch it on.
4282[Comments, and a couple of asserts, only
4284[Fix Trac #2587: take account of type lets
4287 GHC allows a non-recursive let for type varaibles
4288        let a = TYPE ty in ...
4289 But the free-variable finder had not caught up with this
4290 fact. This patch catches up.
4293[Don't try to float type-lets
4296 A type let shouldn't really occur in SetLevels, but if it does,
4297 this patch makes sure it is left alone.
4300[add refs and fix a bug (noted by Peter Gammie) in docs of arrow notation
4301Ross Paterson <ross@soi.city.ac.uk>**20080915104757]
4302[Generalise type of 'withExtendedLinkEnv'.
4303Thomas Schilling <nominolo@googlemail.com>**20080915085738]
4304[Use 'GhcMonad' in ghci/InteractiveUI.
4305Thomas Schilling <nominolo@googlemail.com>**20080915085633]
4306[Use 'GhcMonad' in ghci/GhciTags.
4307Thomas Schilling <nominolo@googlemail.com>**20080915084922]
4308[Use 'GhcMonad' in ghci/Debugger.
4309Thomas Schilling <nominolo@googlemail.com>**20080915084738]
4310[Use 'GhcMonad' in ghci/GhciMonad.
4311Thomas Schilling <nominolo@googlemail.com>**20080915084646]
4312[Use 'GhcMonad' in ghc/Main.
4313Thomas Schilling <nominolo@googlemail.com>**20080914232957]
4314[Require PatternSignatures for bootstrapping compiler.
4315Thomas Schilling <nominolo@googlemail.com>**20080914232642]
4316[Use 'GhcMonad' in InteractiveEval.
4317Thomas Schilling <nominolo@googlemail.com>**20080914232454]
4318[Use 'GhcMonad' in GHC and split up checkModule into phases.
4319Thomas Schilling <nominolo@googlemail.com>**20080914232044
4321 I'm not sure I covered all the ways of throwing errors in the code.
4322 Some functions throw ProgramErrors, some error messages.  It's still
4323 quite a mess, but we're getting closer.  The missing cases are mostly
4324 errors that cannot be fixed by the API client either or are a result
4325 of wrong usage, so are in any case fatal.
4327 One function, 'getModuleInfo', still returns a 'Maybe', but the
4328 documentation suggests it should always succeed.  So I may change that
4329 soon.
4331 The spit-up of of 'checkModule' has pros and cons.  The various forms
4332 of 'checkModule*' now become:
4334  checkAndLoadModule ms False ~~>
4335     loadModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
4337  checkAndLoadModule ms True ~~>
4338    loadModule =<< desugarModule =<< typecheckModule =<< parseModule (ms_mod_name ms)
4340  checkModule mn False ~~>
4341    typecheckModule =<< parseModule mn
4343  checkModule mn True ~~>
4344    desugarModule =<< typecheckModule =<< parseModule mn
4346 The old APIs cannot easily be provided, since the result type would be
4347 different depending on the second argument.  However, a more
4348 convenient API can be modelled on top of these four functions
4349 ({parse,typecheck,desugar,load}Module).
4351[Use 'GhcMonad' in DriverPipeline.  Also haddockify a bit while we're at it.
4352Thomas Schilling <nominolo@googlemail.com>**20080914220628]
4353[Use 'GhcMonad' in HscMain.
4354Thomas Schilling <nominolo@googlemail.com>**20080914213655]
4355[Use 'GhcMonad' in DriverMkDepend.
4356Thomas Schilling <nominolo@googlemail.com>**20080914212113]
4357[Haddockify DynFlags (partial).
4358Thomas Schilling <nominolo@googlemail.com>**20080914211718]
4359[Haddockify 'IE'.
4360Thomas Schilling <nominolo@googlemail.com>**20080914210016]
4361[Provide accessors for 'ImportDecl'.
4362Thomas Schilling <nominolo@googlemail.com>**20080914205811]
4363[Start haddockifying 'HsBindLR'.
4364Thomas Schilling <nominolo@googlemail.com>**20080914205629]
4365[Document 'parseStaticFlags'.
4366Thomas Schilling <nominolo@googlemail.com>**20080914205316]
4367[Introduce 'GhcMonad' class and two default implementations 'Ghc' and 'GhcT'.
4368Thomas Schilling <nominolo@googlemail.com>**20080914204930
4370 This monad will be required by most public API calls.
4372[Give the "Failing due to -Werror" message a name.
4373Thomas Schilling <nominolo@googlemail.com>**20080914173904]
4374[Make typechecker top-level functions also return messages instead of
4375Thomas Schilling <nominolo@googlemail.com>**20080914173228
4376 printing them.
4378[Reflect changes of desugarer error reporting in VectMonad.
4379Thomas Schilling <nominolo@googlemail.com>**20080914172711]
4380[Generalise 'handleGhcException' to work with any 'ExceptionMonad'.
4381Thomas Schilling <nominolo@googlemail.com>**20080914172404]
4382[Introduce an 'ExceptionMonad' class.
4383Thomas Schilling <nominolo@googlemail.com>**20080914172154
4385 This monad provides variants of 'catch', 'bracket', and 'finally', so
4386 exceptions can be handled in monads that wrap IO.  The latter two
4387 methods need to be part of the class definition, because GHC uses
4388 'block' and 'unblock' which are used in the definition of those two
4389 methods for the IO monad.  A perhaps better class interface would
4390 consist of 'gcatch', 'gblock', and 'gunblock' and let the latter two
4391 default to 'id' like is done for non-GHC implementations of 'bracket'
4392 and 'finally'.
4394[Provide default MonadIO instance for IO.
4395Thomas Schilling <nominolo@googlemail.com>**20080914164245]
4396[Return instead of print warnings and errors in desugarer.
4397Thomas Schilling <nominolo@googlemail.com>**20080914163641]
4398[Return parser errors and warnings instead of dying.
4399Thomas Schilling <nominolo@googlemail.com>**20080914162644]
4400[Add aliases for bags of warnings and errors.
4401Thomas Schilling <nominolo@googlemail.com>**20080914160337]
4402[Slightly more helpful panic message in DynFlags
4403Tim Chevalier <chevalier@alum.wellesley.edu>**20080915080650]
4404[Comments only: ".core" => ".hcr"
4405Tim Chevalier <chevalier@alum.wellesley.edu>**20080914203645]
4406[We need to tell ghc-pkg to --force if we've only built a profiling library
4407Ian Lynagh <igloo@earth.li>**20080913153142]
4408[If we're profiling GHC, don't bother building the GHC package the vanilla way
4409Ian Lynagh <igloo@earth.li>**20080913144820]
4410[Remove the duplicate show rule in libraries/Makefile
4411Ian Lynagh <igloo@earth.li>**20080913144413]
4412[Move the "show" target from target.mk to boilerplate.mk
4413Ian Lynagh <igloo@earth.li>**20080913141312
4414 target.mk isn't included everywhere, but show is always handy
4416[Change how we detect if we are using the bootstrapping compiler or not
4417Ian Lynagh <igloo@earth.li>**20080913104658
4418 I think looking for $(GHC_COMPILER_DIR_ABS) was failing on the Windows
4419 buildbot due to different path separators. Now we just look for
4420 "inplace".
4422[wibble the distrib Makefile
4423Ian Lynagh <igloo@earth.li>**20080912135932
4424 We now need to install driver after ghc
4426[Reinstate the driver/ghc directory, to create a versioned GHC program
4427Ian Lynagh <igloo@earth.li>**20080912113619
4428 e.g. $(bindir)/ghc-6.9.20080911
4430[If USE_NEW_MKDEPEND_FLAGS is YES then don't use the deprecated -optdep flags
4431Ian Lynagh <igloo@earth.li>**20080912110316]
4432[Use --force-local when calling tar in bindisttest/
4433Ian Lynagh <igloo@earth.li>**20080912012855
4434 Otherwise it thinks that c:/foo is a remote file
4436[Fix #2586, bug in THUNK_SELECTORs (again)
4437Simon Marlow <marlowsd@gmail.com>**20080912130404
4438 This time, we had forgetten the write barrier in one place.
4440[TAG 2008-09-12 2
4441Ian Lynagh <igloo@earth.li>**20080912132848]
4442Patch bundle hash: