Ticket #3833: 3833-patch

File 3833-patch, 57.8 KB (added by simonpj, 6 years ago)

Patch for Trac 3833

Line 
1Thu Jan 21 11:36:53 GMT 2010  [email protected]
2  * Fix Trac #3833,#3834: improve error messages for deriving
3 
4  This patch, on the 6.12 branch only, does what the patch
5      "Tidy up deriving error messages"
6  did for the HEAD.  That patch fixed #3702, but it also
7  fixes the problem in #3833,#3834
8
9New patches:
10
11[Fix Trac #3833,#3834: improve error messages for deriving
12[email protected]**20100121113653
13 Ignore-this: 211f5245a5cc7ee64e902d6663ef2bb2
14 
15 This patch, on the 6.12 branch only, does what the patch
16     "Tidy up deriving error messages"
17 did for the HEAD.  That patch fixed #3702, but it also
18 fixes the problem in #3833,#3834
19] {
20hunk ./compiler/typecheck/TcDeriv.lhs 95
21        -- ds_newtype = True  <=> Newtype deriving
22        --              False <=> Vanilla deriving
23 
24+type DerivContext = Maybe ThetaType
25+   -- Nothing   <=> Vanilla deriving; infer the context of the instance decl
26+   -- Just theta <=> Standalone deriving: context supplied by programmer
27+
28 type EarlyDerivSpec = Either DerivSpec DerivSpec
29        -- Left  ds => the context for the instance should be inferred
30        --             In this case ds_theta is the list of all the
31hunk ./compiler/typecheck/TcDeriv.lhs 556
32 
33 \begin{code}
34 mkEqnHelp :: InstOrigin -> [TyVar] -> Class -> [Type] -> Type
35-          -> Maybe ThetaType   -- Just    => context supplied (standalone deriving)
36+          -> DerivContext      -- Just    => context supplied (standalone deriving)
37                                -- Nothing => context inferred (deriving on data decl)
38           -> TcRn EarlyDerivSpec
39 -- Make the EarlyDerivSpec for an instance
40hunk ./compiler/typecheck/TcDeriv.lhs 591
41                mkNewTypeEqn orig dflags tvs cls cls_tys
42                             tycon tc_args rep_tc rep_tc_args mtheta }
43   | otherwise
44-  = failWithTc (derivingThingErr cls cls_tys tc_app
45+  = failWithTc (derivingThingErr False cls cls_tys tc_app
46               (ptext (sLit "The last argument of the instance must be a data or newtype application")))
47 \end{code}
48 
49hunk ./compiler/typecheck/TcDeriv.lhs 650
50               -> [Var]                  -- Universally quantified type variables in the instance
51               -> Class                  -- Class for which we need to derive an instance
52               -> [Type]                 -- Other parameters to the class except the last
53-              -> TyCon                  -- Type constructor for which the instance is requested (last parameter to the type class)
54+              -> TyCon                  -- Type constructor for which the instance is requested
55+                                       --    (last parameter to the type class)
56               -> [Type]                 -- Parameters to the type constructor
57               -> TyCon                  -- rep of the above (for type families)
58               -> [Type]                 -- rep of the above
59hunk ./compiler/typecheck/TcDeriv.lhs 655
60-              -> Maybe ThetaType        -- Context of the instance, for standalone deriving
61+              -> DerivContext        -- Context of the instance, for standalone deriving
62               -> TcRn EarlyDerivSpec    -- Return 'Nothing' if error
63 
64 mkDataTypeEqn orig dflags tvs cls cls_tys
65hunk ./compiler/typecheck/TcDeriv.lhs 660
66               tycon tc_args rep_tc rep_tc_args mtheta
67-  | isJust mtheta = go_for_it  -- Do not test side conditions for standalone deriving
68-  | otherwise     = case checkSideConditions dflags cls cls_tys rep_tc of
69-                     -- NB: pass the *representation* tycon to checkSideConditions
70-                     CanDerive               -> go_for_it
71-                     NonDerivableClass       -> bale_out (nonStdErr cls)
72-                     DerivableClassError msg -> bale_out msg
73+  = case checkSideConditions dflags mtheta cls cls_tys rep_tc of
74+       -- NB: pass the *representation* tycon to checkSideConditions
75+       CanDerive               -> go_for_it
76+       NonDerivableClass       -> bale_out (nonStdErr cls)
77+       DerivableClassError msg -> bale_out msg
78   where
79     go_for_it    = mk_data_eqn orig tvs cls tycon tc_args rep_tc rep_tc_args mtheta
80hunk ./compiler/typecheck/TcDeriv.lhs 667
81-    bale_out msg = failWithTc (derivingThingErr cls cls_tys (mkTyConApp tycon tc_args) msg)
82+    bale_out msg = failWithTc (derivingThingErr False cls cls_tys (mkTyConApp tycon tc_args) msg)
83 
84 mk_data_eqn, mk_typeable_eqn
85    :: InstOrigin -> [TyVar] -> Class
86hunk ./compiler/typecheck/TcDeriv.lhs 671
87-   -> TyCon -> [TcType] -> TyCon -> [TcType] -> Maybe ThetaType
88+   -> TyCon -> [TcType] -> TyCon -> [TcType] -> DerivContext
89    -> TcM EarlyDerivSpec
90 mk_data_eqn orig tvs cls tycon tc_args rep_tc rep_tc_args mtheta
91   | getName cls `elem` typeableClassNames
92hunk ./compiler/typecheck/TcDeriv.lhs 788
93                 | DerivableClassError SDoc     -- Standard class, but can't do it
94                 | NonDerivableClass            -- Non-standard class
95 
96-checkSideConditions :: DynFlags -> Class -> [TcType] -> TyCon -> DerivStatus
97-checkSideConditions dflags cls cls_tys rep_tc
98-  | Just cond <- sideConditions cls
99+checkSideConditions :: DynFlags -> DerivContext -> Class -> [TcType] -> TyCon -> DerivStatus
100+checkSideConditions dflags mtheta cls cls_tys rep_tc
101+  | Just cond <- sideConditions mtheta cls
102   = case (cond (dflags, rep_tc)) of
103        Just err -> DerivableClassError err     -- Class-specific error
104hunk ./compiler/typecheck/TcDeriv.lhs 793
105-       Nothing  | null cls_tys -> CanDerive
106+       Nothing  | null cls_tys -> CanDerive    -- All derivable classes are unary, so
107+                                               -- cls_tys (the type args other than last)
108+                                               -- should be null
109                 | otherwise    -> DerivableClassError ty_args_why      -- e.g. deriving( Eq s )
110   | otherwise = NonDerivableClass      -- Not a standard class
111   where
112hunk ./compiler/typecheck/TcDeriv.lhs 804
113 nonStdErr :: Class -> SDoc
114 nonStdErr cls = quotes (ppr cls) <+> ptext (sLit "is not a derivable class")
115 
116-sideConditions :: Class -> Maybe Condition
117-sideConditions cls
118+sideConditions :: DerivContext -> Class -> Maybe Condition
119+sideConditions mtheta cls
120   | cls_key == eqClassKey                 = Just cond_std
121   | cls_key == ordClassKey                = Just cond_std
122   | cls_key == showClassKey               = Just cond_std
123hunk ./compiler/typecheck/TcDeriv.lhs 825
124   | otherwise = Nothing
125   where
126     cls_key = getUnique cls
127+    cond_std = cond_stdOK mtheta
128 
129 type Condition = (DynFlags, TyCon) -> Maybe SDoc
130        -- first Bool is whether or not we are allowed to derive Data and Typeable
131hunk ./compiler/typecheck/TcDeriv.lhs 848
132                     Nothing -> c2 tc   -- c1 succeeds
133                     Just x  -> Just x  -- c1 fails
134 
135-cond_std :: Condition
136-cond_std (_, rep_tc)
137-  | null data_cons      = Just no_cons_why
138-  | not (null con_whys) = Just (vcat con_whys)
139+cond_stdOK :: DerivContext -> Condition
140+cond_stdOK (Just _) _
141+  = Nothing    -- Don't check these conservative conditions for
142+               -- standalone deriving; just generate the code
143+cond_stdOK Nothing (_, rep_tc)
144+  | null data_cons      = Just (no_cons_why $$ suggestion)
145+  | not (null con_whys) = Just (vcat con_whys $$ suggestion)
146   | otherwise          = Nothing
147   where
148hunk ./compiler/typecheck/TcDeriv.lhs 857
149-    data_cons       = tyConDataCons rep_tc
150-    no_cons_why            = quotes (pprSourceTyCon rep_tc) <+>
151-                     ptext (sLit "has no data constructors")
152+    suggestion  = ptext (sLit "Possible fix: use a standalone deriving declaration instead")
153+    data_cons   = tyConDataCons rep_tc
154+    no_cons_why        = quotes (pprSourceTyCon rep_tc) <+>
155+                 ptext (sLit "has no data constructors")
156 
157     con_whys = mapCatMaybes check_con data_cons
158 
159hunk ./compiler/typecheck/TcDeriv.lhs 1021
160 \begin{code}
161 mkNewTypeEqn :: InstOrigin -> DynFlags -> [Var] -> Class
162              -> [Type] -> TyCon -> [Type] -> TyCon -> [Type]
163-             -> Maybe ThetaType
164+             -> DerivContext
165              -> TcRn EarlyDerivSpec
166 mkNewTypeEqn orig dflags tvs
167              cls cls_tys tycon tc_args rep_tycon rep_tc_args mtheta
168hunk ./compiler/typecheck/TcDeriv.lhs 1039
169        ; return (if isJust mtheta then Right spec
170                                   else Left spec) }
171 
172-  | isJust mtheta = go_for_it  -- Do not check side conditions for standalone deriving
173   | otherwise
174hunk ./compiler/typecheck/TcDeriv.lhs 1040
175-  = case checkSideConditions dflags cls cls_tys rep_tycon of
176+  = case checkSideConditions dflags mtheta cls cls_tys rep_tycon of
177       CanDerive               -> go_for_it     -- Use the standard H98 method
178       DerivableClassError msg -> bale_out msg  -- Error with standard class
179       NonDerivableClass        -- Must use newtype deriving
180hunk ./compiler/typecheck/TcDeriv.lhs 1049
181   where
182         newtype_deriving = dopt Opt_GeneralizedNewtypeDeriving dflags
183         go_for_it        = mk_data_eqn orig tvs cls tycon tc_args rep_tycon rep_tc_args mtheta
184-       bale_out msg     = failWithTc (derivingThingErr cls cls_tys inst_ty msg)
185+       bale_out msg     = failWithTc (derivingThingErr newtype_deriving cls cls_tys inst_ty msg)
186 
187        non_std_err = nonStdErr cls $$
188                      ptext (sLit "Try -XGeneralizedNewtypeDeriving for GHC's newtype-deriving extension")
189hunk ./compiler/typecheck/TcDeriv.lhs 1159
190               -- so for 'data' instance decls
191                                         
192        cant_derive_err
193-          = vcat [ ptext (sLit "even with cunning newtype deriving:")
194-                 , if arity_ok then empty else arity_msg
195+          = vcat [ if arity_ok then empty else arity_msg
196                  , if eta_ok then empty else eta_msg
197                  , if ats_ok then empty else ats_msg ]
198         arity_msg = quotes (ppr (mkClassPred cls cls_tys)) <+> ptext (sLit "does not have arity 1")
199hunk ./compiler/typecheck/TcDeriv.lhs 1452
200   = hang (ptext (sLit "Derived instance") <+> quotes (pprClassPred cls (cls_tys ++ [inst_ty])))
201        2 (ptext (sLit "requires illegal partial application of data type family") <+> ppr tc)
202 
203-derivingThingErr :: Class -> [Type] -> Type -> Message -> Message
204-derivingThingErr clas tys ty why
205-  = sep [hsep [ptext (sLit "Can't make a derived instance of"),
206-              quotes (ppr pred)],
207-        nest 2 (parens why)]
208+derivingThingErr :: Bool -> Class -> [Type] -> Type -> Message -> Message
209+derivingThingErr newtype_deriving clas tys ty why
210+  = sep [(hang (ptext (sLit "Can't make a derived instance of"))
211+            2 (quotes (ppr pred))
212+          $$ nest 2 extra) <> colon,
213+        nest 2 why]
214   where
215hunk ./compiler/typecheck/TcDeriv.lhs 1459
216+    extra | newtype_deriving = ptext (sLit "(even with cunning newtype deriving)")
217+          | otherwise        = empty
218     pred = mkClassPred clas (tys ++ [ty])
219 
220 derivingHiddenErr :: TyCon -> SDoc
221}
222
223Context:
224
225[Change how RTS libraries get installed; fixes trac #3794
226Ian Lynagh <[email protected]>**20100119232623]
227[Fix #3741
228Ian Lynagh <[email protected]>**20100119195530
229 This isn't exactly a merge of
230     Thu Dec 10 16:09:09 GMT 2009  Simon Marlow <[email protected]>
231       * Fix #3741, simplifying things in the process
232 as it doesn't do any of the simplification, but it does fix the actual
233 bug.
234]
235[Allow spaces at either end of the C import spec (#3742)
236Simon Marlow <[email protected]>**20091210124537
237 Ignore-this: 840424ea49d5e81ab8f8ce3209d5eedf
238]
239[Update to a newer version of filepath; fixes trac #3762
240Ian Lynagh <[email protected]>**20100119133232]
241[Update some comments about how autoconf/configure works
242Ian Lynagh <[email protected]>**20100118145959]
243[Rolling back: Make FastString thread-safe.
244Simon Marlow <[email protected]>**20091231164651
245 Ignore-this: 8f21b256b0c86d167f8f6984d2b27a87
246     
247 This patch was the cause of the compile-time performance regression in
248 #3796.  My guess is that it is due to the use of unsafePerformIO which
249 traverses the stack up to the first update frame, and perhaps we have
250 a deep stack when reading the dictionary from a .hi file.  In any
251 case, since we're not relying on thread safety for FastStrings, I
252 think the safest thing to do is back this out until we can investigate
253 further.
254]
255[Reorder ALL_RTS_LIBS
256Matthias Kilian <[email protected]>**20091115175405
257 Ignore-this: 795cfd5215ec73eea729aa2b3097817e
258 
259 ALL_RTS_LIBS is (ab)used for linking ghc when BootingFromHc=Yes,
260 which needs libHSrtsmain.a before libHSrts.a.
261 
262]
263[Fix Trac #3792: check for qualified names in import items
264[email protected]**20100104215950
265 Ignore-this: 12ff8d232e1ecf02b56bb8c03265bc53
266]
267[MERGED: Fix #650: use a card table to mark dirty sections of mutable arrays
268Ian Lynagh <[email protected]>**20100109133330
269 Simon Marlow <[email protected]>**20091217224228
270  Ignore-this: 75c354682c9ad1b71b68b5bc4cedd6de
271  The card table is an array of bytes, placed directly following the
272  actual array data.  This means that array reading is unaffected, but
273  array writing needs to read the array size from the header in order to
274  find the card table.
275 
276  We use a bytemap rather than a bitmap, because updating the card table
277  must be multi-thread safe.  Each byte refers to 128 entries of the
278  array, but this is tunable by changing the constant
279  MUT_ARR_PTRS_CARD_BITS in includes/Constants.h.
280]
281[Copying Simon M's fix for 650 to the new codegen
282[email protected]**20091222222017
283 Ignore-this: 4bd46e6ef23debc39c7c10aea3dfdf5c
284]
285[Fixes to account for the new layout of MUT_ARR_PTRS (see #650)
286Simon Marlow <[email protected]>**20091221115249
287 Ignore-this: ca4a58628707b362dccedb74e81ef052
288]
289[MERGED: Patch for shared libraries support on FreeBSD
290Ian Lynagh <[email protected]>**20100109125752
291 Ian Lynagh <[email protected]>**20100106185321
292  From Maxime Henrion <[email protected]>
293]
294[Fix running in-place gen_contents_index; trac #3716
295Ian Lynagh <[email protected]>**20100108133416
296 It was making incorrect URLs due to a shell script error.
297]
298[Add comments to darcs-all
299[email protected]**20091221160511
300 Ignore-this: 5a369a030785aec6ef0169e36757bba4
301 
302 The comments explain how darcs-all decides what repo to use
303]
304[Partial support for Haiku (#3727)
305Simon Marlow <[email protected]>**20091221110250
306 Ignore-this: 5d4a3104c1bd50b7eae64780cb73071d
307]
308[Fix spelling in comment
309[email protected]**20091211115744
310 Ignore-this: bd02fc0eb67efc7404536f1ee96d4d1f
311]
312[Fix Trac #3776
313[email protected]**20091221155509
314 Ignore-this: 69607bdc7208775a305a5f39a575f0e2
315 
316 An easy fix.  See Note [Usage for sub-bndrs] in RnEnv.
317]
318[Fix #3751, also fix some lexical error SrcLocs
319Simon Marlow <[email protected]>**20091217132658
320 Ignore-this: 63e11a7a64bb0c98e793e4cc883f051d
321]
322[Get a newer hpc tarball
323Ian Lynagh <[email protected]>**20091219211719
324 Contains some testsuite improvements
325]
326[Fix the FloatOut patch for the 6.12 branch
327Ian Lynagh <[email protected]>**20091218173357]
328[MERGED: Fix a nasty (and long-standing) FloatOut performance bug
329Ian Lynagh <[email protected]>**20091218163448
330 Mon Dec  7 08:32:46 GMT 2009  simonpj@microsoft.
331   Ignore-this: a64b98992fa4ced434d1edf0b89842ec
332   
333   The effect was that, in deeply-nested applications, FloatOut would
334   take quadratic time.  A good example was compiling
335       programs/barton-mangler-bug/Expected.hs
336   in which FloatOut had a visible pause of a couple of seconds!
337   Profiling showed that 40% of the entire compile time was being
338   consumbed by the single function partitionByMajorLevel.
339   
340   The bug was that the floating bindings (type FloatBinds) was kept
341   as a list, which was partitioned at each binding site.  In programs
342   with deeply nested lists, such as
343          e1 : e2 : e3 : .... : e5000 : []
344   this led to quadratic behaviour.
345   
346   The solution is to use a proper finite-map representation;
347   see the new definition of FloatBinds near the bottom of FloatOut.
348]
349[Fix a braino in a comment
350Ian Lynagh <[email protected]>**20091218213541]
351[Fix another sed problem on Solaris
352Ian Lynagh <[email protected]>**20091217000421]
353[Add lengthBag to Bag (using in forthcoming patch)
354[email protected]**20091204155055
355 Ignore-this: 5af0f45d6b51bc77e54c5cb0e2b1e607
356]
357[Add splitUFM to UniqFM (used in a forthcoming patch)
358[email protected]**20091204160820
359 Ignore-this: 332aa029f25ec3f22e4f195ecd44b40b
360 
361 splitUFM :: Uniquable key => UniqFM elt -> key -> (UniqFM elt, Maybe elt, UniqFM elt)
362    -- Splits a UFM into things less than, equal to, and greater than the key
363]
364[Print the prog name in errorBelch() even if prog_argv is not set yet
365Simon Marlow <[email protected]>**20091119135230
366 Ignore-this: ec42e7a4f344ebc34befddfc3d74a946
367 This means we get the prog name in error messages from the flag parser
368]
369[define HS_WORD_MAX
370Simon Marlow <[email protected]>**20091119140143
371 Ignore-this: ed27e7c7ac0bd03cddcd745ae7053a74
372]
373[Check whether the main function is actually exported (#414)
374Simon Marlow <[email protected]>**20091130112327
375 Ignore-this: 1afaa18d8c0c9e1d029531ac9d4865bb
376]
377[#include <sys/select.h> if we have it (#3760)
378Simon Marlow <[email protected]>**20091216095501
379 Ignore-this: 7c00991a67ae6715e16c6458bf0b78af
380]
381[fix up libm detection and use (#3724)
382Simon Marlow <[email protected]>**20091216113652
383 Ignore-this: 6bbdd7302b262ac3b8ddc5c852dc538
384]
385[configure.ac: fix libm checks (Trac #3730)
386Sergei Trofimovich <[email protected]>**20091204214012
387 Ignore-this: f3372535a68f3833247f679b023745c8
388 
389 libbfd pulled libm as dependency and broke LIBM= detection.
390 
391 Patch moves libm in library tests as early as possible.
392 Thanks to asuffield for suggesting such a simple fix.
393 Thanks to Roie Kerstein and Renato Gallo for finding
394 and tracking down the issue.
395]
396[Barf on unhandled Mach-O relocations in the ghci linker
397Manuel M T Chakravarty <[email protected]>**20091111020712
398 Ignore-this: 67cd1323420bf7139a7ee293b43e7be9
399 
400 - It might be worthwhile to MERGE this to 6.12, BUT somebody should validate
401   it on PPC/Mac OS X first.
402]
403[Check upper/lower bounds on various RTS flags (#3633)
404Simon Marlow <[email protected]>**20091119142422
405 Ignore-this: 8cbbb3f0f2c46711967491d5c028a410
406 
407 Also, make K mean 1024 rather than 1000, in RTS flags (similarly for M
408 and G).  The main reason I want to change it is that otherwise this
409 might be confusing:
410   
411 exp3_8: error in RTS option -H4k: size outside allowed range (4096 - 18446744073709551615)
412 
413 And I think the original reason for using 1000 instead of 1024,
414 worries about direct-mapped caches, is not an issue in this context
415 (even if you can find a direct-mapped cache these days).
416]
417[TAG GHC 6.12.1 release
418Ian Lynagh <[email protected]>**20091215124607]
419[Set RELEASE back to NO
420Ian Lynagh <[email protected]>**20091211141350]
421[Put README and INSTALL into bindists
422Ian Lynagh <[email protected]>**20091209174305
423 Also tidied up the way configure.ac gets into bindists
424]
425[Fix the stage1 version number munging
426Ian Lynagh <[email protected]>**20091209151715
427 It was munging 6.12.1 into 62
428]
429[add a missing unlockTSO()
430Simon Marlow <[email protected]>**20091209124113
431 Ignore-this: 9ff0aedcb6d62e5b4bd2fab30bfce105
432]
433[Correct the version number
434Ian Lynagh <[email protected]>**20091209124704]
435[Add an entry about deriving instances for GADTs to the release notes
436Ian Lynagh <[email protected]>**20091208114511]
437[add locking in mkWeakForeignEnv#
438Simon Marlow <[email protected]>**20091208101229
439 Ignore-this: 3902631687fc252c0e6794d58641371b
440]
441[need locking around use of weak_ptr_list in mkWeak#
442Simon Marlow <[email protected]>**20091207145213
443 Ignore-this: 9c7d506c30652de4dd5c47d1989022c1
444]
445[Set RELEASE to YES
446Ian Lynagh <[email protected]>**20091207160059]
447[threadStackOverflow: check whether stack squeezing released some stack (#3677)
448Simon Marlow <[email protected]>**20091125125917
449 Ignore-this: d35089eb93f5b367b7d1c445bda79232
450 
451 In a stack overflow situation, stack squeezing may reduce the stack
452 size, but we don't know whether it has been reduced enough for the
453 stack check to succeed if we try again.  Fortunately stack squeezing
454 is idempotent, so all we need to do is record whether *any* squeezing
455 happened.  If we are at the stack's absolute -K limit, and stack
456 squeezing happened, then we try running the thread again.
457 
458 We also want to avoid enlarging the stack if squeezing has already
459 released some of it.  However, we don't want to get into a
460 pathalogical situation where a thread has a nearly full stack (near
461 its current limit, but not near the absolute -K limit), keeps
462 allocating a little bit, squeezing removes a little bit, and then it
463 runs again.  So to avoid this, if we squeezed *and* there is still
464 less than BLOCK_SIZE_W words free, then we enlarge the stack anyway.
465]
466[Fix Trac #3102: pre-matching polytypes
467[email protected]**20091130174441
468 Ignore-this: 3e3fa97e0de28b005a1aabe9e5542b32
469 
470 When *pre-matching* two types
471      forall a. C1 => t1  ~  forall a. C2 => t2
472 we were matching t1~t2, but totally ignoring C1,C2
473 That's utterly wrong when pre-matching
474        (?p::Int) => String  ~  a
475 because we emerge with a:=String!
476 
477 All this is part of the impredicative story, which is about
478 to go away, but still.
479 
480 Worth merging this to 6.12
481]
482[Fix Trac #3100: reifyType
483[email protected]**20091130175204
484 Ignore-this: ad1578c3d2e3da6128cd5052c8b64dc
485 
486 A type without any leading foralls may still have constraints
487    eg:  ?x::Int => Int -> Int
488 
489 But reifyType was failing in this case.
490 
491 Merge to 6.12.
492]
493[Add some missing exports back for GHC package users; fixes trac #3715
494Ian Lynagh <[email protected]>**20091205153532]
495[Add an entry fo the ghci command :run to the user guide
496Ian Lynagh <[email protected]>**20091201173339]
497[Add release highlights, from HCAR report, to ANNOUNCE and release notes
498Ian Lynagh <[email protected]>**20091201172408]
499[Tweak release notes
500Ian Lynagh <[email protected]>**20091201171603]
501[Fix typo in docs
502Ian Lynagh <[email protected]>**20091201170550]
503[Fix PS file generation
504Simon Marlow <[email protected]>**20091201154254
505 Ignore-this: 7b7122208e845b029a8b7215149fd203
506 (the image doesn't work, but at least db2latex doesn't fall over)
507]
508[Fix Commentary link in the HACKING file; trac #3706
509Ian Lynagh <[email protected]>**20091201150149]
510[document 'recache' command in the help output (#3684)
511Simon Marlow <[email protected]>**20091130122040
512 Ignore-this: 95a51f76e66055af27cdfc7b5ad7deb3
513]
514[Fix the prof_scc.png image in the profiling section (#3694)
515Simon Marlow <[email protected]>**20091130132703
516 Ignore-this: 9774bad70187274e3dd283d66703004
517]
518[Delay expansion of some makefile variables until they are available
519Ian Lynagh <[email protected]>**20091201133609]
520[Call $(SED) rather than sed
521Ian Lynagh <[email protected]>**20091201131031]
522[Look for sed as gsed first
523Ian Lynagh <[email protected]>**20091201130741
524 Solaris's sed apparently doesn't understand [:space:]
525]
526[Avoid running empty for loops; fixes trac #3683
527Ian Lynagh <[email protected]>**20091201125927
528 Solaris's sh gives
529     /bin/sh: syntax error at line 1: `;' unexpected
530 when faced with something like
531     for x in ; do ...; done
532 Patch from Christian Maeder.
533]
534[Use UTF-8 explicitly for InstalledPackageInfo
535Simon Marlow <[email protected]>**20091125141730
536 Ignore-this: 45be1506dd5c3339fb229a44aa958235
537 So ghc-pkg register/update takes input in UTF-8, and ghc-pkg dump
538 outputs in UTF-8.  Textual package config files in the package DB are
539 assumed to be in UTF-8.
540]
541[Install perl on Windows
542Ian Lynagh <[email protected]>**20091120223830]
543[Stop creating $(INPLACE_LIB)/perl.exe
544Ian Lynagh <[email protected]>**20091020215627
545 We now use an msys/mingw perl tarball
546]
547[Use the ghc-perl tarball on Windows, instead of the msys one
548Ian Lynagh <[email protected]>**20091120153953]
549[Add a rule to allow us to sdist libraries easily
550Ian Lynagh <[email protected]>**20091119160527]
551[Remove -fasm from mk/validate-settings.mk
552Ian Lynagh <[email protected]>**20091120125656
553 Makes it easier to do unregisterised validate runs
554]
555[Fix some dependencies in bindists
556Ian Lynagh <[email protected]>**20091120125342
557 We can't depend on sources in a bindist, because we don't have the sources.
558]
559[Update the containers library tarball
560Ian Lynagh <[email protected]>**20091119155218
561 It now includes:
562 Wed Oct 28 03:55:32 PDT 2009  Ross Paterson <[email protected]>
563   * doc bugfix: correct description of index argument
564]
565[Update the directory library tarball
566Ian Lynagh <[email protected]>**20091119155042
567 This now includes the fix:
568 Thu Nov 19 04:29:51 PST 2009  Ian Lynagh <[email protected]>
569   * Include sys/types.h in HsDirectory.h; fixes trac #3653
570]
571[Add gnutar to the list of names we use when looking for GNU tar
572Ian Lynagh <[email protected]>**20091119144927]
573[Add support for the man page to the new build system
574Ian Lynagh <[email protected]>**20091119140811]
575[Add the msysCORE*.tar.gz tarball to the list of tarballs we unpack
576Ian Lynagh <[email protected]>**20091118195523]
577[Add an install-docs target that emits a helpful diagnostic (#3662)
578Simon Marlow <[email protected]>**20091116120137
579 Ignore-this: 1c5414730614b205c67919f3ea363c00
580]
581[Merge patches
582Ian Lynagh <[email protected]>**20091118184150
583 
584 Mon Nov 16 11:56:30 GMT 2009  Simon Marlow <[email protected]>
585   * fix install_docs dependencies, and add a missing $(INSTALL_DIR)
586 
587 Tue Nov 17 15:11:23 GMT 2009  Simon Marlow <[email protected]>
588   * exclude some haddock-related rules during BINDIST
589 
590]
591[include the GHC package docs in a bindist
592Simon Marlow <[email protected]>**20091117151133
593 Ignore-this: c4a10221b1a2a4778494018bca7d2169
594]
595[MERGED: Tweak to the directory-building rule
596Ian Lynagh <[email protected]>**20091118182145
597 Fri Nov 13 12:57:19 GMT 2009  Simon Marlow <[email protected]>
598   So we don't try to recreate directories just because they are older
599   than mkdirhier, since mkdirhier won't touch them.
600]
601[Put the libffi files to be installed into a dist directory
602Ian Lynagh <[email protected]>**20091118150508
603 This meakes it easier to correctly clean libffi
604]
605[Add a directory creation rule in the 6.12 branch
606Ian Lynagh <[email protected]>**20091118140621]
607[Add ghc-tarballs to the list of directories that go into an sdist
608Ian Lynagh <[email protected]>**20091118131047]
609[Remove the old libffi tarball
610Ian Lynagh <[email protected]>**20091118124004
611 We now use the tarball in the ghc-tarballs repo
612]
613[Fix gen_contents_index on MSYS
614Ian Lynagh <[email protected]>**20091117223556
615 On MSYS
616     sed 's/.*[ \t]//'
617 wasn't matching
618     version:<tab>1.0
619 so I've switched to
620     's/.*[[:space:]]//'
621 which works on Linux, cygwin and MSYS.
622]
623[Windows-specific fix for #1185 patch
624Simon Marlow <[email protected]>**20091112125853
625 Ignore-this: 911e48472b9d21624a20caeb28d53a63
626]
627[Second attempt to fix #1185 (forkProcess and -threaded)
628Simon Marlow <[email protected]>**20091111142822
629 Ignore-this: d33740204660b3e6dd6d39e8f5f7b499
630 
631 Patch 1/2: second part of the patch is to libraries/base
632 
633 This time without dynamic linker hacks, instead I've expanded the
634 existing rts/Globals.c to cache more CAFs, specifically those in
635 GHC.Conc.  We were already using this trick for signal handlers, I
636 should have realised before.
637 
638 It's still quite unsavoury, but we can do away with rts/Globals.c in
639 the future when we switch to a dynamically-linked GHCi.
640]
641[Add gen_contents_index and prologue.txt to bindists
642Ian Lynagh <[email protected]>**20091111192821]
643[Use relative paths for haddockHTMLs in the inplace package.conf
644Ian Lynagh <[email protected]>**20091110223632
645 This means that the docs get built with the correct relative paths.
646 When installing, the absolute path will still be used.
647]
648[Put docs into versioned directory names; fixes trac #3532
649Ian Lynagh <[email protected]>**20091108210701
650 You can now have multiple versions of a package installed, and
651 gen_contents_index will do the right thing.
652]
653[Fix formatting of module deprecation/warning messages
654Duncan Coutts <[email protected]>**20091115155617
655 Ignore-this: a41444bdda003aee4412eb56a0e7d052
656 It was accidentally using list syntax. Fixes #3303 again.
657]
658[HC bootstrapping fix: add -I$(GHC_INCLUDE_DIR) to SRC_CC_OPTS
659Simon Marlow <[email protected]>**20091112094514
660 Ignore-this: 8d3f6aa515ab83abec08227e7d4c464a
661 And add a comment explaining why these options are here
662]
663[Support for DragonFly BSD
664Simon Marlow <[email protected]>**20091111111821
665 Ignore-this: 37f39eff3af0ce8f42cae581b1c2a17e
666 Patches from Goetz Isenmann <[email protected]>, slightly updated
667 for HEAD (the method for configuring platforms in configure.ac has
668 changed).
669]
670[Don't try to rebuild compiler/primop-*.hs-incl when BootingFromHc
671Simon Marlow <marlowsd@gmail.com>**20091109135159
672 Ignore-this: 8901b86a5b7551b63c94d278109b3765
673 Patch submitted by Matthias Kilian <kili@outback.escape.de>
674]
675[The RTS needs hs-suffix-rules-srcdir for BootingFromHc
676Simon Marlow <marlowsd@gmail.com>**20091111111225
677 Ignore-this: 3b121df345191fb4328445c8be0c57e6
678 Patch submitted by Matthias Kilian <kili@outback.escape.de>,
679 re-recorded against HEAD by me, with a comment added.
680]
681[Fix bug when the combined package DB has duplicate package IDs
682Simon Marlow <marlowsd@gmail.com>**20091112135120
683 Ignore-this: ed917f06ffbf873ca80a4cf92f270728
684 Someone on IRC reported that they were encountering a strange missing
685 module error from GHC, and it turned out that they had mtl-1.1.0.2
686 installed in both the global and local DB, with the same
687 InstalledPackageId.  The two packages should be interchangeable, but
688 we were forgetting to eliminate duplicates in part of the
689 package-processing phase in GHC.
690 
691 Really I should switch this code over to use the new PackageIndex data
692 type in Cabal, which ought to make things simpler.
693]
694[Apply a workaround for #3586
695Simon Marlow <marlowsd@gmail.com>**20091112133807
696 Ignore-this: ddfe66109a9b08a4bc6348b4d164ebbb
697 This is a pretty severe performance bug in newArray and newArray_,
698 fixed in HEAD, but needs a workaround in STABLE.  The workaround from
699 the ticket didn't work, but a slight modification of it did: I had to
700 disable the INLINE pragma on the newArray default method.
701]
702[Tell ghc-cabal what strip program to use
703Ian Lynagh <igloo@earth.li>**20091108120204]
704[Change a use of xargs to "$(XARGS)" $(XARGS_OPTS)
705Ian Lynagh <igloo@earth.li>**20091107224328]
706[Split XARGS into XARGS and XARGS_OPTS
707Ian Lynagh <igloo@earth.li>**20091107223715]
708[Define CONF_CC_OPTS/CONF_LD_OPTS in bindists
709Ian Lynagh <igloo@earth.li>**20091107211747]
710[Tweak how shell wrappers are built
711Ian Lynagh <igloo@earth.li>**20091107205042]
712[Remove unused distrib/Makefile-bin-vars.in file
713Ian Lynagh <igloo@earth.li>**20091107211817]
714[ghc-stage2 is now renamed to ghc when it is installed
715Ian Lynagh <igloo@earth.li>**20091107183614
716 This means that we get the right program name in error messages etc.
717]
718[Tweak the shell wrapper scripts
719Ian Lynagh <igloo@earth.li>**20091107180502
720 We now separate the executable path from the executable name.
721 This will allow us to change one but not the other easily.
722]
723[mkdirhier now just calls mkdir -p
724Ian Lynagh <igloo@earth.li>**20091107120847
725 The old shell code apparently didn't work properly with /bin/sh=dash
726]
727[Update layout of error message slightly
728simonpj@microsoft.com**20091105120443
729 Ignore-this: 4761c9c79a6e200ab58f4d190eb4490e
730]
731[Fix #3642: m GHC builds using the Haskell Platform
732Simon Marlow <marlowsd@gmail.com>**20091105141310
733 Ignore-this: a6b08420a01cfe8ac39c28898fa3c9b8
734]
735[Fix some bugs to do with tools in paths containing spaces
736Simon Marlow <marlowsd@gmail.com>**20091104164343
737 Ignore-this: d3f00d3b1b14d59feccbb4585301c17a
738 Not everything is fixed yet; see #3642
739]
740[Always include libraries/dph/ghc.mk in top-level ghc.mk
741Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091104011908
742 Ignore-this: bb519641dd797cc674da8dcd1ea9dcec
743]
744[Accept any non-space characters in a header file (#3624)
745Simon Marlow <marlowsd@gmail.com>**20091106102319
746 Ignore-this: 1fc9156c2bcd767d6f231a56440cbeb4
747 The FFI spec doesn't say exactly which characters may occur in a
748 header file, so to be on the safe side we'll accept anything that
749 isn't a space.
750]
751[Fix the build
752Ian Lynagh <igloo@earth.li>**20091106204927]
753[Refactor package installation
754Ian Lynagh <igloo@earth.li>**20091103133322
755 There is now less makefile code duplication.
756 Also, stage2 packages are registered after GHC, which is important as
757 they might depend on the ghc package (as dph now does).
758]
759[Make installation on *nix work for paths with spaces in their name
760Ian Lynagh <igloo@earth.li>**20091105162300
761 This means we can remove some conditional stuff from the Makefiles,
762 and means the testsuite doesn't have to work out whether or not it's
763 on Windows.
764]
765[add '-' to the chars allowed in C header file names
766Simon Marlow <marlowsd@gmail.com>**20091104144032
767 Ignore-this: 8832e49d56a75fae9f1651c07954fb0c
768]
769[Fix non-portable regexp
770Roman Leshchinskiy <rl@cse.unsw.edu.au>**20091104011830
771 Ignore-this: aa396bdd0ca904ec59969a2e8ba24d64
772]
773[Fix Trac #3640, plus associated refactoring
774simonpj@microsoft.com**20091105165525
775 Ignore-this: cf1f4ea1e8b75b4909ab395907de9eb3
776 
777 In fixing this bug (to do with record puns), I had the usual rush of
778 blood to the head, and I did quite a bit of refactoring in the way
779 that duplicate/shadowed names are reported.
780 
781 I think the result is shorter as well as clearer.
782 
783 In one place I found it convenient for the renamer to use the ErrCtxt
784 carried in the monad.  (The renamer used not to have such a context,
785 but years ago the typechecker and renamer monads became one, so now it
786 does.)   So now it's availble if you want it in future.
787]
788[#3604: treat TH with -dynamic in the same way as -prof
789Simon Marlow <marlowsd@gmail.com>**20091104163039
790 Ignore-this: 2122ef7f452f4c3627fea8fe9d11a7f2
791 That is, you have to build the library/program without -dynamic first,
792 to get plain object files, and then build it again with -dynamic.
793 
794 I still need to check whether any changes to Cabal are required to
795 make this work.
796]
797[Update docs on ticky-ticky profiling
798Simon Marlow <marlowsd@gmail.com>**20091105101503
799 Ignore-this: 7cdcd80f83a1fa557b1b852f995b2d8a
800]
801[Finish #3439: -ticky implies -debug at link time; the ticky "way" has gone
802Simon Marlow <marlowsd@gmail.com>**20091104145507
803 Ignore-this: 9ca68e63bbc34c8f6f216efe27e259eb
804 
805 To get ticky profiling you still have to compile with -ticky (for
806 those modules that you want to profile), but you can link with either
807 -debug or -ticky.
808]
809[Allow -ticky and -prof together
810simonpj@microsoft.com**20091020155201
811 Ignore-this: cddba709acd29968e0517a398e99b49c
812 
813 The two used to be incompatible, but they aren't any longer.
814 
815 In fact, -ticky should not be a 'way' any more, and doing that
816 is on Simon M's todo list, but this patch takes us a little
817 step closer.
818 
819 I'm not sure this is worth merging to the 6.12 branch.
820]
821[GhciMonad.resume should restore the program's argv and progname
822Simon Marlow <marlowsd@gmail.com>**20091021125240
823 Ignore-this: 2ced5594fe32c2e3bc39dcbdabf04551
824 I discovered that single-stepping over getArgs gave the wrong answer
825 sometimes, because we were forgetting to set the program's argv and
826 progname when resuming at a breakpoint.
827 
828 Test is ghci.debugger/scripts/getargs.script.
829]
830[Minor change to captalisation in error message only
831simonpj@microsoft.com**20091102172236
832 Ignore-this: 65cb215b313658ccdff6304360b33e62
833]
834[Improve error message for malformed LANGUAGE pragma
835simonpj@microsoft.com**20091030180114
836 Ignore-this: 984eefd9c0978b837f79d0f1a72564b9
837]
838[Improve documentation of 'rec' in do-notation
839simonpj@microsoft.com**20091102172217
840 Ignore-this: ab639f7fc2ec658edf2371797d669f36
841 
842 Merge to 6.12 along with the main DoRec patch
843]
844[Document the fact that impredicative polymorphism is deprecated
845simonpj@microsoft.com**20091103133344
846 Ignore-this: a91b61dd99783d7ca9f823009667c23f
847 
848 Merge to 6.12
849]
850[Drop unused import
851simonpj@microsoft.com**20091028175902
852 Ignore-this: e473d30a9844ae0a6d124c9352e6be4
853]
854[Deprecate the ImpredicativeTypes feature
855simonpj@microsoft.com**20091030095929
856 Ignore-this: b5dadc6be7f0c7bcbbf3691079f41dfb
857 
858 GHC has had an experimental implementation of impredicative
859 polymorphism for a year or two now (flag -XImpredicativeTypes).
860 But
861 
862   a) The implementation is ridiculously complicated, and the complexity
863      is pervasive (in the type checker) rather than localized.
864      I'm very unhappy about this, especially as we add more stuff to
865      the type checker for type families.
866 
867   b) The specification (type system) is well-defined [1], but is also pretty
868      complicated, and it's just too hard to predict which programs will
869      typecheck and which will not.
870 
871 So it's time for a re-think.  I propose to deprecate it in 6.12, and
872 remove it altogether in 6.14.  We may by then have something else to
873 put in its place.  (There is no lack of candidates [2,3,4]!)
874 
875 [1] http://research.microsoft.com/en-us/um/people/simonpj/papers/boxy/
876 [2] http://research.microsoft.com/en-us/um/people/crusso/qml/
877 [3] http://research.microsoft.com/en-us/um/people/daan/pubs.html
878 [4] http://gallium.inria.fr/~remy/mlf/
879]
880[Fix formatting and wording in documentation of DoRec
881simonpj@microsoft.com**20091029114726
882 Ignore-this: ce528f2e73f38c244be4a38d83f52214
883]
884[Add 'rec' to stmts in a 'do', and deprecate 'mdo'
885simonpj@microsoft.com**20091028133554
886 Ignore-this: 7b77848c6283828869783ed61510ee1c
887 
888 The change is this (see Trac #2798).  Instead of writing
889 
890   mdo { a <- getChar
891       ; b <- f c
892       ; c <- g b
893       ; putChar c
894       ; return b }
895 
896 you would write
897 
898   do { a <- getChar
899      ; rec { b <- f c
900            ; c <- g b }
901      ; putChar c
902      ; return b }
903 
904 That is,
905   * 'mdo' is eliminated
906   * 'rec' is added, which groups a bunch of statements
907     into a single recursive statement
908 
909 This 'rec' thing is already present for the arrow notation, so it 
910 makes the two more uniform.  Moreover, 'rec' lets you say more
911 precisely where the recursion is (if you want to), whereas 'mdo' just
912 says "there's recursion here somewhere".  Lastly, all this works with
913 rebindable syntax (which mdo does not).
914 
915 Currently 'mdo' is enabled by -XRecursiveDo.  So we now deprecate this
916 flag, with another flag -XDoRec to enable the 'rec' keyword.
917 
918 Implementation notes:
919   * Some changes in Lexer.x
920   * All uses of RecStmt now use record syntax
921 
922 I'm still not really happy with the "rec_ids" and "later_ids" in the
923 RecStmt constructor, but I don't dare change it without consulting Ross
924 about the consequences for arrow syntax.
925]
926[Add flag -XExplicitForAll and document it
927simonpj@microsoft.com**20091007155251
928 Ignore-this: b61396beab4f6b47ce388c3aacf357ee
929 
930 This implements the Haskell Prime proposal
931   http://hackage.haskell.org/trac/haskell-prime/wiki/ExplicitForall
932 
933 Flag is -XExplicitForAll
934 
935 Implied by Opt_RankNTypes, Opt_Rank2Types, Opt_ScopedTypeVariables,
936            Opt_LiberalTypeSynonyms, Opt_ExistentialQuantification,
937            Opt_PolymorphicComponents
938 
939 
940]
941[Define BootingFromHc in bindists; fixes #3617
942Ian Lynagh <igloo@earth.li>**20091031084426
943 This variable is tested when deciding whether or not to add debug to
944 the list of RTS ways, so it needs to be correctly defined.
945]
946[Add ghc-cabal dependencies; fixes #3494
947Ian Lynagh <igloo@earth.li>**20091030211928]
948[Fix Trac #3626: TH should reject unboxed tuples
949simonpj@microsoft.com**20091030091928
950 Ignore-this: 409bacbcfb37b4d3dc75ecec71bcf484
951 
952 This was just a missing test in DsMeta
953]
954[Fix a dynamic linker bug that killed ghci on Snow Leopard
955Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20091029124159
956 Ignore-this: 67461b0969e3ff1b0d0c4f666ce473bc
957]
958[Tidy up the parsing of comprehensions and improve locations
959simonpj@microsoft.com**20091028133653
960 Ignore-this: e9da5f8a60eaa23bc1c037f9c075a18f
961 
962 While I was dealing with 'rec' statements I did this tidy-up
963]
964[Fix Trac #3591: very tricky specialiser bug
965simonpj@microsoft.com**20091023161551
966 Ignore-this: 705bf8d79fdf89b0a98f278de4303a8d
967   
968 There was a subtle bug in the interation of specialisation and floating,
969 described in Note [Specialisation of dictionary functions].
970   
971 The net effect was to create a loop where none existed before; plain wrong.
972   
973 In fixing it, I did quite a bit of house-cleaning in the specialiser, and
974 added a lot more comments.  It's tricky, alas.
975]
976[Improvements to the gcc wrapper
977Ian Lynagh <igloo@earth.li>**20091029115831
978 Add some comments and better error reporting
979]
980[Don't "set -e" in configure.ac
981Ian Lynagh <igloo@earth.li>**20091029010031
982 On some systems (bash 4?) configure fails because of it when
983 "gcc -V" fails.
984]
985[Add some &&s to configure
986Ian Lynagh <igloo@earth.li>**20091029010125
987 so if the "cd" fails we don't charge on regardless.
988]
989[Wrap gcc on Windows, to provide the -B flags
990Ian Lynagh <igloo@earth.li>**20091027202503]
991[Add restrictVarEnv :: VarEnv a -> VarSet -> VarEnv a
992simonpj@microsoft.com**20091023161735
993 Ignore-this: c32b91755afd1cce99817a251702ef08
994 
995 I needed it, and then didn't need it, so it's not currently
996 called, but its generally useful kind of thing.
997]
998[Use braces rather than angle-brackets in debug-printing for Bags
999simonpj@microsoft.com**20091023161631
1000 Ignore-this: 687f858714593153362f0227f59b92f7
1001]
1002[Fix Trac #3590: a nasty type-checker bug in left/right sections
1003simonpj@microsoft.com**20091020155540
1004 Ignore-this: ae831f2a7fe8416e2c549df7616f7139
1005 
1006 The bug related to the fact that boxyUnify (now) returns a coercion,
1007 which was simply being ignored.  (TcExpr is clearly not warning-free
1008 wrt the unused-monadic-bind thing!)
1009 
1010 Anyway, it's fine now.  I added a test case to the test suite.
1011 
1012 MERGE to 6.12 please.
1013]
1014[Escape some $s in makefiles for consistency
1015Ian Lynagh <igloo@earth.li>**20091025132625]
1016[Remove readline license info from OS X package
1017Ian Lynagh <igloo@earth.li>**20091024202858
1018 We no longer ship readline
1019]
1020[Fix a buglet in exprIsConApp_maybe
1021Ian Lynagh <igloo@earth.li>**20091024114616
1022 Patch from Simon Peyton Jones. He write:
1023 
1024 exprIsConApp_maybe was returning 'Just' even for an unsaturated constructor
1025 application.  This bit me in an experiment; although it doesn't seem to
1026 have been causing problems elsewhere.
1027 
1028 Committing this change to the 6.12 branch only; the HEAD is different
1029 because of the upcoming INLINE patch
1030]
1031[Document that lazy I/O now throws exceptions
1032Simon Marlow <marlowsd@gmail.com>**20091012154213
1033 Ignore-this: dbb7557e351694a988761cc51f4f8c8e
1034]
1035[findSpark: exit if there's a returning foreign call
1036Simon Marlow <marlowsd@gmail.com>**20091009152920
1037 Ignore-this: cd018bff306760486037da5a28def34d
1038]
1039[Tweak to the way per-source-file options are specified
1040Simon Marlow <marlowsd@gmail.com>**20091015122225
1041 Ignore-this: 851228ecab11c0c481f3eaca59a582ce
1042]
1043[Fix cross-reference
1044simonpj@microsoft.com**20091020074213
1045 Ignore-this: 68c6a73d8298c3f4f74a44123b5ab39b
1046]
1047[Add some manual dependencies, and -fforce-recomp for Constants and PrimOps
1048Simon Marlow <marlowsd@gmail.com>**20091015115120
1049 Ignore-this: fd82e37b27db6d4196a497674a20e92f
1050 GHC's recompilation checker doesn't take into account #included files,
1051 which is really a bug.  We work around it here by adding dependencies
1052 and using -fforce-recomp in a couple of places.
1053]
1054[Fix several missing dependencies in ifFreeNames
1055simonpj@microsoft.com**20091015120159
1056 Ignore-this: bab527d292e384a9bfd3fce3a8325e8d
1057 
1058 These missing dependencies led to:
1059   ghc-stage1: panic! (the 'impossible' happened)
1060   (GHC version 6.13 for x86_64-unknown-linux):
1061        urk! lookup local fingerprint ghc-6.13:CgBindery.CgBindings{tc r4Z}
1062 
1063 Simon and I don't quite understand why I've encountered these while
1064 no one else has, but they are certainly bugs, and this patch certainly
1065 fixes them.
1066 
1067 Merge to 6.12 branch
1068 
1069]
1070[Correct comment
1071simonpj@microsoft.com**20091015115546
1072 Ignore-this: e7da9f6067071c040bead3ce775eb33f
1073]
1074[Fix FFI declaration checks
1075Simon Marlow <marlowsd@gmail.com>**20091014140128
1076 Ignore-this: 9e91f3bf8fddf7a59f9eacbfa96bb763
1077 For GHCi, foreign labels should be allowed, but foreign export should
1078 be disallowed; both were previously wrong.
1079]
1080[Fixes for cross-compiling to a different word size
1081Simon Marlow <marlowsd@gmail.com>**20091014130612
1082 Ignore-this: f5f1769ae247a3eb735662ea90926f96
1083 This patch eliminates a couple of places where we were assuming that
1084 the host word size is the same as the target word size.
1085 
1086 Also a little refactoring: Constants now exports the types TargetInt
1087 and TargetWord corresponding to the Int/Word type on the target
1088 platform, and I moved the definitions of tARGET_INT_MAX and friends
1089 from Literal to Constants.
1090 
1091 Thanks to Barney Stratford <barney_stratford@fastmail.fm> for helping
1092 track down the problem and fix it.  We now know that GHC can
1093 successfully cross-compile from 32-bit to 64-bit.
1094]
1095[Fix install when various DOC variables are empty
1096Ian Lynagh <igloo@earth.li>**20091013101530]
1097[Fix install when INSTALL_LIBEXEC_SCRIPTS = ""
1098Ian Lynagh <igloo@earth.li>**20091013095243]
1099[Fix install when INSTALL_LIBEXECS = ""
1100Ian Lynagh <igloo@earth.li>**20091013093917
1101 This is the case on Windows (as we have no shell wrappers), and mingw's
1102 shell doesn't like an empty list of things in a "for" command.
1103]
1104[Fix Trac #3600: Template Haskell bug in Convert
1105simonpj@microsoft.com**20091020072616
1106 Ignore-this: 92992568a8380d7664318c506d78d09d
1107 
1108 This bug was introduced when I added an optimisation, described in
1109 Note [Converting strings] in Convert.lhs.  It was treating *all*
1110 empty lists as strings, not just string-typed ones!
1111 
1112 The fix is easy.  Pls MERGE to stable branch.
1113 
1114]
1115[Fix Trac #3263: don't print Hpc tick stuff unless -dppr-debug is on
1116simonpj@microsoft.com**20091015114437
1117 Ignore-this: 404c58c21b023adc85b7d8e2d2c884f7
1118 
1119 In general, when pretty-printing HsSyn, we omit the extra info added by GHC
1120 (type appplications and abstractions, etc) when printing stuff for the user.
1121 But we weren't applying that guideline to the HsTick stuff for Hpc.  This
1122 patch adds the necessary tests.
1123 
1124]
1125[Fix #3579: avoid clashing with names of implicit bindings
1126Simon Marlow <marlowsd@gmail.com>**20091014095153
1127 Ignore-this: c38978208ca629d63c311a86e6334ff9
1128]
1129[micro-opt: replace stmGetEnclosingTRec() with a field access
1130Simon Marlow <marlowsd@gmail.com>**20091014131727
1131 Ignore-this: 5ca954541072cdd9e91656400db81d52
1132 While fixing #3578 I noticed that this function was just a field
1133 access to StgTRecHeader, so I inlined it manually.
1134]
1135[Fix #3578: return a dummy result when an STM transaction is aborted
1136Simon Marlow <marlowsd@gmail.com>**20091014131619
1137 Ignore-this: f8c1d879a38a9eb7699cefb8d458770d
1138 (see comment for details)
1139]
1140[Do "set -e" in configure.ac
1141Ian Lynagh <igloo@earth.li>**20091023134122
1142 So if something configure does fails, so does the whole configur script
1143]
1144[Don't build PS/PDF docs when validating
1145Ian Lynagh <igloo@earth.li>**20091023143512
1146 dblatex with miktex under msys/mingw can't build the PS and PDF docs,
1147 and just building the HTML docs is sufficient to check that the
1148 markup is correct, so we turn off PS and PDF doc building when
1149 validating.
1150]
1151[Add a test to the unpulled patches in darcs-all
1152Ian Lynagh <igloo@earth.li>**20091023181521]
1153[Add a test in darcs-all for old bytestring repositories
1154Ian Lynagh <igloo@earth.li>**20091006203342]
1155[Explain why we check for LICENSE, not _darcs, in boot
1156Ian Lynagh <igloo@earth.li>**20091023174748]
1157[Make a mingw tree from mingw tarballs
1158Ian Lynagh <igloo@earth.li>**20091023174443]
1159[Check for failure when running wget
1160Ian Lynagh <igloo@earth.li>**20091020202516]
1161[Add tarball syncing to darcs-all
1162Ian Lynagh <igloo@earth.li>**20091014162948
1163 We now use it for libffi and the mingw tarballs
1164]
1165[The -e flag now has a "SepArg" argument; fixes #3568
1166Ian Lynagh <igloo@earth.li>**20091012134923
1167 This means -e must be separated from its argument by a space.
1168 It therefore doesn't try to parse "-exclude-module" as
1169 "execute xclude-module".
1170]
1171[Print warnings after doMkDependHS
1172Ian Lynagh <igloo@earth.li>**20091012132611
1173 We weren't printing any warning for a commandline like
1174     ghc -M Foo.hs -optdep--exclude-module=Bar -fffi
1175 but the last 2 flags are both deprecated.
1176]
1177[remove duplicate entry for -fwarn-unused-do-bind (#3576)
1178Simon Marlow <marlowsd@gmail.com>**20091012110216
1179 Ignore-this: a7fa8f53b223fe5abe8885b634edeae1
1180]
1181[fix markup
1182Simon Marlow <marlowsd@gmail.com>**20091012083656
1183 Ignore-this: 649ca712cbc361c1d6016d84d15e30d4
1184]
1185[Install libHSffi_p.a
1186Ian Lynagh <igloo@earth.li>**20091012101952]
1187[More README updates
1188Ian Lynagh <igloo@earth.li>**20091012095142]
1189[Update the README instructions for getting the source
1190Ian Lynagh <igloo@earth.li>**20091012094325]
1191[Make ghci work with libraries compiled with -ticky
1192simonpj@microsoft.com**20091008162752
1193 Ignore-this: 97d2d10fbc5fa21afb1076920c1aec66
1194 
1195 This is a follow up to the patch tha fixes Trac #3439.
1196 We had forgotten the dynamic linker, which needs to
1197 know all these ticky symbols too.
1198 
1199]
1200[Only make the Windows installer if ISCC is set
1201Ian Lynagh <igloo@earth.li>**20091010160246
1202 Now that we make bindists during validate, we can't assume that ISCC
1203 is available.
1204]
1205[Update the list of happy/alex-generated files put in sdists
1206Ian Lynagh <igloo@earth.li>**20091010021300]
1207[Remove the windres configure check, now that we use an in-tree windres
1208Ian Lynagh <igloo@earth.li>**20091008153244]
1209[Remove FP_MINGW_GCC now that we use an in-tree gcc
1210Ian Lynagh <igloo@earth.li>**20091008153412]
1211[Add the include files to bindists
1212Ian Lynagh <igloo@earth.li>**20091009215604]
1213[Tweak how bindistprep is created and cleaned
1214Ian Lynagh <igloo@earth.li>**20091009203803]
1215[When validating, run the testsuite with the bindisttest compiler
1216Ian Lynagh <igloo@earth.li>**20091009203125]
1217[Don't remake the bindist when validating with --testsuite-only
1218Ian Lynagh <igloo@earth.li>**20091009200955]
1219[Fix dependencies for the RTS
1220Simon Marlow <marlowsd@gmail.com>**20091006155059
1221 Ignore-this: 627b7552fa8b84a78f85d16c05d99d20
1222 Evac_thr.c and Scav_thr.c had no dependencies
1223]
1224[Packages are only shadowed if the InstalledPackageId is *different*
1225Simon Marlow <marlowsd@gmail.com>**20091006154940
1226 Ignore-this: dc1b9417bc4d75206a18e4ee979370ff
1227 If the two InstalledPackageIds are the same, then the packages are
1228 interchangeable and we don't need to explicitly remove one of them.
1229]
1230[Make the Windows installer in bindistprep/
1231Ian Lynagh <igloo@earth.li>**20091007131839]
1232[MERGED: Make the unpleasant sed one-liner less unpleasant
1233Ian Lynagh <igloo@earth.li>**20091007131648
1234 Matthias Kilian <kili@outback.escape.de>**20091007101239
1235]
1236[Update bin-package-db's Cabal dep
1237Ian Lynagh <igloo@earth.li>**20091006160633]
1238[follow changes in Distribution.Simple.PackageIndex API
1239Simon Marlow <marlowsd@gmail.com>**20091006131456
1240 Ignore-this: ae072de9e355b794a3a3222a34e0be48
1241]
1242[Add --supported-languages support to dummy-ghc
1243Ian Lynagh <igloo@earth.li>**20091004211035
1244 We used to call the bootstrapping compiler to get its --supported-languages
1245 but that doesn't work when it doesn't support all the extensions that we
1246 need. In particular, compiling the new bytestring which needs NamedFieldPuns
1247 broken when building with 6.8.2.
1248 There's now a rather ugly sed script to extract the extensions from
1249 DynFlags.hs.
1250]
1251[Update to the 0.9.1.5 bytestring release
1252Ian Lynagh <igloo@earth.li>**20091004184930]
1253[Make the bindist AC_INIT line match the main configure script's
1254Ian Lynagh <igloo@earth.li>**20091004103908
1255 This means that PACKAGE_TARNAME gets set, so the default docdir is
1256 correct.
1257]
1258[add missing id="ffi-prim"
1259Simon Marlow <marlowsd@gmail.com>**20091002151457
1260 Ignore-this: b3edbbee2de1c19440870e9ccf560bc7
1261]
1262[Fix typo in comment
1263Ian Lynagh <igloo@earth.li>**20091002212605]
1264[Don't build haddock if HADDOC_DOCS = NO, and disable HADDOC_DOCS if GhcWithInterpreter = NO
1265Matthias Kilian <kili@outback.escape.de>**20090920181319
1266 Ignore-this: 1268ae31d74e746b09287814ee435f65
1267 Haddock uses TcRnDriver.tcRnGetInfo, which is only available if
1268 GHCI is built. Set HADDOC_DOCS to NO if GhcWithInterpreter is NO,
1269 and disable the haddock build if HADDOC_DOCS = NO.
1270]
1271[Use INSTALL_DIR, not MKDIRHIER, when installing
1272Ian Lynagh <igloo@earth.li>**20091002152246]
1273[Fix pretty-printing precedence for equality constraints
1274simonpj@microsoft.com**20091002111549
1275 Ignore-this: 9c5347975db3d23bf64057c64cd7856f
1276]
1277[Document -XMonoLocalBinds
1278simonpj@microsoft.com**20091002111400
1279 Ignore-this: ed8b57fb02690d78fbee99961ed8ab1c
1280]
1281[Combine treatment of vanialla/GADT data decls, and fix assert failure
1282simonpj@microsoft.com**20091002072109
1283 Ignore-this: 392c4b36a5fd43b1c93122683abc0321
1284]
1285[Fix Trac #3540: malformed types
1286simonpj@microsoft.com**20090930104703
1287 Ignore-this: bbd5543b88e6beadd1a9ae9d0ebce15e
1288 
1289 Tidy up the way that predicates are handled inside types
1290 
1291]
1292[System.Console.Terminfo isn't available when bootstrapping.
1293Matthias Kilian <kili@outback.escape.de>**20090930212629
1294 Ignore-this: 4793dc492b4b5b11019f96e2325be9d2
1295]
1296[The Windows installer now needs to get its files from bindistprep/
1297Ian Lynagh <igloo@earth.li>**20090930224746]
1298[We no longer need to specify the gcc and ld location when validating
1299Ian Lynagh <igloo@earth.li>**20090930210502
1300 on Windows, as they are now in-tree
1301]
1302[Remove long rotted configure support for Windows DLLs
1303Ben.Lippmeier@anu.edu.au**20090926103610]
1304[Follow renaming of binary to ghc-binary.
1305Matthias Kilian <kili@outback.escape.de>**20090929212110
1306 Ignore-this: f28a7deafa283ef1c9c57ed38a90dbbf
1307]
1308[No need to use -split-objs with dynamic libraries
1309Simon Marlow <marlowsd@gmail.com>**20090929103811
1310 Ignore-this: ad0c08809191c99ff9d3bfce88b77aee
1311]
1312[Fix some missing unfoldings (foldr in particular!)
1313Simon Marlow <marlowsd@gmail.com>**20090929102745
1314 Ignore-this: 39c9b075f523e210cf4a5fb9db438d05
1315 
1316 The changes I made to the tidier recently introduced a serious
1317 regression: the unfoldings for bindings in a recursive group were
1318 sometimes lost, because we were looking at Id occurrences rather than
1319 Id binders, and the occurrences of recursive Ids do not necessarily
1320 have unfoldings attached.
1321]
1322[Don't put library tarballs etc in the GHC source tarballs
1323Ian Lynagh <igloo@earth.li>**20090929152952]
1324[Switch to a released haskeline tarball
1325Ian Lynagh <igloo@earth.li>**20090929144953]
1326[Don't install haskeline/mtl/terminfo, and hide ghc-binary
1327Ian Lynagh <igloo@earth.li>**20090929144324]
1328[Rename binary to ghc-binary
1329Ian Lynagh <igloo@earth.li>**20090929124617]
1330[Fix making Windows bindist and installer
1331Ian Lynagh <igloo@earth.li>**20090929012717]
1332[emitRetUT: cope with arguments overlapping with results (#3546)
1333Simon Marlow <marlowsd@gmail.com>**20090928124455
1334 Ignore-this: 899c4be65a7c31d05bf5e79ea423147e
1335 
1336 In decodeFloat_Int# we have the C-- code:
1337 
1338     mp_tmp1  = Sp - WDS(1);
1339     mp_tmp_w = Sp - WDS(2);
1340     
1341     /* arguments: F1 = Float# */
1342     arg = F1;
1343     
1344     /* Perform the operation */
1345     foreign "C" __decodeFloat_Int(mp_tmp1 "ptr", mp_tmp_w "ptr", arg) [];
1346     
1347     /* returns: (Int# (mantissa), Int# (exponent)) */
1348     RET_NN(W_[mp_tmp1], W_[mp_tmp_w]);
1349 
1350 Which all looks quite reasonable.  The problem is that RET_NN() might
1351 assign the results to the stack (with an unregisterised back end), and
1352 in this case the arguments to RET_NN() refer to the same stack slots
1353 that will be assigned to.
1354 
1355 The code generator should do the right thing here, but it wasn't - it
1356 was assuming that it could assign the results sequentially.  A 1-line
1357 fix to use emitSimultaneously rather than emitStmts (plus comments).
1358]
1359[fix cut-and-paste bugs in .cmm -> .hc/.s rules
1360Simon Marlow <marlowsd@gmail.com>**20090928115139
1361 Ignore-this: fe9a834cb94b53c7d4d6dc238c0d348d
1362]
1363[Add a way to generate tracing events programmatically
1364Simon Marlow <marlowsd@gmail.com>**20090925150243
1365 Ignore-this: 7f17f3474b06a1fb4a527c62e003e7aa
1366 
1367 added:
1368 
1369  primop  TraceEventOp "traceEvent#" GenPrimOp
1370    Addr# -> State# s -> State# s
1371    { Emits an event via the RTS tracing framework.  The contents
1372      of the event is the zero-terminated byte string passed as the first
1373      argument.  The event will be emitted either to the .eventlog file,
1374      or to stderr, depending on the runtime RTS flags. }
1375 
1376 and added the required RTS functionality to support it.  Also a bit of
1377 refactoring in the RTS tracing code.
1378]
1379[Run bindisttest when validating
1380Ian Lynagh <igloo@earth.li>**20090928173323]
1381[Follow bindist changes in bindisttest
1382Ian Lynagh <igloo@earth.li>**20090927215031
1383 Also add support for testing the bindistprep tarball, for when we are
1384 validating.
1385]
1386[More bindist tweaking
1387Ian Lynagh <igloo@earth.li>**20090927212114]
1388[Add a $(MAKE_RESTARTS) check to ghc.mk
1389Ian Lynagh <igloo@earth.li>**20090927202603
1390 This should catch make going into an infinite loop.
1391]
1392[Don't use absolute paths unnecessarily when making bindists
1393Ian Lynagh <igloo@earth.li>**20090927193528]
1394[Change where bindists are made
1395Ian Lynagh <igloo@earth.li>**20090927191740
1396 We now do all the hard work in a bindistprep subdirectory, and just move
1397 the result to the root directory. This way we can delete anything in
1398 bindistprep/ without worrying about deleting anything important.
1399]
1400[Fix building of the RTS with the NCG under Windows
1401Ben.Lippmeier@anu.edu.au**20090926075507]
1402[Use $topdir in the RTS's package.conf file when doing a relocatable build
1403Ian Lynagh <igloo@earth.li>**20090927145309]
1404[Fix invoking windres in a directory containing spaces
1405Ian Lynagh <igloo@earth.li>**20090927144119]
1406[Add support for relocatable builds in the new build system
1407Ian Lynagh <igloo@earth.li>**20090927010605]
1408[Update the OS X package build scripts
1409Ian Lynagh <igloo@earth.li>**20090925132151
1410 The docs are no longer built and installed separately.
1411]
1412[Make some sed more portable: Use \{0,1\} instead of \?
1413Ian Lynagh <igloo@earth.li>**20090924171025]
1414[We now tell the linker macosx_version_min is 10.5; trac #3521
1415Ian Lynagh <igloo@earth.li>**20090924162450
1416 We used to say 10.3, but this gives
1417     -rpath can only be used when targeting Mac OS X 10.5 or later
1418 when building shared libraries.
1419 Patch from mwotton.
1420]
1421[Errors talking about a left section should refer to the "first" argument
1422Ian Lynagh <igloo@earth.li>**20090924124128
1423 rather than the "second" argument. Fixes trac #3505.
1424]
1425[Make count_lines work with the new directory layout
1426Ian Lynagh <igloo@earth.li>**20090923182251]
1427[Add count_lines back into the repo
1428Ian Lynagh <igloo@earth.li>**20090923174945]
1429[Remove a haskeline release note that doesn't apply to ghci
1430Ian Lynagh <igloo@earth.li>**20090923145130
1431 Spotted by Judah.
1432]
1433[fix warnings
1434Simon Marlow <marlowsd@gmail.com>**20090923125059
1435 Ignore-this: 6cc0a727c7a55a5bf79b0190c47666de
1436]
1437[Add erf, erfc, erfff, erfcf (#3536)
1438Simon Marlow <marlowsd@gmail.com>**20090923105240
1439 Ignore-this: 4c90186bf779bec6b9c72e2989a1876a
1440]
1441[Various updates/additions
1442Simon Marlow <marlowsd@gmail.com>**20090923094647
1443 Ignore-this: 7551a50a3f7723f21bc8c17e4c827764
1444]
1445[Document -package-id, and use the term "package ID" consistently
1446Simon Marlow <marlowsd@gmail.com>**20090923094639
1447 Ignore-this: 234a5a2840b7a9608c9a5d4bc475080f
1448]
1449[Make it so that -Ds implies -ls
1450Simon Marlow <marlowsd@gmail.com>**20090923105119
1451 Ignore-this: 52662a8e69ff4b8e8d9a07e4ca3e181
1452]
1453[remove "touch %_hsc.c" - what was it for?
1454Simon Marlow <marlowsd@gmail.com>**20090921155720
1455 Ignore-this: 48d5d7ad35e1f2bdcebf4e197d46c609
1456]
1457[Set the version number to 6.12.0
1458Ian Lynagh <igloo@earth.li>**20090922105641]
1459[TAG 6.12-branch created
1460Ian Lynagh <igloo@earth.li>**20090922104027]
1461Patch bundle hash:
14629e1c05c7bd97ae0327d2fd39e2e799421d36ff9c