# HG changeset patch
# User Bryan O'Sullivan
# Date 1378836624 25200
# Node ID eb5f545f6b106ef334d4d77a36b15c6264a26b2e
# Parent f8507d5342571853ed4f2e041dc2a77c9f0e816b
Fix various English language issues
diff --git a/System/Random/MWC.hs b/System/Random/MWC.hs
--- a/System/Random/MWC.hs
+++ b/System/Random/MWC.hs
@@ -515,8 +515,8 @@
-- This is workaround for bug #25.
--
--- GHC-7.6 have bug (#8072) which results in calculation of wrongs
--- number of buckets in function `uniformRange'. Consequently unformR
+-- GHC-7.6 has a bug (#8072) which results in calculation of wrong
+-- number of buckets in function `uniformRange'. Consequently uniformR
-- generates values in wrong range.
--
-- Bug only affects 32-bit systems and Int/Word data types. Word32
diff --git a/System/Random/MWC/Distributions.hs b/System/Random/MWC/Distributions.hs
--- a/System/Random/MWC/Distributions.hs
+++ b/System/Random/MWC/Distributions.hs
@@ -10,7 +10,7 @@
--
-- Pseudo-random number generation for non-uniform distributions.
-module System.Random.MWC.Distributions
+module System.Random.MWC.Distributions
(
-- * Variates: non-uniformly distributed values
normal
@@ -168,8 +168,8 @@
| otherwise = do x <- gamma (0.5 * fromIntegral n) 1 gen
return $! 2 * x
--- | Random variate generator for geometrical distribution for number
--- of failures before success. Have support [0..]
+-- | Random variate generator for the geometric distribution,
+-- computing the number of failures before success. Supports [0..].
geometric0 :: PrimMonad m
=> Double -- ^ /p/ success probability lies in (0,1]
-> Gen (PrimState m) -- ^ Generator
@@ -181,10 +181,10 @@
-- FIXME: We want to use log1p here but it will
-- introduce dependency on math-functions.
return $! floor $ log q / log (1 - p)
- | otherwise = pkgError "geometrical" "probability out of [0,1] range"
+ | otherwise = pkgError "geometric0" "probability out of [0,1] range"
--- | Random variate generator for geometrical distribution for number
--- of trials. Have support [1..] it's just 'geometrical0' shifted by 1.
+-- | Random variate generator for geometric distribution for number of
+-- trials. Supports [1..] (i.e. just 'geometric0' shifted by 1).
geometric1 :: PrimMonad m
=> Double -- ^ /p/ success probability lies in (0,1]
-> Gen (PrimState m) -- ^ Generator