[Git][ghc/ghc][master] Fix doc typos in libraries/base
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sun Apr 23 17:40:25 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
97a6f7bc by tocic at 2023-04-23T13:40:08-04:00
Fix doc typos in libraries/base
- - - - -
7 changed files:
- libraries/base/Control/Concurrent/MVar.hs
- libraries/base/Control/Exception/Base.hs
- libraries/base/Control/Monad.hs
- libraries/base/Data/Complex.hs
- libraries/base/Data/List.hs
- libraries/base/Data/OldList.hs
- libraries/base/Text/Read/Lex.hs
Changes:
=====================================
libraries/base/Control/Concurrent/MVar.hs
=====================================
@@ -37,7 +37,7 @@
-- than 'GHC.Conc.STM'. They are appropriate for building synchronization
-- primitives and performing simple interthread communication; however
-- they are very simple and susceptible to race conditions, deadlocks or
--- uncaught exceptions. Do not use them if you need perform larger
+-- uncaught exceptions. Do not use them if you need to perform larger
-- atomic operations such as reading from multiple variables: use 'GHC.Conc.STM'
-- instead.
--
=====================================
libraries/base/Control/Exception/Base.hs
=====================================
@@ -223,7 +223,7 @@ onException io what = io `catch` \e -> do _ <- what
-- handle. Similarly, closing a socket (from \"network\" package) is also
-- uninterruptible under similar conditions. An example of an interruptible
-- action is 'killThread'. Completion of interruptible release actions can be
--- ensured by wrapping them in in 'uninterruptibleMask_', but this risks making
+-- ensured by wrapping them in 'uninterruptibleMask_', but this risks making
-- the program non-responsive to @Control-C@, or timeouts. Another option is to
-- run the release action asynchronously in its own thread:
--
=====================================
libraries/base/Control/Monad.hs
=====================================
@@ -101,11 +101,11 @@ import GHC.Num ( (-) )
--
-- ==== __Examples__
--
--- Common uses of 'guard' include conditionally signaling an error in
+-- Common uses of 'guard' include conditionally signalling an error in
-- an error monad and conditionally rejecting the current choice in an
-- 'Alternative'-based parser.
--
--- As an example of signaling an error in the error monad 'Maybe',
+-- As an example of signalling an error in the error monad 'Maybe',
-- consider a safe division function @safeDiv x y@ that returns
-- 'Nothing' when the denominator @y@ is zero and @'Just' (x \`div\`
-- y)@ otherwise. For example:
=====================================
libraries/base/Data/Complex.hs
=====================================
@@ -104,13 +104,13 @@ cis theta = cos theta :+ sin theta
-- | The function 'polar' takes a complex number and
-- returns a (magnitude, phase) pair in canonical form:
--- the magnitude is nonnegative, and the phase in the range @(-'pi', 'pi']@;
+-- the magnitude is non-negative, and the phase in the range @(-'pi', 'pi']@;
-- if the magnitude is zero, then so is the phase.
{-# SPECIALISE polar :: Complex Double -> (Double,Double) #-}
polar :: (RealFloat a) => Complex a -> (a,a)
polar z = (magnitude z, phase z)
--- | The nonnegative magnitude of a complex number.
+-- | The non-negative magnitude of a complex number.
{-# SPECIALISE magnitude :: Complex Double -> Double #-}
magnitude :: (RealFloat a) => Complex a -> a
magnitude (x:+y) = scaleFloat k
=====================================
libraries/base/Data/List.hs
=====================================
@@ -124,7 +124,7 @@ module Data.List
, partition
-- * Indexing lists
- -- | These functions treat a list @xs@ as a indexed collection,
+ -- | These functions treat a list @xs@ as an indexed collection,
-- with indices ranging from 0 to @'length' xs - 1 at .
, (!?)
=====================================
libraries/base/Data/OldList.hs
=====================================
@@ -124,7 +124,7 @@ module Data.OldList
, partition
-- * Indexing lists
- -- | These functions treat a list @xs@ as a indexed collection,
+ -- | These functions treat a list @xs@ as an indexed collection,
-- with indices ranging from 0 to @'length' xs - 1 at .
, (!?)
=====================================
libraries/base/Text/Read/Lex.hs
=====================================
@@ -112,7 +112,7 @@ numberToFixed _ _ = Nothing
-- space problems in #5688
-- Ways this is conservative:
-- * the floatRange is in base 2, but we pretend it is in base 10
--- * we pad the floateRange a bit, just in case it is very small
+-- * we pad the floatRange a bit, just in case it is very small
-- and we would otherwise hit an edge case
-- * We only worry about numbers that have an exponent. If they don't
-- have an exponent then the Rational won't be much larger than the
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97a6f7bc5e2408d99c3ecdef85b7cc66ff994de3
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97a6f7bc5e2408d99c3ecdef85b7cc66ff994de3
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230423/de46ce01/attachment-0001.html>
More information about the ghc-commits
mailing list