Ticket #2395: fix-2395.dpatch

File fix-2395.dpatch, 32.4 KB (added by ajd, 6 years ago)

Patch that fixes the problem by turning off the checker entirely for any equation that has view patterns

Line 
1Fri Aug  7 11:48:41 PDT 2009  Alexander Dunlap <[email protected]>
2  * FIX #2395 (ViewPatterns trigger bad Check errors)
3
4New patches:
5
6[FIX #2395 (ViewPatterns trigger bad Check errors)
7Alexander Dunlap <[email protected]>**20090807184841
8 Ignore-this: af83dc1d93b735bd89d5f9dcb2f5ca6b
9] {
10hunk ./compiler/deSugar/Check.lhs 112
11 
12 check :: [EquationInfo] -> ([ExhaustivePat], [EquationInfo])
13        -- Second result is the shadowed equations
14-check qs = (untidy_warns, shadowed_eqns)
15+  -- if there are view patterns, just give up - don't know what the function is
16+check qs | has_view_pattern = ([],[])
17+         | otherwise = (untidy_warns, shadowed_eqns)
18       where
19hunk ./compiler/deSugar/Check.lhs 116
20+        is_view x = hasViewPat x
21+        has_view_pattern = any (\(EqnInfo p _) -> any is_view p) qs
22        (warns, used_nos) = check' ([1..] `zip` map simplify_eqn qs)
23        untidy_warns = map untidy_exhaustive warns
24        shadowed_eqns = [eqn | (eqn,i) <- qs `zip` [1..],
25hunk ./compiler/deSugar/Check.lhs 225
26    | literals     = split_by_literals qs
27    | constructors = split_by_constructor qs
28    | only_vars    = first_column_only_vars qs
29--- FIXME: hack to get view patterns through for now
30-   | otherwise    = ([([],[])],emptyUniqSet)
31 -- pprPanic "Check.check': Not implemented :-(" (ppr first_pats)
32   where
33      -- Note: RecPats will have been simplified to ConPats
34hunk ./compiler/hsSyn/HsPat.lhs 28
35 
36        isBangHsBind, hsPatNeedsParens,
37        patsAreAllCons, isConPat, isSigPat, isWildPat,
38-       patsAreAllLits, isLitPat, isIrrefutableHsPat
39+       patsAreAllLits, isLitPat, isIrrefutableHsPat, hasViewPat
40     ) where
41 
42 import {-# SOURCE #-} HsExpr           (SyntaxExpr, LHsExpr, pprLExpr)
43hunk ./compiler/hsSyn/HsPat.lhs 372
44 
45 The 1.3 report defines what ``irrefutable'' and ``failure-free'' patterns are.
46 \begin{code}
47+hasViewPat :: Pat id -> Bool
48+hasViewPat p = hasViewPat' (L undefined p)
49+
50+hasViewPat' :: LPat id -> Bool
51+hasViewPat' (L _ p) = go p where
52+  go (WildPat _) = False
53+  go (VarPat _) = False
54+  go (VarPatOut _ _) = False
55+  go (LazyPat p) = hasViewPat' p
56+  go (AsPat _ p) = hasViewPat' p
57+  go (ParPat p) = hasViewPat' p
58+  go (BangPat p) = hasViewPat' p
59+  go (ListPat p _) = any hasViewPat' p
60+  go (TuplePat p _ _) = any hasViewPat' p
61+  go (PArrPat p _) = any hasViewPat' p
62+  go (ConPatIn _ p) = go' p
63+  go (ConPatOut _ _ _ _ p _) = go' p
64+  go (ViewPat _ _ _) = True
65+  go (QuasiQuotePat _) = False
66+  go (LitPat _) = False
67+  go (NPat _ _ _) = False
68+  go (NPlusKPat _ _ _ _) = False
69+  go (TypePat _) = False
70+  go (SigPatIn p _) = hasViewPat' p
71+  go (SigPatOut p _) = hasViewPat' p
72+  go (CoPat _ _ _) = False
73+  go' p = case p of
74+    PrefixCon ps -> any hasViewPat' ps
75+    RecCon (HsRecFields fs _) -> any (hasViewPat' . hsRecFieldArg) fs
76+    InfixCon p1 p2 -> hasViewPat' p1 || hasViewPat' p2
77+
78 isWildPat :: Pat id -> Bool
79 isWildPat (WildPat _) = True
80 isWildPat _           = False
81}
82
83Context:
84
85[Windows build fix
86Simon Marlow <[email protected]>**20090803144931
87 Ignore-this: c066b5b75e58f3c4389fc199f700dce5
88]
89[rts_stop_on_exception is a C int, not a W_
90Simon Marlow <[email protected]>**20090803124916
91 Ignore-this: d0432287956e7291a503a554424d6897
92 amazing this hasn't caused any problems before now
93]
94[Fix #3412: the worker of an Id might not be a local Id
95Simon Marlow <[email protected]>**20090803112803
96 Ignore-this: c433025fd02c997a05555f5c7e6a6a7b
97]
98[Add -r option to darcs-all, and remove push-all (#3375)
99Simon Marlow <[email protected]>**20090803104413
100 Ignore-this: 6871c15294113898902be90210d9a7a9
101 Contributed by: [email protected]
102     
103 This patch modifies darcs-all to have feature parity with push-all by
104 recognizing two new options.
105 
106     * -i, equivalent to --ignore-failure in push-all
107     * -r <repo>, specifies the remote repository darcs commands will use
108 
109 Some example commands:
110 
111 Get the libraries from a repository of your choosing. This is useful
112 when working with a git mirror:
113 
114     $ ./darcs-all -r http://darcs.haskell.org get
115 
116 Pull changes. Used to be:
117 
118     $ ./push-all --pull http://darcs.haskell.org
119 
120 Is now:
121 
122     $ ./darcs-all -r http://darcs.haskell.org pull
123 
124 Or to use the default remote of the ghc repository:
125 
126     $ ./darcs-all pull
127]
128[remove dead code
129Simon Marlow <[email protected]>**20090620214113
130 Ignore-this: 6da2bda8efd2dc63c8931243ab7dec0a
131]
132[fix warnings
133Simon Marlow <[email protected]>**20090729134348
134 Ignore-this: 98128ac0b78d861439ebf807af1ca417
135]
136[Implement "ghc --abi-hash M1 M2 ..."
137Simon Marlow <[email protected]>**20090729132125
138 Ignore-this: d0a71b2fadefdfdefa6d287d28bad40f
139 This prints a combined hash of the ABIs exposed by the modules listed
140 on the command line.  It will be used by Cabal for generating a
141 package Id based on the actual ABI of a package.
142]
143[Clean GMP properly; fixes #3411
144Ian Lynagh <[email protected]>**20090802195759]
145[Fix permissions when installing
146Ian Lynagh <[email protected]>**20090802161237]
147[Fix creation of library doc index, and put the library docs in bindists
148Ian Lynagh <[email protected]>**20090802114202]
149[Remove a TODO item that's been done
150Ian Lynagh <[email protected]>**20090802103944]
151[Add a publish-docs rule
152Ian Lynagh <[email protected]>**20090801224155]
153[Add docs to bindists
154Ian Lynagh <[email protected]>**20090801222551]
155[Fix "make show" in a bindist
156Ian Lynagh <[email protected]>**20090801212604]
157[Make the new build system install the documentation
158Ian Lynagh <[email protected]>**20090801204624]
159[whitespace tweaks in rules/docbook.mk
160Ian Lynagh <[email protected]>**20090801195221]
161[Fix configure when alex/happy are installed to a directory containing spaces
162Ian Lynagh <[email protected]>**20090801182817]
163[Allow more than 64k instructions in a BCO; fixes #789
164Ian Lynagh <[email protected]>**20090801153203]
165[If ghci runs out of labels, panic
166Ian Lynagh <[email protected]>**20090801132829]
167[Fix the 64k insns overflow check in ghci, and add more checks
168Ian Lynagh <[email protected]>**20090801130014]
169[Fix cleaning the integer package
170Ian Lynagh <[email protected]>**20090730143129]
171[Fix warnings when building with the HEAD
172Ian Lynagh <[email protected]>**20090730143031]
173[Remove some redundant fromIntegral's
174Ian Lynagh <[email protected]>**20090730105532]
175[Fix space problems in ghci
176Ian Lynagh <[email protected]>**20090730105351
177 We were making arrays with range (0, n-1) which is bad if n == 0 now
178 that we are using Word types.
179]
180[Make the types we use when creating GHCi bytecode better match reality
181Ian Lynagh <[email protected]>**20090729130911
182 We were keeping things as Int, and then converting them to Word16 at
183 the last minute, when really they ought to have been Word16 all along.
184]
185[Add an (Outputable Word16) instance
186Ian Lynagh <[email protected]>**20090728134436]
187[Fix whitespace in ByteCodeAsm.lhs
188Ian Lynagh <[email protected]>**20090728123444]
189[Add CHECK(p), like ASSERT(p) but works even when !defined(DEBUG)
190Simon Marlow <[email protected]>**20090729075433
191 Ignore-this: a723f456e4b1eaeaa617a675da276aa2
192 For inexpensive assertions
193]
194[enable the x86-specific versions of atomic_inc()/atomic_dec()
195Simon Marlow <[email protected]>**20090729075307
196 Ignore-this: a271b7ade5502ec4d8444aac19f4b4c3
197]
198[fix warning
199Simon Marlow <[email protected]>**20090728103855
200 Ignore-this: ee626aa5de0a2aed8f44ae1131cc341d
201]
202[fix warning
203Simon Marlow <[email protected]>**20090728102707
204 Ignore-this: ad4f07a163921d17d242a9452b4bb578
205]
206[fix a warning
207Simon Marlow <[email protected]>**20090728101731
208 Ignore-this: 73ead0a0004723757c0a51b56681c991
209]
210[Be a bit more sensible about choosing external OccNames
211Simon Marlow <[email protected]>**20090728100434
212 Ignore-this: 4adcd661e76440deb2b4ab498ebd2d1e
213 
214 Instead of chr_$wchr, we now just get $wchr.  In general, when an
215 OccName is system-generated, we leave it out of the final external
216 name, preferring to use the name of the exported parent instead (which
217 is necessarily a user-written name).
218 
219 Names should be no less deterministic, but should be shorter and more
220 readable.
221]
222[Remove old 'foreign import dotnet' code
223Simon Marlow <[email protected]>**20090727144524
224 Ignore-this: 821ebea2c3897415195318f107421472
225 It still lives in darcs, if anyone wants to revive it sometime.
226]
227[remove a couple of ToDos
228Simon Marlow <[email protected]>**20090727094719
229 Ignore-this: ef00fc481821dff4381ba9efcd792708
230]
231[buildinfo files need a $$(wildcard)
232Simon Marlow <[email protected]>**20090727091012
233 Ignore-this: b4c3201dfa81fef32ee254dd9c955b2d
234]
235[Slight tweak to avoid overflowing the command-line size in bindist
236Simon Marlow <[email protected]>**20090727090946
237 Ignore-this: 1e2ff207d03fed08576ac59f0b46c08c
238 Not a real fix: if this bites us again we'll have to rethink
239]
240[avoid (benign) error about overriding rules for binary-dist
241Simon Marlow <[email protected]>**20090727090903
242 Ignore-this: ffb7f7bf1290f2faf96ac177f76a1422
243]
244[Give a better error message for hidden packages when building Cabal package
245Ian Lynagh <[email protected]>**20090726194915
246 Fixes #3168
247]
248[Add a -fbuilding-cabal-package flag
249Ian Lynagh <[email protected]>**20090726181934
250 This means GHC knows whether it's building a Cabal package, or just
251 Haskell sources. For example, it may wish to give different error
252 messages when building a Cabal package.
253]
254[Add an extension to disable n+k patterns
255Ian Lynagh <[email protected]>**20090725134703]
256[Fix a warning on Windows
257Ian Lynagh <[email protected]>**20090724221244]
258[Remove GHC's haskell98 dependency
259Ian Lynagh <[email protected]>**20090724210825]
260[add number of bytes to +RTS -DS leak reports
261Simon Marlow <[email protected]>**20090724150010
262 Ignore-this: 3a66585c8fd2b58ce96abab1e154fb6e
263]
264[free the gc_thread structures during shutdown
265Simon Marlow <[email protected]>**20090724145956
266 Ignore-this: 25efeb189cbfb549af4550d266604f0e
267]
268[Add atomic_inc()/atomic_dec(), and use them to replace gc_running_mutex
269Simon Marlow <[email protected]>**20090724142620
270 Ignore-this: d775eeaf85fd0f9064d87a0909134bc0
271 This also fixes a memory leak on Windows with -threaded, because we
272 were calling initMutex(&gc_running_mutex) for each GC, which allocates
273 memory.
274]
275[Rewrite the foreign import string parser using ReadP
276Simon Marlow <[email protected]>**20090723152138
277 Ignore-this: 1c7db770a29d48710b05e2a3d216b2a8
278 And kill the duplicate one in HsSyn.Convert
279]
280[point to the wiki
281Simon Marlow <[email protected]>**20090723132345
282 Ignore-this: c11300bac62ce2f56d7fc271aa26dbcd
283]
284[Remove note about avoiding use of #def in libraries
285Simon Marlow <[email protected]>**20090723111026
286 Ignore-this: 8a027ed37b2d10094f7a31548aee2535
287 It should be safe to use now that we aren't relying on C prototypes
288 for foreign functions in via-C code.
289]
290[refactorings
291Simon Marlow <[email protected]>**20090723091230
292 Ignore-this: 836feb0e819127603dd56623af6e48dc
293]
294[Fix Trac #3391: make generic to/from bindings only for newly-declared types
295[email protected]**20090723155803
296 Ignore-this: bb56c2ec054397d421dce13d5eb6c73f
297 
298 Before this patch we were bogusly making to/from bindings for all data types
299 in the TcGblEnv.  But that is wrong when we have multiple "chunks" of
300 bindings in Template Haskell.  We should start from the declarations
301 themselves.  Easy.
302 
303]
304[Print explicit braces and semicolons in do-notation
305[email protected]**20090723152411
306 Ignore-this: a97ddf19774d27d15a01d63787708b20
307 
308 By printing explicit braces we make it more likely that pretty-printed
309 code will be acceptable if fed back into GHC.
310 
311 See http://www.haskell.org/pipermail/glasgow-haskell-users/2009-July/017554.html
312 
313]
314[Documentation for stand-alone deriving (Trac #3012)
315[email protected]**20090723132558
316 Ignore-this: 54445c5984594eb7f82151b2ac118695
317]
318[Windows only: set the encoding on stdin to utf8
319Simon Marlow <[email protected]>**20090723121913
320 Ignore-this: d65115d9711b5fb68e77786565ef6de
321 Otherwise it defaults to latin1.
322]
323[Fix Trac #3012: allow more free-wheeling in standalone deriving
324[email protected]**20090723130145
325 Ignore-this: 357580b9388ccbe1da3c1da3ba90e456
326 
327 In standalone deriving, we now do *not* check side conditions.
328 We simply generate the code and typecheck it.  If there's a type
329 error, it's the programmer's problem.
330 
331 This means that you can do 'deriving instance Show (T a)', where
332 T is a GADT, for example, provided of course that the boilerplate
333 code does in fact typecheck.
334 
335 I put some work into getting a decent error message.  In particular
336 if there's a type error in a method, GHC will show the entire code
337 for that method (since, after all, the user did not write it).
338 Most of the changes are to achieve that goal.
339 
340 Still to come: changes in the documentation.
341 
342]
343[Use the ErrMsg record type
344[email protected]**20090723130108
345 Ignore-this: 7fb6dd78d3185da0c33901b8aac8d108
346]
347[Stop generating redundant parens in 'deriving' code
348[email protected]**20090723125903
349 Ignore-this: 6fc82df9648a82bcf7bf6fdfa9b4dad3
350 
351 This makes the code printed by -ddump-deriv look prettier
352 
353]
354[Wibble to printing tuple sections
355[email protected]**20090723125756
356 Ignore-this: af2a1b9784f6447fea0e11d454cf082f
357]
358[Fix Trac #3193: improve line number reporting for equality constraints
359[email protected]**20090723065504
360 Ignore-this: b45a68071bcaca48cad7855dccb9c9eb
361 
362 When reporting an error from a failed equality constraint, we were
363 setting the *context* but not the *line number* in TcTyFuns.eqInstMisMatch
364 As a result, the line number didn't match the context at all.  It's
365 trivial to fix.
366 
367 I'm 99% certain this fixes #3193, but it's too complicated to
368 reproduce, so I have not actually tested it.
369 
370]
371[Add fmapM_maybe :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b)
372[email protected]**20090723064932
373 Ignore-this: db5f6319b52a5e6b5f85d76985f2a7c9
374 
375 This function isn't used at the moment, but Max added it, and it
376 looks useful.
377 
378]
379[Add tuple sections as a new feature
380[email protected]**20090723063859
381 Ignore-this: d42a26fc1efff112b852b5c1135c1746
382 
383 This patch adds tuple sections, so that
384 
385        (x,,z)  means   \y -> (x,y,z)
386 
387 Thanks for Max Bolinbroke for doing the hard work.
388 
389 In the end, instead of using two constructors in HsSyn, I used
390 just one (still called ExplicitTuple) whose arguments can be
391        Present (LHsExpr id)
392 or     Missing PostTcType
393 
394 While I was at it, I did a bit of refactoring too.
395 
396]
397[NetBSD defines _REENTRANT in its header files, so compiling ghc gives
398Simon Marlow <[email protected]>**20090723075030
399 Ignore-this: 4722c4ff0541c6080de8f433e498684
400 redefinition warnings for all files that are including includes/Rts.h.
401 
402 Contributed by: Krister Walfridsson <[email protected]>
403]
404[includes/TSO.h: kill trailing whitespace
405Samuel Bronson <[email protected]>**20090722170354
406 Ignore-this: 36d4afd1a21188d604ed6b432942dcdc
407]
408[Say what StgTSOBlockInfo is for, where to read about it.
409Samuel Bronson <[email protected]>**20090722163011
410 Ignore-this: 6c09e11f23594251cdc2db1bc642edc9
411]
412[Make the Integer library used directly configurable in GHC and base
413Ian Lynagh <[email protected]>**20090722151048
414 Rather than indirecting through an integer package
415]
416[Fix cleaning with the new integer changes
417Ian Lynagh <[email protected]>**20090722142545]
418[Add integer-simple as a build option
419Ian Lynagh <[email protected]>**20090722013137]
420[Tweak whitespace
421Ian Lynagh <[email protected]>**20090719221303]
422[thenIO, bindIO, returnIO moved to GHC.Base
423Simon Marlow <[email protected]>**20090722102219
424 Ignore-this: 5d6c5988e0abab2c5169540aa8ddedb9
425]
426[remove unused $(HscIfaceFileVersion)
427Simon Marlow <[email protected]>**20090720145053
428 Ignore-this: d725cbbde3c68673e2342b370460d87f
429]
430[Choose external names more predictably
431Simon Marlow <[email protected]>**20090720144751
432 Ignore-this: 17513bc93af646108f21bbed1c8f4a3a
433 
434 Now, for a compiler-generated binding "x", if "x" is referred to by
435 the exported "f", then it will be named "f_x" rather than something
436 like "x23".  This means that hopefully
437 
438   - compilation will more often product the same results given the
439     same input (the choice of names is not dependent on the
440     non-deterministic order of bindings within the compiler).
441 
442   - less recompilation will be necessary after making changes
443 
444   - navigating Core might be a bit easier.
445 
446 unfortunately, compilation with -O still does not consistently produce
447 the same ABI.  The simplifier sometimes does different things,
448 apparently.
449 
450 Names will be longer, but I can't see a way around that.
451]
452[Use stable ordering in the dependencies
453Simon Marlow <[email protected]>**20090717123449
454 Ignore-this: e20bac233cf6f834e69c027ff60b5b50
455 Fixes another cause of wobbly interface files and unnecessary recompilation.
456]
457[fall back on libffi for 'foreign import "wrapper"' if necessary
458Simon Marlow <[email protected]>**20090716134549
459 Ignore-this: e1073e1ad77e720326865a6d3c4f3790
460]
461[Take account of GADTs when reporting patterm-match overlap
462[email protected]**20090722050933
463 Ignore-this: 7dcbdcb91021e83e6e6208a2e68c50c9
464 
465 When matching against a GADT, some of the constructors may be impossible.
466 For example
467        data T a where
468           T1 :: T Int
469           T2 :: T Bool
470           T3 :: T a
471 
472         f :: T Int -> Int
473         f T1 = 3
474         f T3 = 4
475 
476 Here, does not have any missing cases, despite omittting T2, because
477 T2 :: T Bool.
478 
479 This patch teaches the overlap checker about GADTs, which happily
480 turned out to be rather easy even though the overlap checker needs
481 a serious rewrite.
482 
483]
484[Fix Trac #3382: desugaring of NPats
485[email protected]**20090720061226
486 Ignore-this: 4dccdaf2b7d6428141dcf174cb455a20
487 
488 Max spotted that the short-cut rules for desugaring NPats (where
489 we compare against a literal) were wrong now that we have overloaded
490 strings.
491 
492]
493[Add a -fwarn-dodgy-exports flag; fixes #1911
494Ian Lynagh <[email protected]>**20090719200124
495 This is used to control warnings that were previously unconditional.
496]
497[Build terminfo if we /aren't/ on Windows, not if we /are/
498Ian Lynagh <[email protected]>**20090719111709]
499[Change how PACKAGES is constructed, so that everything gets cleaned properly
500Ian Lynagh <[email protected]>**20090718210058
501 If Windows wasn't defined properly then the Win32 package wasn't being
502 cleaned, as it wasn't added to PACKAGES. Now we always add everything to
503 PACKAGES when CLEANING=YES.
504]
505[temporarily turn off unused import warnings for the time library
506Ian Lynagh <[email protected]>**20090718183445]
507[Follow the split directory rename in the GHC build system rules
508Ian Lynagh <[email protected]>**20090718155618]
509[Add osuf to the name we use for the split dir
510Ian Lynagh <[email protected]>**20090718145522
511 This avoids a collision between the directories we use when compiling
512 multiple ways, which in turn leads to a race condition in parallel
513 builds.
514]
515[Temporarily turn off unused-do-bind warnings for the time package
516Ian Lynagh <[email protected]>**20090718134536]
517[Make ghc-cabal handle "Custom" Setup.hs files that have a configure script
518Ian Lynagh <[email protected]>**20090718131555]
519[Add the time library, and support for libraries in tarballs
520Ian Lynagh <[email protected]>**20090718121649]
521[Always serialise Int as 64bit values; fixes trac #3041
522Ian Lynagh <[email protected]>**20090717224203
523 This means that, provided the values are small enough, files
524 serialized are portable between architectures. In particular,
525 .haddock files are portable.
526]
527[Remove some code that has always been commented out
528Ian Lynagh <[email protected]>**20090717224100]
529[Fix Trac #3346: tcSimplify for LHS of RULES with type equalities
530[email protected]**20090717155722
531 Ignore-this: dfdd0f9a62d78d63276a4d558831099c
532]
533[Allow mixed case in the LINE pragma; patch from squadette; fixes #1817
534Ian Lynagh <[email protected]>**20090717133522]
535[Comment only
536[email protected]**20090717120154
537 Ignore-this: f96b11e602fe4b311c1e466af9aa1908
538]
539[Add missing case for eq_note.
540[email protected]**20090624134407]
541[Rename parameters to make debugging code compile.
542[email protected]**20090626105440]
543[Comment fix: use the same variable names in the conclusion as in the premise.
544[email protected]**20090618092235]
545[Typo fixes, from Alexey Mahotkin
546Ian Lynagh <[email protected]>**20090717010817]
547[Use names like '$fOrdInt' for dfuns (and TF instances), rather than '$f21'
548Simon Marlow <[email protected]>**20090716125643
549 Ignore-this: d0b4632cf8ed9e05b67a19aa19ab3e19
550 
551 2 reasons for this:
552   - compilation is more predictable.  Adding or removing an instance
553     is less likely to force unnecessary recompilation due to
554     renumbering other dfun names.
555   - it makes it easier to read Core / C-- / asm
556 
557 The names aren't completely deterministic.  To do that, we'd have to
558 include package and module names, which would make the symbol names
559 long and reduce readability.  So the compromise is that if there's a
560 clash, we disambiguate by adding an integer suffix.  This is fairly
561 unlikely in practice unless you're using overlapping instances.
562 
563 Type family instances are handled in the same way, with the same
564 disambiguation strategy.
565]
566[Use a stable ordering for the export list in the interface
567Simon Marlow <[email protected]>**20090716122601
568 Ignore-this: 847dd7adc8b52e56f28d2478c78c925
569 The export list was ordered according to the whim of FastStrings,
570 which meant that interface fingerprints could change for no good
571 reason, causing spurious recompilation.
572]
573[Don't put all of $CFLAGS into $SRC_CC_OPTS
574Ian Lynagh <[email protected]>**20090716131309
575 Instead, we just put the flags we need in there (e.g. -m64 on OS X 64).
576 This fixes a problem found by Simon M, where we were compiling
577 everything with -g, leading to a bloated RTS.
578]
579[Move showOpt into DynFlags
580Ian Lynagh <igloo@earth.li>**20090716005314]
581[Make the --info values printable with "ghc --print-foo"; trac #3122
582Ian Lynagh <igloo@earth.li>**20090716001718
583 Also, libdir is now part of the --info output, so this subsumes the old
584 --print-libdir flag.
585 The mode parsing was getting rather adhoc, so I've tidied it up a bit
586 in the process.
587]
588[whitespace only
589Simon Marlow <marlowsd@gmail.com>**20090716104217
590 Ignore-this: 38cff291d9ef15c30e3ed685ffc3c9f9
591]
592[refactor: use packageConfigId in place of mkPackageId . package
593Simon Marlow <marlowsd@gmail.com>**20090716104145
594 Ignore-this: f3d73e7bd1b307a67d26585c49f3d89f
595]
596[Fix a flag name in the docs
597Ian Lynagh <igloo@earth.li>**20090714165943]
598[Add the -fno-shared-implib flag
599Ian Lynagh <igloo@earth.li>**20090714165631
600 Patch from
601     Max Bolingbroke <batterseapower@hotmail.com>
602 Rerecorded to avoid conflicts.
603]
604[Derived Foldable instances should use Data.Foldable.foldr
605m.niloc@gmail.com**20090711130647
606 Ignore-this: e3eb841e9535a842a98bb1ae0532c6e8
607]
608[remove Solaris-specific hacks, now unnecessary
609Simon Marlow <marlowsd@gmail.com>**20090713083524
610 Ignore-this: 500077008e463532e0677ee82f5284bb
611]
612[Simplify timestamp restoration
613Matthias Kilian <kili@outback.escape.de>**20090711100244
614 Ignore-this: 7eaede224befa6b5368c91b92366211
615]
616[FIX #3272
617Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090714054559
618 Ignore-this: 225fe4d82d4eed02e9b1377687661bac
619]
620[Fix warnings
621Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090713092032
622 Ignore-this: 3631b87164fc54d82e3a02875dc08f7d
623]
624[Separate length from data in DPH arrays
625Roman Leshchinskiy <rl@cse.unsw.edu.au>**20090713044212
626 Ignore-this: aa2cc3b5ae43bd2c493ce4b330c883cd
627]
628[Stop using -fno-warn-unused-do-bind when compiling the libraries
629Ian Lynagh <igloo@earth.li>**20090709160422
630 They're now fixed to not generate those warnings
631]
632[Remove maybePrefixMatch, using stripPrefix instead
633Ian Lynagh <igloo@earth.li>**20090709160412
634 We already require GHC 6.8 to build, and that included stripPrefix
635 in Data.List.
636]
637[TFs: FIX #2203 (second half)
638Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090710064834
639 Ignore-this: 46a46feaa73f74feb08524b9e7547414
640]
641[TFs: Fix should_compile/Simple8
642Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090710042728
643 Ignore-this: 471ab67e3df1c5245921be5286a45f93
644]
645[workaround new Cygwin bash CRLF behaviour
646Simon Marlow <marlowsd@gmail.com>**20090709132850
647 Ignore-this: 5cfa2cc9d776ebe315c0f6ad7ab56d98
648]
649[Use /usr/bin/test if it exists, and fix test syntax.
650Simon Marlow <marlowsd@gmail.com>**20090709124616
651 Ignore-this: 83a75ba7c3ce2a1d02bddb7bfe414bfe
652 Should fix Solaris build failures
653]
654[Allow mixed case pragmas; #1817. Patch from squadette
655Ian Lynagh <igloo@earth.li>**20090709153737
656 This patch allow you to use "Language CPP", or even "LaNgUaGe CPP",
657 if you wish, as the manual claims you can.
658]
659[don't create inplace/bin/ghc-<version>
660Simon Marlow <marlowsd@gmail.com>**20090706092031
661 Ignore-this: 2584d7bf56e77b27ca5b7b557c152c5e
662]
663[Fix ignored-monadic-result warnings
664Ian Lynagh <igloo@earth.li>**20090707181857]
665[Fix an unused import warning
666Ian Lynagh <igloo@earth.li>**20090707144706]
667[Fix unused import warnings
668Ian Lynagh <igloo@earth.li>**20090707143216]
669[Fix unused import warnings
670Ian Lynagh <igloo@earth.li>**20090707133537]
671[When exporting F(..), all the children of F are also exported
672Ian Lynagh <igloo@earth.li>**20090707133427
673 This fixes the unused imports warning when
674     Foo (F(x,y,z))
675 is imported and
676     Foo (F(..))
677 is exported.
678]
679[Remove unused imports
680Ian Lynagh <igloo@earth.li>**20090707121548]
681[Major patch to fix reporting of unused imports
682simonpj@microsoft.com**20090706112503
683 Ignore-this: 3b5ecdd880474493d73bdbdc0fa0b782
684 
685 This patch, joint work between and Ian and Simon, fixes Trac #1074
686 by reporting unused import declarations much more accuratly than
687 before.  The specification is described at
688 
689 http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/UnusedImports
690 
691 The implementation is both easier to understand than before, and shorter
692 too. 
693 
694 Also fixed are #1148, #2267
695 
696 Also fixed is -ddump-minimal imports, which now works properly, fixing
697 Trac #1792.
698 
699 
700]
701[Trim unused imports detected by new unused-import code
702simonpj@microsoft.com**20090706112201
703 Ignore-this: c6ca46d3a750c1cd1d58ea2c0de9f14f
704]
705[Avoid unnecessary recompilation after ./configure (helps #3228)
706Simon Marlow <marlowsd@gmail.com>**20090707085040
707 Ignore-this: f8b3e7a2a96bc23cd29505ab9c8dbd7d
708 We cache the old versions of files generated by configure, so that if
709 configure touches the file without changing it, we can detect that and
710 restore the timestamp.
711]
712[check for tabs in compiler/ghc.cabal.in (#3344)
713Simon Marlow <marlowsd@gmail.com>**20090707081845
714 Ignore-this: 6073db47eafd52e13e76c58ef738afcf
715]
716[remove tabs
717Simon Marlow <marlowsd@gmail.com>**20090707081823
718 Ignore-this: 3d65831fc019f76cefac03291904842a
719]
720[fix cleaning of libraries (now 'make clean' in libraries/* works again)
721Simon Marlow <marlowsd@gmail.com>**20090703114638
722 Ignore-this: b3af731d50ff5bfbd453f94aa40cb92c
723]
724[FIX #2677
725Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090707055442
726 Ignore-this: e224dd09d0d1c9ec4f3b46c7accb8d57
727]
728[Update driver/Makefile for the new build system
729Ian Lynagh <igloo@earth.li>**20090705204041]
730[Fix generational GC bug (#3348)
731Simon Marlow <marlowsd@gmail.com>**20090706112227
732 Ignore-this: 5938338efa0ad1550968c664a5a76f31
733]
734[Windows fixes to build system: use the 'find' and 'sort' found by configure
735simonpj@microsoft.com**20090706103413
736 Ignore-this: a96197917f388a637118bafefb427495
737 
738 The build system should use 'find' and 'sort' that are discovered by
739 configure, not the ones in your path.  On Windows the ones in your path
740 might well be the non-Unixy Windows versions.
741 
742 This patch fixes the ones I tripped over. There may be more.
743 
744]
745[Follow Cabal changes
746Ian Lynagh <igloo@earth.li>**20090705180414]
747[Update TODO list
748Ian Lynagh <igloo@earth.li>**20090705165009]
749[Make -fext-core a dynamic flag (it was a static flag)
750Ian Lynagh <igloo@earth.li>**20090705132420]
751[Update a few points about shared libs in other sections
752Duncan Coutts <duncan@well-typed.com>**20090704212212
753 And add links to the new shared libs section.
754]
755[Document -dynload flag. Also add it and -shared to the flags reference.
756Duncan Coutts <duncan@well-typed.com>**20090704212119]
757[Add new section on using shared libs
758Duncan Coutts <duncan@well-typed.com>**20090704212003]
759[Document foreign import prim in the user guide
760Duncan Coutts <duncan@well-typed.com>**20090704180547
761 Basically just stat that it exists and refer to the ghc dev wiki
762 for the details, because we don't really want people using it.
763]
764[For now, use -fno-warn-unused-do-bind when building the libraries
765Ian Lynagh <igloo@earth.li>**20090704210654]
766[Make changes to -fwarn-unused-do-bind and -fwarn-wrong-do-bind suggested by SPJ
767Max Bolingbroke <batterseapower@hotmail.com>**20090702150943
768 Ignore-this: 595368298d2e11623c0bd280ff89d8de
769]
770[Support for -fwarn-unused-do-bind and -fwarn-wrong-do-bind, as per #3263
771Max Bolingbroke <batterseapower@hotmail.com>**20090701200344
772 Ignore-this: 511117ffc10d4b656e530b751559b8b8
773]
774[Improved infrastructure for fast-rebuilding of parts of the tree
775Simon Marlow <marlowsd@gmail.com>**20090703074527
776 Ignore-this: ab348d0988d8bbc28c2b4babbd6bbfb8
777 
778 e.g.
779 
780   cd compiler
781   make FAST=YES stage1/build/HscTypes.o
782 
783 builds just the specified .o file, without rebuilding dependencies,
784 and omitting some of the makefile phases.  FAST=YES works anywhere, to
785 omit depenencies and phases.  'make fast' is shorthand for 'make
786 all FAST=YES'.
787]
788[Fix Trac #3342: missed zonking in TcHsSyn
789simonpj@microsoft.com**20090702124331
790 Ignore-this: 9b97b2142dfc665b503f59df7c55dd17
791 
792 The type in a ViewPat wasn't being zonked.  Easily fixed.
793 
794]
795[Type synonym families may be nullary
796Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090702084826
797 Ignore-this: bcfe6ed62c901206daf5a5088890bbea
798]
799[New syntax for GADT-style record declarations, and associated refactoring
800simonpj@microsoft.com**20090702094657
801 Ignore-this: bd9817230d3773b3b01fae3d7f04c57d
802 
803 The main purpose of this patch is to fix Trac #3306, by fleshing out the
804 syntax for GADT-style record declraations so that you have a context in
805 the type.  The new form is
806    data T a where
807      MkT :: forall a. Eq a => { x,y :: !a } -> T a
808 See discussion on the Trac ticket.
809 
810 The old form is still allowed, but give a deprecation warning.
811 
812 When we remove the old form we'll also get rid of the one reduce/reduce
813 error in the grammar. Hurrah!
814 
815 While I was at it, I failed as usual to resist the temptation to do lots of
816 refactoring.  The parsing of data/type declarations is now much simpler and
817 more uniform.  Less code, less chance of errors, and more functionality.
818 Took longer than I planned, though.
819 
820 ConDecl has record syntax, but it was not being used consistently, so I
821 pushed that through the compiler.
822 
823]
824[White space only
825simonpj@microsoft.com**20090702094627
826 Ignore-this: 19f654cbf371c8dcc6517fd4934855b4
827]
828[Comments only
829simonpj@microsoft.com**20090702094531
830 Ignore-this: 384fc2729c7c50a1680775a1f9ff89e4
831]
832[Look through Notes when matching
833simonpj@microsoft.com**20090702094444
834 Ignore-this: 7daea81e905ec6061d3e0fd588d7e61b
835]
836[FIX #3197
837Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20090702070905
838 Ignore-this: ebf829f0ae025e82bccdfa4345828ffe
839]
840[Fix #2197 (properly this time)
841Simon Marlow <marlowsd@gmail.com>**20090701122354
842 Ignore-this: 39b6e4b0bcdd8c2f4660f976b7db768d
843 
844 $ ./inplace/bin/ghc-stage2 --interactive
845 GHCi, version 6.11.20090701: http://www.haskell.org/ghc/  :? for help
846 ghc-stage2: GHCi cannot be used when compiled with -prof
847 [1]    32473 exit 1     ./inplace/bin/ghc-stage2 --interactive
848]
849[make GhcProfiled work, and add a "prof" flavour to build.mk
850Simon Marlow <marlowsd@gmail.com>**20090701114211
851 Ignore-this: 386d347e4ad8b6c2bd40a2ba7da31ba6
852 
853 Building a profiled GHC is as simple as adding
854 
855 GhcLibWays += p
856 GhcProfiled = YES
857 
858 to your build.mk and saying 'make'.  Then you have a profiled
859 inplace/bin/ghc-stage2.
860]
861[remove unnecessary $(RM)s
862Simon Marlow <marlowsd@gmail.com>**20090701110609
863 Ignore-this: f326ec8931d0d484a66b67ce1270cc6e
864]
865['make html' in a library builds the Haddock docs
866Simon Marlow <marlowsd@gmail.com>**20090630111137
867 Ignore-this: 781bf10e2d4bca23b7f70c6f0465d120
868]
869[fix GC bug introduced with the C finalizer support
870Simon Marlow <marlowsd@gmail.com>**20090630080834
871 Ignore-this: 3567e3adb5ae4a5dcbce81733487f348
872]
873[Add a configure test for whether or not __mingw_vfprintf exists
874Ian Lynagh <igloo@earth.li>**20090627150501]
875[Fix #3319, and do various tidyups at the same time
876Simon Marlow <marlowsd@gmail.com>**20090626095421
877 Ignore-this: ea54175f6bd49e101d7b33392764f643
878  - converting a THSyn FFI declaration to HsDecl was broken; fixed
879  - pretty-printing of FFI declarations was variously bogus; fixed
880  - there was an unused "library" field in CImport; removed
881]
882[rename cache variable to keep recent autoconfs happy
883Ross Paterson <ross@soi.city.ac.uk>**20090626131410
884 Ignore-this: 187091bbe78f2b14402162acfb98180f
885]
886[TAG 2009-06-25
887Ian Lynagh <igloo@earth.li>**20090625155528]
888Patch bundle hash:
889ae45a9e251bfa29cf95a5bac1cf7cbee16b80b50