diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2014-12-16 12:07:10 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-12-16 13:30:08 +0100 |
commit | 554aedab646075e12e53b44df04bcfbccbe03a73 (patch) | |
tree | 0832201a44fd74632bbbd88fb77cb6c11eb34cf7 /libraries/integer-gmp2/src/GHC | |
parent | 45a9696c550c5fe5e891b6d4710179272dc9f6db (diff) | |
download | haskell-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/integer-gmp2/src/GHC')
-rw-r--r-- | libraries/integer-gmp2/src/GHC/Integer/GMP/Internals.hs | 24 | ||||
-rw-r--r-- | libraries/integer-gmp2/src/GHC/Integer/Type.hs | 24 |
2 files changed, 24 insertions, 24 deletions
diff --git a/libraries/integer-gmp2/src/GHC/Integer/GMP/Internals.hs b/libraries/integer-gmp2/src/GHC/Integer/GMP/Internals.hs index 48dd5d22e8..0ad6848974 100644 --- a/libraries/integer-gmp2/src/GHC/Integer/GMP/Internals.hs +++ b/libraries/integer-gmp2/src/GHC/Integer/GMP/Internals.hs @@ -190,7 +190,7 @@ default () -- * \"@'sizeInBaseInteger' /i/ 2#@\" can be used to determine the most -- significant bit of @/i/@. -- --- /Since: 0.5.1.0/ +-- @since 0.5.1.0 sizeInBaseInteger :: Integer -> Int# -> Word# sizeInBaseInteger (S# i#) = sizeInBaseWord# (int2Word# (absI# i#)) sizeInBaseInteger (Jp# bn) = sizeInBaseBigNat bn @@ -198,7 +198,7 @@ sizeInBaseInteger (Jn# bn) = sizeInBaseBigNat bn -- | Version of 'sizeInBaseInteger' operating on 'BigNat' -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 sizeInBaseBigNat :: BigNat -> Int# -> Word# sizeInBaseBigNat bn@(BN# ba#) = c_mpn_sizeinbase# ba# (sizeofBigNat# bn) @@ -207,7 +207,7 @@ foreign import ccall unsafe "integer_gmp_mpn_sizeinbase" -- | Version of 'sizeInBaseInteger' operating on 'Word#' -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 foreign import ccall unsafe "integer_gmp_mpn_sizeinbase1" sizeInBaseWord# :: Word# -> Int# -> Word# @@ -217,7 +217,7 @@ foreign import ccall unsafe "integer_gmp_mpn_sizeinbase1" -- -- See description of 'exportIntegerToMutableByteArray' for more details. -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 exportIntegerToAddr :: Integer -> Addr# -> Int# -> IO Word exportIntegerToAddr (S# i#) = exportWordToAddr (W# (int2Word# (absI# i#))) exportIntegerToAddr (Jp# bn) = exportBigNatToAddr bn @@ -268,7 +268,7 @@ foreign import ccall unsafe "integer_gmp_mpn_export1" -- integers as this function would currently convert those to big -- integers in msbf to call @mpz_export()@. -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 exportIntegerToMutableByteArray :: Integer -> MutableByteArray# RealWorld -> Word# -> Int# -> IO Word exportIntegerToMutableByteArray (S# i#) @@ -278,7 +278,7 @@ exportIntegerToMutableByteArray (Jn# bn) = exportBigNatToMutableByteArray bn -- | Version of 'exportIntegerToMutableByteArray' operating on 'BigNat's. -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 exportBigNatToMutableByteArray :: BigNat -> MutableByteArray# RealWorld -> Word# -> Int# -> IO Word exportBigNatToMutableByteArray bn@(BN# ba#) @@ -291,7 +291,7 @@ foreign import ccall unsafe "integer_gmp_mpn_export" -- | Version of 'exportIntegerToMutableByteArray' operating on 'Word's. -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 exportWordToMutableByteArray :: Word -> MutableByteArray# RealWorld -> Word# -> Int# -> IO Word exportWordToMutableByteArray (W# w#) = c_mpn_export1ToMutableByteArray# w# @@ -316,7 +316,7 @@ foreign import ccall unsafe "integer_gmp_mpn_export1" -- determining a /probable prime/. For more details, see -- <http://gmplib.org/manual/Number-Theoretic-Functions.html#index-mpz_005fprobab_005fprime_005fp-360 GMP documentation for `mpz_probab_prime_p()`>. -- --- /Since: 0.5.1.0/ +-- @since 0.5.1.0 {-# NOINLINE testPrimeInteger #-} testPrimeInteger :: Integer -> Int# -> Int# testPrimeInteger (S# i#) = testPrimeWord# (int2Word# (absI# i#)) @@ -325,7 +325,7 @@ testPrimeInteger (Jn# n) = testPrimeBigNat n -- | Version of 'testPrimeInteger' operating on 'BigNat's -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 testPrimeBigNat :: BigNat -> Int# -> Int# testPrimeBigNat bn@(BN# ba#) = c_integer_gmp_test_prime# ba# (sizeofBigNat# bn) @@ -334,7 +334,7 @@ foreign import ccall unsafe "integer_gmp_test_prime" -- | Version of 'testPrimeInteger' operating on 'Word#'s -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 foreign import ccall unsafe "integer_gmp_test_prime1" testPrimeWord# :: GmpLimb# -> Int# -> Int# @@ -346,7 +346,7 @@ foreign import ccall unsafe "integer_gmp_test_prime1" -- primes. For practical purposes it's adequate, the chance of a -- composite passing will be extremely small.\" -- --- /Since: 0.5.1.0/ +-- @since 0.5.1.0 {-# NOINLINE nextPrimeInteger #-} nextPrimeInteger :: Integer -> Integer nextPrimeInteger (S# i#) @@ -357,6 +357,6 @@ nextPrimeInteger (Jn# _) = S# 2# -- | Version of 'nextPrimeInteger' operating on 'Word#'s -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 foreign import ccall unsafe "integer_gmp_next_prime1" nextPrimeWord# :: GmpLimb# -> GmpLimb# diff --git a/libraries/integer-gmp2/src/GHC/Integer/Type.hs b/libraries/integer-gmp2/src/GHC/Integer/Type.hs index db24560a02..e2028553c4 100644 --- a/libraries/integer-gmp2/src/GHC/Integer/Type.hs +++ b/libraries/integer-gmp2/src/GHC/Integer/Type.hs @@ -785,7 +785,7 @@ gcdInt x# y# -- | Compute greatest common divisor. -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 gcdWord :: Word# -> Word# -> Word# gcdWord = gcdWord# @@ -1261,7 +1261,7 @@ gcdBigNat x@(BN# x#) y@(BN# y#) -- For @/a/@ and @/b/@, compute their greatest common divisor @/g/@ -- and the coefficient @/s/@ satisfying @/a//s/ + /b//t/ = /g/@. -- --- /Since: 0.5.1.0/ +-- @since 0.5.1.0 {-# NOINLINE gcdExtInteger #-} gcdExtInteger :: Integer -> Integer -> (# Integer, Integer #) gcdExtInteger a b = case gcdExtSBigNat a' b' of @@ -1312,7 +1312,7 @@ gcdExtSBigNat x y = case runS go of (g,s) -> (# g, s #) -- Future versions of @integer_gmp@ may not support negative @/e/@ -- values anymore. -- --- /Since: 0.5.1.0/ +-- @since 0.5.1.0 {-# NOINLINE powModInteger #-} powModInteger :: Integer -> Integer -> Integer -> Integer powModInteger (S# b#) (S# e#) (S# m#) @@ -1329,19 +1329,19 @@ powModInteger b e m = case m of -- | Version of 'powModInteger' operating on 'BigNat's -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 powModBigNat :: BigNat -> BigNat -> BigNat -> BigNat powModBigNat b e m = inline powModSBigNat (PosBN b) (PosBN e) m -- | Version of 'powModInteger' for 'Word#'-sized moduli -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 powModBigNatWord :: BigNat -> BigNat -> GmpLimb# -> GmpLimb# powModBigNatWord b e m# = inline powModSBigNatWord (PosBN b) (PosBN e) m# -- | Version of 'powModInteger' operating on 'Word#'s -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 foreign import ccall unsafe "integer_gmp_powm_word" powModWord :: GmpLimb# -> GmpLimb# -> GmpLimb# -> GmpLimb# @@ -1384,7 +1384,7 @@ foreign import ccall unsafe "integer_gmp_powm1" -- the inverse exists, the return value @/y/@ will satisfy @0 < /y/ < -- abs(/m/)@, otherwise the result is @0@. -- --- /Since: 0.5.1.0/ +-- @since 0.5.1.0 {-# NOINLINE recipModInteger #-} recipModInteger :: Integer -> Integer -> Integer recipModInteger (S# x#) (S# m#) @@ -1397,13 +1397,13 @@ recipModInteger x m = bigNatToInteger (recipModSBigNat x' m') -- | Version of 'recipModInteger' operating on 'BigNat's -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 recipModBigNat :: BigNat -> BigNat -> BigNat recipModBigNat x m = inline recipModSBigNat (PosBN x) m -- | Version of 'recipModInteger' operating on 'Word#'s -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 foreign import ccall unsafe "integer_gmp_invert_word" recipModWord :: GmpLimb# -> GmpLimb# -> GmpLimb# @@ -1748,7 +1748,7 @@ byteArrayToBigNat# ba# n0# -- -- See description of 'importIntegerFromByteArray' for more details. -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 importIntegerFromAddr :: Addr# -> Word# -> Int# -> IO Integer importIntegerFromAddr addr len msbf = IO $ do bn <- liftIO (importBigNatFromAddr addr len msbf) @@ -1802,7 +1802,7 @@ foreign import ccall unsafe "integer_gmp_mpn_import" -- -- * returns a new 'Integer' -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 importIntegerFromByteArray :: ByteArray# -> Word# -> Word# -> Int# -> Integer importIntegerFromByteArray ba ofs len msbf = bigNatToInteger (importBigNatFromByteArray ba ofs len msbf) @@ -1860,7 +1860,7 @@ isValidBigNat# (BN# ba#) -- | Version of 'nextPrimeInteger' operating on 'BigNat's -- --- /Since: 1.0.0.0/ +-- @since 1.0.0.0 nextPrimeBigNat :: BigNat -> BigNat nextPrimeBigNat bn@(BN# ba#) = runS $ do mbn@(MBN# mba#) <- newBigNat# n# |