[commit: ghc] master: Update doctest example style in `Data.Bool` (d3a7126)

git at git.haskell.org git at git.haskell.org
Fri Oct 31 13:38:24 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d3a7126ff749d1eff31128ace31bcea26c4eadaa/ghc

>---------------------------------------------------------------

commit d3a7126ff749d1eff31128ace31bcea26c4eadaa
Author: Michael Orlitzky <michael at orlitzky.com>
Date:   Fri Oct 31 14:34:56 2014 +0100

    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


>---------------------------------------------------------------

d3a7126ff749d1eff31128ace31bcea26c4eadaa
 libraries/base/Data/Bool.hs | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/libraries/base/Data/Bool.hs b/libraries/base/Data/Bool.hs
index 1537198..9f1bef6 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 at .
+-- | 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



More information about the ghc-commits mailing list