[Git][ghc/ghc][master] Add @since pragmas for Data.Ord.clamp and GHC.Float.clamp
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Aug 16 02:01:26 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
bdab6898 by Bodigrim at 2023-08-15T22:01:03-04:00
Add @since pragmas for Data.Ord.clamp and GHC.Float.clamp
- - - - -
2 changed files:
- libraries/base/Data/Ord.hs
- libraries/base/GHC/Float.hs
Changes:
=====================================
libraries/base/Data/Ord.hs
=====================================
@@ -64,6 +64,8 @@ comparing p x y = compare (p x) (p y)
--
-- >>> clamp ('a', 'm') 'x'
-- 'm'
+--
+-- @since 4.16.0.0
clamp :: (Ord a) => (a, a) -> a -> a
clamp (low, high) a = min high (max a low)
=====================================
libraries/base/GHC/Float.hs
=====================================
@@ -1600,6 +1600,8 @@ exponents returned by decodeFloat.
-- ==== __Example__
-- >>> clamp (-10) 5
-- 10
+--
+-- @since 4.13.0.0
clamp :: Int -> Int -> Int
clamp bd k = max (-bd) (min bd k)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bdab68986f3c4059180d6874678d598627843c5b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bdab68986f3c4059180d6874678d598627843c5b
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230815/3bb5a23b/attachment-0001.html>
More information about the ghc-commits
mailing list