summaryrefslogtreecommitdiff
path: root/libraries/base/GHC
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2014-12-16 12:07:10 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2014-12-16 13:30:08 +0100
commit554aedab646075e12e53b44df04bcfbccbe03a73 (patch)
tree0832201a44fd74632bbbd88fb77cb6c11eb34cf7 /libraries/base/GHC
parent45a9696c550c5fe5e891b6d4710179272dc9f6db (diff)
downloadhaskell-554aedab646075e12e53b44df04bcfbccbe03a73.tar.gz
Convert `/Since: .../` to new `@since ...` syntax
Starting with Haddock 2.16 there's a new built-in support for since-annotations Note: This exposes a bug in the `@since` implementation (see e.g. `Data.Bits`)
Diffstat (limited to 'libraries/base/GHC')
-rw-r--r--libraries/base/GHC/Conc/Sync.hs24
-rw-r--r--libraries/base/GHC/Exception.hs4
-rwxr-xr-xlibraries/base/GHC/Exts.hs4
-rw-r--r--libraries/base/GHC/Fingerprint.hs2
-rw-r--r--libraries/base/GHC/Generics.hs2
-rw-r--r--libraries/base/GHC/IO.hs2
-rw-r--r--libraries/base/GHC/IO/Encoding.hs12
-rw-r--r--libraries/base/GHC/IO/Encoding/Latin1.hs4
-rw-r--r--libraries/base/GHC/IO/Encoding/Types.hs4
-rw-r--r--libraries/base/GHC/IO/Encoding/UTF16.hs6
-rw-r--r--libraries/base/GHC/IO/Encoding/UTF32.hs6
-rw-r--r--libraries/base/GHC/IO/Encoding/UTF8.hs2
-rw-r--r--libraries/base/GHC/IO/Exception.hs8
-rw-r--r--libraries/base/GHC/IO/Handle/FD.hs2
-rw-r--r--libraries/base/GHC/IP.hs2
-rw-r--r--libraries/base/GHC/List.hs2
-rw-r--r--libraries/base/GHC/MVar.hs2
-rw-r--r--libraries/base/GHC/Natural.hs20
-rw-r--r--libraries/base/GHC/Profiling.hs2
-rw-r--r--libraries/base/GHC/RTS/Flags.hsc2
-rw-r--r--libraries/base/GHC/Stack.hsc8
-rw-r--r--libraries/base/GHC/Stats.hsc8
-rw-r--r--libraries/base/GHC/TypeLits.hs32
-rw-r--r--libraries/base/GHC/Word.hs6
24 files changed, 83 insertions, 83 deletions
diff --git a/libraries/base/GHC/Conc/Sync.hs b/libraries/base/GHC/Conc/Sync.hs
index e1dc915c07..eb07137b76 100644
--- a/libraries/base/GHC/Conc/Sync.hs
+++ b/libraries/base/GHC/Conc/Sync.hs
@@ -193,7 +193,7 @@ instance Ord ThreadId where
--
-- Allocation accounting is accurate only to about 4Kbytes.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
setAllocationCounter :: Int64 -> IO ()
setAllocationCounter i = do
ThreadId t <- myThreadId
@@ -202,7 +202,7 @@ setAllocationCounter i = do
-- | Return the current value of the allocation counter for the
-- current thread.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
getAllocationCounter :: IO Int64
getAllocationCounter = do
ThreadId t <- myThreadId
@@ -227,7 +227,7 @@ getAllocationCounter = do
-- Compared to using timeouts, allocation limits don't count time
-- spent blocked or in foreign calls.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
enableAllocationLimit :: IO ()
enableAllocationLimit = do
ThreadId t <- myThreadId
@@ -235,7 +235,7 @@ enableAllocationLimit = do
-- | Disable allocation limit processing for the current thread.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
disableAllocationLimit :: IO ()
disableAllocationLimit = do
ThreadId t <- myThreadId
@@ -296,7 +296,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/
+-- @since 4.4.0.0
forkIOWithUnmask :: ((forall a . IO a -> IO a) -> IO ()) -> IO ThreadId
forkIOWithUnmask io = forkIO (io unsafeUnmask)
@@ -321,7 +321,7 @@ 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/
+@since 4.4.0.0
-}
forkOn :: Int -> IO () -> IO ThreadId
forkOn (I# cpu) action = IO $ \ s ->
@@ -332,7 +332,7 @@ 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/
+-- @since 4.4.0.0
forkOnWithUnmask :: Int -> ((forall a . IO a -> IO a) -> IO ()) -> IO ThreadId
forkOnWithUnmask cpu io = forkOn cpu (io unsafeUnmask)
@@ -352,7 +352,7 @@ 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/
+@since 4.4.0.0
-}
getNumCapabilities :: IO Int
getNumCapabilities = do
@@ -371,7 +371,7 @@ capabilities is not set larger than the number of physical processor
cores, and it may often be beneficial to leave one or more cores free
to avoid contention with other processes in the machine.
-/Since: 4.5.0.0/
+@since 4.5.0.0
-}
setNumCapabilities :: Int -> IO ()
setNumCapabilities i = c_setNumCapabilities (fromIntegral i)
@@ -381,7 +381,7 @@ foreign import ccall safe "setNumCapabilities"
-- | Returns the number of CPUs that the machine has
--
--- /Since: 4.5.0.0/
+-- @since 4.5.0.0
getNumProcessors :: IO Int
getNumProcessors = fmap fromIntegral c_getNumberOfProcessors
@@ -585,7 +585,7 @@ threadStatus (ThreadId t) = IO $ \s ->
-- that capability or not. A thread is locked to a capability if it
-- was created with @forkOn@.
--
--- /Since: 4.4.0.0/
+-- @since 4.4.0.0
threadCapability :: ThreadId -> IO (Int, Bool)
threadCapability (ThreadId t) = IO $ \s ->
case threadStatus# t s of
@@ -606,7 +606,7 @@ threadCapability (ThreadId t) = IO $ \s ->
-- caller must use @deRefWeak@ first to determine whether the thread
-- still exists.
--
--- /Since: 4.6.0.0/
+-- @since 4.6.0.0
mkWeakThreadId :: ThreadId -> IO (Weak ThreadId)
mkWeakThreadId t@(ThreadId t#) = IO $ \s ->
case mkWeakNoFinalizer# t# t s of
diff --git a/libraries/base/GHC/Exception.hs b/libraries/base/GHC/Exception.hs
index e2b7149dda..b77d50a628 100644
--- a/libraries/base/GHC/Exception.hs
+++ b/libraries/base/GHC/Exception.hs
@@ -144,7 +144,7 @@ class (Typeable e, Show e) => Exception e where
--
-- Default implementation: @'show'@.
--
- -- /Since: 4.8.0.0/
+ -- @since 4.8.0.0
displayException :: e -> String
displayException = show
@@ -178,7 +178,7 @@ data ArithException
| LossOfPrecision
| DivideByZero
| Denormal
- | RatioZeroDenominator -- ^ /Since: 4.6.0.0/
+ | RatioZeroDenominator -- ^ @since 4.6.0.0
deriving (Eq, Ord, Typeable)
divZeroException, overflowException, ratioZeroDenomException :: SomeException
diff --git a/libraries/base/GHC/Exts.hs b/libraries/base/GHC/Exts.hs
index d9e19f046e..93de419eb6 100755
--- a/libraries/base/GHC/Exts.hs
+++ b/libraries/base/GHC/Exts.hs
@@ -50,7 +50,7 @@ module GHC.Exts
--
-- | These are available from the /Trustworthy/ module "Data.Coerce" as well
--
- -- /Since: 4.7.0.0/
+ -- @since 4.7.0.0
Data.Coerce.coerce, Data.Coerce.Coercible,
-- * Transform comprehensions
@@ -151,7 +151,7 @@ data SpecConstrAnnotation = NoSpecConstr | ForceSpecConstr
-- | The 'IsList' class and its methods are intended to be used in
-- conjunction with the OverloadedLists extension.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
class IsList l where
-- | The 'Item' type function returns the type of items of the structure
-- @l@.
diff --git a/libraries/base/GHC/Fingerprint.hs b/libraries/base/GHC/Fingerprint.hs
index ba890004fa..8a92cd0595 100644
--- a/libraries/base/GHC/Fingerprint.hs
+++ b/libraries/base/GHC/Fingerprint.hs
@@ -72,7 +72,7 @@ fingerprintString str = unsafeDupablePerformIO $
-- | Computes the hash of a given file.
-- This function loops over the handle, running in constant memory.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
getFileHash :: FilePath -> IO Fingerprint
getFileHash path = withBinaryFile path ReadMode $ \h -> do
allocaBytes SIZEOF_STRUCT_MD5CONTEXT $ \pctxt -> do
diff --git a/libraries/base/GHC/Generics.hs b/libraries/base/GHC/Generics.hs
index 8835df45e8..b89d628526 100644
--- a/libraries/base/GHC/Generics.hs
+++ b/libraries/base/GHC/Generics.hs
@@ -18,7 +18,7 @@
-- Stability : internal
-- Portability : non-portable
--
--- /Since: 4.6.0.0/
+-- @since 4.6.0.0
--
-- If you're using @GHC.Generics@, you should consider using the
-- <http://hackage.haskell.org/package/generic-deriving> package, which
diff --git a/libraries/base/GHC/IO.hs b/libraries/base/GHC/IO.hs
index 62c4975c37..e9ac94103d 100644
--- a/libraries/base/GHC/IO.hs
+++ b/libraries/base/GHC/IO.hs
@@ -174,7 +174,7 @@ of the duplicated IO actions is only run partially, and then interrupted
in the middle without an exception being raised. Therefore, functions
like 'bracket' cannot be used safely within 'unsafeDupablePerformIO'.
-/Since: 4.4.0.0/
+@since 4.4.0.0
-}
{-# NOINLINE unsafeDupablePerformIO #-}
-- See Note [unsafeDupablePerformIO is NOINLINE]
diff --git a/libraries/base/GHC/IO/Encoding.hs b/libraries/base/GHC/IO/Encoding.hs
index 68bc0cfa4e..31683b4e68 100644
--- a/libraries/base/GHC/IO/Encoding.hs
+++ b/libraries/base/GHC/IO/Encoding.hs
@@ -103,7 +103,7 @@ utf32be = UTF32.utf32be
-- | The Unicode encoding of the current locale
--
--- /Since: 4.5.0.0/
+-- @since 4.5.0.0
getLocaleEncoding :: IO TextEncoding
-- | The Unicode encoding of the current locale, but allowing arbitrary
@@ -116,17 +116,17 @@ getLocaleEncoding :: IO TextEncoding
-- the use of code pages is deprecated: Strings should be retrieved
-- via the "wide" W-family of UTF-16 APIs instead
--
--- /Since: 4.5.0.0/
+-- @since 4.5.0.0
getFileSystemEncoding :: IO TextEncoding
-- | The Unicode encoding of the current locale, but where undecodable
-- bytes are replaced with their closest visual match. Used for
-- the 'CString' marshalling functions in "Foreign.C.String"
--
--- /Since: 4.5.0.0/
+-- @since 4.5.0.0
getForeignEncoding :: IO TextEncoding
--- | /Since: 4.5.0.0/
+-- | @since 4.5.0.0
setLocaleEncoding, setFileSystemEncoding, setForeignEncoding :: TextEncoding -> IO ()
(getLocaleEncoding, setLocaleEncoding) = mkGlobal initLocaleEncoding
@@ -138,7 +138,7 @@ mkGlobal x = unsafePerformIO $ do
x_ref <- newIORef x
return (readIORef x_ref, writeIORef x_ref)
--- | /Since: 4.5.0.0/
+-- | @since 4.5.0.0
initLocaleEncoding, initFileSystemEncoding, initForeignEncoding :: TextEncoding
#if !defined(mingw32_HOST_OS)
@@ -169,7 +169,7 @@ initForeignEncoding = CodePage.mkLocaleEncoding IgnoreCodingFailure
-- discards information, so encode followed by decode is not the
-- identity.
--
--- /Since: 4.4.0.0/
+-- @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 5ec7110973..34a4fca193 100644
--- a/libraries/base/GHC/IO/Encoding/Latin1.hs
+++ b/libraries/base/GHC/IO/Encoding/Latin1.hs
@@ -45,7 +45,7 @@ import GHC.IO.Encoding.Types
latin1 :: TextEncoding
latin1 = mkLatin1 ErrorOnCodingFailure
--- | /Since: 4.4.0.0/
+-- | @since 4.4.0.0
mkLatin1 :: CodingFailureMode -> TextEncoding
mkLatin1 cfm = TextEncoding { textEncodingName = "ISO8859-1",
mkTextDecoder = latin1_DF cfm,
@@ -74,7 +74,7 @@ latin1_EF cfm =
latin1_checked :: TextEncoding
latin1_checked = mkLatin1_checked ErrorOnCodingFailure
--- | /Since: 4.4.0.0/
+-- | @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 95bb2905a4..02a0d13e8b 100644
--- a/libraries/base/GHC/IO/Encoding/Types.hs
+++ b/libraries/base/GHC/IO/Encoding/Types.hs
@@ -67,7 +67,7 @@ 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/
+ -- @since 4.4.0.0
close :: IO (),
-- ^ Resources associated with the encoding may now be released.
@@ -121,7 +121,7 @@ instance Show TextEncoding where
-- | Returns the value of 'textEncodingName'
show te = textEncodingName te
--- | /Since: 4.4.0.0/
+-- | @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 4dd393b418..192f30beb9 100644
--- a/libraries/base/GHC/IO/Encoding/UTF16.hs
+++ b/libraries/base/GHC/IO/Encoding/UTF16.hs
@@ -55,7 +55,7 @@ import GHC.IORef
utf16 :: TextEncoding
utf16 = mkUTF16 ErrorOnCodingFailure
--- | /Since: 4.4.0.0/
+-- | @since 4.4.0.0
mkUTF16 :: CodingFailureMode -> TextEncoding
mkUTF16 cfm = TextEncoding { textEncodingName = "UTF-16",
mkTextDecoder = utf16_DF cfm,
@@ -141,7 +141,7 @@ bom2 = bomL
utf16be :: TextEncoding
utf16be = mkUTF16be ErrorOnCodingFailure
--- | /Since: 4.4.0.0/
+-- | @since 4.4.0.0
mkUTF16be :: CodingFailureMode -> TextEncoding
mkUTF16be cfm = TextEncoding { textEncodingName = "UTF-16BE",
mkTextDecoder = utf16be_DF cfm,
@@ -170,7 +170,7 @@ utf16be_EF cfm =
utf16le :: TextEncoding
utf16le = mkUTF16le ErrorOnCodingFailure
--- | /Since: 4.4.0.0/
+-- | @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 c874224682..26b5e448ca 100644
--- a/libraries/base/GHC/IO/Encoding/UTF32.hs
+++ b/libraries/base/GHC/IO/Encoding/UTF32.hs
@@ -55,7 +55,7 @@ import GHC.IORef
utf32 :: TextEncoding
utf32 = mkUTF32 ErrorOnCodingFailure
--- | /Since: 4.4.0.0/
+-- | @since 4.4.0.0
mkUTF32 :: CodingFailureMode -> TextEncoding
mkUTF32 cfm = TextEncoding { textEncodingName = "UTF-32",
mkTextDecoder = utf32_DF cfm,
@@ -144,7 +144,7 @@ utf32_native_encode = utf32be_encode
utf32be :: TextEncoding
utf32be = mkUTF32be ErrorOnCodingFailure
--- | /Since: 4.4.0.0/
+-- | @since 4.4.0.0
mkUTF32be :: CodingFailureMode -> TextEncoding
mkUTF32be cfm = TextEncoding { textEncodingName = "UTF-32BE",
mkTextDecoder = utf32be_DF cfm,
@@ -174,7 +174,7 @@ utf32be_EF cfm =
utf32le :: TextEncoding
utf32le = mkUTF32le ErrorOnCodingFailure
--- | /Since: 4.4.0.0/
+-- | @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 1c48acf18e..18d034ad15 100644
--- a/libraries/base/GHC/IO/Encoding/UTF8.hs
+++ b/libraries/base/GHC/IO/Encoding/UTF8.hs
@@ -43,7 +43,7 @@ import Data.Bits
utf8 :: TextEncoding
utf8 = mkUTF8 ErrorOnCodingFailure
--- | /Since: 4.4.0.0/
+-- | @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/Exception.hs b/libraries/base/GHC/IO/Exception.hs
index f811e5a43e..6701fdf67a 100644
--- a/libraries/base/GHC/IO/Exception.hs
+++ b/libraries/base/GHC/IO/Exception.hs
@@ -103,7 +103,7 @@ instance Show Deadlock where
-- 'GHC.Conc.setAllocationCounter' and
-- 'GHC.Conc.enableAllocationLimit'.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
data AllocationLimitExceeded = AllocationLimitExceeded
deriving Typeable
@@ -131,7 +131,7 @@ instance Show AssertionFailed where
-- |Superclass for asynchronous exceptions.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
data SomeAsyncException = forall e . Exception e => SomeAsyncException e
deriving Typeable
@@ -140,11 +140,11 @@ instance Show SomeAsyncException where
instance Exception SomeAsyncException
--- |/Since: 4.7.0.0/
+-- |@since 4.7.0.0
asyncExceptionToException :: Exception e => e -> SomeException
asyncExceptionToException = toException . SomeAsyncException
--- |/Since: 4.7.0.0/
+-- |@since 4.7.0.0
asyncExceptionFromException :: Exception e => SomeException -> Maybe e
asyncExceptionFromException x = do
SomeAsyncException a <- fromException x
diff --git a/libraries/base/GHC/IO/Handle/FD.hs b/libraries/base/GHC/IO/Handle/FD.hs
index ac792de4fb..181aad7831 100644
--- a/libraries/base/GHC/IO/Handle/FD.hs
+++ b/libraries/base/GHC/IO/Handle/FD.hs
@@ -157,7 +157,7 @@ openFile fp im =
-- 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/
+-- @since 4.4.0.0
openFileBlocking :: FilePath -> IOMode -> IO Handle
openFileBlocking fp im =
catchException
diff --git a/libraries/base/GHC/IP.hs b/libraries/base/GHC/IP.hs
index b80ee4b3fb..9a4a0ec009 100644
--- a/libraries/base/GHC/IP.hs
+++ b/libraries/base/GHC/IP.hs
@@ -5,7 +5,7 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NoImplicitPrelude #-}
--- | /Since: 4.6.0.0/
+-- | @since 4.6.0.0
module GHC.IP (IP(..)) where
import GHC.TypeLits
diff --git a/libraries/base/GHC/List.hs b/libraries/base/GHC/List.hs
index 19c771bdab..34ba445826 100644
--- a/libraries/base/GHC/List.hs
+++ b/libraries/base/GHC/List.hs
@@ -67,7 +67,7 @@ badHead = errorEmptyList "head"
-- returns 'Nothing'. If the list is non-empty, returns @'Just' (x, xs)@,
-- where @x@ is the head of the list and @xs@ its tail.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
uncons :: [a] -> Maybe (a, [a])
uncons [] = Nothing
uncons (x:xs) = Just (x, xs)
diff --git a/libraries/base/GHC/MVar.hs b/libraries/base/GHC/MVar.hs
index 0ba122b543..a5054cc8fe 100644
--- a/libraries/base/GHC/MVar.hs
+++ b/libraries/base/GHC/MVar.hs
@@ -156,7 +156,7 @@ tryPutMVar (MVar mvar#) x = IO $ \ s# ->
-- returns immediately, with 'Nothing' if the 'MVar' was empty, or
-- @'Just' a@ if the 'MVar' was full with contents @a@.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
tryReadMVar :: MVar a -> IO (Maybe a)
tryReadMVar (MVar m) = IO $ \ s ->
case tryReadMVar# m s of
diff --git a/libraries/base/GHC/Natural.hs b/libraries/base/GHC/Natural.hs
index 0211061a32..71e3498f2c 100644
--- a/libraries/base/GHC/Natural.hs
+++ b/libraries/base/GHC/Natural.hs
@@ -26,7 +26,7 @@
-- change. It's recommended use the "Numeric.Natural" module to import
-- the 'Natural' type.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
-----------------------------------------------------------------------------
module GHC.Natural
( -- * The 'Natural' number type
@@ -81,7 +81,7 @@ default ()
-- Operations whose result would be negative
-- @'throw' ('Underflow' :: 'ArithException')@.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
data Natural = NatS# GmpLimb# -- ^ in @[0, maxBound::Word]@
| NatJ# {-# UNPACK #-} !BigNat -- ^ in @]maxBound::Word, +inf[@
--
@@ -96,7 +96,7 @@ data Natural = NatS# GmpLimb# -- ^ in @[0, maxBound::Word]@
-- This operation is mostly useful for test-suites and/or code which
-- constructs 'Integer' values directly.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
isValidNatural :: Natural -> Bool
isValidNatural (NatS# _) = True
isValidNatural (NatJ# bn) = isTrue# (isValidBigNat# bn)
@@ -381,7 +381,7 @@ minusNatural (NatJ# x) (NatJ# y)
-- | 'Natural' subtraction. Returns 'Nothing's for non-positive results.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
minusNaturalMaybe :: Natural -> Natural -> Maybe Natural
minusNaturalMaybe x (NatS# 0##) = Just x
minusNaturalMaybe (NatS# x) (NatS# y) = case subWordC# x y of
@@ -439,7 +439,7 @@ naturalToInt (NatJ# bn) = I# (bigNatToInt bn)
-- Operations whose result would be negative
-- @'throw' ('Underflow' :: 'ArithException')@.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
newtype Natural = Natural Integer -- ^ __Invariant__: non-negative 'Integer'
deriving (Eq,Ord,Ix)
@@ -448,7 +448,7 @@ newtype Natural = Natural Integer -- ^ __Invariant__: non-negative 'Integer'
-- This operation is mostly useful for test-suites and/or code which
-- constructs 'Integer' values directly.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
isValidNatural :: Natural -> Bool
isValidNatural (Natural i) = i >= 0
@@ -479,7 +479,7 @@ instance Num Natural where
-- | 'Natural' subtraction. Returns 'Nothing's for non-positive results.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
minusNaturalMaybe :: Natural -> Natural -> Maybe Natural
minusNaturalMaybe x y
| x >= y = Just (x - y)
@@ -572,7 +572,7 @@ instance Integral Natural where
-- | Construct 'Natural' from 'Word' value.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
wordToNatural :: Word -> Natural
#if HAVE_GMP_BIGNAT
wordToNatural (W# w#) = NatS# w#
@@ -583,7 +583,7 @@ wordToNatural w = Natural (fromIntegral w)
-- | Try downcasting 'Natural' to 'Word' value.
-- Returns 'Nothing' if value doesn't fit in 'Word'.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
naturalToWordMaybe :: Natural -> Maybe Word
#if HAVE_GMP_BIGNAT
naturalToWordMaybe (NatS# w#) = Just (W# w#)
@@ -612,7 +612,7 @@ instance Data Natural where
-- | \"@'powModNatural' /b/ /e/ /m/@\" computes base @/b/@ raised to
-- exponent @/e/@ modulo @/m/@.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
powModNatural :: Natural -> Natural -> Natural -> Natural
#if HAVE_GMP_BIGNAT
powModNatural _ _ (NatS# 0##) = throw DivideByZero
diff --git a/libraries/base/GHC/Profiling.hs b/libraries/base/GHC/Profiling.hs
index 281d9b10d1..732917684d 100644
--- a/libraries/base/GHC/Profiling.hs
+++ b/libraries/base/GHC/Profiling.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
--- | /Since: 4.7.0.0/
+-- | @since 4.7.0.0
module GHC.Profiling where
import GHC.Base
diff --git a/libraries/base/GHC/RTS/Flags.hsc b/libraries/base/GHC/RTS/Flags.hsc
index 1d75568061..ff1bf694f1 100644
--- a/libraries/base/GHC/RTS/Flags.hsc
+++ b/libraries/base/GHC/RTS/Flags.hsc
@@ -6,7 +6,7 @@
-- <https://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html GHC User's Guide>,
-- or by running RTS help message using @+RTS --help@.
--
--- /Since: 4.8.0.0/
+-- @since 4.8.0.0
--
module GHC.RTS.Flags
( RTSFlags (..)
diff --git a/libraries/base/GHC/Stack.hsc b/libraries/base/GHC/Stack.hsc
index 611e5c9ba6..0aa4d1768d 100644
--- a/libraries/base/GHC/Stack.hsc
+++ b/libraries/base/GHC/Stack.hsc
@@ -12,7 +12,7 @@
--
-- Access to GHC's call-stack simulation
--
--- /Since: 4.5.0.0/
+-- @since 4.5.0.0
-----------------------------------------------------------------------------
{-# LANGUAGE UnboxedTuples, MagicHash, NoImplicitPrelude #-}
@@ -87,7 +87,7 @@ ccSrcSpan p = (# peek CostCentre, srcloc) p
-- Otherwise, the list returned is likely to be empty or
-- uninformative.
--
--- /Since: 4.5.0.0/
+-- @since 4.5.0.0
currentCallStack :: IO [String]
currentCallStack = ccsToStrings =<< getCurrentCCS ()
@@ -109,7 +109,7 @@ ccsToStrings ccs0 = go ccs0 []
-- | Get the stack trace attached to an object.
--
--- /Since: 4.5.0.0/
+-- @since 4.5.0.0
whoCreated :: a -> IO [String]
whoCreated obj = do
ccs <- getCCSOf obj
@@ -121,7 +121,7 @@ renderStack strs = "Stack trace:" ++ concatMap ("\n "++) (reverse strs)
-- | Like the function 'error', but appends a stack trace to the error
-- message if one is available.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
errorWithStackTrace :: String -> a
errorWithStackTrace x = unsafeDupablePerformIO $ do
stack <- ccsToStrings =<< getCurrentCCS x
diff --git a/libraries/base/GHC/Stats.hsc b/libraries/base/GHC/Stats.hsc
index 226a0e1f88..7bcc221c5f 100644
--- a/libraries/base/GHC/Stats.hsc
+++ b/libraries/base/GHC/Stats.hsc
@@ -10,7 +10,7 @@
--
-- This module is GHC-only and should not be considered portable.
--
--- /Since: 4.5.0.0/
+-- @since 4.5.0.0
-----------------------------------------------------------------------------
module GHC.Stats
( GCStats(..)
@@ -34,14 +34,14 @@ foreign import ccall "getGCStats" getGCStats_ :: Ptr () -> IO ()
-- | Returns whether GC stats have been enabled (with @+RTS -T@, for example).
--
--- /Since: 4.6.0.0/
+-- @since 4.6.0.0
foreign import ccall "getGCStatsEnabled" getGCStatsEnabled :: IO Bool
-- I'm probably violating a bucket of constraints here... oops.
-- | Global garbage collection and memory statistics.
--
--- /Since: 4.5.0.0/
+-- @since 4.5.0.0
data GCStats = GCStats
{ bytesAllocated :: !Int64 -- ^ Total number of bytes allocated
, numGcs :: !Int64 -- ^ Number of garbage collections performed
@@ -89,7 +89,7 @@ data GCStats = GCStats
-- garbage collection. If you would like your statistics as recent as
-- possible, first run a 'System.Mem.performGC'.
--
--- /Since: 4.5.0.0/
+-- @since 4.5.0.0
getGCStats :: IO GCStats
getGCStats = do
statsEnabled <- getGCStatsEnabled
diff --git a/libraries/base/GHC/TypeLits.hs b/libraries/base/GHC/TypeLits.hs
index 4dde7a3c28..6da103e73c 100644
--- a/libraries/base/GHC/TypeLits.hs
+++ b/libraries/base/GHC/TypeLits.hs
@@ -17,7 +17,7 @@
in the implementation of type-level natural numbers. The programmer interface
for working with type-level naturals should be defined in a separate library.
-/Since: 4.6.0.0/
+@since 4.6.0.0
-}
module GHC.TypeLits
@@ -61,33 +61,33 @@ data Symbol
-- | This class gives the integer associated with a type-level natural.
-- There are instances of the class for every concrete literal: 0, 1, 2, etc.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
class KnownNat (n :: Nat) where
natSing :: SNat n
-- | This class gives the string associated with a type-level symbol.
-- There are instances of the class for every concrete literal: "hello", etc.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
class KnownSymbol (n :: Symbol) where
symbolSing :: SSymbol n
--- | /Since: 4.7.0.0/
+-- | @since 4.7.0.0
natVal :: forall n proxy. KnownNat n => proxy n -> Integer
natVal _ = case natSing :: SNat n of
SNat x -> x
--- | /Since: 4.7.0.0/
+-- | @since 4.7.0.0
symbolVal :: forall n proxy. KnownSymbol n => proxy n -> String
symbolVal _ = case symbolSing :: SSymbol n of
SSymbol x -> x
--- | /Since: 4.8.0.0/
+-- | @since 4.8.0.0
natVal' :: forall n. KnownNat n => Proxy# n -> Integer
natVal' _ = case natSing :: SNat n of
SNat x -> x
--- | /Since: 4.8.0.0/
+-- | @since 4.8.0.0
symbolVal' :: forall n. KnownSymbol n => Proxy# n -> String
symbolVal' _ = case symbolSing :: SSymbol n of
SSymbol x -> x
@@ -96,15 +96,15 @@ symbolVal' _ = case symbolSing :: SSymbol n of
-- | This type represents unknown type-level natural numbers.
data SomeNat = forall n. KnownNat n => SomeNat (Proxy n)
- -- ^ /Since: 4.7.0.0/
+ -- ^ @since 4.7.0.0
-- | This type represents unknown type-level symbols.
data SomeSymbol = forall n. KnownSymbol n => SomeSymbol (Proxy n)
- -- ^ /Since: 4.7.0.0/
+ -- ^ @since 4.7.0.0
-- | Convert an integer into an unknown type-level natural.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
someNatVal :: Integer -> Maybe SomeNat
someNatVal n
| n >= 0 = Just (withSNat SomeNat (SNat n) Proxy)
@@ -112,7 +112,7 @@ someNatVal n
-- | Convert a string into an unknown type-level symbol.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
someSymbolVal :: String -> SomeSymbol
someSymbolVal n = withSSymbol SomeSymbol (SSymbol n) Proxy
@@ -168,12 +168,12 @@ type x <= y = (x <=? y) ~ 'True
-- | Comparison of type-level symbols, as a function.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
type family CmpSymbol (m :: Symbol) (n :: Symbol) :: Ordering
-- | Comparison of type-level naturals, as a function.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
type family CmpNat (m :: Nat) (n :: Nat) :: Ordering
{- | Comparison of type-level naturals, as a function.
@@ -193,7 +193,7 @@ type family (m :: Nat) ^ (n :: Nat) :: Nat
-- | Subtraction of type-level naturals.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
type family (m :: Nat) - (n :: Nat) :: Nat
@@ -202,7 +202,7 @@ type family (m :: Nat) - (n :: Nat) :: Nat
-- | We either get evidence that this function was instantiated with the
-- same type-level numbers, or 'Nothing'.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
sameNat :: (KnownNat a, KnownNat b) =>
Proxy a -> Proxy b -> Maybe (a :~: b)
sameNat x y
@@ -212,7 +212,7 @@ sameNat x y
-- | We either get evidence that this function was instantiated with the
-- same type-level symbols, or 'Nothing'.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
sameSymbol :: (KnownSymbol a, KnownSymbol b) =>
Proxy a -> Proxy b -> Maybe (a :~: b)
sameSymbol x y
diff --git a/libraries/base/GHC/Word.hs b/libraries/base/GHC/Word.hs
index 5351c0b94d..6663f59b7d 100644
--- a/libraries/base/GHC/Word.hs
+++ b/libraries/base/GHC/Word.hs
@@ -306,7 +306,7 @@ instance FiniteBits Word16 where
-- | Swap bytes in 'Word16'.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
byteSwap16 :: Word16 -> Word16
byteSwap16 (W16# w#) = W16# (narrow16Word# (byteSwap16# w#))
@@ -538,7 +538,7 @@ instance Read Word32 where
-- | Reverse order of bytes in 'Word32'.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
byteSwap32 :: Word32 -> Word32
byteSwap32 (W32# w#) = W32# (narrow32Word# (byteSwap32# w#))
@@ -794,7 +794,7 @@ instance Read Word64 where
-- | Reverse order of bytes in 'Word64'.
--
--- /Since: 4.7.0.0/
+-- @since 4.7.0.0
#if WORD_SIZE_IN_BITS < 64
byteSwap64 :: Word64 -> Word64
byteSwap64 (W64# w#) = W64# (byteSwap64# w#)