summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorSimon Jakobi <simon.jakobi@gmail.com>2018-10-23 16:29:13 +0200
committerBen Gamari <ben@smart-cactus.org>2018-11-02 14:33:55 -0400
commitc088137949bd69ee463c08a0d221517bc5108945 (patch)
tree9bd6e788a98160b02825d57c2d8d9c134c406e9d /libraries
parentc3c552d6ef4bdbbd7e2928dac864ff6009b36311 (diff)
downloadhaskell-c088137949bd69ee463c08a0d221517bc5108945.tar.gz
base: Misc haddock fixes
(cherry picked from commit ee545ff44e0ba9a165de40807548c75bf181dda3)
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/GHC/Float.hs4
-rw-r--r--libraries/base/GHC/Num.hs14
-rw-r--r--libraries/base/GHC/Real.hs10
3 files changed, 14 insertions, 14 deletions
diff --git a/libraries/base/GHC/Float.hs b/libraries/base/GHC/Float.hs
index 9296978bd4..3ac9408442 100644
--- a/libraries/base/GHC/Float.hs
+++ b/libraries/base/GHC/Float.hs
@@ -65,11 +65,11 @@ infixr 8 **
-- | Trigonometric and hyperbolic functions and related functions.
--
--- The Haskell Report defines no laws for 'Floating'. However, '(+)', '(*)'
+-- The Haskell Report defines no laws for 'Floating'. However, @('+')@, @('*')@
-- and 'exp' are customarily expected to define an exponential field and have
-- the following properties:
--
--- * @exp (a + b)@ = @exp a * exp b
+-- * @exp (a + b)@ = @exp a * exp b@
-- * @exp (fromInteger 0)@ = @fromInteger 1@
class (Fractional a) => Floating a where
pi :: a
diff --git a/libraries/base/GHC/Num.hs b/libraries/base/GHC/Num.hs
index 1fa63fbb00..aed11a354b 100644
--- a/libraries/base/GHC/Num.hs
+++ b/libraries/base/GHC/Num.hs
@@ -36,17 +36,17 @@ default () -- Double isn't available yet,
-- | Basic numeric class.
--
--- The Haskell Report defines no laws for 'Num'. However, '(+)' and '(*)' are
+-- The Haskell Report defines no laws for 'Num'. However, @('+')@ and @('*')@ are
-- customarily expected to define a ring and have the following properties:
--
--- [__Associativity of (+)__]: @(x + y) + z@ = @x + (y + z)@
--- [__Commutativity of (+)__]: @x + y@ = @y + x@
--- [__@fromInteger 0@ is the additive identity__]: @x + fromInteger 0@ = @x@
+-- [__Associativity of @('+')@__]: @(x + y) + z@ = @x + (y + z)@
+-- [__Commutativity of @('+')@__]: @x + y@ = @y + x@
+-- [__@'fromInteger' 0@ is the additive identity__]: @x + fromInteger 0@ = @x@
-- [__'negate' gives the additive inverse__]: @x + negate x@ = @fromInteger 0@
--- [__Associativity of (*)__]: @(x * y) * z@ = @x * (y * z)@
--- [__@fromInteger 1@ is the multiplicative identity__]:
+-- [__Associativity of @('*')@__]: @(x * y) * z@ = @x * (y * z)@
+-- [__@'fromInteger' 1@ is the multiplicative identity__]:
-- @x * fromInteger 1@ = @x@ and @fromInteger 1 * x@ = @x@
--- [__Distributivity of (*) with respect to (+)__]:
+-- [__Distributivity of @('*')@ with respect to @('+')@__]:
-- @a * (b + c)@ = @(a * b) + (a * c)@ and @(b + c) * a@ = @(b * a) + (c * a)@
--
-- Note that it /isn't/ customarily expected that a type instance of both 'Num'
diff --git a/libraries/base/GHC/Real.hs b/libraries/base/GHC/Real.hs
index c96959f55b..da64c8b00d 100644
--- a/libraries/base/GHC/Real.hs
+++ b/libraries/base/GHC/Real.hs
@@ -138,7 +138,7 @@ class (Num a, Ord a) => Real a where
--
-- The Haskell Report defines no laws for 'Integral'. However, 'Integral'
-- instances are customarily expected to define a Euclidean domain and have the
--- following properties for the 'div'/'mod' and 'quot'/'rem' pairs, given
+-- following properties for the `div`\/`mod` and `quot`\/`rem` pairs, given
-- suitable Euclidean functions @f@ and @g@:
--
-- * @x@ = @y * quot x y + rem x y@ with @rem x y@ = @fromInteger 0@ or
@@ -182,8 +182,8 @@ class (Real a, Enum a) => Integral a where
-- | Fractional numbers, supporting real division.
--
--- The Haskell Report defines no laws for 'Fractional'. However, '(+)' and
--- '(*)' are customarily expected to define a division ring and have the
+-- The Haskell Report defines no laws for 'Fractional'. However, @('+')@ and
+-- @('*')@ are customarily expected to define a division ring and have the
-- following properties:
--
-- [__'recip' gives the multiplicative inverse__]:
@@ -194,9 +194,9 @@ class (Real a, Enum a) => Integral a where
class (Num a) => Fractional a where
{-# MINIMAL fromRational, (recip | (/)) #-}
- -- | fractional division
+ -- | Fractional division.
(/) :: a -> a -> a
- -- | reciprocal fraction
+ -- | Reciprocal fraction.
recip :: a -> a
-- | Conversion from a 'Rational' (that is @'Ratio' 'Integer'@).
-- A floating literal stands for an application of 'fromRational'