diff options
author | Joshua Price <elderephemera@gmail.com> | 2021-08-07 20:17:20 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-08 02:59:10 -0400 |
commit | 7a4bde22832512364d930af29840ec055301a0ff (patch) | |
tree | ea2a06fb0658b4b84516a987849f663d4e502790 | |
parent | 5b5c2452ad64d89bf8144cba368f951a8cd3ebba (diff) | |
download | haskell-7a4bde22832512364d930af29840ec055301a0ff.tar.gz |
Fix broken haddock @since fields in base
-rw-r--r-- | libraries/base/Data/Functor/Classes.hs | 1 | ||||
-rw-r--r-- | libraries/base/Data/Type/Ord.hs | 13 | ||||
-rw-r--r-- | libraries/base/GHC/Conc/IO.hs | 1 | ||||
-rw-r--r-- | libraries/base/GHC/TypeLits.hs | 4 | ||||
-rw-r--r-- | libraries/base/GHC/TypeNats.hs | 7 |
5 files changed, 23 insertions, 3 deletions
diff --git a/libraries/base/Data/Functor/Classes.hs b/libraries/base/Data/Functor/Classes.hs index def3c8acfd..ab64b9c468 100644 --- a/libraries/base/Data/Functor/Classes.hs +++ b/libraries/base/Data/Functor/Classes.hs @@ -301,6 +301,7 @@ compare2 = liftCompare2 compare compare -- @ -- -- For more information, refer to the documentation for the 'Read' class. +-- -- @since 4.9.0.0 class Read2 f where {-# MINIMAL liftReadsPrec2 | liftReadPrec2 #-} diff --git a/libraries/base/Data/Type/Ord.hs b/libraries/base/Data/Type/Ord.hs index d882a82a61..87c17c00cd 100644 --- a/libraries/base/Data/Type/Ord.hs +++ b/libraries/base/Data/Type/Ord.hs @@ -44,6 +44,7 @@ import Data.Ord -- | 'Compare' branches on the kind of its arguments to either compare by -- 'Symbol' or 'Nat'. +-- -- @since 4.16.0.0 type Compare :: k -> k -> Ordering type family Compare a b @@ -53,6 +54,7 @@ type instance Compare (a :: Symbol) b = CmpSymbol a b type instance Compare (a :: Char) b = CmpChar a b -- | Ordering data type for type literals that provides proof of their ordering. +-- -- @since 4.16.0.0 data OrderingI a b where LTI :: Compare a b ~ 'LT => OrderingI a b @@ -66,49 +68,59 @@ deriving instance Eq (OrderingI a b) infix 4 <=?, <=, >=?, >=, <?, <, >?, > -- | Comparison (<=) of comparable types, as a constraint. +-- -- @since 4.16.0.0 type x <= y = (x <=? y) ~ 'True -- | Comparison (>=) of comparable types, as a constraint. +-- -- @since 4.16.0.0 type x >= y = (x >=? y) ~ 'True -- | Comparison (<) of comparable types, as a constraint. +-- -- @since 4.16.0.0 type x < y = (x >? y) ~ 'True -- | Comparison (>) of comparable types, as a constraint. +-- -- @since 4.16.0.0 type x > y = (x >? y) ~ 'True -- | Comparison (<=) of comparable types, as a function. +-- -- @since 4.16.0.0 type (<=?) :: k -> k -> Bool type m <=? n = OrdCond (Compare m n) 'True 'True 'False -- | Comparison (>=) of comparable types, as a function. +-- -- @since 4.16.0.0 type (>=?) :: k -> k -> Bool type m >=? n = OrdCond (Compare m n) 'False 'True 'True -- | Comparison (<) of comparable types, as a function. +-- -- @since 4.16.0.0 type (<?) :: k -> k -> Bool type m <? n = OrdCond (Compare m n) 'True 'False 'False -- | Comparison (>) of comparable types, as a function. +-- -- @since 4.16.0.0 type (>?) :: k -> k -> Bool type m >? n = OrdCond (Compare m n) 'False 'False 'True -- | Maximum between two comparable types. +-- -- @since 4.16.0.0 type Max :: k -> k -> k type Max m n = OrdCond (Compare m n) n n m -- | Minimum between two comparable types. +-- -- @since 4.16.0.0 type Min :: k -> k -> k type Min m n = OrdCond (Compare m n) m m n @@ -117,6 +129,7 @@ type Min m n = OrdCond (Compare m n) m m n -- | A case statement on `Ordering`. -- `Ordering c l e g` is `l` when `c ~ LT`, `e` when `c ~ EQ`, and `g` when -- `c ~ GT`. +-- -- @since 4.16.0.0 type OrdCond :: Ordering -> k -> k -> k -> k type family OrdCond o lt eq gt where diff --git a/libraries/base/GHC/Conc/IO.hs b/libraries/base/GHC/Conc/IO.hs index d65f9c0acf..5674284a3c 100644 --- a/libraries/base/GHC/Conc/IO.hs +++ b/libraries/base/GHC/Conc/IO.hs @@ -79,6 +79,7 @@ ensureIOManagerIsRunning = Windows.ensureIOManagerIsRunning -- | Interrupts the current wait of the I/O manager if it is currently blocked. -- This instructs it to re-read how much it should wait and to process any -- pending events. +-- -- @since 4.15 interruptIOManager :: IO () #if !defined(mingw32_HOST_OS) diff --git a/libraries/base/GHC/TypeLits.hs b/libraries/base/GHC/TypeLits.hs index 0eb5f1e2fc..79759f2b87 100644 --- a/libraries/base/GHC/TypeLits.hs +++ b/libraries/base/GHC/TypeLits.hs @@ -157,7 +157,7 @@ instance Read SomeSymbol where -- | Convert a character into an unknown type-level char. -- --- | @since 4.16.0.0 +-- @since 4.16.0.0 someCharVal :: Char -> SomeChar someCharVal n = withSChar SomeChar (SChar n) Proxy {-# NOINLINE someCharVal #-} @@ -277,6 +277,7 @@ sameChar x y -- | Like 'sameSymbol', but if the symbols aren't equal, this additionally -- provides proof of LT or GT. +-- -- @since 4.16.0.0 cmpSymbol :: forall a b proxy1 proxy2. (KnownSymbol a, KnownSymbol b) => proxy1 a -> proxy2 b -> OrderingI a b @@ -290,6 +291,7 @@ cmpSymbol x y = case compare (symbolVal x) (symbolVal y) of -- | Like 'sameChar', but if the Chars aren't equal, this additionally -- provides proof of LT or GT. +-- -- @since 4.16.0.0 cmpChar :: forall a b proxy1 proxy2. (KnownChar a, KnownChar b) => proxy1 a -> proxy2 b -> OrderingI a b diff --git a/libraries/base/GHC/TypeNats.hs b/libraries/base/GHC/TypeNats.hs index fd7c847112..8991ab2e0c 100644 --- a/libraries/base/GHC/TypeNats.hs +++ b/libraries/base/GHC/TypeNats.hs @@ -55,8 +55,10 @@ import GHC.TypeNats.Internal(CmpNat) -- | A type synonym for 'Natural'. -- --- Prevously, this was an opaque data type, but it was changed to a type synonym --- @since @base-4.15.0.0@. +-- Prevously, this was an opaque data type, but it was changed to a type +-- synonym. +-- +-- @since 4.15.0.0 type Nat = Natural -------------------------------------------------------------------------------- @@ -223,6 +225,7 @@ sameNat x y -- | Like 'sameNat', but if the numbers aren't equal, this additionally -- provides proof of LT or GT. +-- -- @since 4.16.0.0 cmpNat :: forall a b proxy1 proxy2. (KnownNat a, KnownNat b) => proxy1 a -> proxy2 b -> OrderingI a b |