Simon Marlow [Wed, 27 Oct 2010 14:43:24 +0000 (14:43 +0000)]
hGetBuf: fix a case of a short read being returned (#4427)
Bas van Dijk [Sat, 16 Oct 2010 18:53:12 +0000 (18:53 +0000)]
Refer to 'mask' instead of 'block' in documentation of Control.Exception
simonpj@microsoft.com [Mon, 25 Oct 2010 15:16:55 +0000 (15:16 +0000)]
Add showMultiLineString to GHC.Show
This is part of the fix for #4436
showMultiLineString :: String -> [String]
-- | Like 'showLitString' (expand escape characters using Haskell
-- escape conventions), but
-- * break the string into multiple lines
-- * wrap the entire thing in double quotes
-- Example: @breakMultiLineString "hello\ngoodbye\nblah"@
-- returns @["\"hello\\", "\\goodbye\\", "\\blah\"" ]@
-- where those "\\" are really just a single backslash
-- (but I'm writing them here as Haskell literals)
Malcolm.Wallace@me.com [Mon, 25 Oct 2010 10:26:44 +0000 (10:26 +0000)]
CIntPtr, CUIntPtr, CIntMax, CUIntMax are new to nhc98.
Ian Lynagh [Sat, 23 Oct 2010 15:15:10 +0000 (15:15 +0000)]
Follow GHC.Bool/GHC.Types merge
simonpj@microsoft.com [Fri, 22 Oct 2010 14:31:57 +0000 (14:31 +0000)]
Remove redundant imports, now that NoImplicitPrelude does not imply RebindableSyntax
Daniel Fischer [Tue, 19 Oct 2010 01:01:09 +0000 (01:01 +0000)]
FIX #4335
fromRational :: Rational -> Ratio a produced invalid results for fixed-width
types a. Reduce the fraction to avoid that.
Daniel Fischer [Tue, 19 Oct 2010 00:30:30 +0000 (00:30 +0000)]
FIX #4337
Special versions for the power functions with a Rational base and rewrite rules.
Simon Marlow [Thu, 21 Oct 2010 09:33:37 +0000 (09:33 +0000)]
remove trailing whitespace
Daniel Fischer [Thu, 21 Oct 2010 09:32:46 +0000 (09:32 +0000)]
FIX #4336
Avoid superfluous gcd calculation in recip for Ratio a because numerator
and denominator are known to be coprime.
Bas van Dijk [Sun, 26 Sep 2010 19:21:44 +0000 (19:21 +0000)]
Add throwSTM :: Exception e => e -> STM a
Bas van Dijk [Sun, 26 Sep 2010 19:21:06 +0000 (19:21 +0000)]
Generalize catchSTM
Daniel Fischer [Wed, 20 Oct 2010 09:11:11 +0000 (09:11 +0000)]
FIX #4334
Make selector thunks visible to GHC to fix a space leak in lines.
Daniel Fischer [Wed, 20 Oct 2010 09:10:14 +0000 (09:10 +0000)]
FIX #1434
Rewrite rules for RealFrac methods with sized Int and Word targets.
For all types whose range is contained in Int's range, there are now
rewrite rules for properFraction, truncate, floor, ceiling and round
from Double and Float, going through the specialised methods for Int.
Unfortunately, we can't have a rewrite rule for Word.
simonpj@microsoft.com [Mon, 18 Oct 2010 13:58:57 +0000 (13:58 +0000)]
Define SpecConstrAnnotation in GHC.Exts, and import it from there
Reason: avoid having to link the entire ghc package in modules
that use compile-time annotations:
import GHC.Exts( SpecConstrAnnotation )
{-# ANN type T ForceSpecConstr #-}
It's a kind of bug that the package exporting SpecConstrAnnotation
is linked even though it is only needed at compile time, but putting
the data type declaration in GHC.Exts is a simple way to sidestep
the problem
See See Note [SpecConstrAnnotation] in SpecConstr
Simon Marlow [Thu, 14 Oct 2010 08:42:20 +0000 (08:42 +0000)]
throwTo: mention interruptible foreign calls
Simon Marlow [Wed, 13 Oct 2010 10:19:06 +0000 (10:19 +0000)]
remove trailing whitespace
Simon Marlow [Wed, 13 Oct 2010 10:18:49 +0000 (10:18 +0000)]
FIX #4381
Fix scaleFloat by clamping the scaling parameter so that
exponent + scale doesn't overflow.
Patch by: Daniel Fischer <daniel.is.fischer@web.de>
Bas van Dijk [Fri, 24 Sep 2010 22:13:40 +0000 (22:13 +0000)]
Replaced some throws to throwIOs where the type is IO
Bas van Dijk [Tue, 5 Oct 2010 07:27:01 +0000 (07:27 +0000)]
Added initial .authorspellings
Daniel Fischer [Sat, 2 Oct 2010 23:12:01 +0000 (23:12 +0000)]
Lazier intersperse
A lazier implementation of intersperse, and consequentially intercalate, to
avoid space leaks.
ghc@cainnorris.net [Mon, 16 Aug 2010 21:36:54 +0000 (21:36 +0000)]
FIX #4228 (atanh (-1) returns NaN instead of -Infinity)
Daniel Fischer [Thu, 30 Sep 2010 19:17:31 +0000 (19:17 +0000)]
Make intersectBy lazier
Add shortcuts to intersectBy for empty list arguments.
In addition to being faster in that case, more inputs yield defined results.
Treats ticket #4323
Simon Marlow [Wed, 22 Sep 2010 11:38:11 +0000 (11:38 +0000)]
doc tweak for Directory file type: file names are '\0'-separated
Simon Marlow [Wed, 15 Sep 2010 13:13:41 +0000 (13:13 +0000)]
documentation for IODeviceType (#4317, edited by me)
<unknown> [Thu, 22 Jul 2010 21:07:26 +0000 (21:07 +0000)]
Allow Data.HashTable construction with user-supplied size
This avoids some resizing for users who know they will be inserting a
lot of data.
http://hackage.haskell.org/trac/ghc/ticket/4193
Simon Marlow [Thu, 16 Sep 2010 11:37:32 +0000 (11:37 +0000)]
some fixes for hGetBufSome
- fix one case where it was blocking when it shouldn't
- a couple of error-message tweaks
Simon Marlow [Wed, 15 Sep 2010 14:26:18 +0000 (14:26 +0000)]
Windows: map ERROR_NO_DATA to EPIPE, rather than EINVAL
WriteFile() returns ERROR_NO_DATA when writing to a pipe that is
"closing", however by default the write() wrapper in the CRT maps this
to EINVAL so we get confusing things like
hPutChar: invalid argument (Invalid Argumnet)
when piping the output of a Haskell program into something that closes
the pipe early. This was happening in the testsuite in a few place.
The solution is to map ERROR_NO_DATA to EPIPE correctly, as we
explicitly check for EPIPE on stdout (in GHC.TopHandler) so we can
exit without an error in this case.
Simon Marlow [Mon, 13 Sep 2010 21:47:33 +0000 (21:47 +0000)]
tighten up parsing of numbers (#1579)
simonpj@microsoft.com [Tue, 14 Sep 2010 13:46:39 +0000 (13:46 +0000)]
Add absentError.
This patch accompanies the HEAD patch:
Tue Sep 14 12:38:27 BST 2010 simonpj@microsoft.com
* Make absent-arg wrappers work for unlifted types (fix Trac #4306)
Previously we were simply passing arguments of unlifted
type to a wrapper, even if they were absent, which was
stupid.
See Note [Absent error Id] in WwLib.
simonpj@microsoft.com [Tue, 14 Sep 2010 12:27:50 +0000 (12:27 +0000)]
Add missing import, fixes build on windows
Simon Marlow [Mon, 13 Sep 2010 15:44:59 +0000 (15:44 +0000)]
Add a suitable Show instance for TextEncoding (#4273)
Simon Marlow [Mon, 13 Sep 2010 15:33:50 +0000 (15:33 +0000)]
don't fill a finalized handle with an error (see comment)
Simon Marlow [Mon, 13 Sep 2010 15:30:31 +0000 (15:30 +0000)]
deriving (Eq, Ord, Read, Show) for Newline and NewlineMode
Simon Marlow [Mon, 13 Sep 2010 11:15:36 +0000 (11:15 +0000)]
fix warning on Windows
simonpj@microsoft.com [Mon, 13 Sep 2010 10:18:32 +0000 (10:18 +0000)]
Put the state-token argument on fill, done, adjust on the RHS
This is so that the functions will inline when
applied to their normal (non-state-token) aguments.
I forget why I did this, but it seems like the right thing anyway.
Ross Paterson [Thu, 9 Sep 2010 12:55:21 +0000 (12:55 +0000)]
avoid Foreign.unsafePerformIO
Simon Marlow [Thu, 9 Sep 2010 11:33:31 +0000 (11:33 +0000)]
Remove debugging code accidentally left in
Ian Lynagh [Wed, 8 Sep 2010 12:30:37 +0000 (12:30 +0000)]
Fix Windows build; patches frmo ezyang
Edward Z. Yang [Tue, 7 Sep 2010 15:41:44 +0000 (15:41 +0000)]
More accurate isatty test for MinGW.
Ian Lynagh [Sat, 4 Sep 2010 22:37:03 +0000 (22:37 +0000)]
Fix the build when HAVE_KQUEUE but not HAVE_KEVENT64
benl@ouroborus.net [Mon, 30 Aug 2010 04:47:41 +0000 (04:47 +0000)]
Fix warnings
Ross Paterson [Thu, 19 Aug 2010 20:48:58 +0000 (20:48 +0000)]
fix cache variable name used by FP_SEARCH_LIBS_PROTO
simonpj@microsoft.com [Sun, 15 Aug 2010 14:51:27 +0000 (14:51 +0000)]
Add a missing castPtr (only shows up in -DDEBUG)
Johan Tibell [Fri, 13 Aug 2010 12:40:43 +0000 (12:40 +0000)]
Fixed a rounding error in threadDelay
Simon Marlow [Thu, 12 Aug 2010 10:55:24 +0000 (10:55 +0000)]
export allocaBytesAligned; make allocaArray use the correct alignment (#2917)
Simon Marlow [Mon, 5 Jul 2010 12:59:52 +0000 (12:59 +0000)]
deprecate unGetChan and isEmptyChan (see #4154)
simonpj@microsoft.com [Wed, 28 Jul 2010 12:48:47 +0000 (12:48 +0000)]
Add type signatures to cope with lack of local generalisation
simonpj@microsoft.com [Tue, 27 Jul 2010 15:15:32 +0000 (15:15 +0000)]
Add type signature in local where
Simon Marlow [Tue, 10 Aug 2010 08:22:48 +0000 (08:22 +0000)]
Integrated new I/O manager
(patch originally by Johan Tibell <johan.tibell@gmail.com>, minor merging by me)
jon.fairbairn@cl.cam.ac.uk [Thu, 17 Sep 2009 14:56:16 +0000 (14:56 +0000)]
Add mfilter to Control.Monad
Straightforward MonadPlus version of List.filter. I would
prefer to call it filter, but the current naming scheme for
Control.Monad implies mfilter.
Ross Paterson [Thu, 29 Jul 2010 12:24:49 +0000 (12:24 +0000)]
move Monad and MonadFix instances for Either from mtl (proposal #4159)
The Monad and MonadFix instances for Either (formerly in the mtl
package) are moved to Control.Monad.Instances and Control.Monad.Fix
respectively. The Monad instance is still an orphan, to retain Haskell
98 compatibility, but the MonadFix instance is together with its class.
The Error constraint is removed from both instances, and the default
definition of fail is used.
Malcolm.Wallace@me.com [Thu, 22 Jul 2010 07:54:49 +0000 (07:54 +0000)]
Remove egregious ghc-ish from Foreign.Marshal
Simon Marlow [Tue, 20 Jul 2010 15:38:58 +0000 (15:38 +0000)]
add numSparks :: IO Int (#4167)
Simon Marlow [Tue, 20 Jul 2010 08:28:19 +0000 (08:28 +0000)]
add unsafeLocalState from Haskell 2010, and docs
Simon Marlow [Tue, 20 Jul 2010 08:28:04 +0000 (08:28 +0000)]
docs: mention that Foreign.unsafePerformIO is deprecated
We can't actually deprecate it without introducing a name clash
between Foreign.unsafePerformIO and System.IO.Unsafe.unsafePerformIO
Simon Marlow [Wed, 14 Jul 2010 15:13:47 +0000 (15:13 +0000)]
doc formatting fix
Simon Marlow [Wed, 14 Jul 2010 11:58:53 +0000 (11:58 +0000)]
add module intro from Haskell 2010
Simon Marlow [Wed, 14 Jul 2010 10:41:07 +0000 (10:41 +0000)]
document exception-overriding behaviour in withFile
Simon Marlow [Wed, 14 Jul 2010 10:36:49 +0000 (10:36 +0000)]
doc: use "finalizer" consistently
Simon Marlow [Wed, 14 Jul 2010 10:33:10 +0000 (10:33 +0000)]
clarify meaning of bit
Simon Marlow [Wed, 14 Jul 2010 10:33:04 +0000 (10:33 +0000)]
note shortcutting behaviour of any/all/elem
Simon Marlow [Tue, 13 Jul 2010 13:25:15 +0000 (13:25 +0000)]
add cast{C,U}CharToChar and castCharTo{C,U}Char, from Haskell 2010
Simon Marlow [Tue, 13 Jul 2010 13:24:03 +0000 (13:24 +0000)]
mention that IntPtr and WordPtr can be marshalled to/from intptr_t and uintptr_t
simonpj@microsoft.com [Wed, 7 Jul 2010 13:57:25 +0000 (13:57 +0000)]
Partial fix for Trac #4136
In 'choose' (which is a library function designed specifically
to support derived instances of Read), we must match Symbol
as well as Ident, for nullary constructors that (wierdly) are
symbols.
Simon Hengel [Sun, 11 Jul 2010 14:16:48 +0000 (14:16 +0000)]
Fix typo in documentation
Simon Hengel [Sun, 11 Jul 2010 07:27:03 +0000 (07:27 +0000)]
Remove duplicated word in documentation
Malcolm.Wallace@me.com [Sat, 10 Jul 2010 17:09:40 +0000 (17:09 +0000)]
Allow nhc98 to cope with recent changes to Control.Exception.
Simon Marlow [Thu, 8 Jul 2010 15:27:35 +0000 (15:27 +0000)]
New asynchronous exception control API (base parts)
As discussed on the libraries/haskell-cafe mailing lists
http://www.haskell.org/pipermail/libraries/2010-April/013420.html
This is a replacement for block/unblock in the asychronous exceptions
API to fix a problem whereby a function could unblock asynchronous
exceptions even if called within a blocked context.
The new terminology is "mask" rather than "block" (to avoid confusion
due to overloaded meanings of the latter).
The following is the new API; the old API is deprecated but still
available for the time being.
Control.Exception
-----------------
mask :: ((forall a. IO a -> IO a) -> IO b) -> IO b
mask_ :: IO a -> IO a
uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b
uninterruptibleMask_ :: IO a -> IO
getMaskingState :: IO MaskingState
data MaskingState
= Unmasked
| MaskedInterruptible
| MaskedUninterruptible
Control.Concurrent
------------------
forkIOUnmasked :: IO () -> IO ThreadId
Simon Marlow [Thu, 8 Jul 2010 14:58:19 +0000 (14:58 +0000)]
Async-exception safety, and avoid space leaks
Patch submitted by: Bas van Dijk <v.dijk.bas@gmail.com>
Modified slightly by me to remove non-functional changes.
Simon Marlow [Thu, 8 Jul 2010 10:31:54 +0000 (10:31 +0000)]
Async-exception safety, and avoid space leaks
Patch submitted by: Bas van Dijk <v.dijk.bas@gmail.com>
Modified slightly by me to remove non-functional changes.
Simon Marlow [Fri, 2 Jul 2010 13:02:10 +0000 (13:02 +0000)]
Fix a few places where we forgot to close the text codecs (#4029)
Each time you invoke :load in GHCi it resets the CAFs, including
stdin/stdout/stderr, and each of these was allocating a new iconv_t.
Simon Marlow [Thu, 1 Jul 2010 15:42:03 +0000 (15:42 +0000)]
remove docs from Monad that belonged on the instance for MonadPlus IO
Simon Marlow [Thu, 1 Jul 2010 15:38:17 +0000 (15:38 +0000)]
docs: unqualify Prelude.IO
Simon Marlow [Thu, 1 Jul 2010 14:27:27 +0000 (14:27 +0000)]
unqualify Float and Double
Simon Marlow [Thu, 1 Jul 2010 14:24:15 +0000 (14:24 +0000)]
extract information about Data.Time from docs for CTime
Simon Marlow [Thu, 1 Jul 2010 14:23:54 +0000 (14:23 +0000)]
doc typo
Simon Marlow [Thu, 1 Jul 2010 12:53:33 +0000 (12:53 +0000)]
peekArray docs: remove mentions of "this version" and "previous version"
Simon Marlow [Thu, 1 Jul 2010 12:41:54 +0000 (12:41 +0000)]
doc typo
Simon Marlow [Thu, 1 Jul 2010 12:41:28 +0000 (12:41 +0000)]
doc typo
Simon Marlow [Thu, 1 Jul 2010 12:37:15 +0000 (12:37 +0000)]
doc typo
Simon Marlow [Thu, 1 Jul 2010 12:36:12 +0000 (12:36 +0000)]
doc wibble: Haskell 98 I/O Error -> 'IOError'
Simon Marlow [Thu, 1 Jul 2010 12:30:14 +0000 (12:30 +0000)]
doc typo
Simon Marlow [Thu, 1 Jul 2010 12:16:31 +0000 (12:16 +0000)]
Haddock hacks to fix whitespace consistency
Simon Marlow [Thu, 1 Jul 2010 12:16:16 +0000 (12:16 +0000)]
use '==' consistently rather than '->' in examples
Simon Marlow [Thu, 1 Jul 2010 11:33:08 +0000 (11:33 +0000)]
doc wibble: remove confusing mention of "Prelude"
Simon Marlow [Thu, 1 Jul 2010 11:32:53 +0000 (11:32 +0000)]
doc wibble: nonstrict -> non-strict
Simon Marlow [Thu, 1 Jul 2010 11:22:42 +0000 (11:22 +0000)]
doc whitespace
Simon Marlow [Tue, 29 Jun 2010 13:41:50 +0000 (13:41 +0000)]
move the doc for 'Char' to its new home in ghc-prim:GHC.Types
Simon Marlow [Tue, 29 Jun 2010 12:26:08 +0000 (12:26 +0000)]
doc wibble
Simon Marlow [Tue, 29 Jun 2010 12:21:18 +0000 (12:21 +0000)]
doc updates in System.IO
Simon Marlow [Fri, 25 Jun 2010 13:48:58 +0000 (13:48 +0000)]
doc wibble
Simon Marlow [Thu, 24 Jun 2010 15:46:14 +0000 (15:46 +0000)]
doc wibbles
Ian Lynagh [Fri, 25 Jun 2010 22:26:23 +0000 (22:26 +0000)]
Fix haddock formatting
Ian Lynagh [Fri, 25 Jun 2010 22:20:59 +0000 (22:20 +0000)]
Give nub's complexity in the haddock docs; fixes #4086
Simon Marlow [Thu, 24 Jun 2010 13:05:06 +0000 (13:05 +0000)]
correct docs for exitWith: only stdout/stderr are flushed, not all Handles
Simon Marlow [Thu, 24 Jun 2010 13:04:44 +0000 (13:04 +0000)]
fix docs for isSpace
Simon Marlow [Thu, 24 Jun 2010 13:04:25 +0000 (13:04 +0000)]
make the hGetBuf/hPutBuf family work with non-FD Handles (#4144)
Simon Marlow [Tue, 22 Jun 2010 12:11:31 +0000 (12:11 +0000)]
nit in docs for accumArray
Simon Marlow [Tue, 22 Jun 2010 12:09:30 +0000 (12:09 +0000)]
add doc for the ExitCode type