summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/base/Control/Exception.hs2
-rw-r--r--libraries/base/Foreign/C/Types.hs4
-rw-r--r--libraries/base/GHC/Conc/Sync.lhs9
-rw-r--r--libraries/base/GHC/IO.hs2
-rw-r--r--libraries/base/GHC/IO/Encoding.hs2
-rw-r--r--libraries/base/GHC/IO/Encoding/Latin1.hs2
-rw-r--r--libraries/base/GHC/IO/Encoding/Types.hs3
-rw-r--r--libraries/base/GHC/IO/Encoding/UTF16.hs3
-rw-r--r--libraries/base/GHC/IO/Encoding/UTF32.hs3
-rw-r--r--libraries/base/GHC/IO/Encoding/UTF8.hs1
-rw-r--r--libraries/base/GHC/IO/Handle/FD.hs2
-rw-r--r--libraries/base/System/IO/Error.hs4
12 files changed, 37 insertions, 0 deletions
diff --git a/libraries/base/Control/Exception.hs b/libraries/base/Control/Exception.hs
index 49a39c0f26..7c019eb5ca 100644
--- a/libraries/base/Control/Exception.hs
+++ b/libraries/base/Control/Exception.hs
@@ -218,6 +218,8 @@ A typical use of 'tryJust' for recovery looks like this:
--
-- When called outside 'mask', or inside 'uninterruptibleMask', this
-- function has no effect.
+--
+-- /Since: 4.4.0.0/
allowInterrupt :: IO ()
allowInterrupt = unsafeUnmask $ return ()
diff --git a/libraries/base/Foreign/C/Types.hs b/libraries/base/Foreign/C/Types.hs
index b247b5afcf..3a35510148 100644
--- a/libraries/base/Foreign/C/Types.hs
+++ b/libraries/base/Foreign/C/Types.hs
@@ -187,8 +187,12 @@ ARITHMETIC_TYPE(CClock,HTYPE_CLOCK_T)
-- | Haskell type representing the C @time_t@ type.
ARITHMETIC_TYPE(CTime,HTYPE_TIME_T)
-- | Haskell type representing the C @useconds_t@ type.
+--
+-- /Since: 4.4.0.0/
ARITHMETIC_TYPE(CUSeconds,HTYPE_USECONDS_T)
-- | Haskell type representing the C @suseconds_t@ type.
+--
+-- /Since: 4.4.0.0/
ARITHMETIC_TYPE(CSUSeconds,HTYPE_SUSECONDS_T)
-- FIXME: Implement and provide instances for Eq and Storable
diff --git a/libraries/base/GHC/Conc/Sync.lhs b/libraries/base/GHC/Conc/Sync.lhs
index 5ba0fc4c25..41d9e1e63b 100644
--- a/libraries/base/GHC/Conc/Sync.lhs
+++ b/libraries/base/GHC/Conc/Sync.lhs
@@ -216,6 +216,7 @@ forkIO action = IO $ \ s ->
-- only be used in that thread; the behaviour is undefined if it is
-- invoked in a different thread.
--
+-- /Since: 4.4.0.0/
forkIOWithUnmask :: ((forall a . IO a -> IO a) -> IO ()) -> IO ThreadId
forkIOWithUnmask io = forkIO (io unsafeUnmask)
@@ -239,6 +240,8 @@ actual processor cores with @+RTS -qa@ if the underlying operating
system supports that, although in practice this is usually unnecessary
(and may actually degrade performance in some cases - experimentation
is recommended).
+
+/Since: 4.4.0.0/
-}
forkOn :: Int -> IO () -> IO ThreadId
forkOn (I# cpu) action = IO $ \ s ->
@@ -248,6 +251,8 @@ forkOn (I# cpu) action = IO $ \ s ->
-- | Like 'forkIOWithUnmask', but the child thread is pinned to the
-- given CPU, as with 'forkOn'.
+--
+-- /Since: 4.4.0.0/
forkOnWithUnmask :: Int -> ((forall a . IO a -> IO a) -> IO ()) -> IO ThreadId
forkOnWithUnmask cpu io = forkOn cpu (io unsafeUnmask)
@@ -266,6 +271,8 @@ numCapabilities = unsafePerformIO $ getNumCapabilities
Returns the number of Haskell threads that can run truly
simultaneously (on separate physical processors) at any given time. To change
this value, use 'setNumCapabilities'.
+
+/Since: 4.4.0.0/
-}
getNumCapabilities :: IO Int
getNumCapabilities = do
@@ -492,6 +499,8 @@ threadStatus (ThreadId t) = IO $ \s ->
-- running, and a boolean indicating whether the thread is locked to
-- that capability or not. A thread is locked to a capability if it
-- was created with @forkOn@.
+--
+-- /Since: 4.4.0.0/
threadCapability :: ThreadId -> IO (Int, Bool)
threadCapability (ThreadId t) = IO $ \s ->
case threadStatus# t s of
diff --git a/libraries/base/GHC/IO.hs b/libraries/base/GHC/IO.hs
index 80c8ffc8d8..cd71698c68 100644
--- a/libraries/base/GHC/IO.hs
+++ b/libraries/base/GHC/IO.hs
@@ -172,6 +172,8 @@ single thread. Hence, when you use 'unsafeDupablePerformIO',
there is a possibility that the IO action may be performed multiple
times (on a multiprocessor), and you should therefore ensure that
it gives the same results each time.
+
+/Since: 4.4.0.0/
-}
{-# NOINLINE unsafeDupablePerformIO #-}
unsafeDupablePerformIO :: IO a -> a
diff --git a/libraries/base/GHC/IO/Encoding.hs b/libraries/base/GHC/IO/Encoding.hs
index e3d7c3ecd9..08f4c94905 100644
--- a/libraries/base/GHC/IO/Encoding.hs
+++ b/libraries/base/GHC/IO/Encoding.hs
@@ -169,6 +169,8 @@ initForeignEncoding = CodePage.mkLocaleEncoding IgnoreCodingFailure
-- This encoding never fails in either direction. However, encoding
-- discards information, so encode followed by decode is not the
-- identity.
+--
+-- /Since: 4.4.0.0/
char8 :: TextEncoding
char8 = Latin1.latin1
diff --git a/libraries/base/GHC/IO/Encoding/Latin1.hs b/libraries/base/GHC/IO/Encoding/Latin1.hs
index aba66adbb5..5ec7110973 100644
--- a/libraries/base/GHC/IO/Encoding/Latin1.hs
+++ b/libraries/base/GHC/IO/Encoding/Latin1.hs
@@ -45,6 +45,7 @@ import GHC.IO.Encoding.Types
latin1 :: TextEncoding
latin1 = mkLatin1 ErrorOnCodingFailure
+-- | /Since: 4.4.0.0/
mkLatin1 :: CodingFailureMode -> TextEncoding
mkLatin1 cfm = TextEncoding { textEncodingName = "ISO8859-1",
mkTextDecoder = latin1_DF cfm,
@@ -73,6 +74,7 @@ latin1_EF cfm =
latin1_checked :: TextEncoding
latin1_checked = mkLatin1_checked ErrorOnCodingFailure
+-- | /Since: 4.4.0.0/
mkLatin1_checked :: CodingFailureMode -> TextEncoding
mkLatin1_checked cfm = TextEncoding { textEncodingName = "ISO8859-1(checked)",
mkTextDecoder = latin1_DF cfm,
diff --git a/libraries/base/GHC/IO/Encoding/Types.hs b/libraries/base/GHC/IO/Encoding/Types.hs
index 4bedfc58aa..95bb2905a4 100644
--- a/libraries/base/GHC/IO/Encoding/Types.hs
+++ b/libraries/base/GHC/IO/Encoding/Types.hs
@@ -66,6 +66,8 @@ data BufferCodec from to state = BufferCodec {
--
-- Currently, some implementations of @recover@ may mutate the input buffer.
-- In particular, this feature is used to implement transliteration.
+ --
+ -- /Since: 4.4.0.0/
close :: IO (),
-- ^ Resources associated with the encoding may now be released.
@@ -119,6 +121,7 @@ instance Show TextEncoding where
-- | Returns the value of 'textEncodingName'
show te = textEncodingName te
+-- | /Since: 4.4.0.0/
data CodingProgress = InputUnderflow -- ^ Stopped because the input contains insufficient available elements,
-- or all of the input sequence has been sucessfully translated.
| OutputUnderflow -- ^ Stopped because the output contains insufficient free elements
diff --git a/libraries/base/GHC/IO/Encoding/UTF16.hs b/libraries/base/GHC/IO/Encoding/UTF16.hs
index 3b1d072f5d..b0ff992a0d 100644
--- a/libraries/base/GHC/IO/Encoding/UTF16.hs
+++ b/libraries/base/GHC/IO/Encoding/UTF16.hs
@@ -56,6 +56,7 @@ import GHC.IORef
utf16 :: TextEncoding
utf16 = mkUTF16 ErrorOnCodingFailure
+-- | /Since: 4.4.0.0/
mkUTF16 :: CodingFailureMode -> TextEncoding
mkUTF16 cfm = TextEncoding { textEncodingName = "UTF-16",
mkTextDecoder = utf16_DF cfm,
@@ -141,6 +142,7 @@ bom2 = bomL
utf16be :: TextEncoding
utf16be = mkUTF16be ErrorOnCodingFailure
+-- | /Since: 4.4.0.0/
mkUTF16be :: CodingFailureMode -> TextEncoding
mkUTF16be cfm = TextEncoding { textEncodingName = "UTF-16BE",
mkTextDecoder = utf16be_DF cfm,
@@ -169,6 +171,7 @@ utf16be_EF cfm =
utf16le :: TextEncoding
utf16le = mkUTF16le ErrorOnCodingFailure
+-- | /Since: 4.4.0.0/
mkUTF16le :: CodingFailureMode -> TextEncoding
mkUTF16le cfm = TextEncoding { textEncodingName = "UTF16-LE",
mkTextDecoder = utf16le_DF cfm,
diff --git a/libraries/base/GHC/IO/Encoding/UTF32.hs b/libraries/base/GHC/IO/Encoding/UTF32.hs
index ce3aa522c4..eddc4f8693 100644
--- a/libraries/base/GHC/IO/Encoding/UTF32.hs
+++ b/libraries/base/GHC/IO/Encoding/UTF32.hs
@@ -56,6 +56,7 @@ import GHC.IORef
utf32 :: TextEncoding
utf32 = mkUTF32 ErrorOnCodingFailure
+-- | /Since: 4.4.0.0/
mkUTF32 :: CodingFailureMode -> TextEncoding
mkUTF32 cfm = TextEncoding { textEncodingName = "UTF-32",
mkTextDecoder = utf32_DF cfm,
@@ -144,6 +145,7 @@ utf32_native_encode = utf32be_encode
utf32be :: TextEncoding
utf32be = mkUTF32be ErrorOnCodingFailure
+-- | /Since: 4.4.0.0/
mkUTF32be :: CodingFailureMode -> TextEncoding
mkUTF32be cfm = TextEncoding { textEncodingName = "UTF-32BE",
mkTextDecoder = utf32be_DF cfm,
@@ -173,6 +175,7 @@ utf32be_EF cfm =
utf32le :: TextEncoding
utf32le = mkUTF32le ErrorOnCodingFailure
+-- | /Since: 4.4.0.0/
mkUTF32le :: CodingFailureMode -> TextEncoding
mkUTF32le cfm = TextEncoding { textEncodingName = "UTF-32LE",
mkTextDecoder = utf32le_DF cfm,
diff --git a/libraries/base/GHC/IO/Encoding/UTF8.hs b/libraries/base/GHC/IO/Encoding/UTF8.hs
index 6d887bbe71..1c48acf18e 100644
--- a/libraries/base/GHC/IO/Encoding/UTF8.hs
+++ b/libraries/base/GHC/IO/Encoding/UTF8.hs
@@ -43,6 +43,7 @@ import Data.Bits
utf8 :: TextEncoding
utf8 = mkUTF8 ErrorOnCodingFailure
+-- | /Since: 4.4.0.0/
mkUTF8 :: CodingFailureMode -> TextEncoding
mkUTF8 cfm = TextEncoding { textEncodingName = "UTF-8",
mkTextDecoder = utf8_DF cfm,
diff --git a/libraries/base/GHC/IO/Handle/FD.hs b/libraries/base/GHC/IO/Handle/FD.hs
index 17c30f6687..df947f81b9 100644
--- a/libraries/base/GHC/IO/Handle/FD.hs
+++ b/libraries/base/GHC/IO/Handle/FD.hs
@@ -156,6 +156,8 @@ openFile fp im =
-- This can be useful for opening a FIFO for reading: if we open in
-- non-blocking mode then the open will fail if there are no writers,
-- whereas a blocking open will block until a writer appears.
+--
+-- /Since: 4.4.0.0/
openFileBlocking :: FilePath -> IOMode -> IO Handle
openFileBlocking fp im =
catchException
diff --git a/libraries/base/System/IO/Error.hs b/libraries/base/System/IO/Error.hs
index 3486769275..6b926aedf5 100644
--- a/libraries/base/System/IO/Error.hs
+++ b/libraries/base/System/IO/Error.hs
@@ -97,6 +97,8 @@ import Text.Show
--
-- Non-I\/O exceptions are not caught by this variant; to catch all
-- exceptions, use 'Control.Exception.try' from "Control.Exception".
+--
+-- /Since: 4.4.0.0/
tryIOError :: IO a -> IO (Either IOError a)
tryIOError f = catch (do r <- f
return (Right r))
@@ -333,5 +335,7 @@ annotateIOError ioe loc hdl path =
--
-- Non-I\/O exceptions are not caught by this variant; to catch all
-- exceptions, use 'Control.Exception.catch' from "Control.Exception".
+--
+-- /Since: 4.4.0.0/
catchIOError :: IO a -> (IOError -> IO a) -> IO a
catchIOError = catch