Commit 5c28ee88 authored by Chaitanya Koparkar's avatar Chaitanya Koparkar Committed by Ben Gamari

Add @since annotations for derived instances in base

Test Plan: ./validate

Reviewers: hvr, goldfire, bgamari, RyanGlScott

Reviewed By: RyanGlScott

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #11767

Differential Revision: https://phabricator.haskell.org/D4452
parent 6a7e159c
......@@ -64,7 +64,10 @@ import GHC.Read (Read)
import GHC.Show (Show)
newtype WrappedMonad m a = WrapMonad { unwrapMonad :: m a }
deriving (Generic, Generic1, Monad)
deriving ( Generic -- ^ @since 4.7.0.0
, Generic1 -- ^ @since 4.7.0.0
, Monad -- ^ @since 4.7.0.0
)
-- | @since 2.01
instance Monad m => Functor (WrappedMonad m) where
......@@ -82,7 +85,9 @@ instance MonadPlus m => Alternative (WrappedMonad m) where
WrapMonad u <|> WrapMonad v = WrapMonad (u `mplus` v)
newtype WrappedArrow a b c = WrapArrow { unwrapArrow :: a b c }
deriving (Generic, Generic1)
deriving ( Generic -- ^ @since 4.7.0.0
, Generic1 -- ^ @since 4.7.0.0
)
-- | @since 2.01
instance Arrow a => Functor (WrappedArrow a b) where
......@@ -101,8 +106,15 @@ instance (ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b) where
-- | Lists, but with an 'Applicative' functor based on zipping.
newtype ZipList a = ZipList { getZipList :: [a] }
deriving ( Show, Eq, Ord, Read, Functor
, Foldable, Generic, Generic1)
deriving ( Show -- ^ @since 4.7.0.0
, Eq -- ^ @since 4.7.0.0
, Ord -- ^ @since 4.7.0.0
, Read -- ^ @since 4.7.0.0
, Functor -- ^ @since 2.01
, Foldable -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.7.0.0
, Generic1 -- ^ @since 4.7.0.0
)
-- See Data.Traversable for Traversable instance due to import loops
-- |
......
......@@ -50,7 +50,7 @@ import Control.Exception (mask_)
data Chan a
= Chan _UPK_(MVar (Stream a))
_UPK_(MVar (Stream a)) -- Invariant: the Stream a is always an empty MVar
deriving (Eq)
deriving Eq -- ^ @since 4.4.0.0
type Stream a = MVar (ChItem a)
......
......@@ -58,8 +58,16 @@ infix 6 :+
data Complex a
= !a :+ !a -- ^ forms a complex number from its real and imaginary
-- rectangular components.
deriving (Eq, Show, Read, Data, Generic, Generic1
, Functor, Foldable, Traversable)
deriving ( Eq -- ^ @since 2.01
, Show -- ^ @since 2.01
, Read -- ^ @since 2.01
, Data -- ^ @since 2.01
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
, Functor -- ^ @since 4.9.0.0
, Foldable -- ^ @since 4.9.0.0
, Traversable -- ^ @since 4.9.0.0
)
-- -----------------------------------------------------------------------------
-- Functions over Complex
......
......@@ -511,7 +511,7 @@ data DataType = DataType
, datarep :: DataRep
}
deriving Show
deriving Show -- ^ @since 4.0.0.0
-- | Representation of constructors. Note that equality on constructors
-- with different types may not work -- i.e. the constructors for 'False' and
......@@ -543,7 +543,9 @@ data DataRep = AlgRep [Constr]
| CharRep
| NoRep
deriving (Eq,Show)
deriving ( Eq -- ^ @since 4.0.0.0
, Show -- ^ @since 4.0.0.0
)
-- The list of constructors could be an array, a balanced tree, or others.
......@@ -553,7 +555,9 @@ data ConstrRep = AlgConstr ConIndex
| FloatConstr Rational
| CharConstr Char
deriving (Eq,Show)
deriving ( Eq -- ^ @since 4.0.0.0
, Show -- ^ @since 4.0.0.0
)
-- | Unique index for datatype constructors,
......@@ -565,7 +569,9 @@ type ConIndex = Int
data Fixity = Prefix
| Infix -- Later: add associativity and precedence
deriving (Eq,Show)
deriving ( Eq -- ^ @since 4.0.0.0
, Show -- ^ @since 4.0.0.0
)
------------------------------------------------------------------------------
......
......@@ -123,7 +123,11 @@ Left "parse error"
-}
data Either a b = Left a | Right b
deriving (Eq, Ord, Read, Show)
deriving ( Eq -- ^ @since 2.01
, Ord -- ^ @since 2.01
, Read -- ^ @since 3.0
, Show -- ^ @since 3.0
)
-- | @since 3.0
instance Functor (Either a) where
......@@ -336,4 +340,3 @@ prop_partitionEithers :: [Either Int Int] -> Bool
prop_partitionEithers x =
partitionEithers x == (lefts x, rights x)
-}
......@@ -57,8 +57,10 @@ mod' n d = n - (fromInteger f) * d where
f = div' n d
-- | The type parameter should be an instance of 'HasResolution'.
newtype Fixed a = MkFixed Integer -- ^ @since 4.7.0.0
deriving (Eq,Ord)
newtype Fixed a = MkFixed Integer
deriving ( Eq -- ^ @since 2.01
, Ord -- ^ @since 2.01
)
-- We do this because the automatically derived Data instance requires (Data a) context.
-- Our manual instance has the more general (Typeable a) context.
......
......@@ -439,19 +439,46 @@ instance Foldable U1 where
sum _ = 0
product _ = 1
-- | @since 4.9.0.0
deriving instance Foldable V1
-- | @since 4.9.0.0
deriving instance Foldable Par1
-- | @since 4.9.0.0
deriving instance Foldable f => Foldable (Rec1 f)
-- | @since 4.9.0.0
deriving instance Foldable (K1 i c)
-- | @since 4.9.0.0
deriving instance Foldable f => Foldable (M1 i c f)
-- | @since 4.9.0.0
deriving instance (Foldable f, Foldable g) => Foldable (f :+: g)
-- | @since 4.9.0.0
deriving instance (Foldable f, Foldable g) => Foldable (f :*: g)
-- | @since 4.9.0.0
deriving instance (Foldable f, Foldable g) => Foldable (f :.: g)
-- | @since 4.9.0.0
deriving instance Foldable UAddr
-- | @since 4.9.0.0
deriving instance Foldable UChar
-- | @since 4.9.0.0
deriving instance Foldable UDouble
-- | @since 4.9.0.0
deriving instance Foldable UFloat
-- | @since 4.9.0.0
deriving instance Foldable UInt
-- | @since 4.9.0.0
deriving instance Foldable UWord
-- | Monadic fold over the elements of a structure,
......
......@@ -38,7 +38,10 @@ infixr 9 `Compose`
-- The composition of applicative functors is always applicative,
-- but the composition of monads is not always a monad.
newtype Compose f g a = Compose { getCompose :: f (g a) }
deriving (Data, Generic, Generic1)
deriving ( Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
)
-- Instances of lifted Prelude classes
......
......@@ -37,9 +37,26 @@ import GHC.Show (Show(showsPrec), showParen, showString)
-- | The 'Const' functor.
newtype Const a b = Const { getConst :: a }
deriving ( Bits, Bounded, Enum, Eq, FiniteBits, Floating, Fractional
, Generic, Generic1, Integral, Ix, Semigroup, Monoid, Num, Ord
, Real, RealFrac, RealFloat, Storable)
deriving ( Bits -- ^ @since 4.9.0.0
, Bounded -- ^ @since 4.9.0.0
, Enum -- ^ @since 4.9.0.0
, Eq -- ^ @since 4.9.0.0
, FiniteBits -- ^ @since 4.9.0.0
, Floating -- ^ @since 4.9.0.0
, Fractional -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
, Integral -- ^ @since 4.9.0.0
, Ix -- ^ @since 4.9.0.0
, Semigroup -- ^ @since 4.9.0.0
, Monoid -- ^ @since 4.9.0.0
, Num -- ^ @since 4.9.0.0
, Ord -- ^ @since 4.9.0.0
, Real -- ^ @since 4.9.0.0
, RealFrac -- ^ @since 4.9.0.0
, RealFloat -- ^ @since 4.9.0.0
, Storable -- ^ @since 4.9.0.0
)
-- | This instance would be equivalent to the derived instances of the
-- 'Const' newtype if the 'runConst' field were removed
......
......@@ -57,9 +57,26 @@ import GHC.Types (Bool(..))
--
-- @since 4.8.0.0
newtype Identity a = Identity { runIdentity :: a }
deriving ( Bits, Bounded, Enum, Eq, FiniteBits, Floating, Fractional
, Generic, Generic1, Integral, Ix, Semigroup, Monoid, Num, Ord
, Real, RealFrac, RealFloat, Storable)
deriving ( Bits -- ^ @since 4.9.0.0
, Bounded -- ^ @since 4.9.0.0
, Enum -- ^ @since 4.9.0.0
, Eq -- ^ @since 4.8.0.0
, FiniteBits -- ^ @since 4.9.0.0
, Floating -- ^ @since 4.9.0.0
, Fractional -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.8.0.0
, Generic1 -- ^ @since 4.8.0.0
, Integral -- ^ @since 4.9.0.0
, Ix -- ^ @since 4.9.0.0
, Semigroup -- ^ @since 4.9.0.0
, Monoid -- ^ @since 4.9.0.0
, Num -- ^ @since 4.9.0.0
, Ord -- ^ @since 4.8.0.0
, Real -- ^ @since 4.9.0.0
, RealFrac -- ^ @since 4.9.0.0
, RealFloat -- ^ @since 4.9.0.0
, Storable -- ^ @since 4.9.0.0
)
-- | This instance would be equivalent to the derived instances of the
-- 'Identity' newtype if the 'runIdentity' field were removed
......
......@@ -35,7 +35,10 @@ import Text.Read (Read(..), readListDefault, readListPrecDefault)
-- | Lifted product of functors.
data Product f g a = Pair (f a) (g a)
deriving (Data, Generic, Generic1)
deriving ( Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
)
-- | @since 4.9.0.0
instance (Eq1 f, Eq1 g) => Eq1 (Product f g) where
......
......@@ -31,7 +31,10 @@ import Text.Read (Read(..), readListDefault, readListPrecDefault)
-- | Lifted sum of functors.
data Sum f g a = InL (f a) | InR (g a)
deriving (Data, Generic, Generic1)
deriving ( Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
)
-- | @since 4.9.0.0
instance (Eq1 f, Eq1 g) => Eq1 (Sum f g) where
......
......@@ -89,8 +89,16 @@ import Data.Semigroup.Internal
-- >>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world"))
-- Just "hello"
newtype First a = First { getFirst :: Maybe a }
deriving (Eq, Ord, Read, Show, Generic, Generic1,
Functor, Applicative, Monad)
deriving ( Eq -- ^ @since 2.01
, Ord -- ^ @since 2.01
, Read -- ^ @since 2.01
, Show -- ^ @since 2.01
, Generic -- ^ @since 4.7.0.0
, Generic1 -- ^ @since 4.7.0.0
, Functor -- ^ @since 4.8.0.0
, Applicative -- ^ @since 4.8.0.0
, Monad -- ^ @since 4.8.0.0
)
-- | @since 4.9.0.0
instance Semigroup (First a) where
......@@ -110,8 +118,16 @@ instance Monoid (First a) where
-- >>> getLast (Last (Just "hello") <> Last Nothing <> Last (Just "world"))
-- Just "world"
newtype Last a = Last { getLast :: Maybe a }
deriving (Eq, Ord, Read, Show, Generic, Generic1,
Functor, Applicative, Monad)
deriving ( Eq -- ^ @since 2.01
, Ord -- ^ @since 2.01
, Read -- ^ @since 2.01
, Show -- ^ @since 2.01
, Generic -- ^ @since 4.7.0.0
, Generic1 -- ^ @since 4.7.0.0
, Functor -- ^ @since 4.8.0.0
, Applicative -- ^ @since 4.8.0.0
, Monad -- ^ @since 4.8.0.0
)
-- | @since 4.9.0.0
instance Semigroup (Last a) where
......
......@@ -48,12 +48,12 @@ comparing p x y = compare (p x) (p y)
-- @since 4.6.0.0
newtype Down a = Down a
deriving
( Eq
, Show -- ^ @since 4.7.0.0
, Read -- ^ @since 4.7.0.0
, Num -- ^ @since 4.11.0.0
( Eq -- ^ @since 4.6.0.0
, Show -- ^ @since 4.7.0.0
, Read -- ^ @since 4.7.0.0
, Num -- ^ @since 4.11.0.0
, Semigroup -- ^ @since 4.11.0.0
, Monoid -- ^ @since 4.11.0.0
, Monoid -- ^ @since 4.11.0.0
)
-- | @since 4.6.0.0
......
......@@ -53,8 +53,8 @@ import GHC.Arr
--
-- >>> Proxy :: Proxy complicatedStructure
-- Proxy
data Proxy t = Proxy deriving ( Bounded
, Read -- ^ @since 4.7.0.0
data Proxy t = Proxy deriving ( Bounded -- ^ @since 4.7.0.0
, Read -- ^ @since 4.7.0.0
)
-- | A concrete, promotable proxy type, for use at the kind level
......
......@@ -95,7 +95,15 @@ diff :: Semigroup m => m -> Endo m
diff = Endo . (<>)
newtype Min a = Min { getMin :: a }
deriving (Bounded, Eq, Ord, Show, Read, Data, Generic, Generic1)
deriving ( Bounded -- ^ @since 4.9.0.0
, Eq -- ^ @since 4.9.0.0
, Ord -- ^ @since 4.9.0.0
, Show -- ^ @since 4.9.0.0
, Read -- ^ @since 4.9.0.0
, Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
)
-- | @since 4.9.0.0
instance Enum a => Enum (Min a) where
......@@ -158,7 +166,15 @@ instance Num a => Num (Min a) where
fromInteger = Min . fromInteger
newtype Max a = Max { getMax :: a }
deriving (Bounded, Eq, Ord, Show, Read, Data, Generic, Generic1)
deriving ( Bounded -- ^ @since 4.9.0.0
, Eq -- ^ @since 4.9.0.0
, Ord -- ^ @since 4.9.0.0
, Show -- ^ @since 4.9.0.0
, Read -- ^ @since 4.9.0.0
, Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
)
-- | @since 4.9.0.0
instance Enum a => Enum (Max a) where
......@@ -222,7 +238,12 @@ instance Num a => Num (Max a) where
-- | 'Arg' isn't itself a 'Semigroup' in its own right, but it can be
-- placed inside 'Min' and 'Max' to compute an arg min or arg max.
data Arg a b = Arg a b deriving
(Show, Read, Data, Generic, Generic1)
( Show -- ^ @since 4.9.0.0
, Read -- ^ @since 4.9.0.0
, Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
)
type ArgMin a b = Min (Arg a b)
type ArgMax a b = Max (Arg a b)
......@@ -267,8 +288,16 @@ instance Bitraversable Arg where
-- | Use @'Option' ('First' a)@ to get the behavior of
-- 'Data.Monoid.First' from "Data.Monoid".
newtype First a = First { getFirst :: a } deriving
(Bounded, Eq, Ord, Show, Read, Data, Generic, Generic1)
newtype First a = First { getFirst :: a }
deriving ( Bounded -- ^ @since 4.9.0.0
, Eq -- ^ @since 4.9.0.0
, Ord -- ^ @since 4.9.0.0
, Show -- ^ @since 4.9.0.0
, Read -- ^ @since 4.9.0.0
, Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
)
-- | @since 4.9.0.0
instance Enum a => Enum (First a) where
......@@ -317,8 +346,16 @@ instance MonadFix First where
-- | Use @'Option' ('Last' a)@ to get the behavior of
-- 'Data.Monoid.Last' from "Data.Monoid"
newtype Last a = Last { getLast :: a } deriving
(Bounded, Eq, Ord, Show, Read, Data, Generic, Generic1)
newtype Last a = Last { getLast :: a }
deriving ( Bounded -- ^ @since 4.9.0.0
, Eq -- ^ @since 4.9.0.0
, Ord -- ^ @since 4.9.0.0
, Show -- ^ @since 4.9.0.0
, Read -- ^ @since 4.9.0.0
, Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
)
-- | @since 4.9.0.0
instance Enum a => Enum (Last a) where
......@@ -371,7 +408,15 @@ instance MonadFix Last where
-- __NOTE__: This is not needed anymore since 'Semigroup' became a superclass of
-- 'Monoid' in /base-4.11/ and this newtype be deprecated at some point in the future.
newtype WrappedMonoid m = WrapMonoid { unwrapMonoid :: m }
deriving (Bounded, Eq, Ord, Show, Read, Data, Generic, Generic1)
deriving ( Bounded -- ^ @since 4.9.0.0
, Eq -- ^ @since 4.9.0.0
, Ord -- ^ @since 4.9.0.0
, Show -- ^ @since 4.9.0.0
, Read -- ^ @since 4.9.0.0
, Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
)
-- | @since 4.9.0.0
instance Monoid m => Semigroup (WrappedMonoid m) where
......@@ -412,7 +457,14 @@ mtimesDefault n x
-- Ideally, this type would not exist at all and we would just fix the
-- 'Monoid' instance of 'Maybe'
newtype Option a = Option { getOption :: Maybe a }
deriving (Eq, Ord, Show, Read, Data, Generic, Generic1)
deriving ( Eq -- ^ @since 4.9.0.0
, Ord -- ^ @since 4.9.0.0
, Show -- ^ @since 4.9.0.0
, Read -- ^ @since 4.9.0.0
, Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
, Generic1 -- ^ @since 4.9.0.0
)
-- | @since 4.9.0.0
instance Functor Option where
......
......@@ -108,7 +108,14 @@ stimesList n x
-- >>> getDual (mappend (Dual "Hello") (Dual "World"))
-- "WorldHello"
newtype Dual a = Dual { getDual :: a }
deriving (Eq, Ord, Read, Show, Bounded, Generic, Generic1)
deriving ( Eq -- ^ @since 2.01
, Ord -- ^ @since 2.01
, Read -- ^ @since 2.01
, Show -- ^ @since 2.01
, Bounded -- ^ @since 2.01
, Generic -- ^ @since 4.7.0.0
, Generic1 -- ^ @since 4.7.0.0
)
-- | @since 4.9.0.0
instance Semigroup a => Semigroup (Dual a) where
......@@ -138,7 +145,8 @@ instance Monad Dual where
-- >>> appEndo computation "Haskell"
-- "Hello, Haskell!"
newtype Endo a = Endo { appEndo :: a -> a }
deriving (Generic)
deriving ( Generic -- ^ @since 4.7.0.0
)
-- | @since 4.9.0.0
instance Semigroup (Endo a) where
......@@ -157,7 +165,13 @@ instance Monoid (Endo a) where
-- >>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8]))
-- False
newtype All = All { getAll :: Bool }
deriving (Eq, Ord, Read, Show, Bounded, Generic)
deriving ( Eq -- ^ @since 2.01
, Ord -- ^ @since 2.01
, Read -- ^ @since 2.01
, Show -- ^ @since 2.01
, Bounded -- ^ @since 2.01
, Generic -- ^ @since 4.7.0.0
)
-- | @since 4.9.0.0
instance Semigroup All where
......@@ -176,7 +190,13 @@ instance Monoid All where
-- >>> getAny (mconcat (map (\x -> Any (even x)) [2,4,6,7,8]))
-- True
newtype Any = Any { getAny :: Bool }
deriving (Eq, Ord, Read, Show, Bounded, Generic)
deriving ( Eq -- ^ @since 2.01
, Ord -- ^ @since 2.01
, Read -- ^ @since 2.01
, Show -- ^ @since 2.01
, Bounded -- ^ @since 2.01
, Generic -- ^ @since 4.7.0.0
)
-- | @since 4.9.0.0
instance Semigroup Any where
......@@ -192,7 +212,15 @@ instance Monoid Any where
-- >>> getSum (Sum 1 <> Sum 2 <> mempty)
-- 3
newtype Sum a = Sum { getSum :: a }
deriving (Eq, Ord, Read, Show, Bounded, Generic, Generic1, Num)
deriving ( Eq -- ^ @since 2.01
, Ord -- ^ @since 2.01
, Read -- ^ @since 2.01
, Show -- ^ @since 2.01
, Bounded -- ^ @since 2.01
, Generic -- ^ @since 4.7.0.0
, Generic1 -- ^ @since 4.7.0.0
, Num -- ^ @since 4.7.0.0
)
-- | @since 4.9.0.0
instance Num a => Semigroup (Sum a) where
......@@ -221,7 +249,15 @@ instance Monad Sum where
-- >>> getProduct (Product 3 <> Product 4 <> mempty)
-- 12
newtype Product a = Product { getProduct :: a }
deriving (Eq, Ord, Read, Show, Bounded, Generic, Generic1, Num)
deriving ( Eq -- ^ @since 2.01
, Ord -- ^ @since 2.01
, Read -- ^ @since 2.01
, Show -- ^ @since 2.01
, Bounded -- ^ @since 2.01
, Generic -- ^ @since 4.7.0.0
, Generic1 -- ^ @since 4.7.0.0
, Num -- ^ @since 4.7.0.0
)
-- | @since 4.9.0.0
instance Num a => Semigroup (Product a) where
......@@ -251,8 +287,20 @@ instance Monad Product where
--
-- @since 4.8.0.0
newtype Alt f a = Alt {getAlt :: f a}
deriving (Generic, Generic1, Read, Show, Eq, Ord, Num, Enum,
Monad, MonadPlus, Applicative, Alternative, Functor)
deriving ( Generic -- ^ @since 4.8.0.0
, Generic1 -- ^ @since 4.8.0.0
, Read -- ^ @since 4.8.0.0
, Show -- ^ @since 4.8.0.0
, Eq -- ^ @since 4.8.0.0
, Ord -- ^ @since 4.8.0.0
, Num -- ^ @since 4.8.0.0
, Enum -- ^ @since 4.8.0.0
, Monad -- ^ @since 4.8.0.0
, MonadPlus -- ^ @since 4.8.0.0
, Applicative -- ^ @since 4.8.0.0
, Alternative -- ^ @since 4.8.0.0
, Functor -- ^ @since 4.8.0.0
)
-- | @since 4.9.0.0
instance Alternative f => Semigroup (Alt f a) where
......
......@@ -88,4 +88,6 @@ instance (a ~ Char) => IsString [a] where
-- | @since 4.9.0.0
deriving instance IsString a => IsString (Const a b)
-- | @since 4.9.0.0
deriving instance IsString a => IsString (Identity a)
......@@ -293,6 +293,7 @@ instance Traversable Last where
instance Traversable ZipList where
traverse f (ZipList x) = ZipList <$> traverse f x
-- | @since 4.9.0.0
deriving instance Traversable Identity
-- Instances for GHC.Generics
......@@ -307,19 +308,46 @@ instance Traversable U1 where
sequence _ = pure U1
{-# INLINE sequence #-}
-- | @since 4.9.0.0
deriving instance Traversable V1
-- | @since 4.9.0.0
deriving instance Traversable Par1
-- | @since 4.9.0.0
deriving instance Traversable f => Traversable (Rec1 f)
-- | @since 4.9.0.0
deriving instance Traversable (K1 i c)
-- | @since 4.9.0.0
deriving instance Traversable f => Traversable (M1 i c f)
-- | @since 4.9.0.0
deriving instance (Traversable f, Traversable g) => Traversable (f :+: g)
-- | @since 4.9.0.0
deriving instance (Traversable f, Traversable g) => Traversable (f :*: g)
-- | @since 4.9.0.0
deriving instance (Traversable f, Traversable g) => Traversable (f :.: g)
-- | @since 4.9.0.0
deriving instance Traversable UAddr
-- | @since 4.9.0.0
deriving instance Traversable UChar
-- | @since 4.9.0.0
deriving instance Traversable UDouble
-- | @since 4.9.0.0
deriving instance Traversable UFloat
-- | @since 4.9.0.0
deriving instance Traversable UInt
-- | @since 4.9.0.0
deriving instance Traversable UWord
-- general functions
......
......@@ -76,8 +76,13 @@ trans Coercion Coercion = Coercion
repr :: (a Eq.:~: b) -> Coercion a b
repr Eq.Refl = Coercion
-- | @since 4.7.0.0
deriving instance Eq (Coercion a b)
-- | @since 4.7.0.0
deriving instance Show (Coercion a b)
-- | @since 4.7.0.0
deriving instance Ord (Coercion a b)
-- | @since 4.7.0.0
......
......@@ -120,8 +120,13 @@ inner Refl = Refl
outer :: (f a :~: g b) -> (f :~: g)
outer Refl = Refl
-- | @since 4.7.0.0
deriving instance Eq (a :~: b)
-- | @since 4.7.0.0
deriving instance Show (a :~: b)
-- | @since 4.7.0.0
deriving instance Ord (a :~: b)
-- | @since 4.7.0.0
......
......@@ -94,7 +94,10 @@ data Version =
-- The interpretation of the list of tags is entirely dependent
-- on the entity that this version applies to.
}
deriving (Read,Show,Generic)
deriving ( Read -- ^ @since 2.01
, Show -- ^ @since 2.01
, Generic -- ^ @since 4.9.0.0
)
{-# DEPRECATED versionTags "See GHC ticket #2496" #-}
-- TODO. Remove all references to versionTags in GHC 8.0 release.
......