summaryrefslogtreecommitdiff
path: root/libraries/base/Data/Either.hs
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2013-09-21 14:16:45 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2013-09-21 14:16:45 +0200
commit77f32dad3bef5b641a9d15f69ad2e0f058ade67a (patch)
treefa9f41552d5dde6ce6ac1700d4ed3c44b2aa2652 /libraries/base/Data/Either.hs
parent957511b3816ec58c02fd33d5d115f7f6eef2b6b8 (diff)
downloadhaskell-77f32dad3bef5b641a9d15f69ad2e0f058ade67a.tar.gz
Add Haddock `/Since: 4.7.0.0/` comments to new symbols
These annotations were added in such a way, that the line {{{ /Since: 4.7.0.0/ }}} represents the last paragraph of the Haddock comment. Maybe Haddock will have support for this meta-syntax at some point, and be able to inherited the since-version property to the children of an annotated symbol and display the since-version property in the rendered documentation only in cases when it's not visually obvious (for instance, when re-exporting documentation strings). Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Diffstat (limited to 'libraries/base/Data/Either.hs')
-rw-r--r--libraries/base/Data/Either.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/base/Data/Either.hs b/libraries/base/Data/Either.hs
index 5ed041dd31..b494e265fb 100644
--- a/libraries/base/Data/Either.hs
+++ b/libraries/base/Data/Either.hs
@@ -90,11 +90,15 @@ partitionEithers = foldr (either left right) ([],[])
right a ~(l, r) = (l, a:r)
-- | Return `True` if the given value is a `Left`-value, `False` otherwise.
+--
+-- /Since: 4.7.0.0/
isLeft :: Either a b -> Bool
isLeft (Left _) = True
isLeft (Right _) = False
-- | Return `True` if the given value is a `Right`-value, `False` otherwise.
+--
+-- /Since: 4.7.0.0/
isRight :: Either a b -> Bool
isRight (Left _) = False
isRight (Right _) = True