New patches: [Make HsRecordBinds a data type instead of a synonym. lennart@augustsson.net**20070204015905] { hunk ./compiler/deSugar/Coverage.lhs 413 -addTickHsRecordBinds pairs = mapM process pairs +addTickHsRecordBinds (HsRecordBinds pairs) = liftM HsRecordBinds (mapM process pairs) hunk ./compiler/deSugar/DsExpr.lhs 432 -dsExpr (RecordCon (L _ data_con_id) con_expr rbinds) +dsExpr (RecordCon (L _ data_con_id) con_expr (HsRecordBinds rbinds)) hunk ./compiler/deSugar/DsExpr.lhs 480 -dsExpr (RecordUpd record_expr [] record_in_ty record_out_ty) +dsExpr (RecordUpd record_expr (HsRecordBinds []) record_in_ty record_out_ty) hunk ./compiler/deSugar/DsExpr.lhs 483 -dsExpr expr@(RecordUpd record_expr rbinds record_in_ty record_out_ty) +dsExpr expr@(RecordUpd record_expr (HsRecordBinds rbinds) record_in_ty record_out_ty) hunk ./compiler/deSugar/DsMeta.hs 533 -repE (RecordCon c _ flds) +repE (RecordCon c _ (HsRecordBinds flds)) hunk ./compiler/deSugar/DsMeta.hs 537 -repE (RecordUpd e flds _ _) +repE (RecordUpd e (HsRecordBinds flds) _ _) hunk ./compiler/hsSyn/Convert.lhs 367 - ; return $ RecordCon c' noPostTcExpr flds' } + ; return $ RecordCon c' noPostTcExpr (HsRecordBinds flds') } hunk ./compiler/hsSyn/Convert.lhs 370 - ; return $ RecordUpd e' flds' placeHolderType placeHolderType } + ; return $ RecordUpd e' (HsRecordBinds flds') placeHolderType placeHolderType } hunk ./compiler/hsSyn/HsExpr.lhs 557 -type HsRecordBinds id = [(Located id, LHsExpr id)] +data HsRecordBinds id = HsRecordBinds [(Located id, LHsExpr id)] hunk ./compiler/hsSyn/HsExpr.lhs 560 -recBindFields rbinds = [unLoc field | (field,_) <- rbinds] +recBindFields (HsRecordBinds rbinds) = [unLoc field | (field,_) <- rbinds] hunk ./compiler/hsSyn/HsExpr.lhs 563 -pp_rbinds thing rbinds +pp_rbinds thing (HsRecordBinds rbinds) hunk ./compiler/parser/Parser.y.pp 1312 - (reverse $3); + $3; hunk ./compiler/parser/Parser.y.pp 1538 - : fbinds1 { $1 } - | {- empty -} { [] } + : fbinds1 { HsRecordBinds (reverse $1) } + | {- empty -} { HsRecordBinds [] } hunk ./compiler/parser/Parser.y.pp 1541 -fbinds1 :: { HsRecordBinds RdrName } +fbinds1 :: { [(Located id, LHsExpr id)] } hunk ./compiler/parser/RdrHsSyn.lhs 707 - RecordCon c _ fs -> mapM checkPatField fs >>= \fs -> - return (ConPatIn c (RecCon (map (uncurry mkRecField) fs))) + RecordCon c _ (HsRecordBinds fs) -> mapM checkPatField fs >>= \fs -> + return (ConPatIn c (RecCon (map (uncurry mkRecField) fs))) hunk ./compiler/parser/RdrHsSyn.lhs 875 -mkRecConstrOrUpdate exp loc fs@(_:_) +mkRecConstrOrUpdate exp loc fs@(HsRecordBinds (_:_)) hunk ./compiler/parser/RdrHsSyn.lhs 877 -mkRecConstrOrUpdate _ loc [] +mkRecConstrOrUpdate _ loc (HsRecordBinds []) hunk ./compiler/rename/RnExpr.lhs 231 -rnExpr (RecordCon con_id _ rbinds) +rnExpr (RecordCon con_id _ (HsRecordBinds rbinds)) hunk ./compiler/rename/RnExpr.lhs 234 - returnM (RecordCon conname noPostTcExpr rbinds', + returnM (RecordCon conname noPostTcExpr (HsRecordBinds rbinds'), hunk ./compiler/rename/RnExpr.lhs 237 -rnExpr (RecordUpd expr rbinds _ _) +rnExpr (RecordUpd expr (HsRecordBinds rbinds) _ _) hunk ./compiler/rename/RnExpr.lhs 240 - returnM (RecordUpd expr' rbinds' placeHolderType placeHolderType, + returnM (RecordUpd expr' (HsRecordBinds rbinds') placeHolderType placeHolderType, hunk ./compiler/typecheck/TcExpr.lhs 385 -tcExpr expr@(RecordUpd record_expr rbinds _ _) res_ty +tcExpr expr@(RecordUpd record_expr hrbinds@(HsRecordBinds rbinds) _ _) res_ty hunk ./compiler/typecheck/TcExpr.lhs 407 - upd_field_lbls = recBindFields rbinds + upd_field_lbls = recBindFields hrbinds hunk ./compiler/typecheck/TcExpr.lhs 419 - (badFieldsUpd rbinds) `thenM_` + (badFieldsUpd hrbinds) `thenM_` hunk ./compiler/typecheck/TcExpr.lhs 460 - tcRecordBinds con1 con1_arg_tys' rbinds `thenM` \ rbinds' -> + tcRecordBinds con1 con1_arg_tys' hrbinds `thenM` \ rbinds' -> hunk ./compiler/typecheck/TcExpr.lhs 1052 -tcRecordBinds data_con arg_tys rbinds +tcRecordBinds data_con arg_tys (HsRecordBinds rbinds) hunk ./compiler/typecheck/TcExpr.lhs 1054 - ; return (catMaybes mb_binds) } + ; return (HsRecordBinds (catMaybes mb_binds)) } hunk ./compiler/typecheck/TcHsSyn.lhs 650 -zonkRbinds env rbinds - = mappM zonk_rbind rbinds +zonkRbinds env (HsRecordBinds rbinds) + = mappM zonk_rbind rbinds >>= return . HsRecordBinds } Context: [Warning police: "%p" format expects a void* sven.panne@aedion.de**20070203123141] [Comments only simonpj@microsoft.com**20070202233750] [Fix a pair of classic, but tricky, bugs in the type matcher; exposed by a program from Roman simonpj@microsoft.com**20070202233634] [One more wibble to FloatOut, fixes HEAD breakage (I hope) simonpj@microsoft.com**20070202225348] [clarify that -main-is sets main module and function andrew.pimlott.ctr@metnet.navy.mil**20070131223921] [Don't dump floated bindings just outside a lambda simonpj@microsoft.com**20070202155452 We do not want the FloatOut pass to transform f = \x. e to f = let lvl = ... in \x.e The arity pinned on f isn't right any more; and see Note [Floating out of RHSs]. Core Lint is now spotting the arity lossage (for a letrec), which is how I spotted this bug. I also re-jigged the code around floatBind; it's a bit tidier now. ] [Reset the demand info on bindings going to top level (since they cannot be strict) simonpj@microsoft.com**20070202151206] [Record arity of the worker, to maintain consistency of arity and strictness information (checked by Lint) simonpj@microsoft.com**20070202151051] [Extend the local bindings at a breakpoint with one for the wrapped expression Pepe Iborra **20070202112629 By popular request, in a breakpoint it is possible now to inspect the result of the expression wrapped by the breakpoint. The user interface for this is right now preliminar; there is a new binding called '_result' at every breakpoint. Suggestions are welcome! ] [Refactoring of DsBreakpoint.hs Pepe Iborra **20070202105907] [Fix imports Pepe Iborra **20070202100502] [Warning police: Avoid warning about unused variable sven.panne@aedion.de**20070201150839] [Adhere to the new GNU Coding Standards, avoiding a warning with autoconf 2.59c and later sven.panne@aedion.de**20070201134243] [chmod +x install-sh, see bug #978 Simon Marlow **20070201131125] [some dynamic flags cannot be used with OPTIONS_GHC, e.g. -i, -package Simon Marlow **20070201124058 fixes #1108 ] [Partial fix for #926 Simon Marlow **20070201114047 It seems that when a program exits with open DLLs on Windows, the system attempts to shut down the DLLs, but it also terminates (some of?) the running threads. The RTS isn't prepared for threads to die unexpectedly, so it sits around waiting for its workers to finish. This bites in two places: ShutdownIOManager() in the the unthreaded RTS, and shutdownCapability() in the threaded RTS. So far I've modified the latter to notice when worker threads have died unexpectedly and continue shutting down. It seems a bit trickier to fix the unthreaded RTS, so for now the workaround for #926 is to use the threaded RTS. ] [Always pay attention to -keep-tmp-files when we want to delete files Ian Lynagh **20070131151058] [Slight refactoring for overloaded strings simonpj@microsoft.com**20070131150701] [Use Id.isStrictId simonpj@microsoft.com**20070131150616] [Two new warnings: arity differing from demand type, and strict IDs at top level Kirsten Chevalier **20070129225533 I added two new Core Lint checks in lintSingleBinding: 1. Check that the id's arity is equal to the number of arguments in its demand type, if it has a demand type at all (i.e., if demand analysis already happened). 2. Check that top-level or recursive binders aren't demanded. ] [Fix typo causing the PowerPC OS X build to fail Ian Lynagh **20070131120153] [Fix typo Ian Lynagh **20070131112724] [BugFix: do not insert breakpoints around expressions with unlifted kind Pepe Iborra **20070131102821 I have added a check, and while there removed a few kludges in my code. Kudos to -dcore-lint for uncovering this. I think that this restriction could be lifted, if GHC.Base.breakpoint could have kind ?? -> ??. But is this a legal type? Does not look so to me. ] [Fix a typo Pepe Iborra **20070131104001] [Add note about Template Haskell and mutual recursion simonpj@microsoft.com**20070131091451] [Fix Trac #1122; spot absence of TyCon in data/newtype header simonpj@microsoft.com**20070130161330] [Fix for #936 Simon Marlow **20070130101306 We must traverse dependencies recursively if we encounter any [boot] modules in the dependencies. ] [fix bug in GetLastError/SetLastError patch Simon Marlow **20070129124559] [Fix GHCi on PowerPC OS X Ian Lynagh **20070128213216 David Kirkman and Peter Tanski noticed that a line had been removed during a patch merge which meant that oc->image pointed to the wrong place and ultimately caused an error from realloc. ] [Save the Win32 error code where necessary Simon Marlow **20070126162620 Similarly to the way we save errno across context switches and suspendThread/resumeThread, we must save and restore the Win32 error code via GetLastError()/SetLastError(). Fixes #896. ] [Comments and layout only simonpj@microsoft.com**20070125125448] [Add -stdout-binary and -stderr-binary flags to bypass dos2unix Simon Marlow **20070123123843 Apparently some versions of dos2unix can detect a binary file and ignore it, but others can't, so provide a way to tell runstdtest that the output is in binary. ] [Document the overloaded string extension. lennart@augustsson.net**20070120161436] [Add support for overloaded string literals. lennart@augustsson.net**20061221210147 The class is named IsString with the single method fromString. Overloaded strings work the same way as overloaded numeric literals. In expressions a string literals gets a fromString applied to it. In a pattern there will be an equality comparison with the fromString:ed literal. Use -foverloaded-strings to enable this extension. ] [Improve presentation of :print output Pepe Iborra **20070121110610] [Comments only Pepe Iborra **20070121110344] [Refactoring of Debugger.hs Pepe Iborra **20070121105909 A big motivation to start with it was getting several independently useful functions out of the Ghci monad and into the IO monad instead. Working in debugger integration for Emacs via the ghc-api is helping me to improve reusability.. While I was there, I tried to make the code less tangled, easier to understand, switched from implicit Exceptions to explicit Eithers in the bkptTable code, etc. ] [Fix a bug in the closure viewer Pepe Iborra **20070120201105] [Add obtainTerm1 to the GHC api Pepe Iborra **20070120185249] [Reorganizing my mess a bit Pepe Iborra **20070107211240] [Tweak hc-build Ian Lynagh **20070119220850 Touch all the object files at the end of hc-build, as otherwise make gets upset as the .h files are newer than them and tries to rebuild stuff (and fails). Print a nice message when we're finished. ] [User's guide: length is not a good consumer anymore. Spencer Janssen **20070104075243] [Don't start a GHC session before answering --version/--numeric-version Ian Lynagh **20070119155231 This also fixes bootstrapping issues, as when bootstrapping we don't have a package.conf when we run configure, so it fails to work out what version of GHC it is which causes breakage later on. ] [prettifying Cmm: print MachOps as identifiers by replacing ' ' with '_' mrchebas@gmail.com**20070117133234] [prettifying Cmm a bit: convert (x + (-N)) to (x - N) mrchebas@gmail.com**20070117130037] [addition to "Eagerly raise a blocked exception" to fix unreg case Simon Marlow **20070117095944] [Remove special lambda unicode character, it didn't work anyway Simon Marlow **20070116161100 Since lambda is a lower-case letter, it's debatable whether we want to steal it to mean lambda in Haskell source. However if we did, then we would probably want to make it a "special" symbol, not just a reserved symbol, otherwise writing \x->... (using unicode characters of course) wouldn't work, because \x would be treated as a single identifier, you'd need a space. ] [allow 'ghci -threaded' (fixes #1101) Simon Marlow **20070116120409] [Check with sysconf _POSIX_THREAD_CPUTIME is available before we try to use it. Ian Lynagh **20070116012907 Calling clock_gettime(CLOCK_THREAD_CPUTIME_ID,_) regardless was causing a segfault (trac #1030). ] [Give -fwrapv to gcc when it supports it Ian Lynagh **20070115194250 Fixes trac #952: Haskell requires consistent overflow behaviour, which gcc doesn't give without this flag. ] [Fix ghc-pkg now showError has been removed Ian Lynagh **20070115124441] [Documentation for the new ':breakpoint continue' command Pepe Iborra **20070115095643] [Add TcGadt to package.conf Pepe Iborra **20070114130853 I'm assuming that this was overlooked during the System Fc overhaul If TcGadt is not supposed to be in package.conf please rollback this patch ] [Add a header for GhciMonad.hs Pepe Iborra **20070114130815] [Remove a false assertion Pepe Iborra **20070112144040] [Too agressive breakpoint coalescing politics Pepe Iborra **20070111172555] [Fix an obscure bug in rule-matching simonpj@microsoft.com**20070113220425 This bug is the cause of Trac #1092. The fix is easy by making the RnEnv2 implementation do the right thing. See Note [rnBndrLR] in VarEnv. Test case is simplCore/should_compile/rule1 ] [Add a warning for tabs in source files Ian Lynagh **20070112164732] [expand $topdir in the output of 'ghc-pkg field' Simon Marlow **20070109170019 this fixed #937, and gets us further towards 'setup haddock' working for Cabal on Windows. ] [Remove bogus assertion in getCallMethod Kirsten Chevalier **20070111172501 With my as-yet-uncommitted changes to the demand analyzer, code got generated for some programs that caused this assertion to fail. The transformation I was doing was correct; it was the assertion that wasn't. So, the assertion is removed. This is actually Simon PJ's patch rather than mine, but I noticed that it wasn't checked in and it seems completely safe to do so. ] [Fixed .spec file (no building guide anymore) sven.panne@aedion.de**20070111162956] [An object code module in ghci is not and cannot be handled by the GHCi debugger Pepe Iborra **20070111145634 This patch should provide more informative messages to the user ] [Comments only Pepe Iborra **20070111131431] [Added the new :breakpoint continue option Pepe Iborra **20070111131359 Previously, when in a breakpoint, :quit was used to continue execution. This is not the right thing to do, so this patch restores :quit to its original meaning whether or not ghci is in an inferior session. The continue behavior is now provided by ":breakpoint continue". I added a synonim command in :continue because it is much shorter, but this is optional ] [:cd is a top level only command, that is, not allowed in inferior ghci sessions Pepe Iborra **20070111131156] [Wibble simonpj@microsoft.com**20070111131423] [Slightly improve -ddump-hi-diffs output simonpj@microsoft.com**20070111131226] [Avoid duplicate defns of 'main' in module Main simonpj@microsoft.com**20070111131029] [Add -ddump-rule-firings simonpj@microsoft.com**20070111130804] [Comments simonpj@microsoft.com**20070111085331] [Correct spelling simonpj@microsoft.com**20070110133324] [Sort rules and instances lexicographically in interface files simonpj@microsoft.com**20070110124327 We should sort rules and instances lexicographically, not by Unique, in interface files, else we get unnecessary "rules changed" and hence unnecessary recompilation. This bug has been there since the interface-file upheaval that put Names into IfaceSyn. ] [This patch teaches ghci to announce that a module has beeen loaded in debugging mode Pepe Iborra **20070111112351 Usually ghci announces when a module has been loaded interpreted. Now it will also announce it when the module has been instrumented for debugging ] [Fix some text in the GHCi help message that was going over 80 columns Pepe Iborra **20070111111742] [Comments only Pepe Iborra **20070111111707] [Comments only simonpj@microsoft.com**20070111091623] [Make the LiberateCase transformation understand associated types simonpj@microsoft.com**20070111091533 Consider this FC program: data family AT a :: * data instance AT Int = T1 Int Int f :: AT Int -> Int f t = case t of DEFAULT -> We'd like to replace the DEFAULT by a use of T1, so that if we scrutinise t inside we share the evaluation: f t = case (t `cast` co) of T1 x y -> I decided to do this as part of the liberate-case transformation, which is already trying to avoid redundant evals. The new transformation requires knowledge of the family instance environment, so I had to extend ModGuts to carry the fam_inst_env, and put that envt into the liberate-case environment. Otherwise it's all pretty straightforward. ] [Add comments about invariants simonpj@microsoft.com**20070111091003] [Comments simonpj@microsoft.com**20070111090922] [Comments simonpj@microsoft.com**20070111090837] [Add the function TypeRep.pprTypeApp, and use it simonpj@microsoft.com**20070111090704 pprTypeApp :: SDoc -> [Type] -> SDoc pprTypeApp pp tys = hang pp 2 (sep (map pprParendType tys)) ] [Log message for: Fix a nasty recursive loop in typechecking interface files simonpj@microsoft.com**20070111090252 (Alas, Darcs failed to record my log-message for the above patch, so this patch is an attempt to add the log message retrospectively.) Roman found a case where the type-checker for interface files would go into a loop. Here it is: module BarAT where class Foo a where data FooT a :: * int :: FooT a -> Int module Baz where import BarAT foo :: FooT Int -> Int foo = foo The trouble turned out to be that Foo gives rise to a *newtype*, and using a newtpe caused a little bit too much strictness in BuildTyCl.mkNewTyConRhs. Specifically, mkNewTypeCoercion did pattern matching, which forced the call to eta_reduce in mkNewTyConRhs. This is all too delicate really. But for now I've fixed the bug, and added an explanatory comment. I'll add a test for it, in indexed-types/should_compile/ATLoop ] [Log-message for: Improve command-line parser (add OptIntSuffix); make -fliberate-case-threshold dynamic simonpj@microsoft.com**20070111090123 (Alas, Darcs failed to record my log-message for the above patch, so this patch is an attempt to add the log message retrospectively.) Parsing options numeric arguments, such as -fliberate-case-threshold=30 for dynamic flags wasn't being handled well. I elaborated the command-line parser to have a new constructor, OptIntSuffix, for this case, and did the consequential changes. This patch also makes the -fliberate-case-threshold flag into a dynamic flag. ] [Improve command-line parser (add OptIntSuffix); make -fliberate-case-threshold dynamic simonpj@microsoft.com**20070111084851] [Remove redundant import simonpj@microsoft.com**20070111084702] [Add comments (AT-related) simonpj@microsoft.com**20070111084645] [Spelling correction only simonpj@microsoft.com**20070111084521] [Fix a nasty recursive loop in typechecking interface files simonpj@microsoft.com**20070111082950] [Update comments simonpj@microsoft.com**20070111082907] [Changing bootstrapping for pipes between debugger and debuggee andy@galois.com**20070110202635 - Now we use two pipes and a fork rather than use named pipes - We use the HPCRIX env var to send the pipe numbers in %d:%d format - We now always breakpoint for special events - We check to see we are the original process before each breakpoint event sub processes are not debugged; this lets us debug the debugger. ] [Dynamically allocating the tix box breakpoint array andy@galois.com**20070109194631] [Adding command channel for the hpc debugger to the hpc part of the RTS andy@galois.com**20070109194011] [checkTauTvUpdate: take synonym families into account Manuel M T Chakravarty **20070110184451] [remove old building guide, change links to point to the wiki Simon Marlow **20070110161112] [Fix apparently-long-standing bug in FloatIn simonpj@microsoft.com**20070110111344 The float-in pass wasn't doing the right thing when you have let x{rule mentions y} = rhs in body It allowed a binding mentioning y to float into the body, which is obviously wrong. I think this bug has been there a long time; I don't really know why it has not come up before. It showed up when compiling Text.Regex.Base.Context with WAY=p in package regex-base. ] [Comments only simonpj@microsoft.com**20070110111331] [Handle synonym families in check_tau_type Manuel M T Chakravarty **20070109215541] [Preserve rigidity for GADTs when typechecking explicit tuples simonpj@microsoft.com**20070109135314] [Fix egregious bug in implication constraints simonpj@microsoft.com**20070109134719 Build an implication constraint if there is a non-trivial refinement, even if there are no other 'given' constraints. Test = gadt/set.hs ] [reorganise text in the "using packages" section Simon Marlow **20070109091758 ] [Unbreak usage of ASSERTM Pepe Iborra **20070109074258] [When setting stdout and stderr to NoBuffering in GHCi, do stdin too. Ian Lynagh **20070108162838 Fixes trac #929. Merge to 6.6 branch. ] [fix version checking of .hi files Simon Marlow **20070108151006 I broke it during my recent interface-file overhaul ] [Have the splitter duplicate the .note.GNU-stack Ian Lynagh **20070108125916] [Have the mangler keep .note.GNU-stack Ian Lynagh **20070108122642] [Try to emulate the output of 'deriving Show' in the Term pretty printer Pepe Iborra **20070107204319 ] [Extended the debugger documentation with a 'tips' section Pepe Iborra **20070107191227] [More informative message in a breakpoint Pepe Iborra **20070106100736] [Reload modules after ':break stop' Pepe Iborra **20070106100509 This is necessary to revert CAFs. Previously to this patch the user would get a msg "You may need to reload your modules". This patch takes care of that ] [Remove a tracing statement, change a comment, and make more obvious an unexpected condition Pepe Iborra **20070105174858] [Improved an error message, giving a more concrete suggestion Pepe Iborra **20070105174525] [This patch fixes ticket #1083 in the ghci debugger Pepe Iborra **20070105173851 A module loaded under debugging mode but owning no breakpoints was erroneously identified by ghci as a non-under debugging module, producing a confusing error msg when the user tried to set a breakpoint The fix inserts an empty list of sites in the module-sites dictionary used by the debugger ] [Updates to the ghci debugger docs Pepe Iborra **20061231132844] [Fixed errors in "clunky" definition for pattern guards ijones@syntaxpolice.org**20070107215249 Amusingly, this little error in the GHC manual came from the original SPJ proposal for pattern guards from 1997 and even slipped into the Haskell Workshop 2000 paper by SPJ and Martin Erwig. It's almost 10 years old. ] [Remove the DocEntity type. Fixes the problem with duplicate error messages at davve@dtek.chalmers.se**20070105174346 its root. Also gets rid of the getDeclMainBinder function which isn't needed anylonger. ] [Eagerly raise a blocked exception when entering 'unblock' or exiting 'block' Simon Marlow **20070105135715 This fixes #1047 ] [wrap Main.main in GHC.TopHandler.runIOFastExit Simon Marlow **20070105114608 This is so that exceptions raised by Main.main do exactly the same thing as they would in a compiled program, including writing the message to stderr and shutting down with the correct exit code. ] [disable an incorrect ASSERTion in the non-THREADED_RTS case (bug #1067) Simon Marlow **20070105123403] [HsSyn clean up for indexed types Manuel M T Chakravarty **20070105012619 - This patch cleans up the HsSyn representation of type family declarations. - The new representation is not only less delicate, it also simplified teh code a bit. - I took the opportunity of stream lining the terminology and function names at the same time. - I also updated the description on the wiki at ] [Fix and improve deriving for indexed data types Manuel M T Chakravarty **20070104013156 - The test for being able to derive the requested classes needs to be made with the representation tycon (not the family tycon). - Standalone deriving for indexed types requires the instance types in the derive clause to match a data/newtype instance exactly (modulo alpha). ] [Record-ise the liberate-case envt, in preparation for new stuff simonpj@microsoft.com**20070103175932] [Add a type synonym for FamInstEnvs simonpj@microsoft.com**20070103175913] [Comments only simonpj@microsoft.com**20070103175638] [Comments only simonpj@microsoft.com**20070103175558] [Be more relaxed about reporting ambiguous class methods simonpj@microsoft.com**20070103160703 (MERGE to STABLE branch, pls) This patch makes us a bit more relaxed about ambiguous class method types. See tc223 for an example. Reported by Yitzchak Gale ] [Fix bug in cast optimisation; fixes Trac #995 simonpj@microsoft.com**20070103153530 There was a plain bug in the cast-optimiation code -- a call to splitCoercionKind_maybe instead of coercionKind! Result was that we missed useful opportunities to move casts around. Trac #995 is an example, but I bet there are more. ] [Fix stupid error in rehashing TcRnDriver (fixes TH test errors) simonpj@microsoft.com**20070103121540] [Fix several bugs related to finding free variables simonpj@microsoft.com**20070103115009 Now that coercion variables mention types, a type-lambda binder can have free variables. This patch adjusts the free-variable finder to take account of this, by treating Ids and TyVars more uniformly. In addition, I fixed a bug in the specialiser that was missing a free type variable in a binder. And a bug in tyVarsOfInst that was missing the type variables in the kinds of the quantified tyvars. ] [Comments only simonpj@microsoft.com**20070103103524] [Make warnings come out in deterministic order simonpj@microsoft.com**20070103102438 Fixes Trac #1053 ] [Change to Unix line-line-endings simonpj@microsoft.com**20070103102419] [Add newline at end simonpj@microsoft.com**20070103102408] [Better error messages for deriving simonpj@microsoft.com**20070103095412] [Fix another buglet in HsDoc stuff simonpj@microsoft.com**20070103094058 A 'foreign export' represents an *occurrence* of a Haskell name, not a *binding* site for the Haskell name. (This was making cc012 fail; Trac #1054. ] [Comments only simonpj@microsoft.com**20070103082517] [Standalone deriving wibbles: keyword is 'derive' not 'derived'; and add flag documentation simonpj@microsoft.com**20070102161752] [Docmunent stand-alone deriving simonpj@microsoft.com**20070102161218 I also re-organised the type-system extension section, which has grown rather big. ] [Big tidy-up of deriving code simonpj@microsoft.com**20070102154610 This tidy-up, triggered by Trac #1068, re-factors the way that 'deriving' happens. It took me way longer than I had intended. The main changes, by far are to TcDeriv; everyting else is a minor consequence. While I was at it, I changed the syntax for standalone deriving, so that it goes derive instance Show (T a) (instead of "derive Show for T"). However, there's still an implicit context, generated by the deriving code, and I wonder if it shouldn't really be derive instance (..) => Show (T a) but I have left it simple for now. I also added a function Type.substTyVars, and used it here and there, which led to some one-line changes otherwise unrelated (sorry). Loose ends: * 'deriving Typeable' for indexed data types is still not right * standalone deriving should be documented ] [Fixed bug #744 (ghc-pkg lies about location of haddock-interfaces and haddock-html) sven.panne@aedion.de**20070102134622] [Added ghc man page to RPM sven.panne@aedion.de**20070102134546] [Added the GHC commentary to the RPM sven.panne@aedion.de**20070102134238] [Stylistic change: Use %{_prefix} instead of %{prefix} sven.panne@aedion.de**20070102134033] [The ghc package is not relocatable (yet), so don't claim that this is the case sven.panne@aedion.de**20070102133923] [Removed some trailing spaces sven.panne@aedion.de**20070102133809] [Update reference to configure.in to refer to configure.ac instead Ian Lynagh **20061231143443] [Warning police: Added missing #include sven.panne@aedion.de**20061230133057] [Standardized Makefile for man page sven.panne@aedion.de**20061230115623 Use our standard build machinery for building, installing and cleaning the man page. Do not use deprecated - option for 'head'. Use $(RM) instead of explicit 'rm -f' for better portability. Note that we always build/install the man page with the 'install-docs' target now, this is the usual behaviour. "GhcManpages is dead, Jim..." This patch should unbreak 'make dist', too. ] [Make dicts for arbitrary type equalities Manuel M T Chakravarty **20061229203300] [EqPred pretty prints as ~ and equalities without brackets Manuel M T Chakravarty **20061229201751] [Construction of EqPred dictionaries Manuel M T Chakravarty **20061229181357] [data family declarations are fine without any type arguments Manuel M T Chakravarty **20061229181122] [Add missing case for documented types in the type desugarer davve@dtek.chalmers.se**20061229163224] [Avoid duplicate error report when renaming HsDoc stuff simonpj@microsoft.com**20061229141557 This patch is a bit of a hack to avoid a duplicate error when checking class C a where op :: a -> a op2 x = x (This is tcfail077) For reasons I don't understand, the decl of op2 generates an HsDeclEntity, and that gives a renamer error which duplicates the (better) one that comes from rnMethodBinds. A better fix might be to get rid of HsDeclEntities altogether. ] [Add newline to end of file simonpj@microsoft.com**20061229133456] [Adding a GENERATED pragma andy@galois.com**20061229072948 Adding a {-# GENERATED "SourceFile" SourceSpan #-} pragma. This will be used to generate coverage for tool generated (or quoted) code. The pragma states the the expression was generated/quoted from the stated source file and source span. ] [Parse and desugar equational constraints Manuel M T Chakravarty **20061228010348 - With -findexed-types, equational constraints can appear in contexts wherever class predicates are allowed. - The two argument types need to be boxed and rank 0. ] [Remove a reference to GHC.Exts.Ptr in stage1 Pepe Iborra **20061222165541 Hopefully this will help to restore ability to build HEAD on GHC 5.0x systems ] [Handle LongArg's in the FFI on x86 Ian Lynagh **20061222141554] [Improve documentation about packages simonpj@microsoft.com**20061222141551] [Remove ' in cpp error Ian Lynagh **20061222133940] [Documentation for class contexts in data-constructor declarations simonpj@microsoft.com**20061222093431] [Allow a word-sized argument for STKCHECK Ian Lynagh **20061221023825] [Parse and use ghci nofib output Ian Lynagh **20061220220715] [Add hook to fam inst consistency check to GHCi/--make Manuel M T Chakravarty **20061221004058] [Fix import lists Pepe Iborra **20061220042417] [Deriving for indexed newtypes Manuel M T Chakravarty **20061219213017 - The isomorphism-based newtype-deriving isn't very useful for indexed types right now as it rejects all recursive declarations, and we have to mark all indexed type instances as recurrsive as we can't guarantee that future instances aren't going to make them part of a recursive group. ] [Fixed uninitialised FunBind fun_tick field Manuel M T Chakravarty **20061219192506] [Add HscTypes.hi-boot-6 so builds with older GHCs succeed Ian Lynagh **20061219155954] [Deriving for indexed data types Manuel M T Chakravarty **20061218211205 - This patch implements deriving clauses for data instance declarations (toplevel and associated) - Doesn't support standalone deriving. This could be easily supported, but requires an extension of the syntax of standalone deriving clauses. Björn, fancy adding this? - We cannot derive Typeable. This seems a problem of notation, more than anything else. Why? For a binary vanilla data type "T a b", we would generate an instance Typeable2 T; ie, the instance is for the constructor alone. In the case of a family instance, such as (S [a] (Maybe b)), we simply have no means to denote the associated constuctor. It appears to require type level lambda - something like (/\a b. S [a] (Maybe b). - Derivings are for *individual* family *instances*, not for entire families. Currently, I know of no simple translation of class instances for entire families to System F_C. This actually seems to be similar to implementing open data types à la Löh & Hinze. - This patch only covers data types, not newtypes. ] [Don't overwrite old memory with 0xaa when doing a realloc Ian Lynagh **20061218152423] [Replace association list in AddressEnv for a FiniteMap Pepe Iborra **20061218141715] [Remove uses of Data.Traversable to fix stage1 on pre ghc-6.6 systems Pepe Iborra **20061218095343] [Propagate the DEBUGGER flag to the Makefile for stage 2 Pepe Iborra **20061217001150] [TAG 2006-12-17 Ian Lynagh **20061217233747] [Merge DynFlags changes Ian Lynagh **20061216173957] [Fix an overlapping of uniques in PrelNames Pepe Iborra **20061216114624] [Fix the build Ian Lynagh **20061216022535] [Toggle whether the RTS gets build with debugger support for ghci Pepe Iborra **20061211181307 Specifically, this disables the special support in the RTS for looking up the datacon name corresponding to an address. Correspondingly, the debugging commads in GHCi will not be available, and neither will the '-fdebugging' flag ] [Adjust code from manual merges Pepe Iborra **20061211162027] [Fix an issue with lazyness in the closure viewer Pepe Iborra **20061211153453] [Closure inspection in GHCi Pepe Iborra **20061210232018 The :print, :sprint and :force commands for GHCi. This set of commands allows inspection of heap structures of the bindings in the interactive environment. This is useful to observe lazyness and specially to inspect things with undespecified polymorphic types, as happens often in breakpoints. ] [Dynamic breakpoints in GHCi Pepe Iborra **20061210231551 This patch adds dynamic breakpoints to GHCi There is a new ':breakpoint' command to manage breakpoints. GHCi simply uses the breakpoint api functions in ghc-api to install itself as a client. The mechanism used by GHCi to keep track of enabled breakpoints is a simple table. When a breakpoint is hit, a new interactive session is launched and the bindings in the breakpoint are injected. Some commands are disabled in this sub session ] [Split the GHCi monad apart from InteractiveUI, together with some related functions Pepe Iborra **20061210230553 I found this convenient while I was extending ghci with the debugger. I wanted to put all the debugger stuff in a separate module, but I would need a huge hs-boot file to break the circular dependencies. This option seemed better ] [Add the debugger related modules to package.conf Pepe Iborra **20061210223217] [Prevent breakpoint instrumentation of spliced code Pepe Iborra **20061210223102] [Capturing and keeping track of local bindins in the desugarer Pepe Iborra **20061210222540 Used in the desugaring of the breakpoint primitive ] [Handle breakpoint jumps while splicing TH functions in ghci Pepe Iborra **20061210222424 The dynamic linker has been modified so that it won't panic if one of the breakpointJump functions fails to resolve. Now, if the dynamic linker fails to find a HValue for a Name, before looking for a static symbol it will ask to Breakpoints.lookupBogusBreakpointVal :: Name -> Maybe HValue which returns an identity function for the Jump names or Nothing else. A TH function might contain a call to a breakpoint function. So if it is compiled to bytecodes, the breakpoints will be desugared to 'jumps'. Whenever this code is spliced, the linker will fail to find the jumpfunctions unless there is a default. ] [Breakpoint code instrumentation Pepe Iborra **20061210204934 Instrumentation gets activated by the '-fdebugging' dynflag. All the instrumentation occurrs in the desugarer; it consists of inserting 'breakpoint' combinators at a number of places in the AST, namely: - Binding sites - Do-notation statements These 'breakpoint' combinators will later be further desugared (at DsExpr) into ___Jump functions. For more info about this and all the ghci.debugger see the page at the GHC wiki: http://hackage.haskell.org/trac/ghc/wiki/GhciDebugger ] [The breakpoint primitive Pepe Iborra **20061210203729] [GHCi debugger documentation Pepe Iborra **20061210184123] [Extend the GHC API with breakpoints and breakpoint handlers Pepe Iborra **20061210184027 The entry point is: setBreakpointHandler :: Session -> BkptHandler Module -> IO () ] [Playing with closures Pepe Iborra **20061210173005 RtClosureInspect includes a bunch of stuff for playing with closures: - the datatype Closure is the low level representation type - the datatype Term is the high level representation type - cvObtainTerm is the main entry point, providing the Term representation of an arbitrary closure ] [Retrieving the datacon of an arbitrary closure Pepe Iborra **20061210112944 This patch extends the RTS linker and the dynamic linker so that it is possible to find out the datacon of a closure in heap at runtime: - The RTS linker now carries a hashtable 'Address->Symbol' for data constructors - The Persistent Linker State in the dynamic linker is extended in a similar way. Finally, these two sources of information are consulted by: > Linker.recoverDataCon :: a -> TcM Name ] [Two new prim ops to access the Info Table and Payload of a closure: Pepe Iborra **20061209173823 - infoPtr# :: a -> Addr# - closurePayload# :: a -> (# Array b, ByteArr# #) These prim ops provide the magic behind the ':print' command ] [TAG 2006-12-16 Ian Lynagh **20061216174100] [Free more things that we allocate Ian Lynagh **20061215214430] [Free all tasks on exit, not just those on the task_free_list Ian Lynagh **20061215172617] [Give cap its correct type, rather than void Ian Lynagh **20061215172558] [Put the task on the free list in workerTaskStop Ian Lynagh **20061215164210] [Free various things we allocate Ian Lynagh **20061215134507] [Updating rix output to new standard. andy@galois.com**20061214235210] [update, and add some more build flavours (inc. dons's fast build) Simon Marlow **20061214110947] [Rework the block allocator Simon Marlow **20061214110901 The main goal here is to reduce fragmentation, which turns out to be the case of #743. While I was here I found some opportunities to improve performance too. The code is rather more complex, but it also contains a long comment describing the strategy, so please take a look at that for the details. ] [fix wibble in memory leak error dump Simon Marlow **20061214101102] [Removing explicit Binary Tick Boxes; using Case instead. andy@galois.com**20061213184502] [Add left-to-right impredicative instantiation simonpj@microsoft.com**20061213162915 People keep complaining, with some justification, that runST $ foo doesn't work. So I've finally caved in. The difficulty with the above is that we need to decide how to instantiate ($)'s type arguments based on the first argument (runST), and then use that info to check the second argumnent. There is a left-to-right flow of information. It's not hard to implement this, and it's clearly useful. The main change is in TcExpr.tcArgs, with some knock-on effects elsewhere. I was finally provoked into this by Trac #981, which turned out, after some head-scratching, to be another instance of the same problem. (There was some bug-fixing too; a type like ((?x::Int) => ...) is a polytype even though it has no leading for-alls, but the new TcUnify code was not treating it right.) Test for this is tc222 ] [Removing unused argument to a printf. andy@galois.com**20061213160651] [fixing obvious typo in darwin_HOST_OS code (currently does not compile). andy@galois.com**20061213160601] [PowerPC NCG: support conditional branches outside +-32KB wolfgang.thaller@gmx.net**20061213133808 Work around the PowerPC architecture's +-32KB limitation for conditional branches by conditionally skipping an unconditional branch instead (unconditional branches have a +-32MB range). This requires an extra pass over the basic blocks for each CmmTop after block sequencing, to determine which branches are "far". Fixes ticket #709, "Fixup too large" error with -fasm on PowerPC ] [Fix allocation debugger to handle allocations in con/destructors Ian Lynagh **20061213133518 conc021 is an example of a program that broke. It doesn't handle them particularly well still, but it doesn't crash at least. ] [Don't free sched_mutex until freeTaskManager has finished with it Simon Marlow **20061212153353 Also move closeMutex() etc. into freeTaskManager, this is a free-ish thing ] [Give a better panic if the allocation debugger is used uninitialised Ian Lynagh **20061213122602] [Misc Hpc improvement to dynamic tracer output andy@galois.com**20061213001917 - Added HPCRIX support for passing tracer filename. - Added thread tracing support. - Cleaned up use of HsFFI.h ] [Adding tracing support andy@galois.com**20061209050334] [Misc unsigned printing issues; adding magicTixNumber. andy@galois.com**20061130003024] [Turn -Wall on Ian Lynagh **20061212201127] [Fix more warnings Ian Lynagh **20061212200422] [Fix whitespace Ian Lynagh **20061212182215] [Silence some warnings Ian Lynagh **20061212182044] [Fix more warnings Ian Lynagh **20061212174310] [Remove trailing white space Ian Lynagh **20061212173705] [Detab Ian Lynagh **20061212173625] [Fix thd3 Ian Lynagh **20061212173427] [Silence some warnings Ian Lynagh **20061212173404] [Silence more warnings Ian Lynagh **20061212172756] [More warning fixes Ian Lynagh **20061212164651] [Fix more warnings Ian Lynagh **20061212162624] [More warning fixes and some code rejigging Ian Lynagh **20061212161754] [Fix more warnings Ian Lynagh **20061212161026] [Fix some warnings Ian Lynagh **20061212160020] [Beautify a bit Ian Lynagh **20061212154801] [Remove trailing spaces Ian Lynagh **20061212154307] [Detab Ian Lynagh **20061212154211] [Missed a stage-2 problem in the TcSimplify refactoring simonpj@microsoft.com**20061212132813] [Comments only simonpj@microsoft.com**20061212132802] [MERGE: Fix Windows DEP violations (bug #885) Simon Marlow **20061212103623 Original patch by brianlsmith@gmail.com ] [Fix the pattern for _hpc symbols: it incorrectly matched the _hp suffix too Simon Marlow **20061212103237 This has the undesitrable effect that stg_gc_gen_hp in the RTS was caught as an HPC symbol and put in the data segment. ] [Fix up yesterdays commit to TcSimplify; fixes broken HEAD simonpj@microsoft.com**20061212092556] [Add comments, plus fix zapFragileInfo to zap worker info simonpj@microsoft.com**20061211165141 This is a minor fix up to the patch * retain arity for let-bound vars in simplifier ] [Add comments about pruning implication constraints simonpj@microsoft.com**20061211164333] [Unbreak x86_64 PIC patch, part 3 wolfgang.thaller@gmx.net**20061211222635 This time, the PowerPC NCG suffered from a typo. (I've really grown to hate all those #if foo_TARGET_ARCH lines. I need to build GHC for at least four different platforms just to make sure that there are no typos...) ] [Support MO_WriteBarrier in PowerPC NCG (lwsync instruction) wolfgang.thaller@gmx.net**20061211222534] [Fix allocate name clash in the HEAD Ian Lynagh **20061211192103] [Add freeScheduler/freeTaskManager and call it later than exitScheduler Ian Lynagh **20061211131004 We were freeing the tasks in exitScheduler (stopTaskManager) before exitStorage (stat_exit), but the latter needs to walk down the list printing stats. Resulted in segfaults with commands like ghc -v0 -e main q.hs -H32m -H32m +RTS -Sstderr (where q.hs is trivial), but very sensitive to exact commandline and libc version or something. ] [When debugging, have the allocator help us a bit Ian Lynagh **20061211124950 We now check for freeing memory that isn't allocated, and overwrite memory we are about to free with 0xaa. It might be nice to also have a flag to control whether the memory actually gets free'd. ] [More refactoring of constraint simplification simonpj@microsoft.com**20061211160732 This patch fixes several bugs in the handling of impliciation constraints, thereby fixing several regression-suite failures. On the way I managed to further simplify the code in TcSimplify; the extra lines are comments. ] [Improve origin of constraints in subsumption checking simonpj@microsoft.com**20061211160557] [Suggests -fglasgow-exts for contexts-differ-in-length error simonpj@microsoft.com**20061211160517] [Comments and layout only simonpj@microsoft.com**20061211160409] [Remove strange extra print (a temporary debug?) simonpj@microsoft.com**20061211155035] [Fix typo simonpj@microsoft.com**20061208134807] [Improve parsing for bang patterns (fixes Trac #1041) simonpj@microsoft.com**20061208134629] [Unbreak x86_64 PIC patch, part 2 wolfgang.thaller@gmx.net**20061210132712 Continue repairing breakage from patch "x86_64: support PIC and therefore, Mac OS X in the NCG", this time something affecting (linux && !i386) ] [Use System.IO.stderr rather than IO.stderr in GHCi. Fixes trac #1001. Ian Lynagh **20061209185152 GHCi evaluates a command to flush the stdout/stderr buffers, but this command can only use names that are in scope. It used to need IO.stderr from the haskell98 package, but this patch means it only needs things from the base package. ] [Add PowerPC to the list of SMP arches Ian Lynagh **20061209174203] [Make './darcs-all get --complete' work sven.panne@aedion.de**20061209125154] [fix for #1013. Simon Marlow **20061207151644 We weren't getting the bitmap right for the continuation BCO in a case-of-case. ] [Unbreak previous x86_64 PIC patch wolfgang.thaller@gmx.net**20061207133108 Make things compile on Linux again ] [Tell the NCG that XOR foo, foo does *not* read foo wolfgang.thaller@gmx.net**20061207131721 On x86[-64], MachCodeGen uses the old XOR trick to zero a register. This patch makes regUsage not list the register as an input in this case. Listing the register as an input for the instruction could make it appear like an unitialised value, which is bad because unitialised values can cause the register allocator to panic (at least in the presence of a loop). ] [x86_64: support PIC and therefore, Mac OS X in the NCG wolfgang.thaller@gmx.net**20061207131607 Supporting x86_64-apple-darwin in the NCG basically boils down to supporting position-independent code in the NCG. PIC code works almost exactly the same as on x86_64-linux, while position-dependent code is not supported at all. This patch implements -fPIC for x86_64-linux, too, but that is untested. ] [Fix family instance consistency check for home package modules Manuel M T Chakravarty **20061207014118 * So far, family instance modules was only available for external modules. * This fixes the "Over" test in the testsuite under indexed-types/ ] [Kind sigs in associated data/newtype family decls may be omitted Manuel M T Chakravarty **20061206223320 * This is only a slight generalisation of the parser, so that family declarations on the toplevel and in classes are uniform. * I didn't allow that right away as it is a bit tricky to avoid reduce/reduce conflicts. ] [Add release note that Network.CGI.Compat uses XHtml rather than Html Ian Lynagh **20061206144946] [Improve dependency analysis; makes more dictionaries inlinable simonpj@microsoft.com**20061206071845 I recentl changed the scoring system used by dependency analysis for recursive bindings, that it used the *form* of the RHS of a binding, rather than just its type. In doing so I inadvertently made recursive dictionary bindings unravel less well, because I'd missed the case of c = /\a. C (...) (...) This patch fixes the problem. A good example is the instance for Monad (ST s) or Show (ST s a) in GHC.ST. It's vital for these dictionaries to be inlinable. ] [Add documentation for seq simonpj@microsoft.com**20061204013116] [Comments only simonpj@microsoft.com**20061204013040] [Make a ghc/ghci manpage Ian Lynagh **20061205235244 Set GhcManpages=YES in mk/build.mk if you want to build the manpage. ] [we need GHC.Conc.ensureIOManagerIsRunning on Windows too Simon Marlow **20061205162435] [add Windows-specific GHCi information, and a FAQ about ^C in GHCi on Windows Simon Marlow **20061205161140] [update the question about concurrent threads & GHCi Simon Marlow **20061205153947] [fix Windows GHCi Simon Marlow **20061204164326] [MERGE: In hashExpr, use Word32 rather than relying on wrapping behaviour of Int Ian Lynagh **20061203223337 Fixes #952, as it turns out. When compiling via C, we are at the mercy of C's undefined behaviour with respect to overflow of signed integer operations, and this was biting us here. Perhaps we should always add the -fwrapv flag to gcc, but since Haskell doesn't define overflow on Int either, it seemed the right thing to do to fix this code anyway. ] [Fixed and simplified repository calculation, works via SSH now, too sven.panne@aedion.de**20061203134824] [Add support for the IO manager thread on Windows Simon Marlow **20061201144823 Fixes #637. The implications of this change are: - threadDelay on Windows no longer creates a new OS thread each time, instead it communicates with the IO manager thread in the same way as on Unix. - deadlock detection now works the same way on Windows as on Unix; that is the timer interrupt wakes up the IO manager thread, which causes the scheduler to check for deadlock. - Console events now get sent to the IO manager thread, in the same way as signals do on Unix. This means that console events should behave more reliably with -threaded on Windows. All this applies only with -threaded. Without -threaded, the old ConsoleEvent code is still used. After some testing, this could be pushed to the 6.6 branch. ] [Remove the Windows Async IO Manager completely in THREADED_RTS mode Simon Marlow **20061201140753 It isn't used here anyway, just making sure the code doesn't get compiled in. ] [Decouple -O from -fvia-C wolfgang.thaller@gmx.net**20061201125304 Nowadays, there are situations where -fvia-C is definitely unwanted, such as when -fPIC is used on some platforms, so we do not want implicit -fvia-C any more. ] [q simonpj@microsoft.com**20061201034207] [cas(): modify assembly syntax to make it work everywhere (hopefully) Simon Marlow **20061121132646] [use "lock cmpxchg" instead of "lock/cmpxchg" Simon Marlow **20061117114429 I'm not sure where the latter version came from, but it apparently doesn't generate a legal instruction on Solaris. ] [Update library version numbers in release notes Ian Lynagh **20061009120243] [Fix _module_registered bug for sparc linux. Simon Marlow **20061006104534 Patch by Ferris McCormick This patch has been tested with GHC-6.4.2 where it fixes a huge number of testsuite failures (down from 406 to 17) ] [Remove trace simonpj@microsoft.com**20061129225243] [Remove bogus comment simonpj@microsoft.com**20061129225223] [Teach SpecConstr how to handle mutually-recursive functions simonpj@microsoft.com**20061129213931 Roman found cases where it was important to do SpecConstr for mutually-recursive definitions. Here is one: foo :: Maybe Int -> Int foo Nothing = 0 foo (Just 0) = foo Nothing foo (Just n) = foo (Just (n-1)) By the time SpecConstr gets to it, it looks like this: lvl = foo Nothing foo Nothing = 0 foo (Just 0) = lvl foo (Just n) = foo (Just (n-1)) Happily, it turns out to be rather straightforward to generalise the transformation to mutually-recursive functions. Look, ma, only 4 extra lines of ocde! ] [Improve the loop-breaking heuristics simonpj@microsoft.com**20061129212440 The loop-breaking heuristics were making it a high priority to avoid choosing a variable as a loop breaker if its *type* was a data type. The reason is that it's very good to be able to "see" constructor applications. But it's only good if the constructor application is *visible*, so that is what I test for now. I found a case (when testing SpecConstr) where I had a Rec like this: rec { lvl = foo Nothing foo = ... RULE foo Nothing = ... } Even if lvl has a data type, it's much better to make lvl the loop breaker, not foo, so that foo's RULE is visible in lvl's RHS. ] [Comments only simonpj@microsoft.com**20061129194212] [Make SpecConstr work right for nullary constructors simonpj@microsoft.com**20061129192421 For totally stupid reasons, SpecConstr didn't work for the (particularly easy) case of nullary constructors like True and False. I just had some equations in the wrong order, so that a Var case came first, which matches a nullary constructor, with the constructor-application case afterwards. The fix is easy. I did a bit of refactoring at the same time. ] [x86_64 NCG: fix register usage for CALLs wolfgang.thaller@gmx.net**20061129013429 For varargs calls, CALL reads the %al register; record that fact for the benefit of the register allocator. (There was a previous attempt to do this, but it was broken.) ] [Add Win32/configure.ac to the mix sof@galois.com**20061129222513] [TickBox representation change andy@galois.com**20061129220957 This changes the internal representation of TickBoxes, from Note (TickBox "module" n) into case tick of _ -> tick has type :: #State #World, when the module and tick numbe are stored inside IdInfo. Binary tick boxes change from Note (BinaryTickBox "module" t f) into btick btick has type :: Bool -> Bool, with the module and tick number stored inside IdInfo. ] [Fixing Alts to reflect Alternatives, rather than every pattern match in Hpc. andy@galois.com**20061101230827] [fix to isNormalComment for non-Haddock mode, and some cleanup Simon Marlow **20061129093221 Haddock documentation comments weren't being treated as comments even without the -haddock flag. Fixes nofib/spectral/simple, and probably others. ] [Make the non-threaded-RTS threadDelay wait at least as long as asked Ian Lynagh **20061128210516] [retain arity for let-bound vars in simplifier Kirsten Chevalier **20061128135143] [Initial support for x86_64-darwin wolfgang.thaller@gmx.net**20061127130602 Basic -fvia-C code generation is there, not much testing. ] [Support I64->I32 casts in the NCG, and use them for I64->Integer conversions wolfgang.thaller@gmx.net**20061124094129 We can avoid using any other long long operations in PrimOps.cmm. One more step towards compiling the RTS using the NCG. ] [NCG: Really avoid the need for memory-to-memory moves in the register allocator wolfgang.thaller@gmx.net**20061124093536 This is a follow-up to "NCG: Handle loops in register allocator". The newly-introduced invariant that every virtual register is always assigned to the same spill slot wasn't kept under all circumstances. *Now* memory-to-memory moves should never be required when compiling hand-written cmm code. ] [i386-darwin: disable use of code stubs for dynamic linking wolfgang.thaller@gmx.net**20061120172516 We can't use lazy binding for tail-calls accross shared libraries, because dyld will crash due to incorrect stack layout. We can't get the stack alignment right for both cross-library tailcalls and foreign calls, so we have to bypass the stub code altogether and load the address to branch to from the non-lazy pointer table. ] [Support RelocatableReadOnlyData section type in CmmParse, and use it where needed in AutoApply wolfgang.thaller@gmx.net**20061022160650 This is needed for position-independent code on Mac OS X (both i386 and powerpc), when compiling the RTS with -fasm. ] [Cast switch scrutinees to W_ in AutoApply.cmm wolfgang.thaller@gmx.net**20061022160507 ... and make CmmLint check for this problem. This doesn't matter for -fvia-C, but passing a halfword to a switch will make the NCG generate crashing code. ] [Add some Outputable instances Ian Lynagh **20061125152307] [Change a comma to a colon Ian Lynagh **20061125003444] [ghc-pkg: New command 'check' and made 'list' indicate broken packages Lennart Kolmodin **20061105183851 Command 'check': print a list of all packages that are broken and which dependencies they are missing. Command 'list': updated by making it put brackets around broken packages. ] [Fix constraint handling for lazy patterns simonpj@microsoft.com**20061124230548 Lazy patterns are quite tricky! Consider f ~(C x) = 3 Can the Num constraint from the 3 be discharged by a Num dictionary bound by the pattern? Definitely not! See Note [Hopping the LIE in lazy patterns] in TcPat The type checker wasn't ensuring this, and that was causing all manner of strange things to happen. It actually manifested as a strictness bug reported by Sven Panne. I've added his test case as tcrun040. ] [Warning police: Removed unused variable sven.panne@aedion.de**20061124175900] [small stats fix Simon Marlow **20061124162512] [Make SpecConstr more aggressive, by neglecting reboxing simonpj@microsoft.com**20061124132054 SpecConstr was conservative about avoiding reboxing (see Note [Reboxing]) but that meant it lost useful opportunities. This patch makes it much more aggressive, but at the risk of doing some reboxing. Actually, the strictness analyser has the same property (it's possible for it to generate reboxing code, and thus increase allocation), but we don't worry so much about that. Maybe we should. Ideally, one would do some more sophisticated analysis that spotted the reboxing cases without excluding the useful ones. But meanwhile, let's try this. ] [Drop redundant parens in pretty-printing simonpj@microsoft.com**20061124131813] [Improve handling of implicit parameters simonpj@microsoft.com**20061124122120 A message to Haskell Cafe from Grzegorz Chrupala made me realise that GHC was not handling implicit parameters correctly, when it comes to choosing the variables to quantify, and ambiguity tests. Here's the note I added to TcSimplify: Note [Implicit parameters and ambiguity] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What type should we infer for this? f x = (show ?y, x::Int) Since we must quantify over the ?y, the most plausible type is f :: (Show a, ?y::a) => Int -> (String, Int) But notice that the type of the RHS is (String,Int), with no type varibables mentioned at all! The type of f looks ambiguous. But it isn't, because at a call site we might have let ?y = 5::Int in f 7 and all is well. In effect, implicit parameters are, well, parameters, so we can take their type variables into account as part of the "tau-tvs" stuff. This is done in the function 'FunDeps.grow'. The actual changes are in FunDeps.grow, and the tests are tc219, tc219 ] [Fix name-capture bug in rule matching simonpj@microsoft.com**20061124111158 The matching algorithm for RULES should respect alpha-conversion, but it wasn't doing so. In particular, if the names of the template variables clashed with a variable in scope at the call site, bad things could happen (it showed up as a CoreLint failure when compiling nofib/real/parser) This patch fixes the problem; see Note [Template binders] Test is in simplCore/should_compile/spec002, but nofib -O2 in real/parser, real/fulsom ] [Improve hashing of expressions simonpj@microsoft.com**20061124110926 We were getting too many cases where different expressions map to the same hash code (which shows up in CSE). This patch tries to improve the hash algorithm a bit. ] [Use existing Ord instance on Int, saving code simonpj@microsoft.com**20061124110830] [Use existing function uniqAway instead of duplicating code simonpj@microsoft.com**20061124110750] [Gather constraints in program order simonpj@microsoft.com**20061124084011 Provoked by a suggestion of Simon's, this patch makes a half-hearted attempt to gather constraints in program order, so that we tend to report an error at its first occurrence, rather than its last. Examples: mdofail001, tcfail015 It's "half-hearted" because generally-speaking the typechecker does not guaranteed to keep constraints in order; it treats them as a set. Nevertheless this very small change seems to improve matters, so it seems a good one. ] [Simplify TcSimplify, by removing Free simonpj@microsoft.com**20061123171602 For a long time TcSimplify used a three-way classification of constraints, into Free Irred ReduceMe (see the data type WhatToDo). In the new world of implication constraints, the Free case does not make so much sense, and I managed to elminate it altogether, thus simplifying the story somewhat. Now WhatToDo has constructors Stop ReduceMe There should be no change in behaviour. ] [fix failing assertion Simon Marlow **20061123135825] [Improve recovery in hptRules simonpj@microsoft.com**20061122173415] [Refactoring of where tcSimplifyTop happens simonpj@microsoft.com**20061122135121 We want to do tcSimplifyTop after checkMain, because checkMain can add useful type information that eliminates ambiguity. E.g. main = return undefined This is the way it used to be in 6.6, and I think I mistakenly moved it when doing implication constraints. This patch effectively puts it back the way it was. Cures the cg053 failure. ] [Retain simplifications of implication constraints simonpj@microsoft.com**20061122132844 When simplifying an implication constraint (reduceImplication), if we make progress, make a new implication constraint for the result. If we don't do this, we get a constraint that can be simplified in a unique way, and that in turn confuses reportNoInstance ] [Improve error messages slightly simonpj@microsoft.com**20061122132821] [refactor code for memInventory() Simon Marlow **20061122101906] [allocatePinned(): fix n_large_blocks count after allocating a new block Simon Marlow **20061122101808] [fix bug in memInventory() giving false memory leak errors Simon Marlow **20061122101604 fixes ffi009(threaded1) ] [Remove the concept of stableRoots. Lemmih **20061121193701 StableRoots opened new possibilities in the world of plugins with their ability to link partially applied closures against object code. Exporting '(fn pluginwideState)' severely reduced the complexity of HIDE's plugin system. The previous system of global variables was both fragile and hard to scale. Good bye, StableRoots. We sure had some fun. ] [small fix to DEBUG case in coalesce/freeGroup patch Simon Marlow **20061121163416] [optimisation to freeGroup() to avoid an O(N^2) pathalogical case Simon Marlow **20061121134551 In the free list, we don't strictly speaking need to have every block in a coalesced group point to the head block, although this is an invariant for non-free blocks. Dropping this invariant for the free list means that coalesce() is O(1) rather than O(N), and freeGroup() is therefore O(N) not O(N^2). The bad case probably didn't happen most of the time, indeed it has never shown up in a profile that I've seen. I had a report from a while back that this was a problem with really large heaps, though. Fortunately the fix is easy. ] [Fix ":i Maybe", noticed by Claus Reinke Ian Lynagh **20061121132132 It looks like this was just commented out while FC was being developed. ] [put the unsafeCoerce trace inside DEBUG, to avoid test failures Simon Marlow **20061121093748] [Fix printf$LDBLStub workaround for Darwin wolfgang.thaller@gmx.net**20061121004953 Apparently, the original fix never really worked due to typos and oversights. ] [Mac OS X mangler: follow some minor gcc changes wolfgang.thaller@gmx.net**20061120171553] [Add ppr for the MKPAP case, and rearrange the other cases to match the datatype Ian Lynagh **20061120155352] [Avoid problems with unaligned loads on alpha/mips/mipsel/arm Ian Lynagh **20061120154914 This is overly conservative, but it works. ] [reorganise PAPI configuration: off by default, even if library is found Simon Marlow **20061120143657 Add GhcRtsWithPapi=YES to mk/build.mk to turn it on ] [No special Papi measurements taken by default mrchebas@gmail.com**20061109081120] [whitespace Simon Marlow **20061120142550] [Cosmetic improvements, no change in Papi functionality. mrchebas@gmail.com**20061109080400] [better error messages when PAPI_library_init() fails Simon Marlow **20061120142738] [alter PAPI help message slightly Simon Marlow **20061120142722] [Added configure gadgets to detect Papi, and fixed build problems 'Alexey Rodriguez '**20061109120414] [Selection of PAPI events via RTS command line mrchebas@gmail.com**20061109075746] [Addition of PAPI to RTS mrchebas@gmail.com**20061108171452 This patch still requires the addition of the USE_PAPI define to compile with PAPI. Also, programs must be compiled and linked with the appropriate library flags for papi. ] [Don't force -static on mips Ian Lynagh **20061120122305] [Don't make ghc threaded if GhcNotThreaded is YES Ian Lynagh **20061120121631] [Cope with big endian float word order on little endian machines Ian Lynagh **20061120121309] [Emit .bat versions of -inplace scripts on Windows platforms (Cabal-friendlier) sof@galois.com**20061117012343] [Emit .bat version of -inplace script on Windows platforms sof@galois.com**20061117012239] [restore compilation with 5.04 Simon Marlow **20061115104322] [remove unused includes, now that Storage.h & Stable.h are included by Rts.h Simon Marlow **20061115104111] [move newSpark() prototype to RtsExternal.h to avoid warnings Simon Marlow **20061107115430] [mark stop event handle as invalid once closed, making shutdowns more graceful. sof@galois.com**20061016223516] [simplify the generated C a little by removing some casts. Simon Marlow **20061114162846] [fix types in generated C for comparison MachOps Simon Marlow **20061114160027 C comparisons have type 'int', but our generated code assumed they had type 'StgWord', leading to (very) occasional warnings from gcc. ] [Remove unused Name imort, and add a comment explaining why pragmas are disabled Ian Lynagh **20061114131459] [Document new -L RTS flag Ian Lynagh **20061114113542] [Be compatible with older C standards Ian Lynagh **20061114112514] [hp2ps_config_mk Ravi Nanavati **20060929225418 Add variables for hp2ps to config.mk.in ] [hp_slash_fix Ravi Nanavati **20060929225324 Fix output of cost-centre stacks so that the slashes appear in the correct place Please include this patch in the 6.6 branch as well as HEAD ] [rts_ccs_length Ravi Nanavati **20060929225115 Add the -L RTS flag to control the length of the cost-centre stacks reported in a heap profile. Please include this change in the 6.6 branch as well as HEAD ] [multipage_hp2ps Ravi Nanavati **20060929224739 Add support for splitting the key index over multiple pages in hp2ps Multipage support can be requested with the -M command-line flag or inferred if the number of bands requested is greater than 20 (the limit on the number of bands displayed has been removed) Please include this change in the 6.6 branch as well as HEAD ] [Fix (yet another) odd interaction between selector thunks and compacting GC Simon Marlow **20061114123157 This should fix errors of the form internal error: scavenge_mark_stack: unimplemented/strange closure type 28 @ 0x2b92e5f79960 But since it's quite difficult to reproduce the error, I can't be 100% certain it's gone. I certainly can't reproduce it again after the fix, anyway. ] [Add literal-shift rewrite rules simonpj@microsoft.com**20061113093501 This is a re-factored version of Sam Bronson's patch Need to take care with logical shifts. ] [Fixups to PelRules (esp using intResult, wordResult) simonpj@microsoft.com**20061113090517 In PrelRules we carefully use 'intResult' to trim off the overflow in compile-time calculations, but we were not doing so consistently. This patch fixes that, I think, and adds type signatures ] [Fix typo "comand" (trac #965) Ian Lynagh **20061112170946] [Zap stray whitespace in lhs formatting Samuel Bronson **20061110183633] [Fix up .lhs delimiters a bit Samuel Bronson **20061104015642] [find fop.sh claus.reinke@talk21.com**20061109164054 the fop bundle contains fop.bat and fop.sh, but not fop; let configuration find the latter. ] [Doc nit in OccName Samuel Bronson **20061108192115] [Remove STANDALONE_PACKAGE bits that had escaped the removal Ian Lynagh **20061110182050] [Make StablePtr and friends visible, this seems to be necessary for 64bit architectures sven.panne@aedion.de**20061110171626] [Make all needed prototypes visible to avoid warnings sven.panne@aedion.de**20061110162743] [Added a comment about se.info.type being used uninitialized sven.panne@aedion.de**20061110162654] [Added a workaround for format specifier mismatch sven.panne@aedion.de**20061110162616] [Use implication constraints to improve type inference simonpj@microsoft.com**20061110133123] [Cosmetics and debug printing only simonpj@microsoft.com**20061110131513] [Cosmetics only simonpj@microsoft.com**20061110131345] [Add HsUtils.unguardedGRHSs, and use it simonpj@microsoft.com**20061110131250] [Comments and cosmetics only simonpj@microsoft.com**20061110131036] [Add new utility function, partitionWith simonpj@microsoft.com**20061110130836] [Trim imports simonpj@microsoft.com**20061110130814] [Patch to demand analyser, to handle polymorphism in zipWithDmds simonpj@microsoft.com**20061110130726] [Do not print HsDoc field when pretty-printing patterns (messes up error message) simonpj@microsoft.com**20061108094813] [use the right $(HC) for stage 3 Simon Marlow **20061109101753] [remove unused STANDALONE_PACKAGE stuff Simon Marlow **20061109101729] [update flag settings after files were relocated Simon Marlow **20061108103806] [Comment out deeply suspicious (and unused) function insertStableSymbol simonpj@microsoft.com**20061107171336 The function insertStableSymbol looks utterly wrong, because it coerces a value of type 'a' to an Addr#! That was in turn making the code generator get confused (now improved), but since insertStableSymbol isn't used at all, I'm just commenting it out. Meanwhile, this patch also enhances CoreToStg to report the most egregious cases where an unsafe coerce is going to confuse the code generator. ] [Layout and comments only simonpj@microsoft.com**20061107171040] [Warn only of explicit imports that are unused (test is mod177) simonpj@microsoft.com**20061106161212 This is really a long-standing bug. See test mod177. ] [Various debugging print changes; nothing exciting simonpj@microsoft.com**20061106160244] [Tidy up substitutions simonpj@microsoft.com**20061106155901 The new simplifer stuff exposed the fact that the invariants on the TvSubstEnv and IdSubstEnv were insufficiently explicit. (Resulted in a bug found by Sam Brosnon.) This patch fixes the bug, and tries to document the invariants pretty thoroughly. See Note [Extending the TvSubst] in Type Note [Extenting the Subst] in CoreSubst (Most of the new lines are comments.) ] [Get External Core (-fext-core) working with readline Samuel Bronson **20061101003649 Had to add support for dynamic C calls and for foreign labels (Addr# constants). Actually I only did the printing side -- parsing is not done yet. But at least now you can build the libraries with -fext-core. I also got the function arrow to print out properly again (it was printing fully-qualified and z-coded!) I also added a field for calling convention name to the External data constructor in ExternalCore.Exp (for static C calls). I'm not exactly sure where to document all of this, so I haven't done that, though I did comment the code a bit. ] [Remove pre-5.04 code Ian Lynagh **20061024011026] [Major overhaul of the Simplifier simonpj@microsoft.com**20061101164329 This big patch completely overhauls the Simplifier. The simplifier had grown old and crufty, and was hard to understand and maintain. This new version is still quite complicated, because the simplifier does a lot, but it's much easier to understand, for me at least. It does mean that I have touched almost every line of the simplifier, so the diff is a large one. Big changes are these * When simplifying an Expr we generate a simplified Expr plus a bunch of "floats", which are bindings that have floated out of the Expr. Before, this float stuff was returned separately, but not they are embedded in the SimplEnv, which makes the plumbing much easier and more robust. In particular, the SimplEnv already meaintains the "in-scope set", and making that travel with the floats helps to ensure that we always use the right in-scope set. This change has a pervasive effect. * Rather than simplifying the args of a call before trying rules and inlining, we now defer simplifying the args until both rules and inlining have failed, so we're going to leave a call in the result. This avoids the risk of repeatedly simplifying an argument, which was handled by funny ad-hoc flags before. The downside is that we must apply the substitution to the args before rule-matching; and if thep rule doesn't match that is wasted work. But having any rules at all is the exception not the rule, and the substitution is lazy, so we only substitute until a no-match is found. The code is much more elegant though. * A SimplCont is now more zipper-like. It used to have an embedded function, but that was a bit hard to think about, and now it's nice and consistent. The relevant constructors are StrictArg and StrictBind * Each Rule now has an *arity* (gotten by CoreSyn.ruleArity), which tells how many arguments it matches against. This entailed adding a field ru_nargs to a BuiltinRule. And that made me look at PrelRules; I did quite a bit of refactoring in the end, so the diff in PrelRules looks much biggger than it really is. * A little refactoring in OccurAnal. The key change is that in the RHS of x = y `cast` co we regard 'y' as "many", so that it doesn't get inlined into the RHS of x. This allows x to be inlined elsewhere. It's very like the existing situation for x = Just y where we treat 'y' as "many". ] [Improve error message from ghc --make when filename and modulename differ simonpj@microsoft.com**20061102123111] [Improve handling of unused imports (test is mod75) simonpj@microsoft.com**20061102120441] [Remove unused lookupDeprec function simonpj@microsoft.com**20061102120402] [Fix handling of non-in-scope exports (fixes test mod7) simonpj@microsoft.com**20061102120304] [Comments and layout only simonpj@microsoft.com**20061102093954] [import Maybes wibble sof@galois.com**20061101221108] [add a few #includes to make it compile sof@galois.com**20061101220950] [Trim imports simonpj@microsoft.com**20061101173439] [Default the kind of unconstrained meta-type variables before tcSimplifyTop simonpj@microsoft.com**20061101173325 This patch fixes a long standing bug, Trac #179, and a recently reported one, Trac #963. The problem in both cases was an unconstrained type variable 'a', of kind argTypeKind (printed "??") or openTypeKind ("?"). At top level we now default the kind of such variables to liftedTypeKind ("*"). This is important because then instance declarations can match it. The defaulting function is called TcMType.zonkTopTyVar, and is commented. (Most of the extra lines in the patch are comments!) ] [Comments and layout only simonpj@microsoft.com**20061101170448] [Minor refactoring simonpj@microsoft.com**20061101143416] [Remove unused import simonpj@microsoft.com**20061101142550] [Comments only simonpj@microsoft.com**20061101142343] [Make idInfo fail more informatively on TyVars simonpj@microsoft.com**20061101142246] [Improve error message (push to 6.6 branch) simonpj@microsoft.com**20061101123727] [Fix error reporting for contexts during deriving (Trac 958) simonpj@microsoft.com**20061101122120 When doing the fixpoint iteration for 'deriving' we have to be careful not to end up in a loop, even if we have -fallow-undecidable-instances. Test is tcfail169 ] [Fix a long-standing but obscure bug in worker-wrapper generation simonpj@microsoft.com**20061101110442 Worker/wrapper generation sometimes has to add a dummy void (State#) argument to retain laziness. But when generating the strictness signature for the worker, I forgot to take account of the extra argument, resulting in a bogus strictness signature. Result, chaos. Trac 317 shows this up, and this patch fixes it. ] [Move --help, --version etc to 4.4 (modes) because that is what they really are simonpj@microsoft.com**20061030135204] [remove the *.raw files Simon Marlow **20061027152129] [improve the diagnostic generated by memInventory() for a memory leak Simon Marlow **20061027133611] [count mut-list bytes, not words Simon Marlow **20061027133445] [fix calculation of GC Work for 6.6+ Simon Marlow **20061027103439] [copyright updates and add Commentary links Simon Marlow **20061026092536] [rename spin lock functions, and use macros for non-THREADED_RTS Simon Marlow **20061026091814] [Remove PAR/GRAN code from the storage manager Simon Marlow **20061025111114 ] [markRootPtrTable: write out type in full instead of using evac_fn typedef Simon Marlow **20061026085418 Fixes stage 2 build with -fvia-C ] [an expression with a TickBox round it is not in HNF. andy@galois.com**20061025203829] [Adding arrows to the acceptable code for hpc andy@galois.com**20061025201514] [fixing type error inside Hpc inc; we had a 32 bit '1'. andy@galois.com**20061025201422] [Improving error message in CmmLint andy@galois.com**20061025201338] [Changing Main.tix to .tix in the Hpc RTS andy@galois.com**20061025201229] [Add pointer to coding conventions to HACKING Manuel M T Chakravarty **20061025164331] [6.4 compatiblity andy@galois.com**20061025075900] [Haskell Program Coverage andy@galois.com**20061024212907 This large checkin is the new ghc version of Haskell Program Coverage, an expression-level coverage tool for Haskell. Parts: - Hpc.[ch] - small runtime support for Hpc; reading/writing *.tix files. - Coverage.lhs - Annotates the HsSyn with coverage tickboxes. - New Note's in Core, - TickBox -- ticked on entry to sub-expression - BinaryTickBox -- ticked on exit to sub-expression, depending -- on the boolean result. - New Stg level TickBox (no BinaryTickBoxes, though) You can run the coverage tool with -fhpc at compile time. Main must be compiled with -fhpc. ] [fix 5.04 compile Simon Marlow **20061024133943] [fix indentation wibble to make it compile with 5.04 Simon Marlow **20061024122800] [Re-enable TABLES_NEXT_TO_CODE for powerpc (was accidentally disabled) wolfgang.thaller@gmx.net**20061023203321] [Split GC.c, and move storage manager into sm/ directory Simon Marlow **20061024091357 In preparation for parallel GC, split up the monolithic GC.c file into smaller parts. Also in this patch (and difficult to separate, unfortunatley): - Don't include Stable.h in Rts.h, instead just include it where necessary. - consistently use STATIC_INLINE in source files, and INLINE_HEADER in header files. STATIC_INLINE is now turned off when DEBUG is on, to make debugging easier. - The GC no longer takes the get_roots function as an argument. We weren't making use of this generalisation. ] [fix a printf format warning Simon Marlow **20061024091323] [add prototypes for exitHashTable() Simon Marlow **20061020102934] [remove ^Ms Simon Marlow **20061019141218] [add pure spin locks Simon Marlow **20061019135620] [comments only: document allocateLocal() Simon Marlow **20061019101200] [rename allocated_bytes() to allocatedBytes() Simon Marlow **20061019101129] [remove performGCWithRoots() Simon Marlow **20061019101102 I don't think this can ever be useful, because to add more roots you need to do it consistently for every GC. The right way to add roots is to use newStablePtr. ] [Bump the HEAD to 6.7 Ian Lynagh **20061024003553] [Clean up debugging code in RnNames Manuel M T Chakravarty **20061023180503] [wibble in parseStaticFlags Simon Marlow **20061023145817 should fix profiling and unreg in HEAD ] [Improve error messages for indexed types Manuel M T Chakravarty **20061022171212] [A little abstraction basvandijk@home.nl**20061019152328] [Fix handling of family instances in the presense of this doc stuff Manuel M T Chakravarty **20061022004904 - Not sure whether I do the right thing, because I don't understand the doc stuff. However, the original code was definitely wrong and breaking the renaming of family instance declarations. - The important point is that in data instance T pats = rhs T is *not* a defining occurence of T (similarly as C is not a defining occurence in "instance C Int"). ] [TAG 2006-10-22 Ian Lynagh **20061022003640] [Fix parent position in RnNames.nubAvails Manuel M T Chakravarty **20061021035829 - `RnNames.nubAvails', which amalgamates AvailInfo items that belong to the same parent, needs to be careful that the parent name occurs first if it is in the list of subnames at all. (Otherwise, we can get funny export items in ifaces.) - I discovered this while debugging family import/exports, but I am pretty sure the bug would also have shown up without using families under the right circumstances. ] [Fix export of associated families with new name parent story Manuel M T Chakravarty **20061021002813 Given module Exp (T) where class C a where data T a :: * we need the AvailInfo for the export item to be C|{T}, not just T. This patch achieves that under the new name parent scheme. ] [Fix processing of imports involving ATs with the new name parent code Manuel M T Chakravarty **20061020180442 Associated types in import lists require special care and the new name parent code broke that. What's the problem? in the presence of ATs the name parent relation can have a depth of two (not just one as in H98). Here is an example: class GMapKey a where data GMap a :: * -> * instance GMapKey Int where data GMap Int v = GMapInt ... The data constructor GMapInt's parent is GMap whose parent in turn is the class GMapKey; ie, GMapKey is GMapInt's grand parent. In H98, data types have no parents (which is in some places in the code represented by making them their own parent). I fixed this by extending the information in filterImport's occ_env and taking the case of associated types explicitly in consideration when processing the various forms of IE items. ] [Fix family instance bug due to the name parent elimination Manuel M T Chakravarty **20061019180103 - Its important that `isImplicitTyCon' considers (a) associated families to be implicit, but (b) considers family instances *not* to be implicit (for the same reasons that a dfun is not implicit). ] [Fix show-iface for family instances & add debug ppr for type declarations Manuel M T Chakravarty **20061019165840] [Run dos2unix on all the outputs, and don't let it eat stderr Ian Lynagh **20061019134818] [Fix stage1 build with 6.2.1 (from Andy Gill) Ian Lynagh **20061019000807] [Fix the build with GHC 6.2.2 Ian Lynagh **20061018230555] [Cross-module consistency check for family instances Manuel M T Chakravarty **20061018221300] [Fixed spelling error in compiler/ghci/InteractiveUI.hs and docs/users_guide/ghci.xml basvandijk@home.nl**20061011204301] [Fix a bug in Lint (which wrongly complained when compiling Data.Sequence with -02) simonpj@microsoft.com**20061018120500] [Add the primitive type Any, and use it for Dynamics simonpj@microsoft.com**20061018115658 GHC's code generator can only enter a closure if it's guaranteed not to be a function. In the Dynamic module, we were using the type (forall a.a) as the type to which the dynamic type was unsafely cast: type Obj = forall a.a Gut alas this polytype was sometimes instantiated to (), something like this (it only bit when profiling was enabled) let y::() = dyn () in (y `cast` ..) p q As a result, an ASSERT in ClosureInfo fired (hooray). I've tided this up by making a new, primitive, lifted type Any, and arranging that Dynamic uses Any, thus: type Obj = ANy While I was at it, I also arranged that when the type checker instantiates un-constrained type variables, it now instantiates them to Any, not () e.g. length Any [] [There remains a Horrible Hack when we want Any-like things at arbitrary kinds. This essentially never happens, but see comments with TysPrim.mkAnyPrimTyCon.] Anyway, this fixes Trac #905 ] [Add comment about arity simonpj@microsoft.com**20061018112418 I'm not sure what the significance of the "arity" of a primtive TyCon is. They aren't necessarily saturated, so it's not that. I rather think that arity is only relevant for SynTyCon AlgTyCon CoercionTyCon This comment (and commit message) is just an aide memoire. ] [Spelling in comment simonpj@microsoft.com**20061018112351] [Minor refactoring simonpj@microsoft.com**20061018112320] [Comments onl simonpj@microsoft.com**20061018112235] [fix build for 6.4.x and 6.6.x Simon Marlow **20061018080526] [compensate for gmp/configure sometimes not being executable Simon Marlow **20061017132215] [Rejig TABLES_NEXT_TO_CODE: the -unreg flag was broken by earlier changes Simon Marlow **20061017094435 A GHC binary can generally build either registerised or unregisterised code, unless it is unregisterised only. The previous changes broke this, but I think I've now restored it. ] [Stage 2 fix to "Keep track of family instance modules" Manuel M T Chakravarty **20061016194048] [remove use of FiniteMap, use Text.Printf Simon Marlow **20061016151935] [fix a regular expression in banner_re Simon Marlow **20061016150802] [Try to get the right output for nofib-analyse Samuel Bronson **20061014175855] [Get nofib-analyse to build with 6.4 at least... Samuel Bronson **20061014163442] [Don't squish "Inlined fn" into the right margin quite as much in trace output Samuel Bronson **20061016130004] [Fix build on x86_64 Simon Marlow **20061016112045 ] [Fix deadlock on second call to newSession Simon Marlow **20061016111741 Tracked down by Krasimir Angelov ] [Build the GHC package in stage 3 too Simon Marlow **20061016110926 This fixes the problem with the nightly builds not including the GHC package. ] [more fixups to make a stage 3 build do the right thing with the ghc package Simon Marlow **20061013135318] [use the correct $(HC) Simon Marlow **20061013134443] [remove unused origPkgIdMap field from PackageState Simon Marlow **20061006105148] [Cache the package database the first time it is read Simon Marlow **20061006104221 This was a slight oversight on my part, I intended to store the pristine database in the pkgDatabase of DynFlags, but managed to forget to do it. ] [fix non-DEBUG build (probably my fault, sorry) Simon Marlow **20061016105852] [Add assertion checks for mkCoVar/mkTyVar simonpj@microsoft.com**20061013162434 A type variable has a flag saying whether it is a *type* variable or a *coercion* variable. This patch adds assertions to check the flag. And it adds fixes to places which were Wrong (and hence fired the assertion)! Also removed isCoVar from Coercion, since it's done by Var.isCoVar. ] [Uncomment code to emit a space in place of a '>' in literate scripts Ian Lynagh **20061013131514 This fixes trac #210. Test is read041. ] [Change type of TcGadt.refineType, plus consequences simonpj@microsoft.com**20061013115801] [More refactoring in RnNames simonpj@microsoft.com**20061013094230 I rather self-indulgently spent a chunk of yesterday working on refactoring RnNames further. The result is significantly simpler: * A GlobalRdrElt gets an extra field, gre_par, which records the parent (if any) of the name * ImportAvails has two fields deleted: imp_env and imp_parent. The information provided by these fields was only used when processing the export list; and the same information is now readily generated from the GlobalRdrElts in the GlobalRdrEnv I also did some tidying up; notably moving AvailEnv stuff from TcRnTypes to RnNames. The result is tha the compiler is some 130 lines shorter than before ] [Keep track of family instance modules Manuel M T Chakravarty **20061013004223 - Now each modules carries (1) a flag saying whether it contains family instance declarations and (2) a list of all modules further down in the import tree that contain family instance declarations. (The information is split into these two parts for the exact same reasons why the info about orphan modules is split, too.) - This is the first step to *optimised* overlap checking of family instances coming from imported modules. *** WARNING: This patch changes the interface file format! *** *** Recompile libraries and stage2 from scratch! *** ] [Overlap check for family instances def'd in current module Manuel M T Chakravarty **20061012203737 - All family instances are checked for overlap when entered into TcGblEnv. Their are checked against all instances in the EPS and those currently in the TcGblEnv. ] [Comments only simonpj@microsoft.com**20061012160254] [Make Inst into a record type to ease subsequent changes simonpj@microsoft.com**20061011112305] [Improve pretty-printing slightly simonpj@microsoft.com**20061011112242] [Add comments about primop rules simonpj@microsoft.com**20061011112224] [fix definition of fib in example code Simon Marlow *-20061012110711] [Track changes in source packaging scheme sven.panne@aedion.de**20061012121213] [fix definition of fib in example code Simon Marlow **20061012110711] [Partially fix GHCi when unregisterised Ian Lynagh **20061012013901 We were constructing info tables designed for TABLES_NEXT_TO_CODE, but were building without TABLES_NEXT_TO_CODE. This patch also fixes a bug when we are unregisterised on amd64 and have code with an address above 2^32. ] [More import tidying and fixing the stage 2 build Simon Marlow **20061011200110] [Use relative URLs when referring to libraries; push to 6.6 branch simonpj@microsoft.com**20061011142502] [Improve documentation of concurrent and parallel Haskell; push to branch simonpj@microsoft.com**20061010155834] [Correct id to linkend simonpj@microsoft.com**20061010155814] [Fix trac #921: generate *q instructions for int-float conversions Ian Lynagh **20061011140007 We need to generate, e.g., cvtsi2sdq rather than cvtsi2sd on amd64 in order to have int-float conversions work correctly for values not correctly representable in 32 bits. ] [Module header tidyup #2 Simon Marlow **20061011143523 Push this further along, and fix build problems in the first patch. ] [remove BitSet, it isn't used Simon Marlow **20061011131614] [Module header tidyup, phase 1 Simon Marlow **20061011120517 This patch is a start on removing import lists and generally tidying up the top of each module. In addition to removing import lists: - Change DATA.IOREF -> Data.IORef etc. - Change List -> Data.List etc. - Remove $Id$ - Update copyrights - Re-order imports to put non-GHC imports last - Remove some unused and duplicate imports ] [Interface file optimisation and removal of nameParent Simon Marlow **20061011120518 This large commit combines several interrelated changes: - IfaceSyn now contains actual Names rather than the special IfaceExtName type. The binary interface file contains a symbol table of Names, where each entry is a (package, ModuleName, OccName) triple. Names in the IfaceSyn point to entries in the symbol table. This reduces the size of interface files, which should hopefully improve performance (not measured yet). The toIfaceXXX functions now do not need to pass around a function from Name -> IfaceExtName, which makes that code simpler. - Names now do not point directly to their parents, and the nameParent operation has gone away. It turned out to be hard to keep this information consistent in practice, and the parent info was only valid in some Names. Instead we made the following changes: * ImportAvails contains a new field imp_parent :: NameEnv AvailInfo which gives the family info for any Name in scope, and is used by the renamer when renaming export lists, amongst other things. This info is thrown away after renaming. * The mi_ver_fn field of ModIface now maps to (OccName,Version) instead of just Version, where the OccName is the parent name. This mapping is used when constructing the usage info for dependent modules. There may be entries in mi_ver_fn for things that are not in scope, whereas imp_parent only deals with in-scope things. * The md_exports field of ModDetails now contains [AvailInfo] rather than NameSet. This gives us family info for the exported names of a module. Also: - ifaceDeclSubBinders moved to IfaceSyn (seems like the right place for it). - heavily refactored renaming of import/export lists. - Unfortunately external core is now broken, as it relied on IfaceSyn. It requires some attention. ] [add extendNameEnvList_C Simon Marlow **20061010153137] [getMainDeclBinder should return Nothing for a binding with no variables Simon Marlow **20061010153023 See test rn003 ] [Use ":Co", not "Co" to prefix coercion TyCon names Simon Marlow **20061010134449 Avoid possibility of name clash ] [Fix another hi-boot file Ian Lynagh **20061010235157] [Removed unused unwrapFamInstBody from MkId Manuel M T Chakravarty **20061010205843] [Rejig the auto-scc wrapping stuff simonpj@microsoft.com**20061010164116] [Do not filter the type envt after each GHCi stmt simonpj@microsoft.com**20061010143225 Fixes Trac #925 A new comment in TcRnDriver in tcRnStmt reads thus: At one stage I removed any shadowed bindings from the type_env; they are inaccessible but might, I suppose, cause a space leak if we leave them there. However, with Template Haskell they aren't necessarily inaccessible. Consider this GHCi session Prelude> let f n = n * 2 :: Int Prelude> fName <- runQ [| f |] Prelude> $(return $ AppE fName (LitE (IntegerL 7))) 14 Prelude> let f n = n * 3 :: Int Prelude> $(return $ AppE fName (LitE (IntegerL 7))) In the last line we use 'fName', which resolves to the *first* 'f' in scope. If we delete it from the type env, GHCi crashes because it doesn't expect that. ] [Fail more informatively when a global isn't in the type environment simonpj@microsoft.com**20061010143145] [Rough matches for family instances Manuel M T Chakravarty **20061010044656 - Class and type family instances just got a lot more similar. - FamInst, like Instance, now has a rough match signature. The idea is the same: if the rough match doesn't match, there is no need to pull in the while tycon describing the instance (from a lazily read iface). - IfaceFamInst changes in a similar way and the list of all IFaceFamInsts is now written into the binary iface (as for class instances), as deriving it from the tycon (as before) would render the whole rough matching useless. - As a result of this, the plumbing of class instances and type instances through the various environments, ModIface, ModGuts, and ModDetails is now almost the same. (The remaining difference are mostly because the dfun of a class instance is an Id, but type instance refer to a TyCon, not an Id.) *** WARNING: The interface file format changed! *** *** Rebuild from scratch. *** ] [Tweaks and missing case in disassembler Ian Lynagh **20061009230539] [Update hi-boot files to fix building with old GHCs Ian Lynagh **20061009193218] [STM invariants tharris@microsoft.com**20061007122907] [Fix unregisterised alpha builds Ian Lynagh **20061004125857] [Comments and an import-trim simonpj@microsoft.com**20061006161403] [Mention that the module sub-directory structure for .o and .hi files is created automatically by GHC simonpj@microsoft.com**20061006151234] [Bale out before renamer errors are duplicated simonpj@microsoft.com**20061006140250 With the new Haddock patch, renamer errors can be duplicated; so we want to bale out before doing the Haddock stuff if errors are found. (E.g test mod67 shows this up.) ] [Avoid repeatedly loading GHC.Prim simonpj@microsoft.com**20061006140102 This patch changes HscTypes.lookupIfaceByModule. The problem was that when compiling the 'base' package, we'd repeatedly reload GHC.Prim. This is easily fixed by looking in the PIT too. A comment with lookupIfaceByModule explains ] [Print the 'skipping' messages at verbosity level 1 simonpj@microsoft.com**20061006140034] [Fix up the typechecking of interface files during --make simonpj@microsoft.com**20061006131932 This patch fixes Trac #909. The problem was that when compiling the base package, the handling of wired-in things wasn't right; in TcIface.tcWiredInTyCon it repeatedly loaded GHC.Base.hi into the PIT, even though that was the very module it was compiling. The main fix is by introducing TcIface.ifCheckWiredInThing. But I did some minor refactoring as well. ] [Import trimming simonpj@microsoft.com**20061006131830] [Figure out where the rest of the repositories are, based on defaultrepo Simon Marlow **20061006100049 This is a slight improvement over the patch sent by jamey@minilop.net, we now do it properly if the source repo was a GHC tree on the local filesystem too. Merge post 6.6. ] [Yet another fix to mkAtomicArgs (for floating of casts) simonpj@microsoft.com**20061006075213 Comment Note [Take care] explains. mkAtomicArgs is a mess. A substantial rewrite of Simplify is needed. ] [Improve comments and error tracing simonpj@microsoft.com**20061006075058] [Improve error message simonpj@microsoft.com**20061006072002] [Undo an accidentally-committed patch by Audrey simonpj@microsoft.com**20061006071925] [Merge Haddock comment support from ghc.haddock -- big patch davve@dtek.chalmers.se**20061005220258] [Remove casts from lvalues to allow compilation under GCC 4.0 brianlsmith@gmail.com**20060929185931] [Correct the float-coercions-out-of-let patch simonpj@microsoft.com**20061005161819] [Merge changes Ian Lynagh **20061005150630] [Improve the correlation betweens documented and existent options Ian Lynagh **20061003220354] [Document -dfaststring-stats Ian Lynagh **20061003154147] [Rearrange docs to have all the -ddump-* options together Ian Lynagh **20061003153422] [Remove unused option -femit-extern-decls Ian Lynagh **20061003145854] [Documentation updates Ian Lynagh **20061003142658] [Fix typo Ian Lynagh **20061003121926] [More bootstrapping updates Ian Lynagh **20061005145629] [TAG 2006-10-05 Lemmih **20061005150234] [Teach SpecConstr about Cast simonpj@microsoft.com**20061005143624 This patch teaches SpecConstr about casts; see Note [SpecConstr for casts] ] [Float coercions out of lets simonpj@microsoft.com**20061005132437 Note [Float coercions] ~~~~~~~~~~~~~~~~~~~~~~ When we find the binding x = e `cast` co we'd like to transform it to x' = e x = x `cast` co -- A trivial binding There's a chance that e will be a constructor application or function, or something like that, so moving the coerion to the usage site may well cancel the coersions and lead to further optimisation. Example: data family T a :: * data instance T Int = T Int foo :: Int -> Int -> Int foo m n = ... where x = T m go 0 = 0 go n = case x of { T m -> go (n-m) } -- This case should optimise ] [Remove unused argument to mkAtomicArgs simonpj@microsoft.com**20061005130752] [Comments and layout simonpj@microsoft.com**20061005130723] [Remove unused OccInfo (simplification) simonpj@microsoft.com**20061005130327 The substitution used to carry "fragile" OccInfo to call sites via the DoneId constructor of SimplEnv.SimplSR. This was always a tricky thing to do, and for some time I've been removing the need for it. Now at last I think we can nuke it altogether. Hooray. I did a full nonfib run, and got zero perf changes. ] [Take 2 on the recursive-rule fix simonpj@microsoft.com**20061005121023 This is another attempt to fix the interaction between recursion and RULES. I just had it wrong before! Now the significance of the flag on IAmALoopBreaker is given in BasicTypes | IAmALoopBreaker -- Used by the occurrence analyser to mark loop-breakers -- in a group of recursive definitions !RulesOnly -- True <=> This loop breaker mentions the other binders -- in its recursive group only in its RULES, not -- in its rhs -- See OccurAnal Note [RulesOnly] ] [Take advantage of non-rec-ness in occurrence analysis (minor) simonpj@microsoft.com**20061005105721] [Spelling in comment simonpj@microsoft.com**20061005105640] [Add intersectsUFM simonpj@microsoft.com**20061005105615] [Made 'for' a special ID in the grammar. bjorn@bringert.net**20060921052053] [Merged stand-alone deriving with FC stuff. bjorn@bringert.net**20060920223917] [First documentation on stand-alone instance deriving. bjorn@bringert.net**20060919010606] [Fixed source location and instance origin in stand-alone deriving error messages. bjorn@bringert.net**20060919010535] [Added type signature for tcSplitSigmaTy. bjorn@bringert.net**20060918230925] [New syntax for stand-alone deriving. Implemented fully. bjorn@bringert.net**20060918230854] [Renamer part of stand-alone deriving extension. bjorn@bringert.net**20060917215420] [Added parser and abstract syntax support for stand-alone deriving declarations. bjorn@bringert.net**20060917000956] [Comments only simonpj@microsoft.com**20061004211015] [Fix comment in RdrName simonpj@microsoft.com**20061004210845] [Improve unboxing of strict fields simonpj@microsoft.com**20061004152705 Note [Recursive unboxing] ~~~~~~~~~~~~~~~~~~~~~~~~~ Be careful not to try to unbox this! data T = MkT !T Int But it's the *argument* type that matters. This is fine: data S = MkS S !Int because Int is non-recursive. Before this patch, we were only doing the unboxing if the *parent* data type was non-recursive (eg that meant S was not unboxed), but that is over-conservative. This showed up with indexed data types (thanks to Roman for finding it) because indexed data types are conservatively regarded as always recursive. ] [Remove redundant dump simonpj@microsoft.com**20061004152614] [Trim imports simonpj@microsoft.com**20061004152521] [Improve liberate-case to take account of coercions simonpj@microsoft.com**20061004135155 Note [Scrutinee with cast] ~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider this: f = \ t -> case (v `cast` co) of V a b -> a : f t Exactly the same optimistaion (unrolling one call to f) will work here, despite the cast. See mk_alt_env in the Case branch of libCase. This patch does the job. For a change, it was really easy. ] [Remvove totally unused static flags simonpj@microsoft.com**20061004124826] [Remove ILX from the GHC altogether (although I left the source file IlxGen in case anyone wants to see it) simonpj@microsoft.com**20061004123242] [-frule-check is not a static flag simonpj@microsoft.com**20061004123222] [Tidy tyvar OccNames in TcTyClDecl simonpj@microsoft.com**20061004121239 We want the universal and existential tyvars of a data constructor to have distinct OccNames. It's confusing if they don't (in error messages, for example), and with the current way of generating IfaceSyn, it actally generates bogus interface files. (Which bit Roman.) When IfaceSyn is full of Names, this won't matter so much, but it still seems cleaner. This patch adds a 'tidy' step to the generation of DataCon type variables in TcTyClDecls.tcResultType ] [Improve pretty printing slightly simonpj@microsoft.com**20061004121224] [Second bite at the rules-only idea simonpj@microsoft.com**20061004111000 This is part 2 of the patch that improved the interaction of RULES and recursion. It's vital that all Ids that may be referred to from later in the module are marked 'IAmALoopBreaker' because otherwise we may do postInlineUnconditionally, and lose the binding altogether. So I've added a boolean rules-only flag to IAmALoopBreaker. Now we can do inlining for rules-only loop-breakers. ] [Eliminate case-of-cast simonpj@microsoft.com**20061004110741 Note [Case of cast] ~~~~~~~~~~~~~~~~~~~ Consider case (v `cast` co) of x { I# -> ... (case (v `cast` co) of {...}) ... We'd like to eliminate the inner case. We can get this neatly by arranging that inside the outer case we add the unfolding v |-> x `cast` (sym co) to v. Then we should inline v at the inner case, cancel the casts, and away we go This patch does the job, fixing a performance hole reported by Roman. ] [Fixes for the porting process for 6.6 Ian Lynagh **20061003124232] [Make recursion and RULES interact better simonpj@microsoft.com**20061003153057 See Trac #683 This patch improves the interaction of recursion and RULES; at least I hope it does. The problem was that a RULE was being treated uniformly like an "extra RHS". This worked badly when you have a non-recursive definition that is made recursive only by RULE. This patch maeks the occurrence analyser know whether a binder is referred to only from RULES (the RulesOnly constructor in OccInfo). Then we can ignore such edges when deciding on the order of bindings in a letrec, and when setting the LoopBreaker flag. The remaining potential problem is this: rec{ f = ...g... ; g = ...f... RULE g True = ... } The RULE for g may not be visible in f's rhs. This is fixable, but not today. ] [Warning police only simonpj@microsoft.com**20061003134414] [Fix scoped type variables for expression type signatures simonpj@microsoft.com**20061003134056 I had forgotten to bring scoped type variables into scope at an expression type signature, such as e :: forall s. where 's' should scope over the expression e. Like everything to do with scoped type variables, fixing this took an unreasonable amount of work. I'm sure there must be a better way to achitect this! I updated the user manual too. A test is tc213. It would be good to push this into 6.6.1 ] [Trim imports simonpj@microsoft.com**20061003133845] [Add error check for operators in types simonpj@microsoft.com**20061003082805 Fixes Trac #919 ] [Add a C++ phase. Fixes bug #800 Lemmih **20060727080023] [Latin-1-to-UTF8 pre-processor example for docs from Christian Maeder Ian Lynagh **20061001010700] [add :edit to the release notes, and improve the docs a bit Simon Marlow **20060929112108] [Simplify the way in which the coKindFun in CoercionTyCon is handled simonpj@microsoft.com**20060929222845 Before the coKindFun could be applied to too many arguments; now it expects exactly the right number of arguments. That makes it easier to write the coKindFuns, and localises the work. ] [Match let before lambda in rule-matching (see comment with Lam case of Rules.match) simonpj@microsoft.com**20060929222645] [Fix bug in SCRIPT_SHELL patch (| should be ||) simonpj@microsoft.com**20060929222433] [Add missing case for EqPred simonpj@microsoft.com**20060929165118] [Amplify scoped tyvar changes simonpj@microsoft.com**20060929165038] [Update release notes simonpj@microsoft.com**20060929122855] [Remove Linear Implicit Parameters, and all their works simonpj@microsoft.com**20060929160717 Linear implicit parameters have been in GHC quite a while, but we decided they were a mis-feature and scheduled them for removal. This patch does the job. ] [Global renamings in HsSyn simonpj@microsoft.com**20060929143910] [Improve pretty-printing of Core simonpj@microsoft.com**20060929133549] [Another correction to the (subtle) exprIsConApp_maybe simonpj@microsoft.com**20060929133512] [Spelling correction simonpj@microsoft.com**20060929123644] [Improve pretty printing of IfaceSyn simonpj@microsoft.com**20060929123355] [Improve unification error messages (again) (push to 6.6 branch) simonpj@microsoft.com**20060929122010] [:edit runs notepad by default on Windows Simon Marlow **20060929102739] [unbreak :edit patch on Windows Simon Marlow **20060928155951] [Fix #906, and do #914 while I'm in here (it wasn't too hard) Simon Marlow **20060928151705] [Add basic :edit support Simon Marlow **20060928135156 Without jumping to line numbers or %-expansion, we could add that later. ] [tiny fix in porting docs I just spotted Simon Marlow **20060928105611] [only make stdin/stdout unbuffered in GHCi, not runghc or ghc -e. Simon Marlow **20060928105403] [testsuite *is* boring Simon Marlow **20060928105342] [fix typo in comment Andres Loeh **20060914235648] [remove non-boring directories Norman Ramsey **20060915234902] [Modify toArgs to parse quotes/escapes like /bin/sh rjmccall@gmail.com**20060917003641 Addresses ticket #197, which asks for escape sequences to be supported directly (i.e. not only in dquoted strings) on :load commands in GHCI. Fix modifies the toArgs function to parse its input like /bin/sh does, i.e. recognizing escapes anywhere and treating quoted strings as atomic chunks. Thus: :load a\ b c\"d e" "f would parse with three arguments, namely 'a b', 'c"d', and 'e f'. toArgs is used to parse arguments for both :load and :main, but doesn't appear to be used elsewhere. I see no harm in modifying both to be consistent -- in fact, the functionality is probably more useful for :main than for :load. ] [Fix mulIntMayOflo on 64-bit arches; fixes trac #867 Ian Lynagh **20060928004806 We were assuming we could multiply 2 32-bit numbers without overflowing a 64-bit number, but we can't as the top bit is the sign bit. ] [Handle clock_gettime failing Ian Lynagh **20060927234630] [Change default repo root for the 6.6 branch Ian Lynagh *-20060902174936] [Tell the 6.6 branch where to find extralibs Ian Lynagh *-20060906124640] [Rename -no-recomp to -fforce-recomp, and document it Simon Marlow **20060927132707] [Make printing of binding results optional in GHCi, and document it Simon Marlow **20060927132550 You can say :set -fno-print-bind-result in GHCi to disable this behaviour. Addresses #887 ] [Tell the 6.6 branch where to find extralibs Ian Lynagh **20060906124640] [Change default repo root for the 6.6 branch Ian Lynagh **20060902174936] [Fix exprIsConApp_maybe (wasn't dealing properly with the EqSpec of the DataCon) simonpj@microsoft.com**20060927125308] [unbreak mingw-on-cygwin (/=MSYS) builds sof@galois.com**20060926165631] [Add source code links to Haddock docs Simon Marlow **20060908112725 Right now we can only manage to add a source code link for the module, but that's better than nothing. I had to put the list of core packages in a Makefile variable, $(CorePackages), so we'll have to be careful to keep this up to date. (I could have slurped it out of libraries/core-packages with $(shell), but that's ugly and really slow on Windows). There are a couple of new tweakables: CorePackageSourceURL and ExtraPackageSourceURL in config.mk.in, set these to the appropriate patterns for generating source links. (when we merge this patch onto the HEAD we'll have to tweak these settings). Unfortunately it still doesn't work for all the modules, because modules compiled without -cpp don't get any #line directives. More hackery required... ] [Fix derived instances (again); prevents infinite superclass loop simonpj@microsoft.com**20060926144230] [Various documentation improvements suggested by Bulat Ziganshin Ian Lynagh **20060925231855] [Fix comment/code inconsistency spotted by Bulat Ziganshin Ian Lynagh **20060925195925 I'm not sure if this is the example that was intended, but it's at least now consistent. ] [rejig library include/ files sof@galois.com**20060925232125] [Fix newtype deriving properly (un-doing Audreys patch) simonpj@microsoft.com**20060925121351 The newtype-deriving mechanism generates a HsSyn case expression looking like this case (d `cast` co) of { ... } That is, the case expression scrutinises a dictionary. This is otherwise never seen in HsSyn, and it made the desugarer (Check.get_unused_cons) crash in tcTyConAppTyCon. It would really be better to generate Core in TcInstDecls (the newtype deriving part) but I'm not going to do that today. Instead, I made Check.get_unused_cons a bit more robust. Audrey tried to fix this over the weekend, but her fix was, alas, utterly bogus, which caused mysterious failures later. I completely undid this change. Anyway it should work now! ] [Document -F in the flag reference Ian Lynagh **20060925134816] [Added Darwinports path to DocBook XSL stylesheets to configure. bjorn@bringert.net**20060918232831] [Comment-only: Fix a typo, and note that the PredTy case on SplitTyConApp_maybe was added as a kluge. audreyt@audreyt.org**20060924123151] [In tcSplittyConApp_maybe, add the PredTy case audreyt@audreyt.org**20060924063208 such that this can compile again: newtype Moose = MkMoose () deriving (Eq, Ord) ] [Fixed DocBook XML once again, "make validate" is your friend! sven.panne@aedion.de**20060923165045] [Trim more imports simonpj@microsoft.com**20060923072509] [Fix origin for addDataConStupidTheta simonpj@microsoft.com**20060923072407] [Remove ASSERT from mkDataCon, and add comments to explain why simonpj@microsoft.com**20060923053053] [The unboxed tuple kind is (#), not (##) simonpj@microsoft.com**20060923043130] [Complete definition of cmPredX to take account of EqPred simonpj@microsoft.com**20060923042934] [Correct crucial typo in isSubKind (kc1 -> kc2)! simonpj@microsoft.com**20060923042829] [Re-work the newtype-deriving support simonpj@microsoft.com**20060923040505 The newtype deriving mechanism is much trickier to support than it seems at first. Kevin didn't get it quite right when moving to FC, and I ended up re-writing quite a bit of it. I think it's right now, but I have not yet tested it thoroughly. ] [Add TcRnMonad.newSysLocalIds, and use it simonpj@microsoft.com**20060923040416] [Remove dead code concerning coercions from TypeRep simonpj@microsoft.com**20060923040216] [Move snocView in the file, nearer the other spliting functions simonpj@microsoft.com**20060923040138] [Improve documentation of newtype-deriving (todo: check formatting still works) simonpj@microsoft.com**20060923040015] [Add VarSet.disjointVarSet, and use it simonpj@microsoft.com**20060923035829] [Trim imports, and remove some dead code simonpj@microsoft.com**20060923035201] [Improve specialisation in SpecConstr simonpj@microsoft.com**20060922190436 This patch enables argToPat to look through let expressions e.g. f (let v = rhs in \y -> ...v...) Here we can specialise for f (\y -> ...) because the rule-matcher will look through the let. ] [Remove duplicate call to getDOpts simonpj@microsoft.com**20060922190350] [Remove use of isVanillaDataCon, which was wrong under the new FC dispensation simonpj@microsoft.com**20060922190307] [Trim imports, reformatting simonpj@microsoft.com**20060922190219] [Add a crucial missing prime in tcConPat simonpj@microsoft.com**20060922185711 This fixes a typo -- a missing prime in tcConPat. The test is gadt18. While modifying TcPat I also trimmed imports, fixed non-exhaustive patterns, and improved tracing. ] [64bit fixes for the symbol lookup table sven.panne@aedion.de**20060923162408] [In ByteCodeGen, correctly passthru AnnCast in all relevant places, so the previous band-aid fix is no longer needed. audreyt@audreyt.org**20060923052815] [Add explicit eta-reduction to GHCI's schemeE such that deriving Typeable won't panick. audreyt@audreyt.org**20060923050929] [Repair "ghci" under FC+AT by handling AnnCast in bytecode generator. audreyt@audreyt.org**20060922040618] [Fix Linker import when BREAKPOINT is off Manuel M T Chakravarty **20060921210029] [Extend IfaceSyn.eqIfTc to cover type kind variants from FC Manuel M T Chakravarty **20060921161400] [Use --export-dynamic to ensure ghci works on newer openbsds Don Stewart **20060921010155 Changes to the RTLD_DEFAULT semantics broke the trick we used to ensure libc symbols were available to the ghci linker, in OpenBSD 4.0. We can fix this by linking the ghc binary itself with --export-dynamic on this system, removing the need for any magic Linker.c games. GHCi now works on OpenBSD 4.0 Contributed by Eric Mertens ] [* TypeRep.lhs and TypeRep.lhs-boot didn't agree on their signatures (SuperKind vs Kind) audreyt@audreyt.org**20060921012531] [* Fix stray comma in HsTypes.lhs's import line. audreyt@audreyt.org**20060921011356] [TAG After FC branch merge Manuel M T Chakravarty **20060920211146] [Correct substitution into theta types (after merge) Manuel M T Chakravarty **20060920204805] [Fix import list of TcTyClsDecls after merge Manuel M T Chakravarty **20060920204744] [Adding FamInstEnv & FamInst modules Manuel M T Chakravarty **20060920201727 - They got lost during manual patching, as they are file additions. ] [Adapt FC-code in TcUnify to pre-subsumption Manuel M T Chakravarty **20060920185719 Wed Sep 20 04:01:18 EDT 2006 Manuel M T Chakravarty * Adapt FC-code in TcUnify to pre-subsumption ] [Some more ASSERTs Manuel M T Chakravarty **20060920185432 Wed Sep 20 02:52:00 EDT 2006 Manuel M T Chakravarty * Some more ASSERTs ] [SPJ's fix to resolve conflict in instFun Manuel M T Chakravarty **20060920185240 Wed Sep 20 02:27:26 EDT 2006 Manuel M T Chakravarty * SPJ's fix to resolve conflict in instFun ] [Adjust code from manual merges Manuel M T Chakravarty **20060920185109 Tue Sep 19 14:12:36 EDT 2006 Manuel M T Chakravarty * Adjust code from manual merges ] [Adapt TcFix imports Manuel M T Chakravarty **20060920185041 Tue Sep 19 14:11:55 EDT 2006 Manuel M T Chakravarty * Adapt TcFix imports ] [Basic set up for global family instance environment Manuel M T Chakravarty **20060920185019 Mon Sep 18 19:52:34 EDT 2006 Manuel M T Chakravarty * Basic set up for global family instance environment Fri Sep 15 15:20:44 EDT 2006 Manuel M T Chakravarty * Basic set up for global family instance environment ] [Import/export of data constructors in family instances Manuel M T Chakravarty **20060920184953 Mon Sep 18 19:50:42 EDT 2006 Manuel M T Chakravarty * Import/export of data constructors in family instances Tue Sep 12 13:54:37 EDT 2006 Manuel M T Chakravarty * Import/export of data constructors in family instances - Data constructors of a data/newtype family F can be exported and imported by writing F(..) or F(ConName). - This appears the most natural from a user's persepctive - although, it has a slightly different flavour than similar import/exports items for closed data types. The data constructors denoted by F(..) vary in dependence on the visible data instances. - This has been non-trivial to achieve as RnNames derives its knowledge of what sub-binders an F(..) item exports/imports from the relation specified by Name.nameParent - ie, the constructors of a data/newtype instance need to have the family name (not the internal name of the representation tycon) as their parent. *** WARNING: This patched changes the iface format! *** *** Please re-compile from scratch! *** ] [Use smart lookup for tycons Manuel M T Chakravarty **20060920184934 Mon Sep 18 19:49:35 EDT 2006 Manuel M T Chakravarty * Use smart lookup for tycons Tue Sep 12 12:55:10 EDT 2006 Manuel M T Chakravarty * Use smart lookup for tycons ] [Fix type checking of imported data instances Manuel M T Chakravarty **20060920184915 Mon Sep 18 19:48:41 EDT 2006 Manuel M T Chakravarty * Fix type checking of imported data instances Mon Sep 11 20:06:51 EDT 2006 Manuel M T Chakravarty * Fix type checking of imported data instances - When reading a data/newtype instance from an interface, the data constructors have their own universals that do not necessarily match up with their tycon's type parameters. (Whereas when type checking source, they are always the same.) - Hence, we need to be careful when building the wrapper signature of imported data constructors from data/newtype instances, and rename the type variables in the instance types appropriately. ] [Fix category of representation tycon Manuel M T Chakravarty **20060920184859 Mon Sep 18 19:48:00 EDT 2006 Manuel M T Chakravarty * Fix category of representation tycon Mon Sep 11 16:18:51 EDT 2006 Manuel M T Chakravarty