summaryrefslogtreecommitdiff
path: root/libraries/base/Control/Applicative.hs
diff options
context:
space:
mode:
authorChaitanya Koparkar <ckoparkar@gmail.com>2018-03-02 16:12:56 -0500
committerBen Gamari <ben@smart-cactus.org>2018-03-02 16:13:07 -0500
commit5c28ee88dd66617b0fd5dbe0d90142ce983a547e (patch)
tree8322c8ec668e4a3db7eeafe6ac11f113ea570094 /libraries/base/Control/Applicative.hs
parent6a7e159ce25b432824f8757e0c768f2b2e2754df (diff)
downloadhaskell-5c28ee88dd66617b0fd5dbe0d90142ce983a547e.tar.gz
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
Diffstat (limited to 'libraries/base/Control/Applicative.hs')
-rw-r--r--libraries/base/Control/Applicative.hs20
1 files changed, 16 insertions, 4 deletions
diff --git a/libraries/base/Control/Applicative.hs b/libraries/base/Control/Applicative.hs
index 3e531e5b15..5e2fc8ebe6 100644
--- a/libraries/base/Control/Applicative.hs
+++ b/libraries/base/Control/Applicative.hs
@@ -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
-- |