Thu Jun 11 21:29:53 EDT 2009 * Control.Monad: add 'ignore' function Turns m a -> m (). Lets one call functions for their side-effects without having to get rid of their return values with '>> return ()'. Very useful in many contexts (parsing, IO etc.). -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 New patches: [Control.Monad: add 'ignore' function**20090612012953 Ignore-this: 427b39cba203a7414a1bdf0cdb83a0bc Turns m a -> m (). Lets one call functions for their side-effects without having to get rid of their return values with '>> return ()'. Very useful in many contexts (parsing, IO etc.). ] hunk ./Control/Monad.hs 193 forever :: (Monad m) => m a -> m b forever a = a >> forever a +-- | Convenience function. This is particularly good for 'forkIO' and 'forM_', +-- as they demand return types of 'IO ()', but most interesting IO functions +-- don't return void. So one can wrap them with 'ignore' (essentially a call to 'unit'). +ignore :: Functor f => f a -> f () +ignore = fmap (const ()) + -- ----------------------------------------------------------------------------- -- Other monad functions Context: [Remove unused foreign imports of __encodeFloat/Double Duncan Coutts **20090611160100] [nhc98 must build dirUtils.c as well.**20090605091730 Fixes this bootstrapping error: Undefined symbols: "___hscore_readdir", referenced from: _FR_System_46Posix_46Internals_46readdir_35 in libHSbase.a(Internals.o) ] [Remove unnecessary parens Ian Lynagh **20090602183608] [Fix validate (on Windows) Simon Marlow **20090529130214 Ignore-this: ea31ee9b26cd69b81bb24ecf040dc196 ] [Make two type defaults explicit**20090529083549 Ignore-this: 398a10db1612dbef1723b449bff26782 Now that -Werror rejects programs that use silent type-class defaulting, we must commit in the source code. I've used Double in CPUTime, which is the same as was picked automatically before, but I expect Float would be ok. realToInteger :: Real a => a -> Integer realToInteger ct = round (realToFrac ct :: Double) In GHC.Float I used Float (rather that than the auto-picked Double) because I'm pretty certain it has enough precision. -- f :: Integer, log :: Float -> Float, -- ceiling :: Float -> Int ceiling ((log (fromInteger (f+1) :: Float) + ] [Fix #3257: document that exitWith in a forkIO'd thread does not exit the process Simon Marlow **20090528123738 Ignore-this: cc5aff45a149acd1627bd7ee31aea4e9 ] [Increase the version number to that in the 6.10 branch Ian Lynagh **20090524155610] [Fix warnings Ian Lynagh **20090523224508] [Document that the initial quantity for QSem and QSemN must be >= 0 Ian Lynagh **20090523200238] [add _O_NOINHERIT when opening files on Windows (see #2650) Simon Marlow **20090520130926 Ignore-this: 6dfbdfe13e739cc339e627294e077ba6 ] [remove msvcrt and kernel32 from extra-libraries Simon Marlow **20090520111626 Ignore-this: cd2e24a5144c6ca0efe03ceaea8f577b ] [Add wrappers around fcntl Ian Lynagh **20090520175358 We need to do this as it has a (, ...) type, which we aren't allowed to directly call with the FFI. ] [Add more bang patterns, needed to fix the 32bit build Ian Lynagh **20090424160701] [Use a bang pattern when we where/let-bind values with unlifted types Ian Lynagh **20090424125320] [FIX #3171: make sure we have only one table of signal handlers Simon Marlow **20090423112837 Ignore-this: 3d8039b47efac2629e73a7d7e7d58983 ] [Fix QSem and QSemN: Initial amount must be non-negative Ian Lynagh **20090410164013] [Don't inline enumDeltaToInteger until its rules have had a chance to fire**20090403091750 Ignore-this: ab602bac65610e720065b097d46a6f52 ] [Import GHC.Err so we see bottoming functions properly**20090403091118 Ignore-this: 913e3a4584e73e67ddf9bc3b6f11d11 Before this patch, GHC/Err.lhs-boot exported divZeroError and overflowError, as well as plain 'error'. The latter has a wired-in defn in GHC (MkId.lhs), but the former two do not. As a result GHC doesn't see that overflowError is a bottoming function at a crucial moment when compiling GHC.Real, and that means that divMod wasn't getting the CPR property. The fix is easy: - GHC/Err.lhs-boot should export only 'error' - GHC.Real, GHC.Int, and GHC.Word should import GHC.Err directly. They can do this nowadays without creating a module loop, thanks to the new exception story ] [Don't inline unpackCString**20090403090844 Ignore-this: 78f9660ffff55ae8bc4c41866d1ad80c There's no point in inlining unpackCString, so this patch adds a NOINLINE pragma. (Otherwise, it's just on the threshold.) ] [be sure to install Nhc98BaseConfig.h**20090401122028] [Avoid unnecessarily using Integer when decoding Floats Ian Lynagh **20090330225241] [Add another Data.List.intersect example from Christian Maeder Ian Lynagh **20090327232118] [Remove some redundant fromInteger's Ian Lynagh **20090324145325] [Add an import needed in the new build system Ian Lynagh **20090322162241] [ghcconfig.h is __GLASGOW_HASKELL__ only**20090316134532] [Fix layout to comply with H'98.**20090316125651 Also, configure correctly for nhc98, to avoid win32 code. ] [FIX #2189: re-enabled cooked mode for Console-connected Handles on Windows Simon Marlow *-20090305113323 Patch from Sigbjorn Finne ] [avoid a space leak building up in the "prodding" IORef (part of #2992) Simon Marlow **20090311093938] [Partial fix for #2917 Simon Marlow **20090305154153 Ignore-this: 3a06cd3ea09f1d6454d52031802a93fd - add newAlignedPinnedByteArray# for allocating pinned BAs with arbitrary alignment - the old newPinnedByteArray# now aligns to 16 bytes Foreign.alloca will use newAlignedPinnedByteArray#, and so might end up wasting less space than before (we used to align to 8 by default). Foreign.allocaBytes and Foreign.mallocForeignPtrBytes will get 16-byte aligned memory, which is enough to avoid problems with SSE instructions on x86, for example. There was a bug in the old newPinnedByteArray#: it aligned to 8 bytes, but would have failed if the header was not a multiple of 8 (fortunately it always was, even with profiling). Also we occasionally wasted some space unnecessarily due to alignment in allocatePinned(). I haven't done anything about Foreign.malloc/mallocBytes, which will give you the same alignment guarantees as malloc() (8 bytes on Linux/x86 here). ] [Add config.guess, config.sub and install-sh Ian Lynagh **20090307153831] [add final newline; fix build (on Windows?) Simon Marlow **20090305120426] [FIX #2189: re-enabled cooked mode for Console-connected Handles on Windows Simon Marlow **20090305113323 Patch from Sigbjorn Finne ] [Rules to make genericLength strict for Int/Integer lengths, see #2962**20090207181427] [#2759: Amend previous patch Jose Pedro Magalhaes **20090212132327] [ifdef out the definition of setCloseOnExec on Windows; fixes the build Ian Lynagh **20090220173041] [Fix warnings: put imports inside ifdefs Ian Lynagh **20090220173941] [ifdef out the syncIOManager export on Windows; fixes the build Ian Lynagh **20090220173414] [Set the IO manager pipe descriptors to FD_CLOEXEC Simon Marlow **20090219114217 Ignore-this: ac670a45f8a4d06dd7831a2674d6c119 This pipe is an internal implementation detail, we don't really want it to be exposed. ] [Rewrite of signal-handling (base patch; see also ghc and unix patches) Simon Marlow **20090219102203 Ignore-this: 2122e05eaaab184b9ef0f269ce4c9282 The API is the same (for now). The new implementation has the capability to define signal handlers that have access to the siginfo of the signal (#592), but this functionality is not exposed in this patch. #2451 is the ticket for the new API. The main purpose of bringing this in now is to fix race conditions in the old signal handling code (#2858). Later we can enable the new API in the HEAD. Implementation differences: - More of the signal-handling is moved into Haskell. We store the table of signal handlers in an MVar, rather than having a table of StablePtrs in the RTS. - In the threaded RTS, the siginfo of the signal is passed down the pipe to the IO manager thread, which manages the business of starting up new signal handler threads. In the non-threaded RTS, the siginfo of caught signals is stored in the RTS, and the scheduler starts new signal handler threads. ] [Fix #2971: we had lost the non-blocking flag on Handles created by openFile Simon Marlow **20090206165912 Ignore-this: 546f1a799b6e80f7b25c73ef642d8f9d This code is a mess, fortunately the new IO library cleans it up. ] [add some rules of thumb for catching exceptions, restructure the docs a bit Simon Marlow **20090205150642 Ignore-this: 8294e58f247b2cc3f193991434d336de ] [implement System.IO.Error more fully for nhc98**20090206173314] [Make System.Posix.Internals buildable by nhc98.**20090206111152] [Fix #2903: ensure CWStringLen contains the length of the array rather than the String Ross Paterson **20090203011026] [OldException catches unknown exceptions as DynException Ian Lynagh **20090202151856 It's important that we put all exceptions into the old Exception type somehow, or throwing a new exception wouldn't cause the cleanup code for bracket, finally etc to happen. ] [Update the Exception docs Ian Lynagh **20090131204845] [Require Cabal version >= 1.6 Ian Lynagh **20090122011251] [Add "bug-reports" and "source-repository" info to the Cabal file Ian Lynagh **20090121182010] [Proposal #2875: remove StringRep and StringConstr Jose Pedro Magalhaes **20090116142617] [Fix #2759: add mkRealConstr and mkIntegralConstr, deprecate mkFloatConstr and mkIntConstr Jose Pedro Magalhaes **20090116140655] [Correct SYB's representation of Char Jose Pedro Magalhaes **20081211144716] [avoid `mappend` in monoid laws, because it doesn't work with haddock Ross Paterson **20090118011508] [Make Data.Typeable imports and exports more explicit Ian Lynagh **20090114234512] [add Monoid laws Ross Paterson **20090116151624] [Unbreak an import cycle caused by moving 'catch' definitions around.**20090116110132 The new cycle was introduced for nhc98 only. ] [make the Monoid docs more self-contained Ross Paterson **20090115222441] [Move some catch definitions around to avoid an import loop Ian Lynagh **20090114211033 As suggested by simonpj in trac #2822. ] [Add NoImplicitPrelude to the extensions used when building with GHC Ian Lynagh **20090114202810] [#2699: exit silently for EPIPE on stdout Simon Marlow **20090114134612 Ignore-this: 4236560e8e9c1135129e9526355f11b4 ] [Fix build when we have HTYPE_TCFLAG_T Ian Lynagh **20090105102020] [Fix the build on Windows Ian Lynagh **20090105014625] [Add errno to the IOError type Ian Lynagh **20090104173018] [Fix typo (reqwests -> requests); trac #2908, spotted by bancroft Ian Lynagh **20090104154405] [More compact error messages for record selectors**20090102145325 Make recSelError generate the standard part of the record selector error message (i.e. "No match in record selector") rather than have that string duplicated for every record selector. ] [extra dependencies for the new build system Simon Marlow **20081217104655] [warning fix: don't use -XPatternSignatures in GHC >= 6.10 Simon Marlow **20081217104637] [Rollback INLINE patches Simon Marlow **20081216104143 rolling back: Fri Dec 5 17:00:15 GMT 2008 * Update INLINE pragmas for new INLINE story - (.) and foldr should inline when applied to only two arguments - Make unpackCString# NOINLINE; it inlines too much (with little gain) M ./GHC/Base.lhs -10 +31 ] [FIX #1364: added support for C finalizers that run as soon as the value is no longer reachable. Ivan Tomac **20081210150510 Patch amended by Simon Marlow: - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv# ] [Fix #2760: deprecate mkNorepType, add mkNoRepType Jose Pedro Magalhaes **20081121141905] [Update INLINE pragmas for new INLINE story**20081205170015 - (.) and foldr should inline when applied to only two arguments - Make unpackCString# NOINLINE; it inlines too much (with little gain) ] [Fix #2750: change Prelude.(,) to Prelude.(,,) Jose Pedro Magalhaes **20081201113411] [Fix typo (or out of date reference) in throwTo documentation. shelarcy **20081129024639] [Add more description of what "round" does, from the H98 report Ian Lynagh **20081119143131] [re-instate the gcd/Integer and lcm/Integer RULES Simon Marlow **20081120101826 Fixes a performance regression between 6.8.3 and 6.10.1 ] [Change an "undefined" into a more informative error; trac #2782 Ian Lynagh **20081116160228] [updating Haddock documentation**20081111095023 Fixed the broken link from Data.Generics to Data.Data. ] [add GHC.Conc.runSparks (required by GHC patch "Run sparks in batches") Simon Marlow **20081106095419] [FIX #2722: update RULES for the Category/Arrow split Ross Paterson **20081104144515 The rule arr id = id interacts unpleasantly with the advice to define id = arr id in instances of Category that are also instances of Arrow (#2722). Also changed a couple of >>>'s to .'s in later rules. ] [Add AnnotationWrapper type so GHC can capture annotation dictionaries during compilation Max Bolingbroke **20081016122608] [docs about how exceptions are handled by forkIO'd threads (#2651) Simon Marlow **20081016100410] [Import n_capabilities via import symbol when linking dynamically Clemens Fruhwirth **20081013161220] [add link to the new syb wiki**20081013111605] [changing haddock links**20081010095434] [add readTVarIO :: TVar a -> IO a Simon Marlow **20081010113835] [removed (->) instance from Data.Data**20081006075254] [non-GHC: delete unnecessary imports Ross Paterson **20081007134809] [added new module Data.Data 'Jose Pedro Magalhaes '**20081002140535 The new Data.Data module contains all of Data.Generics.Basics and most of Data.Generics.Instances. The missing instances were deemed dubious and moved to the syb package. ] [add new Data.Data module 'Jose Pedro Magalhaes '**20081002082735] [restore Complex's derived Data instance 'Jose Pedro Magalhaes '**20081002082655] [update Data.Generics import 'Jose Pedro Magalhaes '**20081002082604] [Don't use ^(2::Int) in Data.Complex.magnitude; partially fixes trac #2450 Ian Lynagh **20081004142651 We still might want to make a RULE for this, so the bug is not fully fixed. ] [Restore the Haskell 98 behaviour of Show Ratio (#1920) Simon Marlow **20080923134949] [Pad version number to Ian Lynagh **20080920155801] [TAG 6.10 branch has been forked Ian Lynagh **20080919123437] [In nhc98, Word is a type synonym, so class instance is not possible.**20080917075326] [Fix bugs in Text.Printf (#1548) Simon Marlow **20080916133505] [We should be including Rts.h here, not Stg.h Simon Marlow **20080912134901 Stg.h is for .hc files only, and it sets up various global register variables. ] [Generic functions that take integral arguments should work the same way as their prelude counterparts **20080822022755 The Prelude functions drop, take, and splitAt are unfailing (never call error). This patch changes the Data.List generic versions to behave the same way. At present, they call error on negative arguments. ] [Don't define __hscore_s_issock on Windows Ian Lynagh **20080904202845] [Unbreak the GHC build with older versions of gcc Ian Lynagh **20080904185122 Patch from, who says: Stg.h must be included before HsBase.h, because the latter contains function definitions causing older versions of gcc (3.3.5 in my case) to bail out with "error: global register variable follows a function definition" on Regs.h, which is included by Stg.h. ] [Don't make S_ISSOCK use conditional Ian Lynagh **20080904164234 We were conditionally defining the C wrapper, but unconditionally using it. So if it didn't exist then things would have broken anyway. ] [Add missing files Ian Lynagh **20080904100951] [Remerge concurrent,unique,timeout,st,getopt into base Ian Lynagh **20080903201908] [remove 'pure' method from Arrow class (#2517) Ross Paterson **20080903144436] [make Typeable instances for larger tuples available to non-GHC Ross Paterson **20080903113543] [Don't look for actual OldException.Exception exceptions Ian Lynagh **20080902224730 We don't actually throw them (we throw the new Exception equivalents instead), and looking for them was causing an infinite loop ] [add include/CTypes.h to extra-source-files Ross Paterson **20080902153029] [avoid relying on the implementation of SomeException Ross Paterson **20080902080113 This is because Hugs uses a different implementation. No semantic change. ] [non-GHC: leave out Belch functions Ross Paterson **20080831180227] [non-GHC: add Typeable instance for ForeignPtr Ross Paterson **20080831180048] [docs: mention that killThread on a completed thread is a no-op Simon Marlow **20080902093126] [#2528: reverse the order of args to (==) in nubBy to match nub Simon Marlow **20080902092950 This only makes a difference when the (==) definition is not reflexive, but strictly speaking it does violate the report definition of nubBy, so we should fix it. ] [System.Timeout is no longer part of base**20080901145738] [getopt is no longer part of base**20080827145336] [Split syb off into its own package Ian Lynagh **20080825214144 I've also moved the Data (Complex a) instance into it, and made it portable rather than GHC-only in the process. ] [add extra-source-files field Ross Paterson **20080825231317] [Fix warnings in PrelIOUtils.c Ian Lynagh **20080825141841] [Windows-only fixes for moving concurrent out of base Ian Lynagh **20080824164146] [Split off the concurrent hierarchy (concurrent, unique, timeout) Ian Lynagh **20080824123956] [Split getopt off into its own package Ian Lynagh **20080824020213] [Remove ST stuff that is now in the new st package Ian Lynagh **20080823223014] [Fix Windows-only warnings Ian Lynagh **20080823002249] [Fix Windows-only warnings in GHC.Conc Ian Lynagh **20080822234837] [Suppress some warnings that are hard to fix because of ifdefs Ian Lynagh **20080822233951] [Provide blockedOnDeadMVar, blockedIndefinitely for the RTS Ian Lynagh **20080821110723] [Fix more warnings Ian Lynagh **20080820233958] [Suppress a couple of warnings in GHC.PArr Ian Lynagh **20080820232018 The fix isn't immediately obvious to me ] [Fix more warnings Ian Lynagh **20080820231937] [Fix warnings in Data.Generics.* Ian Lynagh **20080820230437] [Fix some more warnings Ian Lynagh **20080820223252] [Ignore some orphan warnings Ian Lynagh **20080820211901] [remove some functions that aren't used in base Simon Marlow **20080821142339] [remove __hscore_renameFile, it is no longer uesd Simon Marlow **20080818155950 System.Directory implements renameFile using unix/Win32 now. ] [Rewrite the documentation for forkOS again Simon Marlow **20080818132856 Try to make it clearer that forkOS is only necessary when calling foreing libraries that use thread-local state, and it has nothing to do with scheduling behaviour between Haskell threads. I also added something about the performance impact of forkOS, and mentioned that the main thread is a bound thread. ] [nhc only: expose Foldable and Traversable instances of Array Ross Paterson **20080817002719 These were turned off as a side-effect of a previous nhc-only fix for #2176 that is no longer needed. They should be fine for nhc now. ] [Fix hReady (trac #1063) Ian Lynagh **20080816182715 We now throw an EOF exception when appropriate ] [Fix oversight in Control.OldException Bertram Felgenhauer **20080816132631 The NonTermination constructor slipped through in the Exception instance. ] [Eliminate orphan rules and instances in the array package Ian Lynagh **20080816122253] [Control.OldException: Map exceptions to old exceptions and back properly. Ian Lynagh **20080814210219 * Control.OldException: Map exceptions to old exceptions and back properly. It's really necessary to map them back as well, or the RTS and base library will not recognize exceptions that got caught and rethrown. (See #2508) Patch from Bertram Felgenhauer ] [add Traversable generalizations of mapAccumL and mapAccumR (#2461) Ross Paterson **20080814162617] [simplify definition of Prelude.catch Ross Paterson **20080814143650] [remove returns from void functions Ross Paterson **20080814110841] [No reason for Handler and catches to exclude nhc98.**20080813125850] [Must import ExitCode for its instance to be re-exported.**20080813125710 The Cabal library depends on "instance Exception ExitCode", and expects to import it from Control.Exception, not Control.Exception.Base. ] [use New.catch instead of catchException in OldException Ross Paterson **20080813071307] [use the Haskell 98 module Control.Exception.Base in the Concurrent modules Ross Paterson **20080813000219] [export Control.Exception.Base Ross Paterson **20080812233640] [use dummy implementation of timeout for all non-GHCs Ross Paterson **20080812151602] [Hugs only: fix imports Ross Paterson **20080812145654] [non-GHC: hide Prelude.catch Ross Paterson **20080812145622] [add Control.Exception.Base to nhc98 build**20080812174300] [bump to version 4.0 Simon Marlow **20080805153354] [Hugs only: don't import exception types -- their instances are now in Control.Exception.Base Ross Paterson **20080812140433] [split most of Control.Exception into new Control.Exception.Base Ross Paterson **20080812124912 Move everything but catches/Handler into a new internal module. This was needed to get the new exceptions working with Hugs, because Hugs has the constraint that all Haskell 98 library modules, and everything they include, must be Haskell 98. This also involves a different representation of SomeException for Hugs, so that type is exported opaquely for Hugs. Then Control.Exception.Base is Haskell 98 as far as Hugs is concerned, but Control.Exception needs the extensions turned on. Control.Exception re-exports everything from Control.Exception.Base except the functions used by the GHC runtime. ] [remove kludges, now that Control.Exception is imported Ross Paterson **20080811180328] [threadDelay and friends are GHC-only Ross Paterson **20080811175039] [fix imports for non-GHC**20080808092017] [Eq and Ord have moved into GHC.Classes Ian Lynagh **20080807095352] [Use the proper CInt type in GHC.Unicode Ian Lynagh **20080806232948] [Import wibbles Ian Lynagh **20080806232055] [Remove unnecessary Data/Dynamic.hs-boot Ian Lynagh **20080806230623] [Remove more redundant GHC.Float imports Ian Lynagh **20080806225411] [Remove an unnecessary import Ian Lynagh **20080806224742] [Move Int, Float and Double into ghc-prim:GHC.Types Ian Lynagh **20080806191554] [Put some explicit import lists in Data.Typeable Ian Lynagh **20080806190353] [Fix a couple of imports Ian Lynagh **20080806165549] [Remove unused conditional import Ian Lynagh **20080806124930] [Swap imports around to get GHC.ForeignPtr out of the base knot Ian Lynagh **20080806121313] [Move some bits around to stop Data.Either being in the base import knot Ian Lynagh **20080806120504] [Tweak an import Ian Lynagh **20080806000440] [Remove the DynIOError constructor of IOErrorType Ian Lynagh **20080805234720 As far as I can see it is never used or exported ] [Move some internals around to simplify the import graph a bit Ian Lynagh **20080805221341] [Move the Char datatype into ghc-prim Ian Lynagh **20080805204009] [Remove an unnecessary import Ian Lynagh **20080805182336] [The [] definition has moved to ghc-prim Ian Lynagh **20080805182332] [Fix warnings Ian Lynagh **20080805150250] [Add a missing case to Show AsyncException Ian Lynagh **20080805142811] [Remove GHC.Dotnet Ian Lynagh **20080804215840] [Hide standalone deriving clauses from haddock Ian Lynagh **20080804211617] [Control.Exception doesn't need to export assertError Ian Lynagh **20080804161838] [Generalise the type of mapException; pointed out by Isaac Dupree Ian Lynagh **20080804160941] [Remove some unnecessary Data.Tuple imports Ian Lynagh **20080804155956] [The tuple datatype definitions have moved to ghc-prim Ian Lynagh **20080804155420] [make ExitCode an instance of Exception for nhc98**20080805160330] [poke and peek come from Foreign.Storable**20080804160616] [zipWithM_ comes from Control.Monad**20080804160319] [Fix nhc98 code variations to use the extensible exception API.**20080804155842 There is still only one real exception type in nhc98, so it is not truly extensible. But this is enough to get the base package building again. ] [nhc98 needs the Prelude for this module**20080804133853] [Change some imports and derive Show (Either a b) Ian Lynagh **20080804004147 rather than writing it by hand in GHC.Show ] [Windows fixes Ian Lynagh **20080803180345] [Remove the duplicate definition of throwTo in Control.Exception Ian Lynagh **20080803141703 It now imports GHC.Conc, so it is no longer necessary ] [Remove the only import of GHC.Exts Ian Lynagh **20080803141944] [Move assertError into GHC.IOBase Ian Lynagh **20080803141040] [Use onException rather than catchAny Ian Lynagh **20080803114104] [Generalise the type of onException Ian Lynagh **20080803003001 The type of the thing to do on an exception is now IO b rather than IO () which better matches functions like bracket. ] [Remove the dangerous Exception functions Ian Lynagh **20080802231358 Removed: catchAny, handleAny, ignoreExceptions These make it easy to eat /any/ exception, which is rarely what you want. Normally you either want to: * only catch exceptions in a certain part of the hierarchy, e.g. "file not found", in which case you should only catch exceptions of the appropriate type, or * you want to do some cleanup when an exception happens, and then rethrow the exception, in which case you should use onException, or one of the bracketing functions. ] [Remove an unused import Ian Lynagh **20080801230343] [Remove unused imports Ian Lynagh **20080801230059] [Remove unused imports in Control.Exception Ian Lynagh **20080801225847] [Get rid of some duplicate imports Ian Lynagh **20080801214933] [Remove the now-unused GHC/Conc.lhs-boot Ian Lynagh **20080801214707] [Make some more imports non-recursive Ian Lynagh **20080801214546] [Rejig some code so Control.Exception and GHC.Conc don't need recursive imports Ian Lynagh **20080801214208] [Remove the now-unused GHC/TopHandler.lhs-boot Ian Lynagh **20080801212105] [Reshuffle GHC.Conc/GHC.TopHandler a bit to remove a recursive import Ian Lynagh **20080801211801] [Don't import Control.Concurrent.MVar in GHC.TopHandler Ian Lynagh **20080801200123] [Export assertError from Control.Exception to make GHC happy Ian Lynagh **20080801111716 It's a wired-in name in GHC. We should possibly move it to another module. ] [TopHandler now uses the new extensible exceptions Ian Lynagh **20080731153553] [Comment wibble Ian Lynagh **20080730202127] [Make numericEnumFrom more efficient Ian Lynagh **20080730202049] [Put in some parens to clarify how things parse Ian Lynagh **20080730201934] [applied patches to make enumFrom and friends strict in arguments as per the Report; closes ticket #1997 Bart Massey **20080726080444] [Don't use "deriving Typeable" (for portability reasons) Ian Lynagh **20080730194434] [Add onException Ian Lynagh **20080730172014] [Fix whitespace Ian Lynagh **20080730171951 The space after "\begin{code}" was confusing haddock ] [Re-add blocked; it got lost in the extensible exceptions patches Ian Lynagh **20080730145614] [Start to actually use extensible exceptions Ian Lynagh **20080730145115] [Rejig the extensible exceptions so there is less circular importing Ian Lynagh **20080730122539] [Define nonTermination for the RTS to use Ian Lynagh **20080621144420 We'll probably need to do the same for some other exceptions too ] [Use extensible exceptions at the lowest level Ian Lynagh **20080621121501 Everything above is largely unchanged; just the type of catch and throw. ] [add comment Simon Marlow **20080730114559] [add some big warnings to the docs for unsafeIOToSTM (#2401) Simon Marlow **20080730114554] [FIX #2376: inline shiftR Simon Marlow **20080730103539 Duplicating the default definition for shiftR doesn't seem quite right to me, but it gets the right results when compiling the example program, and I couldn't find a better way to do it. ] [Add instance Show Control.Exception.Exception for nhc98.**20080728164537] [Extend nhc98's Exception type to resemble ghc's more closely**20080728163445] [fix dummy async implementations for non-GHC Ross Paterson **20080715125521] [Fix haddocking with older haddocks Ian Lynagh **20080710190855] [Add threadStatus :: ThreadId -> IO ThreadStatus Simon Marlow **20080710151711 -- | The current status of a thread data ThreadStatus = ThreadRunning -- ^the thread is currently runnable or running | ThreadFinished -- ^the thread has finished | ThreadBlocked BlockReason -- ^the thread is blocked on some resource | ThreadDied -- ^the thread received an uncaught exception deriving (Eq,Ord,Show) data BlockReason = BlockedOnMVar -- ^blocked on on 'MVar' | BlockedOnBlackHole -- ^blocked on a computation in progress by another thread | BlockedOnException -- ^blocked in 'throwTo' | BlockedOnSTM -- ^blocked in 'retry' in an STM transaction | BlockedOnForeignCall -- ^currently in a foreign call | BlockedOnOther -- ^blocked on some other resource. Without @-threaded@, -- I/O and 'threadDelay' show up as 'BlockedOnOther', with @-threaded@ -- they show up as 'BlockedOnMVar'. deriving (Eq,Ord,Show) This is useful for concurrency debugging. I've left threadStatus in GHC.Conc for now, since the ThreadStatus type is somewhat GHC-specific. ] [forkOS: start the new thread in blocked mode iff the parent was (#1048) Simon Marlow **20080709135558 This matches the behaviour of forkIO ] [Add Control.Exception.blocked :: IO Bool Simon Marlow **20080709133139 Tells you whether async exceptions are currently blocked or not. ] [FIX BUILD (on Windows) Simon Marlow **20080709123110] [check CONST_SIGINT Simon Marlow **20080709122527] [Make threadWaitRead/threadWaitWrite partially useable on Windows Simon Marlow **20080709111008 They work with -threaded by calling fdReady() in a separate thread. "threadWaitRead 0" also works without -threaded (because we happen to know it's virtually equivalent to "hWaitForInput stdin (-1)"). ] [FIX #1198: hWaitForInput on Windows Simon Marlow **20080708134254 Now we do the appropriate magic in fdReady() to detect when there is real input available, as opposed to uninteresting console events. ] [FIX part of #2301 Simon Marlow **20080709094437 Control-C now causes the new exception (AsyncException UserInterrupt) to be raised in the main thread. The signal handler is set up by GHC.TopHandler.runMainIO, and can be overriden in the usual way by installing a new signal handler. The advantage is that now all programs will get a chance to clean up on ^C. When UserInterrupt is caught by the topmost handler, we now exit the program via kill(getpid(),SIGINT), which tells the parent process that we exited as a result of ^C, so the parent can take appropriate action (it might want to exit too, for example). One subtlety is that we have to use a weak reference to the ThreadId for the main thread, so that the signal handler doesn't prevent the main thread from being subject to deadlock detection. ] [() has moved to ghc-prim:GHC.Unit, and the Eq and Ord instances to Data.Tuple Ian Lynagh **20080624144932] [Add GHC.Exts.maxTupleSize :: Int, the size of the largest tuple supported Ian Lynagh **20080622141559] [Remove code for older GHC versions Ian Lynagh **20080620194521] [Make the macros in Typeable.h add type signatures Ian Lynagh **20080619235808] [Fix #2363: getChar cannot be interrupted with -threaded Simon Marlow **20080619141911 Now in -threaded mode, instead of just making a blocking call to read(), we call select() first to make sure the read() won't block, and if it would block, then we use threadWaitRead. The idea is that the current thread must be interruptible while it blocks. This is a little slower than before, but the overhead only applies to blocking Handles (stdin/stdout/stderr, and those created by System.Process). ] [Remove -fglasgow-exts from pragmas and comments Ian Lynagh **20080616230727] [Avoid using deprecated flags Ian Lynagh **20080616145207] [delete __hscore_{mkstemp,getrlimit,setrlimit} (moved to unix) Ross Paterson **20080615224413] [Update WCsubst.c for Unicode 5.1.0, and add a README.Unicode Ian Lynagh **20080613201754 README.Unicode describes how to do updates in the future. ] [Fix ubconfc Ian Lynagh **20080613201456 The current code doesn't seem to be what was used to generate WCsubst.c, so I'm not sure if it never worked, or if my tools work slightly differently to those of the previous user. ] ['permutations' is now more lazy and also faster Twan van Laarhoven **20080102231712] ['subsequences' is now more lazy and also faster Twan van Laarhoven **20080102231629] [Add 'subsequences' and 'permutations' to Data.List Twan van Laarhoven **20071218154950] [Tweak the definition of (^) again Ian Lynagh **20080601120759 This fixes trac #2306 (do the minimum number of (*)s), and also means that we don't use the value of (1 :: a) which causes problems if the Num a definition isn't complete. ] [note about evaluation affecting StableNames Simon Marlow **20080527110549] [TAG 2008-05-28 Ian Lynagh **20080528003830] Patch bundle hash: b15da3d1ad5ef1d55ae9719cd334a1ae4999770a -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEAREKAAYFAkoxr50ACgkQvpDo5Pfl1oIENgCghtnmVp8pfTVQ5gjiUzR68mhG 1vwAn0Er4ub042Nm/JKxwGuUnalRKG15 =1rXh -----END PGP SIGNATURE-----