diff options
author | Seraphime Kirkovski <kirkseraph@gmail.com> | 2016-06-06 12:29:38 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-06-06 15:07:18 +0200 |
commit | a90085bd45239fffd65c01c24752a9bbcef346f1 (patch) | |
tree | 41a85ba36720d8fba0a3296ea7a844dd9fc0042a /libraries/base/Data/Proxy.hs | |
parent | 48e9a1f5521fa3185510d144dd28a87e452ce134 (diff) | |
download | haskell-a90085bd45239fffd65c01c24752a9bbcef346f1.tar.gz |
Add @since annotations to base instances
Add @since annotations to instances in `base`.
Test Plan:
* ./validate # some commets shouldn't break the build
* review the annotations for absurdities.
Reviewers: ekmett, goldfire, RyanGlScott, austin, hvr, bgamari
Reviewed By: RyanGlScott, hvr, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2277
GHC Trac Issues: #11767
Diffstat (limited to 'libraries/base/Data/Proxy.hs')
-rw-r--r-- | libraries/base/Data/Proxy.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libraries/base/Data/Proxy.hs b/libraries/base/Data/Proxy.hs index a11155844c..2f619b241f 100644 --- a/libraries/base/Data/Proxy.hs +++ b/libraries/base/Data/Proxy.hs @@ -39,18 +39,23 @@ data KProxy (t :: *) = KProxy -- interchangeably, so all of these instances are hand-written to be -- lazy in Proxy arguments. +-- | @since 4.7.0.0 instance Eq (Proxy s) where _ == _ = True +-- | @since 4.7.0.0 instance Ord (Proxy s) where compare _ _ = EQ +-- | @since 4.7.0.0 instance Show (Proxy s) where showsPrec _ _ = showString "Proxy" +-- | @since 4.7.0.0 instance Read (Proxy s) where readsPrec d = readParen (d > 10) (\r -> [(Proxy, s) | ("Proxy",s) <- lex r ]) +-- | @since 4.7.0.0 instance Enum (Proxy s) where succ _ = errorWithoutStackTrace "Proxy.succ" pred _ = errorWithoutStackTrace "Proxy.pred" @@ -62,6 +67,7 @@ instance Enum (Proxy s) where enumFromThenTo _ _ _ = [Proxy] enumFromTo _ _ = [Proxy] +-- | @since 4.7.0.0 instance Ix (Proxy s) where range _ = [Proxy] index _ _ = 0 @@ -70,31 +76,37 @@ instance Ix (Proxy s) where unsafeIndex _ _ = 0 unsafeRangeSize _ = 1 +-- | @since 4.7.0.0 instance Monoid (Proxy s) where mempty = Proxy mappend _ _ = Proxy mconcat _ = Proxy +-- | @since 4.7.0.0 instance Functor Proxy where fmap _ _ = Proxy {-# INLINE fmap #-} +-- | @since 4.7.0.0 instance Applicative Proxy where pure _ = Proxy {-# INLINE pure #-} _ <*> _ = Proxy {-# INLINE (<*>) #-} +-- | @since 4.9.0.0 instance Alternative Proxy where empty = Proxy {-# INLINE empty #-} _ <|> _ = Proxy {-# INLINE (<|>) #-} +-- | @since 4.7.0.0 instance Monad Proxy where _ >>= _ = Proxy {-# INLINE (>>=) #-} +-- | @since 4.9.0.0 instance MonadPlus Proxy -- | 'asProxyTypeOf' is a type-restricted version of 'const'. |