diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-10-30 20:56:33 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-10-31 19:03:10 -0400 |
commit | 73d6e508e6ce0b66bd082419effc0010b1dc9668 (patch) | |
tree | 552d0bc269dfc719e1083293cde6cc0d62c011bd | |
parent | a9743eb7e9a7bc6b406eb5e3beb69c00f0e90b94 (diff) | |
download | haskell-73d6e508e6ce0b66bd082419effc0010b1dc9668.tar.gz |
base: Various haddock fixes
Just a few things I found while looking at #17383.
-rw-r--r-- | libraries/base/Data/Fixed.hs | 6 | ||||
-rw-r--r-- | libraries/base/GHC/Real.hs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libraries/base/Data/Fixed.hs b/libraries/base/Data/Fixed.hs index e99efea256..232175a1ab 100644 --- a/libraries/base/Data/Fixed.hs +++ b/libraries/base/Data/Fixed.hs @@ -46,16 +46,16 @@ import Text.Read.Lex default () -- avoid any defaulting shenanigans --- | generalisation of 'div' to any instance of 'Real' +-- | Generalisation of 'div' to any instance of 'Real' div' :: (Real a,Integral b) => a -> a -> b div' n d = floor ((toRational n) / (toRational d)) --- | generalisation of 'divMod' to any instance of 'Real' +-- | Generalisation of 'divMod' to any instance of 'Real' divMod' :: (Real a,Integral b) => a -> a -> (b,a) divMod' n d = (f,n - (fromIntegral f) * d) where f = div' n d --- | generalisation of 'mod' to any instance of 'Real' +-- | Generalisation of 'mod' to any instance of 'Real' mod' :: (Real a) => a -> a -> a mod' n d = n - (fromInteger f) * d where f = div' n d diff --git a/libraries/base/GHC/Real.hs b/libraries/base/GHC/Real.hs index 8a47720fe1..10d8a54504 100644 --- a/libraries/base/GHC/Real.hs +++ b/libraries/base/GHC/Real.hs @@ -134,7 +134,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 @@ -142,7 +142,7 @@ class (Num a, Ord a) => Real a where -- * @x@ = @y * div x y + mod x y@ with @mod x y@ = @fromInteger 0@ or -- @f (mod x y)@ < @f y@ -- --- An example of a suitable Euclidean function, for `Integer`'s instance, is +-- An example of a suitable Euclidean function, for 'Integer'\'s instance, is -- 'abs'. class (Real a, Enum a) => Integral a where -- | integer division truncated toward zero |