1 patch for repository http://darcs.haskell.org/ghc:

Thu Jun 24 22:26:32 CDT 2010  amsay@amsay.net
  * trac #2362 (full import syntax in ghci)
  'import' syntax is seperate from ':module' syntax

New patches:

[trac #2362 (full import syntax in ghci)
amsay@amsay.net**20100625032632
 Ignore-this: a9d0859d84956beb74e27b797431bf9c
 'import' syntax is seperate from ':module' syntax
] {
hunk ./compiler/main/GHC.hs 101
 	typeKind,
 	parseName,
 	RunResult(..),  
-	runStmt, SingleStep(..),
+	runStmt, parseImportDecl, SingleStep(..),
         resume,
         Resume(resumeStmt, resumeThreadId, resumeBreakInfo, resumeSpan,
                resumeHistory, resumeHistoryIx),
hunk ./compiler/main/HscMain.lhs 17
     , hscSimplify
     , hscNormalIface, hscWriteIface, hscGenHardCode
 #ifdef GHCI
-    , hscStmt, hscTcExpr, hscKcType
+    , hscStmt, hscTcExpr, hscImport, hscKcType
     , compileExpr
 #endif
     , HsCompiler(..)
hunk ./compiler/main/HscMain.lhs 54
 import {- Kind parts of -} Type		( Kind )
 import CoreLint		( lintUnfolding )
 import DsMeta		( templateHaskellNames )
-import SrcLoc		( SrcSpan, noSrcLoc, interactiveSrcLoc, srcLocSpan, noSrcSpan )
+import SrcLoc		( SrcSpan, noSrcLoc, interactiveSrcLoc, srcLocSpan, noSrcSpan, unLoc )
 import VarSet
 import VarEnv		( emptyTidyEnv )
 #endif
hunk ./compiler/main/HscMain.lhs 934
 
 	return $ Just (ids, hval)
 
+hscImport :: GhcMonad m => HscEnv -> String -> m (ImportDecl RdrName)
+hscImport hsc_env str = do
+    (L _ (HsModule{hsmodImports=is})) <- hscParseThing parseModule (hsc_dflags hsc_env) str
+    case is of
+        [i] -> return (unLoc i)
+        _ -> throwOneError (mkPlainErrMsg noSrcSpan (ptext (sLit "parse error in import declaration")))
 
 hscTcExpr	-- Typecheck an expression (but don't run it)
   :: GhcMonad m =>
hunk ./compiler/main/HscTypes.lhs 1128
 	ic_toplev_scope :: [Module],	-- ^ The context includes the "top-level" scope of
 					-- these modules
 
-	ic_exports :: [Module],		-- ^ The context includes just the exports of these
+	ic_exports :: [(Module, Maybe (ImportDecl RdrName))],		-- ^ The context includes just the exported parts of these
 					-- modules
 
 	ic_rn_gbl_env :: GlobalRdrEnv,	-- ^ The contexts' cached 'GlobalRdrEnv', built from
hunk ./compiler/main/InteractiveEval.hs 12
 module InteractiveEval (
 #ifdef GHCI
         RunResult(..), Status(..), Resume(..), History(..),
-	runStmt, SingleStep(..),
+	runStmt, parseImportDecl, SingleStep(..),
         resume,
         abandon, abandonAll,
         getResumeContext,
hunk ./compiler/main/InteractiveEval.hs 43
 #include "HsVersions.h"
 
 import HscMain          hiding (compileExpr)
+import HsSyn (ImportDecl)
 import HscTypes
 import TcRnDriver
hunk ./compiler/main/InteractiveEval.hs 46
-import RnNames		( gresFromAvails )
+import TcRnMonad (initTc)
+import RnNames		(gresFromAvails, rnImports)
 import InstEnv
 import Type
 import TcType		hiding( typeKind )
hunk ./compiler/main/InteractiveEval.hs 56
 import Name             hiding ( varName )
 import NameSet
 import RdrName
+import PrelNames (pRELUDE)
 import VarSet
 import VarEnv
 import ByteCodeInstr
hunk ./compiler/main/InteractiveEval.hs 80
 
 import System.Directory
 import Data.Dynamic
-import Data.List (find)
+import Data.List (find, partition)
 import Control.Monad
 import Foreign
 import Foreign.C
hunk ./compiler/main/InteractiveEval.hs 257
 
   gbracket set_cwd reset_cwd $ \_ -> m
 
+parseImportDecl :: GhcMonad m => String -> m (ImportDecl RdrName)
+parseImportDecl expr = withSession $ \hsc_env -> hscImport hsc_env expr
 
 emptyHistory :: BoundedList History
 emptyHistory = nilBL 50 -- keep a log of length 50
hunk ./compiler/main/InteractiveEval.hs 798
 -- we've built up in the InteractiveContext simply move to the new
 -- module.  They always shadow anything in scope in the current context.
 setContext :: GhcMonad m =>
-              [Module]	-- ^ entire top level scope of these modules
-	   -> [Module]	-- ^ exports only of these modules
-	   -> m ()
-setContext toplev_mods export_mods = do
-  hsc_env <- getSession
-  let old_ic  = hsc_IC     hsc_env
-      hpt     = hsc_HPT    hsc_env
-  --
-  export_env  <- liftIO $ mkExportEnv hsc_env export_mods
-  toplev_envs <- liftIO $ mapM (mkTopLevEnv hpt) toplev_mods
-  let all_env = foldr plusGlobalRdrEnv export_env toplev_envs
-  modifySession $ \_ ->
-      hsc_env{ hsc_IC = old_ic { ic_toplev_scope = toplev_mods,
-				 ic_exports      = export_mods,
-				 ic_rn_gbl_env   = all_env }}
+        [Module]	-- ^ entire top level scope of these modules
+        -> [(Module, Maybe (ImportDecl RdrName))]	-- ^ exports of these modules
+        -> m ()
+setContext toplev_mods other_mods = do
+    hsc_env <- getSession
+    let old_ic  = hsc_IC     hsc_env
+        hpt     = hsc_HPT    hsc_env
+        (decls,mods)   = partition (isJust . snd) other_mods -- time for tracing
+        export_mods = map fst mods
+        imprt_decls = map noLoc (catMaybes (map snd decls))
+    --
+    export_env  <- liftIO $ mkExportEnv hsc_env export_mods
+    import_env  <-
+        if null imprt_decls then return emptyGlobalRdrEnv else do
+            let imports = rnImports imprt_decls
+                this_mod = if null toplev_mods then pRELUDE else head toplev_mods
+            (_, env, _,_) <-
+                ioMsgMaybe $ liftIO $ initTc hsc_env HsSrcFile False this_mod imports
+            return env
+    toplev_envs <- liftIO $ mapM (mkTopLevEnv hpt) toplev_mods
+    let all_env = foldr plusGlobalRdrEnv (plusGlobalRdrEnv export_env import_env) toplev_envs
+    modifySession $ \_ ->
+        hsc_env{ hsc_IC = old_ic { ic_toplev_scope = toplev_mods,
+      			 ic_exports      = other_mods,
+      			 ic_rn_gbl_env   = all_env }}
 
 -- Make a GlobalRdrEnv based on the exports of the modules only.
 mkExportEnv :: HscEnv -> [Module] -> IO GlobalRdrEnv
hunk ./compiler/main/InteractiveEval.hs 859
 -- | Get the interactive evaluation context, consisting of a pair of the
 -- set of modules from which we take the full top-level scope, and the set
 -- of modules from which we take just the exports respectively.
-getContext :: GhcMonad m => m ([Module],[Module])
+getContext :: GhcMonad m => m ([Module],[(Module, Maybe (ImportDecl RdrName))])
 getContext = withSession $ \HscEnv{ hsc_IC=ic } ->
 	       return (ic_toplev_scope ic, ic_exports ic)
 
hunk ./compiler/main/InteractiveEval.hs 983
     setContext full $
         (mkModule
             (stringToPackageId "base") (mkModuleName "Data.Dynamic")
-        ):exports
+        ,Nothing):exports
     let stmt = "let __dynCompileExpr = Data.Dynamic.toDyn (" ++ expr ++ ")"
     Just (ids, hvals) <- withSession (flip hscStmt stmt)
     setContext full exports
hunk ./compiler/typecheck/TcRnDriver.lhs 1344
 getModuleExports hsc_env mod
   = let
       ic        = hsc_IC hsc_env
-      checkMods = ic_toplev_scope ic ++ ic_exports ic
+      checkMods = ic_toplev_scope ic ++ map fst (ic_exports ic)
     in
     initTc hsc_env HsSrcFile False iNTERACTIVE (tcGetModuleExports mod checkMods)
 
hunk ./docs/users_guide/ghci.xml 592
 Prelude IO>
 </screen>
 
-      <para>(Note: you can use <literal>import M</literal> as an
-      alternative to <literal>:module +M</literal>, and
+      <para>(Note: you can use conventional
+      haskell <literal>import</literal> syntax as
+      well, but this does not support
+      <literal>*</literal> forms).
       <literal>:module</literal> can also be shortened to 
hunk ./docs/users_guide/ghci.xml 597
-      <literal>:m</literal>). The full syntax of the
+      <literal>:m</literal>. The full syntax of the
       <literal>:module</literal> command is:</para>
 
 <screen>
hunk ./ghc/GhciMonad.hs 72
         -- remember is here:
         last_command   :: Maybe Command,
         cmdqueue       :: [String],
-        remembered_ctx :: [(CtxtCmd, [String], [String])],
+        remembered_ctx :: [Either (CtxtCmd, [String], [String]) String],
              -- we remember the :module commands between :loads, so that
              -- on a :reload we can replay them.  See bugs #2049,
              -- \#1873, #1360. Previously we tried to remember modules that
hunk ./ghc/GhciMonad.hs 260
                                         return GHC.RunFailed) $ do
           GHC.runStmt expr step
 
+parseImportDecl :: GhcMonad m => String -> m (Maybe (GHC.ImportDecl GHC.RdrName))
+parseImportDecl expr
+  = GHC.handleSourceError (\e -> GHC.printExceptionAndWarnings e >> return Nothing) (Monad.liftM Just (GHC.parseImportDecl expr))
+
 resume :: (SrcSpan -> Bool) -> GHC.SingleStep -> GHCi GHC.RunResult
 resume canLogSpan step = do
   st <- getGHCiState
hunk ./ghc/InteractiveUI.hs 36
 import UniqFM
 
 import HscTypes ( handleFlagWarnings )
+import HsImpExp
 import qualified RdrName ( getGRE_NameQualifier_maybes ) -- should this come via GHC?
hunk ./ghc/InteractiveUI.hs 38
+import RdrName (RdrName)
 import Outputable       hiding (printForUser, printForUserPartWay)
 import Module           -- for ModuleEnv
 import Name
hunk ./ghc/InteractiveUI.hs 342
 
    -- initial context is just the Prelude
    prel_mod <- GHC.lookupModule (GHC.mkModuleName "Prelude") Nothing
-   GHC.setContext [] [prel_mod]
+   GHC.setContext [] [(prel_mod, Nothing)]
 
    default_editor <- liftIO $ findEditor
 
hunk ./ghc/InteractiveUI.hs 546
         dots | _:rs <- resumes, not (null rs) = text "... "
              | otherwise = empty
 
-        
-
         modules_bit = 
        -- ToDo: maybe...
        --  let (btoplevs, bexports) = fromMaybe ([],[]) (remembered_ctx st) in
hunk ./ghc/InteractiveUI.hs 552
        --  hsep (map (\m -> text "!*" <> ppr (GHC.moduleName m)) btoplevs) <+>
        --  hsep (map (\m -> char '!'  <> ppr (GHC.moduleName m)) bexports) <+>
              hsep (map (\m -> char '*'  <> ppr (GHC.moduleName m)) toplevs) <+>
-             hsep (map (ppr . GHC.moduleName) exports)
+             hsep (map (ppr . GHC.moduleName) (nub (map fst exports)))
 
         deflt_prompt = dots <> context_bit <> modules_bit
 
hunk ./ghc/InteractiveUI.hs 647
 runStmt :: String -> SingleStep -> GHCi Bool
 runStmt stmt step
  | null (filter (not.isSpace) stmt) = return False
- | ["import", mod] <- words stmt    = keepGoing' setContext ('+':mod)
+ | x@('i':'m':'p':'o':'r':'t':' ':_) <- stmt    = keepGoing' (importContext True) x
  | otherwise
  = do
 #if __GLASGOW_HASKELL__ >= 611
hunk ./ghc/InteractiveUI.hs 1008
     enqueueCommands (lines cmds)
     return ()
 
+loadModuleName :: GHC.GhcMonad m => ImportDecl RdrName -> m Module
+loadModuleName = flip GHC.findModule Nothing . unLoc . ideclName
+
 loadModule :: [(FilePath, Maybe Phase)] -> InputT GHCi SuccessFlag
 loadModule fs = timeIt (loadModule' fs)
 
hunk ./ghc/InteractiveUI.hs 1067
                   else LoadUpTo (GHC.mkModuleName m)
   return ()
 
-doLoad :: Bool -> ([Module],[Module]) -> LoadHowMuch -> InputT GHCi SuccessFlag
+doLoad :: Bool -> ([Module],[(Module, Maybe (ImportDecl RdrName))]) -> LoadHowMuch -> InputT GHCi SuccessFlag
 doLoad retain_context prev_context howmuch = do
   -- turn off breakpoints before we load: we can't turn them off later, because
   -- the ModBreaks will have gone away.
hunk ./ghc/InteractiveUI.hs 1076
   afterLoad ok retain_context prev_context
   return ok
 
-afterLoad :: SuccessFlag -> Bool -> ([Module],[Module]) -> InputT GHCi ()
+afterLoad :: SuccessFlag -> Bool -> ([Module],[(Module, Maybe (ImportDecl RdrName))]) -> InputT GHCi ()
 afterLoad ok retain_context prev_context = do
   lift revertCAFs  -- always revert CAFs on load.
   lift discardTickArrays
hunk ./ghc/InteractiveUI.hs 1088
   lift $ setContextAfterLoad prev_context retain_context loaded_mod_summaries
 
 
-setContextAfterLoad :: ([Module],[Module]) -> Bool -> [GHC.ModSummary] -> GHCi ()
+setContextAfterLoad :: ([Module],[(Module, Maybe (ImportDecl RdrName))]) -> Bool -> [GHC.ModSummary] -> GHCi ()
 setContextAfterLoad prev keep_ctxt [] = do
   prel_mod <- getPrelude
hunk ./ghc/InteractiveUI.hs 1091
-  setContextKeepingPackageModules prev keep_ctxt ([], [prel_mod])
+  setContextKeepingPackageModules prev keep_ctxt ([], [(prel_mod, Nothing)])
 setContextAfterLoad prev keep_ctxt ms = do
   -- load a target if one is available, otherwise load the topmost module.
   targets <- GHC.getTargets
hunk ./ghc/InteractiveUI.hs 1119
 	if b then setContextKeepingPackageModules prev keep_ctxt ([m], [])
        	     else do
                 prel_mod <- getPrelude
-                setContextKeepingPackageModules prev keep_ctxt ([],[prel_mod,m])
+                setContextKeepingPackageModules prev keep_ctxt ([],[(prel_mod,Nothing),(m,Nothing)])
 
 -- | Keep any package modules (except Prelude) when changing the context.
 setContextKeepingPackageModules
hunk ./ghc/InteractiveUI.hs 1123
-        :: ([Module],[Module])          -- previous context
+        :: ([Module],[(Module, Maybe (ImportDecl RdrName))])          -- previous context
         -> Bool                         -- re-execute :module commands
hunk ./ghc/InteractiveUI.hs 1125
-        -> ([Module],[Module])          -- new context
+        -> ([Module],[(Module, Maybe (ImportDecl RdrName))])          -- new context
         -> GHCi ()
 setContextKeepingPackageModules prev_context keep_ctxt (as,bs) = do
   let (_,bs0) = prev_context
hunk ./ghc/InteractiveUI.hs 1130
   prel_mod <- getPrelude
-  let pkg_modules = filter (\p -> not (isHomeModule p) && p /= prel_mod) bs0
-  let bs1 = if null as then nub (prel_mod : bs) else bs
-  GHC.setContext as (nub (bs1 ++ pkg_modules))
+  -- filter everything, not just lefts
+  let pkg_modules = filter ((\p -> not (isHomeModule p) && p /= prel_mod) . fst) bs0
+  let bs1 = if null as then nubBy sameFst ((prel_mod,Nothing) : bs) else bs
+  GHC.setContext as (nubBy sameFst (bs1 ++ pkg_modules))
   if keep_ctxt
      then do
           st <- getGHCiState
hunk ./ghc/InteractiveUI.hs 1137
-          mapM_ (playCtxtCmd False) (remembered_ctx st)
+          let mem = remembered_ctx st
+              playCmd (Left x) = playCtxtCmd False x
+              playCmd (Right x) = importContext False x
+          mapM_ playCmd mem
      else do
           st <- getGHCiState
           setGHCiState st{ remembered_ctx = [] }
hunk ./ghc/InteractiveUI.hs 1148
 isHomeModule :: Module -> Bool
 isHomeModule mod = GHC.modulePackageId mod == mainPackageId
 
+sameFst :: (Module, Maybe (ImportDecl RdrName)) -> (Module, Maybe (ImportDecl RdrName)) -> Bool
+sameFst x y = fst x == fst y
+
 modulesLoadedMsg :: SuccessFlag -> [ModuleName] -> InputT GHCi ()
 modulesLoadedMsg ok mods = do
   dflags <- getDynFlags
hunk ./ghc/InteractiveUI.hs 1205
                 -- recently-added module occurs last, it seems.
         case (as,bs) of
           (as@(_:_), _)   -> browseModule bang (last as) True
-          ([],  bs@(_:_)) -> browseModule bang (last bs) True
-          ([],  [])  -> ghcError (CmdLineError ":browse: no current module")
+          ([],  bs@(_:_)) -> browseModule bang (fst (last bs)) True
+          ([], [])  -> ghcError (CmdLineError ":browse: no current module")
     _ -> ghcError (CmdLineError "syntax:  :browse <module>")
 
 -- without bang, show items in context of their parents and omit children
hunk ./ghc/InteractiveUI.hs 1221
   -- just so we can get an appropriate PrintUnqualified
   (as,bs) <- GHC.getContext
   prel_mod <- lift getPrelude
-  if exports_only then GHC.setContext [] [prel_mod,modl]
+  if exports_only then GHC.setContext [] [(prel_mod,Nothing), (modl,Nothing)]
                   else GHC.setContext [modl] []
   target_unqual <- GHC.getPrintUnqual
   GHC.setContext as bs
hunk ./ghc/InteractiveUI.hs 1297
 -----------------------------------------------------------------------------
 -- Setting the module context
 
+importContext :: Bool -> String -> GHCi ()
+importContext fail str
+  = do
+    (as,bs) <- GHC.getContext
+    x <- do_checks fail
+    case Monad.join x of
+        Nothing -> return ()
+        (Just a) -> do
+            m <- loadModuleName a
+            GHC.setContext as (bs++[(m,Just a)])
+            st <- getGHCiState
+            let cmds = remembered_ctx st
+            setGHCiState st{ remembered_ctx = cmds++[Right str] }
+  where
+    do_checks True = liftM Just (GhciMonad.parseImportDecl str)
+    do_checks False = trymaybe (GhciMonad.parseImportDecl str)
+
 setContext :: String -> GHCi ()
 setContext str
   | all sensible strs = do
hunk ./ghc/InteractiveUI.hs 1319
        playCtxtCmd True (cmd, as, bs)
        st <- getGHCiState
-       setGHCiState st{ remembered_ctx = remembered_ctx st ++ [(cmd,as,bs)] }
+       let cmds = remembered_ctx st
+       setGHCiState st{ remembered_ctx = cmds ++ [Left (cmd,as,bs)] }
   | otherwise = ghcError (CmdLineError "syntax:  :module [+/-] [*]M1 ... [*]Mn")
   where
     (cmd, strs, as, bs) =
hunk ./ghc/InteractiveUI.hs 1348
       case cmd of
         SetContext -> do
           prel_mod <- getPrelude
-          let bs'' = if null as && prel_mod `notElem` bs' then prel_mod:bs'
+          let bs'' = if null as && prel_mod `notElem` (map fst bs') then (prel_mod,Nothing):bs'
                                                           else bs'
hunk ./ghc/InteractiveUI.hs 1350
-          return (as',bs'')
+          return (as', bs'')
         AddModules -> do
hunk ./ghc/InteractiveUI.hs 1352
-          let as_to_add = as' \\ (prev_as ++ prev_bs)
-              bs_to_add = bs' \\ (prev_as ++ prev_bs)
-          return (prev_as ++ as_to_add, prev_bs ++ bs_to_add)
+          -- it should replace the old stuff, not the other way around
+          -- need deleteAllBy, not deleteFirstsBy for sameFst
+          let remaining_as = prev_as \\ (as' ++ map fst bs')
+              remaining_bs = deleteAllBy sameFst prev_bs (bs' ++ map contextualize as')
+          return (remaining_as ++ as', remaining_bs ++ bs')
         RemModules -> do
hunk ./ghc/InteractiveUI.hs 1358
-          let new_as = prev_as \\ (as' ++ bs')
-              new_bs = prev_bs \\ (as' ++ bs')
+          let new_as = prev_as \\ (as' ++ map fst bs')
+              new_bs = deleteAllBy sameFst prev_bs (map contextualize as' ++ bs')
           return (new_as, new_bs)
     GHC.setContext new_as new_bs
   where
hunk ./ghc/InteractiveUI.hs 1366
     do_checks True = do
       as' <- mapM wantInterpretedModule as
       bs' <- mapM lookupModule bs
-      return (as',bs')
+      return (as', map contextualize bs')
     do_checks False = do
       as' <- mapM (trymaybe . wantInterpretedModule) as
       bs' <- mapM (trymaybe . lookupModule) bs
hunk ./ghc/InteractiveUI.hs 1370
-      return (catMaybes as', catMaybes bs')
+      return (catMaybes as', map contextualize (catMaybes bs'))
+    contextualize x = (x,Nothing)
+    deleteAllBy f a b = filter (\x->(not (any (f x) b))) a
 
hunk ./ghc/InteractiveUI.hs 1374
-    trymaybe m = do
-        r <- ghciTry m
-        case r of
-          Left _  -> return Nothing
-          Right a -> return (Just a)
+trymaybe ::GHCi a -> GHCi (Maybe a)
+trymaybe m = do
+    r <- ghciTry m
+    case r of
+      Left _  -> return Nothing
+      Right a -> return (Just a)
 
 ----------------------------------------------------------------------------
 -- Code for `:set'
}

Context:

[trac #1789 (warnings for missing import lists)
amsay@amsay.net**20100618150649
 Ignore-this: b0b0b1e048fbca0817c1e6fade1153fa
] 
[Fix bindisttest Makefile
Ian Lynagh <igloo@earth.li>**20100616205611
 Ignore-this: 39cd352152422f378572fc3859c5a377
] 
[Remove some more unused make variables
Ian Lynagh <igloo@earth.li>**20100616180519] 
[Convert some more variable names to FOO_CMD, for consistency
Ian Lynagh <igloo@earth.li>**20100616175916] 
[Rename some variables from FOO to FOO_CMD
Ian Lynagh <igloo@earth.li>**20100616161108
 This fixes a problem with commands like gzip, where if $GZIP is exported
 in the environment, then when make runs a command it'll put the Makefile
 variable's value in the environment. But gzip treats $GZIP as arguments
 for itself, so when we run gzip it thinks we're giving it "gzip" as an
 argument.
] 
[Make the "show" target work anywhere in the build tree
Ian Lynagh <igloo@earth.li>**20100616122910
 Ignore-this: 299d40cbe16112accd9f14e56fa12158
] 
[Change ghc-pwd's license to a string Cabal recognises
Ian Lynagh <igloo@earth.li>**20100615204015
 Ignore-this: c935b6ad7f605aab0168997a90b40fc6
] 
[fix warning
Simon Marlow <marlowsd@gmail.com>**20100604205933
 Ignore-this: 2aaa4ed6a8b9ae1e39adc4696aaf14a3
] 
[--install-signal-handles=no does not affect the timer signal (#1908)
Simon Marlow <marlowsd@gmail.com>**20100527214627
 Ignore-this: b0c51f1abdb159dc360662485095a11a
] 
[Small optimisation: allocate nursery blocks contiguously
Simon Marlow <marlowsd@gmail.com>**20100509194928
 Ignore-this: e650e99e9ea9493d2efb245d565beef4
 This lets automatic prefetching work better, for a tiny performance boost
] 
[fix -fforce-recomp setting: module is PrimOp, not PrimOps
Simon Marlow <marlowsd@gmail.com>**20100507084507
 Ignore-this: f76e0d9b643682ec0e8fb7d91afdea68
] 
[it should be an error to use relative directories (#4134)
Simon Marlow <marlowsd@gmail.com>**20100615151740
 Ignore-this: 2068021701832e018ca41b22877921d5
] 
[missing include-dirs or library-dirs is only a warning now (#4104)
Simon Marlow <marlowsd@gmail.com>**20100615151702
 Ignore-this: e3114123cef147bbd28ccb64581a1afb
] 
[fix #3822: desugaring case command in arrow notation
Ross Paterson <ross@soi.city.ac.uk>**20100615225110
 Ignore-this: 477d6c460b4174b94b4cd113fa5b9d19
 
 Get the set of free variables from the generated case expression:
 includes variables in the guards and decls that were missed before,
 and is also a bit simpler.
] 
[Deprecate the -fvia-C flag; trac #3232
Ian Lynagh <igloo@earth.li>**20100615151836
 Ignore-this: c2452b2648bf7e44546465c1b964fce
] 
[Avoid using the new ~~ perl operator in the mangler
Ian Lynagh <igloo@earth.li>**20100615151236
 Ignore-this: 709a7ba4e514b1596841b3ba7e5c6cc
] 
[stmAddInvariantToCheck: add missing init of invariant->lock (#4057)
Simon Marlow <marlowsd@gmail.com>**20100615123643
 Ignore-this: 3b132547fa934cecf71a846db2a5f70e
] 
[Add new LLVM code generator to GHC. (Version 2)
David Terei <davidterei@gmail.com>**20100615094714
 Ignore-this: 4dd2fe5854b64a3f0339d484fd5c238
 
 This was done as part of an honours thesis at UNSW, the paper describing the
 work and results can be found at:
 
 http://www.cse.unsw.edu.au/~pls/thesis/davidt-thesis.pdf
 
 A Homepage for the backend can be found at:
 
 http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM
 
 Quick summary of performance is that for the 'nofib' benchmark suite, runtimes
 are within 5% slower than the NCG and generally better than the C code
 generator.  For some code though, such as the DPH projects benchmark, the LLVM
 code generator outperforms the NCG and C code generator by about a 25%
 reduction in run times.
 
] 
[Fix Trac #4127: build GlobalRdrEnv in GHCi correctly
simonpj@microsoft.com**20100615070626
 Ignore-this: d907e3bfa7882878cea0af172aaf6e84
 
 GHCi was building its GlobalRdrEnv wrongly, so that the
 gre_par field was bogus.  That in turn fooled the renamer.
 The fix is easy: use the right function!  Namely, call
 RnNames.gresFromAvail rather than availsToNameSet.
] 
[Comments, and improvement to pretty-printing of HsGroup
simonpj@microsoft.com**20100615070409
 Ignore-this: ec8358f2485370b20226a97ec84e9024
] 
[Don't reverse bindings in rnMethodBinds (fix Trac #4126)
simonpj@microsoft.com**20100614163935
 Ignore-this: a6ffbb5af6f51b142ed0aeae8ee5e3a9
] 
[Fix Trac #4120: generate a proper coercion when unifying forall types
simonpj@microsoft.com**20100614134311
 Ignore-this: 601592bb505305f1954cbe730f168da4
 
 This was just a blatant omission, which hasn't come up before.
 Easily fixed, happily.
] 
[Use mkFunTy to ensure that invariants are respected
simonpj@microsoft.com**20100614134159
 Ignore-this: 67dcada7a4e8d9927581cd77af71b6f
] 
[Remove redundant debug code
simonpj@microsoft.com**20100601154151
 Ignore-this: e6ff11c04c631cf6aac73788cbcf02b5
] 
[Fix Trac #4099: better error message for type functions
simonpj@microsoft.com**20100531140413
 Ignore-this: 3f53ca98cf770577818b9c0937482577
 
 Now we only want about "T is a type function and might not be
 injective" when matchin (T x) against (T y), which is the case
 that is really confusing.
] 
[Gruesome fix in CorePrep to fix embarassing Trac #4121
simonpj@microsoft.com**20100614132726
 Ignore-this: fe82d15474afaac3e6133adfd7a7e055
 
 This is a long-lurking bug that has been flushed into
 the open by other arity-related changes.  There's a
 long comment
 
      Note [CafInfo and floating]
 
 to explain.  
 
 I really hate the contortions we have to do through to keep correct
 CafRef information on top-level binders.  The Right Thing, I believe,
 is to compute CAF and arity information later, and merge it into the
 interface-file information when the latter is generated.
 
 But for now, this hackily fixes the problem.
] 
[Fix a bug in CorePrep that meant output invariants not satisfied
simonpj@microsoft.com**20100531150013
 Ignore-this: d34eb36d8877d3caf1cf2b20de426abd
 
 In cpePair I did things in the wrong order so that something that
 should have been a CprRhs wasn't.  Result: a crash in CoreToStg.
 Fix is easy, and I added more informative type signatures too.
] 
[Robustify the treatement of DFunUnfolding
simonpj@microsoft.com**20100531145332
 Ignore-this: 8f5506ada4d89f6ab8ad1e8c3ffb09ba
 
 See Note [DFun unfoldings] in CoreSyn.  The issue here is that 
 you can't tell how many dictionary arguments a DFun needs just
 from looking at the Arity of the DFun Id: if the dictionary is
 represented by a newtype the arity might include the dictionary
 and value arguments of the (single) method.
 
 So we need to record the number of arguments need by the DFun
 in the DFunUnfolding itself.  Details in 
    Note [DFun unfoldings] in CoreSyn
] 
[Fix spelling in comment
simonpj@microsoft.com**20100614132259
 Ignore-this: bbf0d55f2e5f10ef9c74592c12f9201c
] 
[Update docs on view patterns
simonpj@microsoft.com**20100614074801
 Ignore-this: 8617b9078800d4942d71f142a5b6c831
] 
[Fix printing of splices; part of #4124
Ian Lynagh <igloo@earth.li>**20100613154838
 Just putting parens around non-atomic expressions isn't sufficient
 for splices, as only the $x and $(e) forms are valid input.
] 
[In ghci, catch IO exceptions when calling canonicalizePath
Ian Lynagh <igloo@earth.li>**20100613134627
 We now get an exception if the path doesn't exist
] 
[Whitespace only
Ian Lynagh <igloo@earth.li>**20100612213119] 
[Whitespace only
Ian Lynagh <igloo@earth.li>**20100612165450] 
[Update ghci example output in user guide; patch from YitzGale in #4111
Ian Lynagh <igloo@earth.li>**20100612162250] 
[Fix #4131 missing UNTAG_CLOSURE in messageBlackHole()
benl@ouroborus.net**20100611044614] 
[messageBlackHole: fix deadlock bug caused by a missing 'volatile'
Simon Marlow <marlowsd@gmail.com>**20100610080636
 Ignore-this: 3cda3054bb45408aa9bd2d794b69c938
] 
[Pass --no-tmp-comp-dir to Haddock (see comment)
Simon Marlow <marlowsd@gmail.com>**20100604083214
 Ignore-this: bfa4d74038637bd149f4d878b4eb8a87
] 
[Track changes to DPH libs
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20100607052903
 Ignore-this: 4dbc3f8418af3e74b3fc4f9a9dfe7764
] 
[Track changes to DPH libs
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20100607012642
 Ignore-this: 5d4e498171a3c57ab02621bfaea82cff
] 
[In ghc-pkg, send warnings to stderr
Ian Lynagh <igloo@earth.li>**20100606161726
 Ignore-this: 56927d13b5e1c1ce2752734f0f9b665b
] 
[Re-add newlines to enable layout for multi-line input.
Ian Lynagh <igloo@earth.li>**20100602180737
 Patch from Adam Vogt <vogt.adam@gmail.com>
 Partial fix for #3984
] 
[Don't use unnecessary parens when printing types (Fix Trac 4107)
simonpj@microsoft.com**20100604110143
 Ignore-this: a833714ab13013c4345b222f4e87db1d
 
    f :: Eq a => a -> a
 rather than
    f :: (Eq a) => a -> a
] 
[Track DPH library changes
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20100604005728
 Ignore-this: 32bc2fbea6ad975e89545d4c42fd7c30
] 
[fix --source-entity option passed to Haddock: we needed to escape a #
Simon Marlow <marlowsd@gmail.com>**20100603125459
 Ignore-this: d52ae6188b510c482bcebb23f0e553ae
] 
[__stg_EAGER_BLACKHOLE_INFO -> __stg_EAGER_BLACKHOLE_info (#4106)
Simon Marlow <marlowsd@gmail.com>**20100602091419
 Ignore-this: 293315ac8f86fd366b8d61992ecc7961
] 
[Add xhtml package (a new dependency of Haddock; not installed/shipped)
Simon Marlow <marlowsd@gmail.com>**20100602090101
 Ignore-this: af0ac8b91abe98f7fdb624ea0a4dee20
] 
[Use UserInterrupt rather than our own Interrupted exception (#4100)
Simon Marlow <marlowsd@gmail.com>**20100602082345
 Ignore-this: 1909acf2f452593138b9f85024711714
] 
[Add the global package DB to ghc --info (#4103)
Simon Marlow <marlowsd@gmail.com>**20100602082233
 Ignore-this: fd5c0e207e70eb0f62606c45dc5b8124
] 
[rts/sm/GC.c: resize_generations(): Remove unneeded check of number of generations.
Marco Túlio Gontijo e Silva <marcot@debian.org>**20100528115612
 Ignore-this: 6f1bea62917c01c7adac636146132c97
 
 This "if" is inside another "if" which checks for RtsFlags.GcFlags.generations
 > 1, so testing this again is redundant, assuming the number of generations
 won't change during program execution.
] 
[rts/sm/BlockAlloc.c: Small comment correction.
Marco Túlio Gontijo e Silva <marcot@debian.org>**20100526205839
 Ignore-this: bd2fcd4597cc872d80b0e2eeb1c3998a
] 
[rts/sm/GC.c: Annotate constants.
Marco Túlio Gontijo e Silva <marcot@debian.org>**20100526205707
 Ignore-this: f232edb89383564d759ed890a18f602f
] 
[includes/rts/storage/GC.h: generation_: n_words: Improve comment.
Marco Túlio Gontijo e Silva <marcot@debian.org>**20100526204615
 Ignore-this: f5d5feefa8f7b552303978f1804fea23
] 
[Add PPC_RELOC_LOCAL_SECTDIFF support; patch from PHO in #3654
Ian Lynagh <igloo@earth.li>**20100601204211
 Ignore-this: 51293b7041cdce3ce7619ef11cf7ceb
] 
[powerpc-apple-darwin now supports shared libs
Ian Lynagh <igloo@earth.li>**20100601173325] 
[PIC support for PowerPC
pho@cielonegro.org**20100508143900
 Ignore-this: 3673859a305398c4acae3f4d7c997615
 
 PPC.CodeGen.getRegister was not properly handling PicBaseReg.
 It seems working with this patch, but I'm not sure this change is correct.
] 
[Vectoriser: only treat a function as scalar if it actually computes something
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20100601045630
 Ignore-this: e5d99a6ddb62052e3520094a5af47552
] 
[Add a release notes file for 6.14.1
Ian Lynagh <igloo@earth.li>**20100530171117
 Ignore-this: 1941e6d3d1f4051b69ca2f17a1cf84d6
] 
[Check dblatex actually creates the files we tell it to
Ian Lynagh <igloo@earth.li>**20100530171043
 Ignore-this: ccc72caea2313be05cbac59bb54c0603
 If it fails, it still exits successfully.
] 
[Add darwin to the list of OSes for which we use mmap
Ian Lynagh <igloo@earth.li>**20100529145016
 Ignore-this: a86d12a3334aaaafc86f7af9dbb0a7ae
 Patch from Barney Stratford
] 
[Simplify the CPP logic in rts/Linker.c
Ian Lynagh <igloo@earth.li>**20100529144929
 Ignore-this: 1288f5b752cc1ab8b1c90cfd0ecfdf68
] 
[Fix validate on OS X
Ian Lynagh <igloo@earth.li>**20100529154726] 
[OS X x86_64 fix from Barney Stratford
Ian Lynagh <igloo@earth.li>**20100529122440] 
[OS X 64 installer fixes from Barney Stratford
Ian Lynagh <igloo@earth.li>**20100528234935] 
[fix warning
Simon Marlow <marlowsd@gmail.com>**20100525155812
 Ignore-this: f34eee3fe3d89579fd8d381c91ced750
] 
[Fix doc bugs (#4071)
Simon Marlow <marlowsd@gmail.com>**20100525155728
 Ignore-this: aa25be196de567de360075022a1942f7
] 
[Make sparks into weak pointers (#2185)
Simon Marlow <marlowsd@gmail.com>**20100525150435
 Ignore-this: feea0bb5006007b82c932bc3006124d7
 The new strategies library (parallel-2.0+, preferably 2.2+) is now
 required for parallel programming, otherwise parallelism will be lost.
] 
[If you say 'make' or 'make stage=2' here, pretend we're in the ghc dir
Simon Marlow <marlowsd@gmail.com>**20100525085301
 Ignore-this: 78b740337aa460915c812cbbcdae5321
] 
[Another attempt to get these #defines right
Simon Marlow <marlowsd@gmail.com>**20100525154313
 Ignore-this: 460ca0c47d81cd25eae6542114f67899
 Apparently on Solaris it is an error to omit _ISOC99_SOURCE when using
 _POSIX_C_SOURCE==200112L.
] 
[Add configure flags for the location of GMP includes/library; fixes #4022
Ian Lynagh <igloo@earth.li>**20100525221616
 Ignore-this: fc3060caf995d07274ec975eeefbdf3e
] 
[Refactor pretty printing of TyThings to fix Trac #4015
simonpj@microsoft.com**20100525153126
 Ignore-this: 8f15053b7554f62caa84201d2e4976d2
] 
[When haddocking, we need the dependencies to have been built
Ian Lynagh <igloo@earth.li>**20100525145830
 as haddock loads the .hi files with the GHC API.
] 
[Fix profiling output; spotted by jlouis
Ian Lynagh <igloo@earth.li>**20100525111217
 We were outputing the number of words allocated in a column titled "bytes".
] 
[Improve printing of TyThings; fixes Trac #4087
simonpj@microsoft.com**20100525114045
 Ignore-this: da2a757a533454bba80b9b77cc5a771
] 
[Spelling in comments
simonpj@microsoft.com**20100525114001
 Ignore-this: 270f3da655e526cf04e27db7a01e29c0
] 
[Refactor (again) the handling of default methods
simonpj@microsoft.com**20100525113910
 Ignore-this: 6686f6cdb878d57abf6b49fec64fcbb1
 
 This patch fixes Trac #4056, by 
 
  a) tidying up the treatment of default method names
  b) removing the 'module' argument to newTopSrcBinder
 
 The details aren't that interesting, but the result
 is much tidier. The original bug was a 'nameModule' panic,
 caused by trying to find the module of a top-level name.
 But TH quotes generate Internal top-level names that don't
 have a module, and that is generally a good thing.  
 
 Fixing that in turn led to the default-method refactoring,
 which also makes the Name for a default method be handled
 in the same way as other derived names, generated in BuildTyCl
 via a call newImplicitBinder.  Hurrah.
] 
[Don't do SpecConstr on NOINLINE things (Trac #4064)
simonpj@microsoft.com**20100525112807
 Ignore-this: 452be0a2cef0042fb67275c2827b5f72
 
 Since the RULE from specialising gets the same Activation as
 the inlining for the Id itself there's no point in specialising
 a NOINLINE thing, because the rule will be permanently switched
 off.
 
 See Note [Transfer activation] in SpecConstr
 and Note [Auto-specialisation and RULES] in Specialise.
] 
[Change our #defines to work on FreeBSD too
Simon Marlow <marlowsd@gmail.com>**20100524105828
 Ignore-this: b23ede46211e67859206c0ec57d6a86f
 With glibc, things like _POSIX_C_SOURCE and _ISOC99_SOURCE are
 additive, but on FreeBSD they are mutually exclusive.  However, it
 turns out we only need to define _POSIX_C_SOURCE and _XOPEN_SOURCE to
 get all the C99 stuff we need too, so there's no need for any #ifdefs.
 
 Submitted by: Gabor PALI <pgj@FreeBSD.org>
] 
[Add a missing UNTAG_CLOSURE, causing bus errors on Sparc
Simon Marlow <marlowsd@gmail.com>**20100524105547
 Ignore-this: a590b5391d6f05d50c8c088456c3c166
 We just about got away with this on x86 which isn't
 alignment-sensitive.  The result of the memory load is compared
 against a few different values, but there is a fallback case that
 happened to be the right thing when the pointer was tagged.  A good
 bug to find, nonetheless.
] 
[Add wiki links
Simon Marlow <marlowsd@gmail.com>**20100520095953
 Ignore-this: c22f126cde166e6207922b2eb51d29e3
] 
[the 'stage=0' trick to disable all compiler builds stopped working; fix it
Simon Marlow <marlowsd@gmail.com>**20100520104455
 Ignore-this: bb6fae9056471612c8dbf06916188c33
] 
[Comments and formatting only
benl@ouroborus.net**20100524014021
 Ignore-this: 64579c38154728b632e358bec751cc0b
] 
[Core prettyprinter fixes. Patch from Tim Chevalier. Fixes #4085
Ian Lynagh <igloo@earth.li>**20100522225048] 
[Correct install-name for dynamic Darwin rts
pho@cielonegro.org**20100508151155
 Ignore-this: 6d31716c8c113dcb46e9cb925c4201df
] 
[Fix the RTS debug_p build
Ian Lynagh <igloo@earth.li>**20100522163127] 
[Unset $CFLAGS for "GNU non-executable stack" configure test; fixes #3889
Ian Lynagh <igloo@earth.li>**20100521165005
 With gcc 4.4 we get
     Error: can't resolve `.note.GNU-stack' {.note.GNU-stack section} - `.Ltext0' {.text section}
 when running gcc with the -g flag. To work around this we unset
 CFLAGS when running the test.
] 
[Don't run "set -o igncr" before configuring libffi
Ian Lynagh <igloo@earth.li>**20100520162918
 Ignore-this: 489fa94df23f2adf4ff63c8ede2c0794
 It used to make the build work on cygwin, but now it breaks it instead:
     config.status: creating include/Makefile
     gawk: ./confLqjohp/subs.awk:1: BEGIN {\r
     gawk: ./confLqjohp/subs.awk:1: ^ backslash not last character on line
     config.status: error: could not create include/Makefile
     make[2]: *** [libffi/stamp.ffi.configure-shared] Error 1
     make[1]: *** [all] Error 2
] 
[Stop passing -Wl,-macosx_version_min to gcc
Ian Lynagh <igloo@earth.li>**20100520154003
 Fixes a build failure on OS X 10.6. When linking
     rts/dist/build/libHSrts-ghc6.13.20100519.dylib
 we got
     ld: symbol dyld_stub_binding_helper not defined (usually in crt1.o/dylib1.o/bundle1.o)
     collect2: ld returned 1 exit status
] 
[Fix build on FreeBSD; patch from Gabor PALI
Ian Lynagh <igloo@earth.li>**20100519140552] 
[Fix package shadowing order (#4072)
Simon Marlow <marlowsd@gmail.com>**20100519104617
 Ignore-this: 26ea5e4bb5dff18618b807a54c7d6ebb
 
 Later packages are supposed to shadow earlier ones in the stack,
 unless the ordering is overriden with -package-id flags.
 Unfortunately an earlier fix for something else had sorted the list of
 packages so that it was in lexicographic order by installedPackageId,
 and sadly our test (cabal/shadow) didn't pick this up because the
 lexicographic ordering happened to work for the test.  I've now fixed
 the test so it tries both orderings.
] 
[Set more env variables when configuring libffi
Ian Lynagh <igloo@earth.li>**20100518185014
 We now tell it where to find ld, nm and ar
] 
[Set the location of ar to be the in-tree ar on Windows
Ian Lynagh <igloo@earth.li>**20100518181556] 
[Change another / to </> to avoid building paths containing \/
Ian Lynagh <igloo@earth.li>**20100518172015
 This will hopefully fix #2889.
] 
[Fix #4074 (I hope).
Simon Marlow <marlowsd@gmail.com>**20100518113214
 Ignore-this: 73cd70f5bc6f5add5247b61985c03fc1
 
 1. allow multiple threads to call startTimer()/stopTimer() pairs
 2. disable the timer around fork() in forkProcess()
 
 A corresponding change to the process package is required.
] 
[we don't have a gcc-lib in LIB_DIR any more
Simon Marlow <marlowsd@gmail.com>**20100401102351
 Ignore-this: f41acd2d8f8e6763aa8bd57a0b44a7e4
] 
[In validate, use gmake if available; based on a patch from Gabor PALI
Ian Lynagh <igloo@earth.li>**20100517200654] 
[Remove duplicate "./configure --help" output; fixes #4075
Ian Lynagh <igloo@earth.li>**20100516141206] 
[Update various 'sh boot's to 'perl boot'
Ian Lynagh <igloo@earth.li>**20100516122609
 Spotted by Marco Túlio Gontijo e Silva
] 
[add missing initialisation for eventBufMutex
Simon Marlow <marlowsd@gmail.com>**20100514094943
 Ignore-this: 7f75594a8cb54fbec5aebd46bb959f45
] 
[Undo part of #4003 patch
Simon Marlow <marlowsd@gmail.com>**20100513142017
 Ignore-this: cb65db86a38a7e5ccee9f779e489d104
 We still need the workaround for when compiling HEAD with 6.12.2
 
] 
[Fix makefile loop (#4050)
pho@cielonegro.org**20100507140707
 Ignore-this: 3a1cb13d0600977e74d17ac26cbef83d
 
 The libtool creates "libffi.dylib" and "libffi.5.dylib" but not "libffi.5.0.9.dylib". Having it in libffi_DYNAMIC_LIBS causes an infinite makefile loop. 
] 
[fix !TABLES_NEXT_TO_CODE
Simon Marlow <marlowsd@gmail.com>**20100510151934
 Ignore-this: fccb859b114bef1c3122c98e60af51
] 
[looksLikeModuleName: allow apostrophe in module names (#4051)
Simon Marlow <marlowsd@gmail.com>**20100510094741
 Ignore-this: df9348f3ba90608bec57257b47672985
] 
[add the proper library dependencies for GhcProfiled=YES
Simon Marlow <marlowsd@gmail.com>**20100506122118
 Ignore-this: 6236993aa308ab5b5e1e5ea5f65982a
] 
[Fix Trac #4003: fix the knot-tying in checkHiBootIface
simonpj@microsoft.com**20100511075026
 Ignore-this: a9ce2a318386fdc8782848df84592002
 
 I had incorrectly "optimised" checkHiBootIface so that it forgot
 to update the "knot-tied" type environment. 
 
 This patch fixes the HEAD
] 
[Re-engineer the derived Ord instance generation code (fix Trac #4019)
simonpj@microsoft.com**20100510133333
 Ignore-this: 8fe46e4dad27fbee211a7928acf372c2
   
 As well as fixing #4019, I rejigged the way that Ord instances are
 generated, which should make them faster in general.  See the 
 Note [Generating Ord instances].
 
 I tried to measure the performance difference from this change, but
 the #4019 fix only removes one conditional branch per iteration, and
 I couldn't measure a consistent improvement.  But still, tihs is
 better than before.
] 
[Make arity of INLINE things consistent
simonpj@microsoft.com**20100510133005
 Ignore-this: 15e7abf803d1dcb3f4ca760d2d939d0d
 
 We eta-expand things with INLINE pragmas; 
 see Note [Eta-expanding INLINE things].
 
 But I eta-expanded it the wrong amount when the function
 was overloaded.  Ooops.
] 
[Compacting GC fix, we forgot to thread the new bq field of StgTSO.
Simon Marlow <marlowsd@gmail.com>**20100510082325
 Ignore-this: a079c8446e2ad53efff6fd95d0f3ac80
] 
[Add version constraints for the boot packages; fixes trac #3852
Ian Lynagh <igloo@earth.li>**20100509175051
 When using the bootstrapping compiler, we now explicitly constrain
 the version of boot packages (Cabal, extensible-exceptions, etc) to the
 in-tree version, so that the build system is less fragile should the
 user have a newer version installed for the bootstrapping compiler.
] 
[Don't include inter-package dependencies when compiling with stage 0; #4031
Ian Lynagh <igloo@earth.li>**20100509130511
 This fixes a problem when building with GHC 6.12 on Windows, where
 dependencies on stage 0 (bootstrapping compiler) packages have absolute
 paths c:/ghc/..., and make gets confused by the colon.
] 
[Add a ghc.mk for bindisttest/
Ian Lynagh <igloo@earth.li>**20100508223911] 
[Move some make variables around so they are available when cleaning
Ian Lynagh <igloo@earth.li>**20100508212405] 
[Optimise checkremove a bit
Ian Lynagh <igloo@earth.li>**20100508202006] 
[Improve the bindisttest Makefile
Ian Lynagh <igloo@earth.li>**20100508195450] 
[Add tools to test that cleaning works properly
Ian Lynagh <igloo@earth.li>**20100508194105] 
[Tweak the ghc-pkg finding code
Ian Lynagh <igloo@earth.li>**20100508125815
 It now understand the ghc-stage[123] names we use in-tree, and it won't
 go looking for any old ghc-pkg if it can't find the one that matches
 ghc.
] 
[Add a way to show what cleaning would be done, without actually doing it
Ian Lynagh <igloo@earth.li>**20100508122438] 
[Tidy up the "rm" flags in the build system
Ian Lynagh <igloo@earth.li>**20100508115745] 
[Fix crash in nested callbacks (#4038)
Simon Marlow <marlowsd@gmail.com>**20100507093222
 Ignore-this: cade85e361534ce711865a4820276388
 Broken by "Split part of the Task struct into a separate struct
 InCall".
] 
[Add $(GhcDynamic) knob, set to YES to get stage2 linked with -dynamic
Simon Marlow <marlowsd@gmail.com>**20100428205241
 Ignore-this: 1db8bccf92099785ecac39aebd27c92d
 Default currently NO.
 
 Validate passed with GhcDynamic=YES on x86/Linux here.
 
 The compiler is currently slower on x86 when linked -dynamic,
 because the GC inner loop has been adversely affected by -fPIC, I'm
 looking into how to fix it.
] 
[omit "dyn" from the way appended to the __stginit label
Simon Marlow <marlowsd@gmail.com>**20100428204914
 Ignore-this: 14183f3defa9f2bde68fda6729b740bc
 When GHCi is linked dynamically, we still want to be able to load
 non-dynamic object files.
] 
[improvements to findPtr(), a neat hack for browsing the heap in gdb
Simon Marlow <marlowsd@gmail.com>**20100506115427
 Ignore-this: ac57785bb3e13b97a5945f753f068738
] 
[Fix +RTS -G1
Simon Marlow <marlowsd@gmail.com>**20100506110739
 Ignore-this: 86a5de39a94d3331a4ee1213f82be497
] 
[Enable the "redundant specialise pragmas" warning; fixes trac #3855
Ian Lynagh <igloo@earth.li>**20100506175351] 
[Find the correct external ids when there's a wrapper
simonpj@microsoft.com**20100506164135
 Ignore-this: 636266407b174b05b2b8646cc73062c0
 
 We were failing to externalise the wrapper id for a function
 that had one.
] 
[Add a comment about pattern coercions
simonpj@microsoft.com**20100506164027
 Ignore-this: 17428089f3df439f65d892e23e8ed61a
] 
[Comments only
simonpj@microsoft.com**20100506163829
 Ignore-this: 169167b6463873ab173cc5750c5be469
] 
[Make a missing name in mkUsageInfo into a panic
simonpj@microsoft.com**20100506163813
 Ignore-this: b82ff1b8bf89f74f146db7cb5cc4c4d7
 
 We really want to know about this!
] 
[Refactoring of hsXxxBinders
simonpj@microsoft.com**20100506163737
 Ignore-this: 97c6667625262b160f9746f7bea1c980
 
 This patch moves various functions that extract the binders
 from a HsTyClDecl, HsForeignDecl etc into HsUtils, and gives
 them consistent names.
] 
[Fix Trac #3966: warn about useless UNPACK pragmas
simonpj@microsoft.com**20100506163337
 Ignore-this: 5beb24b686eda6113b614dfac8490df1
 
 Warning about useless UNPACK pragmas wasn't as easy as I thought.
 I did quite a bit of refactoring, which improved the code by refining
 the types somewhat.  In particular notice that in DataCon, we have
 
     dcStrictMarks   :: [HsBang]
     dcRepStrictness :: [StrictnessMarks]
 
 The former relates to the *source-code* annotation, the latter to
 GHC's representation choice.
] 
[Make tcg_dus behave more sanely; fixes a mkUsageInfo panic
simonpj@microsoft.com**20100506162719
 Ignore-this: d000bca15b0e127e297378ded1bfb81b
 
 The tcg_dus field used to contain *uses* of type and class decls,
 but not *defs*.  That was inconsistent, and it really went wrong
 for Template Haskell bracket.  What happened was that
  foo = [d| data A = A
        	   f :: A -> A
        	   f x = x |]
 would find a "use" of A when processing the top level of the module,
 which in turn led to a mkUsageInfo panic in MkIface.  The cause was
 the fact that the tcg_dus for the nested quote didn't have defs for
 A.
] 
[Add a HsExplicitFlag to SpliceDecl, to improve Trac #4042
simonpj@microsoft.com**20100506161523
 Ignore-this: e4e563bac2fd831cc9e94612f5b4fa9d
 
 The issue here is that 
 
     g :: A -> A
     f
     data A = A
 
 is treated as if you'd written $(f); that is the call of
 f is a top-level Template Haskell splice.  This patch 
 makes sure that we *first* check the -XTemplateHaskellFlag
 and bleat about a parse error if it's off.  Othewise we
 get strange seeing "A is out of scope" errors.
] 
[Change an assert to a warn
simonpj@microsoft.com**20100506161111
 Ignore-this: 739a4fb4c7940376b0f2c8ad52a1966c
 
 This is in the constraint simplifier which I'm about
 to rewrite, so I'm hoping the assert isn't fatal!
] 
[Tidy up debug print a little
simonpj@microsoft.com**20100506161027
 Ignore-this: bd5492878e06bee1cddcbb3fc4df66d8
] 
[Remove useless UNPACK pragmas
simonpj@microsoft.com**20100506161012
 Ignore-this: 3e5ab1a7cf58107034412a798bc214e5
] 
[Add WARNM2 macro, plus some refactoring
simonpj@microsoft.com**20100506160808
 Ignore-this: 2ab4f1f0b5d94be683036e77aec09255
] 
[Use -Wwarn for the binary package, becuase it has redundant UNPACK pragmas
simonpj@microsoft.com**20100506160750
 Ignore-this: cf0d3a11473e28bfce9602e716e69a5f
] 
[Fix Trac #3966: warn about unused UNPACK pragmas
simonpj@microsoft.com**20100409201812
 Ignore-this: c96412596b39c918b5fb9b3c39ce2119
] 
[Fix Trac #3953: fail earlier when using a bogus quasiquoter
simonpj@microsoft.com**20100409201748
 Ignore-this: ef48e39aa932caed538643985234f043
] 
[Fix Trac #3965: tighten conditions when deriving Data
simonpj@microsoft.com**20100409184420
 Ignore-this: 96f7d7d2da11565d26b465d7d0497ac9
 
 It's tricky to set up the context for a Data instance.  I got it wrong
 once, and fixed it -- hence the "extra_constraints" in
 TcDeriv.inferConstraints.  
 
 But it still wasn't right!  The tricky bit is that dataCast1 is only
 generated when T :: *->*, and dataCast2 when T :: *->*->*. (See
 the code in TcGenDeriv for dataCastX.
] 
[Fix Trac #3964: view patterns in DsArrows
simonpj@microsoft.com**20100409165557
 Ignore-this: d823c182831d5e2e592e995b16180e2f
 
 Just a missing case; I've eliminated the catch-all so 
 that we get a warning next time we extend HsPat
] 
[Fix Trac #3955: renamer and type variables
simonpj@microsoft.com**20100409163710
 Ignore-this: bd5ec64d76c0f583bf5f224792bf294c
 
 The renamer wasn't computing the free variables of a type declaration
 properly.  This patch refactors a bit, and makes it more robust,
 fixing #3955 and several other closely-related bugs.  (We were
 omitting some free variables and that could just possibly lead to a
 usage-version tracking error.
] 
[Layout only
simonpj@microsoft.com**20100409163506
 Ignore-this: 1f14990b5aa0b9821b84452fb34e9f41
] 
[Give a better deprecated message for INCLUDE pragmas; fixes #3933
Ian Lynagh <igloo@earth.li>**20100506130910
 We now have a DeprecatedFullText constructor, so we can override the
 "-#include is deprecated: " part of the warning.
] 
[De-haddock a comment that confuses haddock
Ian Lynagh <igloo@earth.li>**20100506123607] 
[Fix comment to not confuse haddock
Ian Lynagh <igloo@earth.li>**20100506113642] 
[Detect EOF when trying to parse a string in hp2ps
Ian Lynagh <igloo@earth.li>**20100506000830] 
[Make the demand analyser sdd demands for strict constructors
simonpj@microsoft.com**20100505200936
 Ignore-this: eb32632adbc354eb7a5cf884c263e0d3
 
 This opportunity was spotted by Roman, and is documented in 
 Note [Add demands for strict constructors] in DmdAnal.
] 
[Fix interaction of exprIsCheap and the lone-variable inlining check
simonpj@microsoft.com**20100505200723
 Ignore-this: f3cb65085c5673a99153d5d7b6559ab1
 
 See Note [Interaction of exprIsCheap and lone variables] in CoreUnfold
 
 This buglet meant that a nullary definition with an INLINE pragma
 counter-intuitively didn't get inlined at all.  Roman identified
 the bug.
] 
[Matching cases in SpecConstr and Rules
simonpj@microsoft.com**20100505200543
 Ignore-this: f5c28c780fbf8badce84c6fdc9aa1779
 
 This patch has zero effect.  It includes comments,
 a bit of refactoring, and a tiny bit of commment-out
 code go implement the "matching cases" idea below.
 
 In the end I've left it disabled because while I think
 it does no harm I don't think it'll do any good either.
 But I didn't want to lose the idea totally. There's
 a thread called "Storable and constant memory" on
 the libraries@haskell.org list (Apr 2010) about it.
 
 Note [Matching cases]
 ~~~~~~~~~~~~~~~~~~~~~
 {- NOTE: This idea is currently disabled.  It really only works if
          the primops involved are OkForSpeculation, and, since
 	 they have side effects readIntOfAddr and touch are not.
 	 Maybe we'll get back to this later .  -}
   
 Consider
    f (case readIntOffAddr# p# i# realWorld# of { (# s#, n# #) ->
       case touch# fp s# of { _ -> 
       I# n# } } )
 This happened in a tight loop generated by stream fusion that 
 Roman encountered.  We'd like to treat this just like the let 
 case, because the primops concerned are ok-for-speculation.
 That is, we'd like to behave as if it had been
    case readIntOffAddr# p# i# realWorld# of { (# s#, n# #) ->
    case touch# fp s# of { _ -> 
    f (I# n# } } )
] 
[Comments only
simonpj@microsoft.com**20100504163629
 Ignore-this: 3be12df04714aa820bce706b5dc8a9cb
] 
[Comments only
simonpj@microsoft.com**20100504163529
 Ignore-this: 791e2fd39c7d880ce1dc80ebdf3a5398
] 
[Comments only
simonpj@microsoft.com**20100504163457
 Ignore-this: f19e9ffeb3d65770b1595bca5f97a59d
] 
[Comments only (about type families)
simonpj@microsoft.com**20100417145032
 Ignore-this: dd39425ef2155d52dbf55a4d5fd97cb8
] 
[Fix hp2ps when the .hp file has large string literals
Ian Lynagh <igloo@earth.li>**20100505191921] 
[In build system, call package-config after including package data
Ian Lynagh <igloo@earth.li>**20100504225035
 Otherwise the $1_$2_HC_OPTS variable gets clobbered.
] 
[runghc: flush stdout/stderr on an exception (#3890)
Simon Marlow <marlowsd@gmail.com>**20100505133848
 Ignore-this: 224c1898cec64cb1c94e0d7033e7590e
] 
[Remove the Unicode alternative for ".." (#3894)
Simon Marlow <marlowsd@gmail.com>**20100505121202
 Ignore-this: 2452cd67281667106f9169747b6d784f
] 
[tidyup; no functional changes
Simon Marlow <marlowsd@gmail.com>**20100505115015
 Ignore-this: d0787e5cdeef1dee628682fa0a46019
] 
[Make the running_finalizers flag task-local
Simon Marlow <marlowsd@gmail.com>**20100505114947
 Ignore-this: 345925d00f1dca203941b3c5d84c90e1
 Fixes a bug reported by Lennart Augustsson, whereby we could get an
 incorrect error from the RTS about re-entry from a finalizer,
] 
[add a MAYBE_GC() in killThread#, fixes throwto003(threaded2) looping
Simon Marlow <marlowsd@gmail.com>**20100505114746
 Ignore-this: efea04991d6feed04683a42232fc85da
] 
[Allow filepath-1.2.*
Simon Marlow <marlowsd@gmail.com>**20100505101139
 Ignore-this: 1b5580cd9cd041ec48f40cd37603326a
] 
[BlockedOnMsgThrowTo is possible in resurrectThreads (#4030)
Simon Marlow <marlowsd@gmail.com>**20100505094534
 Ignore-this: ac24a22f95ffeaf480187a1620fdddb2
] 
[Don't raise a throwTo when the target is masking and BlockedOnBlackHole
Simon Marlow <marlowsd@gmail.com>**20100505094506
 Ignore-this: 302616931f61667030d77ddfbb02374e
] 
[Fix build with GHC 6.10
Ian Lynagh <igloo@earth.li>**20100504180302
 In GHC 6.10, intersectionWith is (a -> b -> a) instead of (a -> b -> c),
 so we need to jump through some hoops to get the more general type.
] 
[The libffi patches are no longer needed
Ian Lynagh <igloo@earth.li>**20100504171603] 
[Use the in-tree windres; fixes trac #4032
Ian Lynagh <igloo@earth.li>**20100504170941] 
[Print unfoldings on lambda-bound variables
Simon PJ <simonpj@microsoft.com>**20100503181822
 Ignore-this: 2fd5a7502cc6273d96258e0914f0f8cd
 
 ...in the unusual case where they have one; 
 see Note [Case binders and join points] in Simplify.lhs
] 
[Replace FiniteMap and UniqFM with counterparts from containers.
Milan Straka <fox@ucw.cz>**20100503171315
 Ignore-this: a021972239163dbf728284b19928cebb
 
 The original interfaces are kept. There is small performance improvement:
 - when compiling for five nofib, we get following speedups:
     Average                -----           -2.5%
     Average                -----           -0.6%
     Average                -----           -0.5%
     Average                -----           -5.5%
     Average                -----          -10.3%
 - when compiling HPC ten times, we get:
     switches                          oldmaps   newmaps
     -O -fasm                          117.402s  116.081s (98.87%)
     -O -fasm -fregs-graph             119.993s  118.735s (98.95%)
     -O -fasm -fregs-iterative         120.191s  118.607s (98.68%)
] 
[Make the demand analyser take account of lambda-bound unfoldings
Simon PJ <simonpj@microsoft.com>**20100503151630
 Ignore-this: 2ee8e27d4df2debfc79e6b8a17c32bc1
 
 This is a long-standing lurking bug. See Note [Lamba-bound unfoldings]
 in DmdAnal.
 
 I'm still not really happy with this lambda-bound-unfolding stuff.
] 
[Fix dynamic libs on OS X, and enable them by default
Ian Lynagh <igloo@earth.li>**20100503150302] 
[Switch back to using bytestring from the darcs repo; partially fixes #3855
Ian Lynagh <igloo@earth.li>**20100502113458] 
[Fix some cpp warnings when building on FreeBSD; patch from Gabor PALI
Ian Lynagh <igloo@earth.li>**20100428150700] 
[Fix "make 2"
Ian Lynagh <igloo@earth.li>**20100427162212
 The new Makefile logic was enabling the stage 1 rules when stage=2,
 so "make 2" was rebuilding stage 1.
] 
[Inplace programs depend on their shell wrappers
Ian Lynagh <igloo@earth.li>**20100427160038] 
[--make is now the default (#3515), and -fno-code works with --make (#3783)
Simon Marlow <marlowsd@gmail.com>**20100427122851
 Ignore-this: 33330474fa4703f32bf9997462b4bf3c
 If the command line contains any Haskell source files, then we behave
 as if --make had been given.
 
 The meaning of the -c flag has changed (back): -c now selects one-shot
 compilation, but stops before linking.  However, to retain backwards
 compatibility, -c is still allowed with --make, and means the same as
 --make -no-link.  The -no-link flag has been un-deprecated.
 
 -fno-code is now allowed with --make (#3783); the fact that it was
 disabled before was largely accidental, it seems.  We also had some
 regressions in this area: it seems that -fno-code was causing a .hc
 file to be emitted in certain cases.  I've tidied up the code, there
 was no need for -fno-code to be a "mode" flag, as far as I can tell.
 
 -fno-code does not emit interface files, nor does it do recompilation
 checking, as suggested in #3783.  This would make Haddock emit
 interface files, for example, and I'm fairly sure we don't want to do
 that.  Compiling with -fno-code is pretty quick anyway, perhaps we can
 get away without recompilation checking.
] 
[remove duplicate docs for -e in --help output (#4010)
Simon Marlow <marlowsd@gmail.com>**20100426140642
 Ignore-this: 187ff893ba8ffa0ec127867a7590e38d
] 
[workaround for #4003, fixes HEAD build with 6.12.2
Simon Marlow <marlowsd@gmail.com>**20100426103428
 Ignore-this: c4bc445dc8052d4e6efef3f1daf63562
] 
[Make sure all the clean rules are always included
Ian Lynagh <igloo@earth.li>**20100424181823
 In particular, this fixes a problem where stage3 bits weren't being cleaned
] 
[Correct the name of the amd64/FreeBSD platform in PlatformSupportsSharedLibs
Ian Lynagh <igloo@earth.li>**20100424132830
 We weren't getting sharedlibs on amd64/FreeBSD because of this
] 
[Include DPH docs in bindists
Ian Lynagh <igloo@earth.li>**20100424123101] 
[reinstate eta-expansion during SimplGently, to fix inlining of sequence_
Simon Marlow <marlowsd@gmail.com>**20100423124853
 Ignore-this: 4fa0fd5bafe0d6b58fc81076f50d5f8d
] 
[fix 64-bit value for W_SHIFT, which thankfully appears to be not used
Simon Marlow <marlowsd@gmail.com>**20100422213605
 Ignore-this: 525c062d2456c224ec8d0e083edd3b55
] 
[Add missing constant folding and optimisation for unsigned division
Simon Marlow <marlowsd@gmail.com>**20100422213443
 Ignore-this: fb10d1cda0852fab0cbcb47247498fb3
 Noticed by Denys Rtveliashvili <rtvd@mac.com>, see #4004
] 
[Fix the GHC API link in the main doc index.html
Ian Lynagh <igloo@earth.li>**20100422213226] 
[Give the right exit code in darcs-all
Ian Lynagh <igloo@earth.li>**20100421171339
 Our END block was calling system, which alters $?. So now we save and
 restore it.
] 
[Use StgWord64 instead of ullong
Ian Lynagh <igloo@earth.li>**20100421162336
 This patch also fixes ullong_format_string (renamed to showStgWord64)
 so that it works with values outside the 32bit range (trac #3979), and
 simplifies the without-commas case.
] 
[Implement try10Times in Makefile
Ian Lynagh <igloo@earth.li>**20100420165909
 Avoid using seq, as FreeBSD has jot instead.
] 
[Fix crash in non-threaded RTS on Windows
Simon Marlow <marlowsd@gmail.com>**20100420122125
 Ignore-this: 28b0255a914a8955dce02d89a7dfaca
 The tso->block_info field is now overwritten by pushOnRunQueue(), but
 stg_block_async_info was assuming that it still held a pointer to the
 StgAsyncIOResult.  We must therefore save this value somewhere safe
 before putting the TSO on the run queue.
] 
[Expand the scope of the event_buf_mutex to cover io_manager_event
Simon Marlow <marlowsd@gmail.com>**20100420122026
 Ignore-this: 185a6d84f7d4a35997f10803f6dacef1
 I once saw a failure that I think was due to a race on
 io_manager_event, this should fix it.
] 
[Flags -auto and -auto-all operate only on functions not marked INLINE.
Milan Straka <fox@ucw.cz>**20100331191050
 Ignore-this: 3b63580cfcb3c33d62ad697c36d94d05
] 
[Spelling correction for LANGUAGE pragmas
Max Bolingbroke <batterseapower@hotmail.com>**20100413192825
 Ignore-this: 311b51ba8d43f6c7fd32f48db9a88dee
] 
[Update the user guide so it talks about the newer "do rec" notation everywhere
Ian Lynagh <igloo@earth.li>**20100416205416
 Some of the problems highlighted in trac #3968.
] 
[Fix typo
Ian Lynagh <igloo@earth.li>**20100416205412] 
[Fix Trac #3950: unifying types of different kinds
simonpj@microsoft.com**20100412151845
 Ignore-this: d145b9de5ced136ef2c39f3ea4a04f4a
 
 I was assuming that the unifer only unified types of the 
 same kind, but now we can "defer" unsolved constraints that
 invariant no longer holds.  Or at least is's more complicated
 to ensure.  
 
 This patch takes the path of not assuming the invariant, which
 is simpler and more robust.  See
 Note [Mismatched type lists and application decomposition]
] 
[Fix Trac #3943: incorrect unused-variable warning
simonpj@microsoft.com**20100412151630
 Ignore-this: 52459f2b8b02c3cb120abe674dc9a060
 
 In fixing this I did the usual little bit of refactoring
] 
[Convert boot and boot-pkgs to perl
Ian Lynagh <igloo@earth.li>**20100415143919
 This stops us having to worry about sh/sed/... portability.
] 
[Use $(MAKE), not make, when recursively calling make
Ian Lynagh <igloo@earth.li>**20100415121453] 
[Remove the ghc_ge_609 makefile variables
Ian Lynagh <igloo@earth.li>**20100412235658
 They are now guaranteed to be YES
] 
[Increase the minimum version number required to 6.10 in configure.ac
Ian Lynagh <igloo@earth.li>**20100412235313] 
[The bootstrapping compiler is now required to be > 609
Ian Lynagh <igloo@earth.li>**20100409161046] 
[Handle IND_STATIC in isRetainer
Ian Lynagh <igloo@earth.li>**20100409104207
 IND_STATIC used to be an error, but at the moment it can happen
 as isAlive doesn't look through IND_STATIC as it ignores static
 closures. See trac #3956 for a program that hit this error.
] 
[Add Data and Typeable instances to HsSyn
David Waern <david.waern@gmail.com>**20100330011020
 Ignore-this: c3f2717207b15539fea267c36b686e6a
 
 The instances (and deriving declarations) have been taken from the ghc-syb
 package.
] 
[Fix for derefing ThreadRelocated TSOs in MVar operations
Simon Marlow <marlowsd@gmail.com>**20100407092824
 Ignore-this: 94dd7c68a6094eda667e2375921a8b78
] 
[sanity check fix
Simon Marlow <marlowsd@gmail.com>**20100407092746
 Ignore-this: 9c18cd5f5393e5049015ca52e62a1269
] 
[get the reg liveness right in the putMVar# heap check
Simon Marlow <marlowsd@gmail.com>**20100407092724
 Ignore-this: b1ba07a59ecfae00e9a1f8391741abc
] 
[initialise the headers of MSG_BLACKHOLE objects properly
Simon Marlow <marlowsd@gmail.com>**20100407081712
 Ignore-this: 183dcd0ca6a395d08db2be12b02bdd79
] 
[initialise the headers of MVAR_TSO_QUEUE objects properly
Simon Marlow <marlowsd@gmail.com>**20100407081514
 Ignore-this: 4b4a2f30cf2fb69ca4128c41744687bb
] 
[undo debugging code
Simon Marlow <marlowsd@gmail.com>**20100406142740
 Ignore-this: 323c2248f817b6717c19180482fc4b00
] 
[putMVar#: fix reg liveness in the heap check
Simon Marlow <marlowsd@gmail.com>**20100406135832
 Ignore-this: cddd2c7807ac7612c9b2c4c0d384d284
] 
[account for the new BLACKHOLEs in the GHCi debugger
Simon Marlow <marlowsd@gmail.com>**20100406133406
 Ignore-this: 4d4aeb4bbada3f50dc1fb0123f565e8f
] 
[don't forget to deRefTSO() in tryWakeupThread()
Simon Marlow <marlowsd@gmail.com>**20100406130411
 Ignore-this: 171d57c4f8653835dec0b69f9be9881c
] 
[Fix bug in popRunQueue
Simon Marlow <marlowsd@gmail.com>**20100406091453
 Ignore-this: 9d3cec8f18f5c5cbd51751797386eb6f
] 
[fix bug in migrateThread()
Simon Marlow <marlowsd@gmail.com>**20100401105840
 Ignore-this: 299bcf0d1ea0f8865f3e845eb93d2ad3
] 
[Remove the IND_OLDGEN and IND_OLDGEN_PERM closure types
Simon Marlow <marlowsd@gmail.com>**20100401093519
 Ignore-this: 95f2480c8a45139835eaf5610217780b
 These are no longer used: once upon a time they used to have different
 layout from IND and IND_PERM respectively, but that is no longer the
 case since we changed the remembered set to be an array of addresses
 instead of a linked list of closures.
] 
[Change the representation of the MVar blocked queue
Simon Marlow <marlowsd@gmail.com>**20100401091605
 Ignore-this: 20a35bfabacef2674df362905d7834fa
 
 The list of threads blocked on an MVar is now represented as a list of
 separately allocated objects rather than being linked through the TSOs
 themselves.  This lets us remove a TSO from the list in O(1) time
 rather than O(n) time, by marking the list object.  Removing this
 linear component fixes some pathalogical performance cases where many
 threads were blocked on an MVar and became unreachable simultaneously
 (nofib/smp/threads007), or when sending an asynchronous exception to a
 TSO in a long list of thread blocked on an MVar.
 
 MVar performance has actually improved by a few percent as a result of
 this change, slightly to my surprise.
 
 This is the final cleanup in the sequence, which let me remove the old
 way of waking up threads (unblockOne(), MSG_WAKEUP) in favour of the
 new way (tryWakeupThread and MSG_TRY_WAKEUP, which is idempotent).  It
 is now the case that only the Capability that owns a TSO may modify
 its state (well, almost), and this simplifies various things.  More of
 the RTS is based on message-passing between Capabilities now.
] 
[eliminate some duplication with a bit of CPP
Simon Marlow <marlowsd@gmail.com>**20100330154355
 Ignore-this: 838f7d341f096ca14c86ab9c81193e36
] 
[Make ioManagerDie() idempotent
Simon Marlow <marlowsd@gmail.com>**20100401100705
 Ignore-this: a5996b43cdb2e2d72e6e971d7ea925fb
 Avoids screeds of "event buffer overflowed; event dropped" in
 conc059(threaded1).
] 
[Move a thread to the front of the run queue when another thread blocks on it
Simon Marlow <marlowsd@gmail.com>**20100329144521
 Ignore-this: c518ff0d41154680edc811d891826a29
 This fixes #3838, and was made possible by the new BLACKHOLE
 infrastructure.  To allow reording of the run queue I had to make it
 doubly-linked, which entails some extra trickiness with regard to
 GC write barriers and suchlike.
] 
[remove non-existent MUT_CONS symbols
Simon Marlow <marlowsd@gmail.com>**20100330152600
 Ignore-this: 885628257a9d03f2ece2a754d993014a
] 
[change throwTo to use tryWakeupThread rather than unblockOne
Simon Marlow <marlowsd@gmail.com>**20100329144613
 Ignore-this: 10ad4965e6c940db71253f1c72218bbb
] 
[tiny GC optimisation
Simon Marlow <marlowsd@gmail.com>**20100329144551
 Ignore-this: 9e095b9b73fff0aae726f9937846ba92
] 
[New implementation of BLACKHOLEs
Simon Marlow <marlowsd@gmail.com>**20100329144456
 Ignore-this: 96cd26793b4e6ab9ddd0d59aae5c2f1d
 
 This replaces the global blackhole_queue with a clever scheme that
 enables us to queue up blocked threads on the closure that they are
 blocked on, while still avoiding atomic instructions in the common
 case.
 
 Advantages:
 
  - gets rid of a locked global data structure and some tricky GC code
    (replacing it with some per-thread data structures and different
    tricky GC code :)
 
  - wakeups are more prompt: parallel/concurrent performance should
    benefit.  I haven't seen anything dramatic in the parallel
    benchmarks so far, but a couple of threading benchmarks do improve
    a bit.
 
  - waking up a thread blocked on a blackhole is now O(1) (e.g. if
    it is the target of throwTo).
 
  - less sharing and better separation of Capabilities: communication
    is done with messages, the data structures are strictly owned by a
    Capability and cannot be modified except by sending messages.
 
  - this change will utlimately enable us to do more intelligent
    scheduling when threads block on each other.  This is what started
    off the whole thing, but it isn't done yet (#3838).
 
 I'll be documenting all this on the wiki in due course.
 
] 
[Fix warnings (allow pushOnRunQueue() to not be inlined)
Simon Marlow <marlowsd@gmail.com>**20100401114559
 Ignore-this: f40bfbfad70a5165a946d11371605b7d
] 
[remove out of date comment
Simon Marlow <marlowsd@gmail.com>**20100401105853
 Ignore-this: 26af88dd418ee0bcda7223b3b7e4e8d2
] 
[tidy up spacing in stderr traces
Simon Marlow <marlowsd@gmail.com>**20100326163122
 Ignore-this: 16558b0433a274be217d4bf39aa4946
] 
[Fix an assertion that was not safe when running in parallel
Simon Marlow <marlowsd@gmail.com>**20100325143656
 Ignore-this: cad08fb8900eb3a475547af0189fcc47
] 
[Never jump directly to a thunk's entry code, even if it is single-entry
Simon Marlow <marlowsd@gmail.com>**20100325114847
 Ignore-this: 938da172c06a97762ef605c8fccfedf1
 I don't think this fixes any bugs as we don't have single-entry thunks
 at the moment, but it could cause problems for parallel execution if
 we ever did re-introduce update avoidance.
] 
[Rename forgotten -dverbose-simpl to -dverbose-core2core in the docs.
Milan Straka <fox@ucw.cz>**20100331153626
 Ignore-this: 2da58477fb96e1cfb80f37dddd7c422c
] 
[Add -pa and -V to the documentation of time profiling options.
Milan Straka <fox@ucw.cz>**20100329191121
 Ignore-this: be74d216481ec5a19e5f40f85e6e3d65
] 
[Keep gcc 4.5 happy
Simon Marlow <marlowsd@gmail.com>**20100330120425
 Ignore-this: 7811878cc2bd1ce9cfbb5bf102fe3454
] 
[Fix warning compiling Linker.c for PPC Mac
naur@post11.tele.dk**20100403182355
 Ignore-this: e2d2448770c9714ce17dd6cf3e297063
 The warning message eliminated is:
 > rts/Linker.c:4756:0:
 >      warning: nested extern declaration of 'symbolsWithoutUnderscore'
] 
[Fix error compiling AsmCodeGen.lhs for PPC Mac (mkRtsCodeLabel)
naur@post11.tele.dk**20100403181656
 Ignore-this: deb7524ea7852a15a2ac0849c8c82f74
 The error messages eliminated are:
 > compiler/nativeGen/AsmCodeGen.lhs:875:31:
 >     Not in scope: `mkRtsCodeLabel'
 > compiler/nativeGen/AsmCodeGen.lhs:879:31:
 >     Not in scope: `mkRtsCodeLabel'
 > compiler/nativeGen/AsmCodeGen.lhs:883:31:
 >     Not in scope: `mkRtsCodeLabel'
] 
[Fix error compiling AsmCodeGen.lhs for PPC Mac (DestBlockId)
naur@post11.tele.dk**20100403180643
 Ignore-this: 71e833e94ed8371b2ffabc2cf80bf585
 The error message eliminated is:
 > compiler/nativeGen/AsmCodeGen.lhs:637:16:
 >     Not in scope: data constructor `DestBlockId'
] 
[Fix boot-pkgs's sed usage to work with Solaris's sed
Ian Lynagh <igloo@earth.li>**20100401153441] 
[Pass "-i org.haskell.GHC" to packagemaker when building the OS X installer
Ian Lynagh <igloo@earth.li>**20100331144707
 This seems to fix this failure:
 [...]
 ** BUILD SUCCEEDED **
 rm -f -f GHC-system.pmdoc/*-contents.xml
 /Developer/usr/bin/packagemaker -v --doc GHC-system.pmdoc\
              -o /Users/ian/to_release/ghc-6.12.1.20100330/GHC-6.12.1.20100330-i386.pkg
 2010-03-31 15:08:15.695 packagemaker[13909:807] Setting to : 0 (null)
 2010-03-31 15:08:15.709 packagemaker[13909:807] Setting to : 0 org.haskell.glasgowHaskellCompiler.ghc.pkg
 2010-03-31 15:08:15.739 packagemaker[13909:807] relocate: (null) 0
 2010-03-31 15:08:15.740 packagemaker[13909:807] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSXMLDocument initWithXMLString:options:error:]: nil argument'
 2010-03-31 15:08:15.741 packagemaker[13909:807] Stack: (
     2511962091,
     2447007291,
     2511961547,
     2511961610,
     2432803204,
     453371,
     447720,
     436209,
     435510,
     9986,
     9918
 )
 make[1]: *** [framework-pkg] Trace/BPT trap
 make: *** [framework-pkg] Error 2
] 
[Use machdepCCOpts when compiling the file to toggle -(no-)rtsopts
Ian Lynagh <igloo@earth.li>**20100331161302
 Should fix toggling on OS X "Snow Leopard". Diagnosed by Roman Leshchinskiy.
] 
[Avoid a non-portable use of tar reported by Roman Leshchinskiy
Ian Lynagh <igloo@earth.li>**20100330145802] 
[Don't install EXTRA_PACKAGES by default
Simon Marlow <marlowsd@gmail.com>**20100330142714
 Ignore-this: d4cc8f87a6de8d9d1d6dc9b77130b3
] 
[fix a non-portable printf format
Simon Marlow <marlowsd@gmail.com>**20100330134437
 Ignore-this: d41c23c54ec29654cb2049de1e588570
] 
[avoid single quote in #error
Simon Marlow <marlowsd@gmail.com>**20100330120346
 Ignore-this: 663f39e7a27fead2f648fbf22d345bb4
] 
[use FMT_Word64 instead of locally-defined version
Simon Marlow <marlowsd@gmail.com>**20100330114650
 Ignore-this: 82697b8095dffb3a8e196c687006ece0
] 
[remove old/unused DotnetSupport and GhcLibsWithUnix
Simon Marlow <marlowsd@gmail.com>**20100330123732
 Ignore-this: c68814868b3671abdc369105bbeafe6c
] 
[fix return type cast in f.i.wrapper when using libffi (#3516)
Simon Marlow <marlowsd@gmail.com>**20100329154220
 Ignore-this: f898eb8c9ae2ca2009e539735b92c438
 
 Original fix submitted by 
   Sergei Trofimovich <slyfox@community.haskell.org>
 modified by me:
  - exclude 64-bit types
  - compare uniques, not strings
  - #include "ffi.h" is conditional
] 
[libffi: install 'ffitarget.h' header as sole 'ffi.h' is unusable
Simon Marlow <marlowsd@gmail.com>**20100329135734
 Ignore-this: f9b555ea289d8df1aa22cb6faa219a39
 Submitted by: Sergei Trofimovich <slyfox@community.haskell.org>
 Re-recorded against HEAD.
] 
[avoid a fork deadlock (see comments)
Simon Marlow <marlowsd@gmail.com>**20100329132329
 Ignore-this: 3377f88b83bb3b21e42d7fc5f0d866f
] 
[tidy up the end of the all_tasks list after forking
Simon Marlow <marlowsd@gmail.com>**20100329132253
 Ignore-this: 819d679875be5f344e816210274d1c29
] 
[Add a 'setKeepCAFs' external function (#3900)
Simon Marlow <marlowsd@gmail.com>**20100329110036
 Ignore-this: ec532a18cad4259a09847b0b9ae2e1d2
] 
[Explicitly check whether ar supports the @file syntax
Ian Lynagh <igloo@earth.li>**20100329123325
 rather than assuming that all GNU ar's do.
 Apparently OpenBSD's older version doesn't.
] 
[Fix the format specifier for Int64/Word64 on Windows
Ian Lynagh <igloo@earth.li>**20100327182126
 mingw doesn't understand %llu/%lld - it treats them as 32-bit rather
 than 64-bit. We use %I64u/%I64d instead.
] 
[Fix the ghci startmenu item
Ian Lynagh <igloo@earth.li>**20100326235934
 I'm not sure what changed, but it now doesn't work for me without
 the "Start in" field being set.
] 
[Fix paths to docs in "Start Menu" entries in Windows installer; fixes #3847
Ian Lynagh <igloo@earth.li>**20100326155917] 
[Add a licence file for the Windows installer to use
Ian Lynagh <igloo@earth.li>**20100326155130] 
[Add gcc-g++ to the inplace mingw installation; fixes #3893
Ian Lynagh <igloo@earth.li>**20100326154714] 
[Add the licence file to the Windows installer. Fixes #3934
Ian Lynagh <igloo@earth.li>**20100326152449] 
[Quote the paths to alex and happy in configure
Ian Lynagh <igloo@earth.li>**20100325143449
 Ignore-this: d6d6e1a250f88985bbeea760e63a79db
] 
[Use </> rather than ++ "/"
Ian Lynagh <igloo@earth.li>**20100325133237
 This stops us generating paths like
     c:\foo\/ghc460_0/ghc460_0.o
 which windres doesn't understand.
] 
[Append $(exeext) to utils/ghc-pkg_dist_PROG
Ian Lynagh <igloo@earth.li>**20100324233447
 Fixes bindist creation
] 
[A sanity check
Simon Marlow <marlowsd@gmail.com>**20100325110500
 Ignore-this: 3b3b76d898c822456857e506b7531e65
] 
[do_checks: do not set HpAlloc if the stack check fails
Simon Marlow <marlowsd@gmail.com>**20100325110328
 Ignore-this: 899ac8c29ca975d03952dbf4608d758
 
 This fixes a very rare heap corruption bug, whereby
 
  - a context switch is requested, which sets HpLim to zero
    (contextSwitchCapability(), called by the timer signal or
    another Capability).
 
  - simultaneously a stack check fails, in a code fragment that has
    both a stack and a heap check.
 
 The RTS then assumes that a heap-check failure has occurred and
 subtracts HpAlloc from Hp, although in fact it was a stack-check
 failure and retreating Hp will overwrite valid heap objects.  The bug
 is that HpAlloc should only be set when Hp has been incremented by the
 heap check.  See comments in rts/HeapStackCheck.cmm for more details.
 
 This bug is probably incredibly rare in practice, but I happened to be
 working on a test that triggers it reliably:
 concurrent/should_run/throwto001, compiled with -O -threaded, args 30
 300 +RTS -N2, run repeatedly in a loop.
] 
[comments and formatting only
Simon Marlow <marlowsd@gmail.com>**20100325104617
 Ignore-this: c0a211e15b5953bb4a84771bcddd1d06
] 
[Change how perl scripts get installed; partially fixes #3863
Ian Lynagh <igloo@earth.li>**20100324171422
 We now regenerate them when installing, which means the path for perl
 doesn't get baked in
] 
[Pass the location of gcc in the ghc wrapper script; partially fixes #3863
Ian Lynagh <igloo@earth.li>**20100324171408
 This means we don't rely on baking a path to gcc into the executable
] 
[Quote the ar path in configure
Ian Lynagh <igloo@earth.li>**20100324162043] 
[Remove unused cUSER_WAY_NAMES cUSER_WAY_OPTS
Ian Lynagh <igloo@earth.li>**20100324145048] 
[Remove unused cCONTEXT_DIFF
Ian Lynagh <igloo@earth.li>**20100324145013] 
[Remove unused cEnableWin32DLLs
Ian Lynagh <igloo@earth.li>**20100324144841] 
[Remove unused cGHC_CP
Ian Lynagh <igloo@earth.li>**20100324144656] 
[Fix the build for non-GNU-ar
Ian Lynagh <igloo@earth.li>**20100324132907] 
[Tweak the Makefile code for making .a libs; fixes trac #3642
Ian Lynagh <igloo@earth.li>**20100323221325
 The main change is that, rather than using "xargs ar" we now put
 all the filenames into a file, and do "ar @file". This means that
 ar adds all the files at once, which works around a problem where
 files with the same basename in a later invocation were overwriting
 the existing file in the .a archive.
] 
[Enable shared libraries on Windows; fixes trac #3879
Ian Lynagh <igloo@earth.li>**20100320231414
 Ignore-this: c93b35ec5b7a7fa6ddb286d17a616216
] 
[Add the external core PDF to the new build system
Ian Lynagh <igloo@earth.li>**20100321161909] 
[Allow specifying $threads directly when validating
Ian Lynagh <igloo@earth.li>**20100321112835] 
[Remove LazyUniqFM; fixes trac #3880
Ian Lynagh <igloo@earth.li>**20100320213837] 
[UNDO: slight improvement to scavenging ...
Simon Marlow <marlowsd@gmail.com>**20100319153413
 Ignore-this: f0ab581c07361f7b57eae02dd6ec893c
 
 Accidnetally pushed this patch which, while it validates, isn't
 correct.
 
 rolling back:
 
 Fri Mar 19 11:21:27 GMT 2010  Simon Marlow <marlowsd@gmail.com>
   * slight improvement to scavenging of update frames when a collision has occurred
 
     M ./rts/sm/Scav.c -19 +15
] 
[slight improvement to scavenging of update frames when a collision has occurred
Simon Marlow <marlowsd@gmail.com>**20100319112127
 Ignore-this: 6de2bb9614978975f17764a0f259d9bf
] 
[Don't install the utf8-string package
Ian Lynagh <igloo@earth.li>**20100317212709] 
[Don't use -Bsymbolic when linking the RTS
Ian Lynagh <igloo@earth.li>**20100316233357
 This makes the RTS hooks work when doing dynamic linking
] 
[Fix Trac #3920: Template Haskell kinds
simonpj@microsoft.com**20100317123519
 Ignore-this: 426cac7920446e04f3cc30bd1d9f76e2
 
 Fix two places where we were doing foldl instead of foldr
 after decomposing a Kind.  Strange that the same bug appears
 in two quite different places!
] 
[copy_tag_nolock(): fix write ordering and add a write_barrier()
Simon Marlow <marlowsd@gmail.com>**20100316143103
 Ignore-this: ab7ca42904f59a0381ca24f3eb38d314
 
 Fixes a rare crash in the parallel GC.
 
 If we copy a closure non-atomically during GC, as we do for all
 immutable values, then before writing the forwarding pointer we better
 make sure that the closure itself is visible to other threads that
 might follow the forwarding pointer.  I imagine this doesn't happen
 very often, but I just found one case of it: in scavenge_stack, the
 RET_FUN case, after evacuating ret_fun->fun we then follow it and look
 up the info pointer.
] 
[Add sliceP mapping to vectoriser builtins
benl@ouroborus.net**20100316060517
 Ignore-this: 54c3cafff584006b6fbfd98124330aa3
] 
[Comments only
benl@ouroborus.net**20100311064518
 Ignore-this: d7dc718cc437d62aa5b1b673059a9b22
] 
[TAG 2010-03-16
Ian Lynagh <igloo@earth.li>**20100316005137
 Ignore-this: 234e3bc29e2f26cc59d7b03d780cc352
] 
Patch bundle hash:
de8a73a54f0223ce2ee0a34fd2d5f86bfd0ce14a

