summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <michael@orlitzky.com>2014-10-31 14:34:56 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2014-10-31 14:38:06 +0100
commitd3a7126ff749d1eff31128ace31bcea26c4eadaa (patch)
treef3f278e0283315cd9460841a19b728a485540e38
parentf12be5b99a993989165c19a0c3c958e6a6034a4c (diff)
downloadhaskell-d3a7126ff749d1eff31128ace31bcea26c4eadaa.tar.gz
Update doctest example style in `Data.Bool`
hvr made some suggestions in D352 and D371, this fixes them in the already-applied patch for Data/Bool.hs as well for consistency. Reviewed By: austin, hvr Differential Revision: https://phabricator.haskell.org/D379
-rw-r--r--libraries/base/Data/Bool.hs40
1 files changed, 20 insertions, 20 deletions
diff --git a/libraries/base/Data/Bool.hs b/libraries/base/Data/Bool.hs
index 15371982ea..9f1bef6e7c 100644
--- a/libraries/base/Data/Bool.hs
+++ b/libraries/base/Data/Bool.hs
@@ -28,33 +28,33 @@ module Data.Bool (
import GHC.Base
--- | Case analysis for the 'Bool' type. @bool x y p@ evaluates to @x@
--- when @p@ is @False@, and evaluates to @y@ when @p@ is @True@.
+-- | Case analysis for the 'Bool' type. @'bool' x y p@ evaluates to @x@
+-- when @p@ is 'False', and evaluates to @y@ when @p@ is 'True'.
--
--- This is equivalent to @if p then y else x@; that is, one can
--- think of it as an if-then-else construct with its arguments
--- reordered.
+-- This is equivalent to @if p then y else x@; that is, one can
+-- think of it as an if-then-else construct with its arguments
+-- reordered.
--
--- /Since: 4.7.0.0/
+-- /Since: 4.7.0.0/
--
--- ==== __Examples__
+-- ==== __Examples__
--
--- Basic usage:
+-- Basic usage:
--
--- >>> bool "foo" "bar" True
--- "bar"
--- >>> bool "foo" "bar" False
--- "foo"
+-- >>> bool "foo" "bar" True
+-- "bar"
+-- >>> bool "foo" "bar" False
+-- "foo"
--
--- Confirm that @bool x y p@ and @if p then y else x@ are
--- equivalent:
+-- Confirm that @'bool' x y p@ and @if p then y else x@ are
+-- equivalent:
--
--- >>> let p = True; x = "bar"; y = "foo"
--- >>> bool x y p == if p then y else x
--- True
--- >>> let p = False
--- >>> bool x y p == if p then y else x
--- True
+-- >>> let p = True; x = "bar"; y = "foo"
+-- >>> bool x y p == if p then y else x
+-- True
+-- >>> let p = False
+-- >>> bool x y p == if p then y else x
+-- True
--
bool :: a -> a -> Bool -> a
bool f _ False = f