From c0d9f51090b404dfc947eb39d67cb5e4c603b18c Mon Sep 17 00:00:00 2001 From: tocic Date: Sun, 23 Apr 2023 12:18:40 +0300 Subject: Fix doc typos in libraries/base --- libraries/base/Control/Concurrent/MVar.hs | 2 +- libraries/base/Control/Exception/Base.hs | 2 +- libraries/base/Control/Monad.hs | 4 ++-- libraries/base/Data/Complex.hs | 4 ++-- libraries/base/Data/List.hs | 2 +- libraries/base/Data/OldList.hs | 2 +- libraries/base/Text/Read/Lex.hs | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libraries/base/Control/Concurrent/MVar.hs b/libraries/base/Control/Concurrent/MVar.hs index f78ad82d79..999c97f1b5 100644 --- a/libraries/base/Control/Concurrent/MVar.hs +++ b/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. -- diff --git a/libraries/base/Control/Exception/Base.hs b/libraries/base/Control/Exception/Base.hs index 06ae041624..7cb720e885 100644 --- a/libraries/base/Control/Exception/Base.hs +++ b/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: -- diff --git a/libraries/base/Control/Monad.hs b/libraries/base/Control/Monad.hs index d2d0e29e43..b3dee03703 100644 --- a/libraries/base/Control/Monad.hs +++ b/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: diff --git a/libraries/base/Data/Complex.hs b/libraries/base/Data/Complex.hs index 734b2fabf4..4d9d2d7981 100644 --- a/libraries/base/Data/Complex.hs +++ b/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 diff --git a/libraries/base/Data/List.hs b/libraries/base/Data/List.hs index a81c743357..6f1e26aa68 100644 --- a/libraries/base/Data/List.hs +++ b/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@. , (!?) diff --git a/libraries/base/Data/OldList.hs b/libraries/base/Data/OldList.hs index 8f00fd754a..cda19cb650 100644 --- a/libraries/base/Data/OldList.hs +++ b/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@. , (!?) diff --git a/libraries/base/Text/Read/Lex.hs b/libraries/base/Text/Read/Lex.hs index 3b8f9ba399..03d22228bb 100644 --- a/libraries/base/Text/Read/Lex.hs +++ b/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 -- cgit v1.2.1