diff options
author | Josh Meredith <joshmeredith2008@gmail.com> | 2019-12-04 23:39:28 +1100 |
---|---|---|
committer | Josh Meredith <joshmeredith2008@gmail.com> | 2019-12-04 23:39:28 +1100 |
commit | a8435165b84c32fd2ebdd1281dd6ee077e07ad5a (patch) | |
tree | 791936d014aeaa26174c2dcbef34c14f3329dd04 /libraries/base/Data | |
parent | 7805441b4d5e22eb63a501e1e40383d10380dc92 (diff) | |
parent | f03a41d4bf9418ee028ecb51654c928b2da74edd (diff) | |
download | haskell-wip/binary-readerT.tar.gz |
Merge branch 'master' into wip/binary-readerTwip/binary-readerT
Diffstat (limited to 'libraries/base/Data')
-rw-r--r-- | libraries/base/Data/Data.hs | 2 | ||||
-rw-r--r-- | libraries/base/Data/IORef.hs | 2 | ||||
-rw-r--r-- | libraries/base/Data/Maybe.hs | 2 | ||||
-rw-r--r-- | libraries/base/Data/STRef.hs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/libraries/base/Data/Data.hs b/libraries/base/Data/Data.hs index 8e285ac07c..a8dfa61115 100644 --- a/libraries/base/Data/Data.hs +++ b/libraries/base/Data/Data.hs @@ -194,7 +194,7 @@ immediate subterms. In the definition of gmapQr, extra effort is needed. We use a higher-order accumulation trick to mediate between left-associative constructor application vs. right-associative binary operation (e.g., @(:)@). When the query is meant to compute a value -of type @r@, then the result type withing generic folding is @r -> r@. +of type @r@, then the result type within generic folding is @r -> r@. So the result of folding is a function to which we finally pass the right unit. diff --git a/libraries/base/Data/IORef.hs b/libraries/base/Data/IORef.hs index 44769268cf..2886e594d3 100644 --- a/libraries/base/Data/IORef.hs +++ b/libraries/base/Data/IORef.hs @@ -49,7 +49,7 @@ mkWeakIORef r@(IORef (STRef r#)) (IO finalizer) = IO $ \s -> -- |Mutate the contents of an 'IORef'. -- -- Be warned that 'modifyIORef' does not apply the function strictly. This --- means if the program calls 'modifyIORef' many times, but seldomly uses the +-- means if the program calls 'modifyIORef' many times, but seldom uses the -- value, thunks will pile up in memory resulting in a space leak. This is a -- common mistake made when using an IORef as a counter. For example, the -- following will likely produce a stack overflow: diff --git a/libraries/base/Data/Maybe.hs b/libraries/base/Data/Maybe.hs index 2bd0b1e00e..f646faeb9a 100644 --- a/libraries/base/Data/Maybe.hs +++ b/libraries/base/Data/Maybe.hs @@ -148,7 +148,7 @@ fromJust :: HasCallStack => Maybe a -> a fromJust Nothing = error "Maybe.fromJust: Nothing" -- yuck fromJust (Just x) = x --- | The 'fromMaybe' function takes a default value and and 'Maybe' +-- | The 'fromMaybe' function takes a default value and a 'Maybe' -- value. If the 'Maybe' is 'Nothing', it returns the default values; -- otherwise, it returns the value contained in the 'Maybe'. -- diff --git a/libraries/base/Data/STRef.hs b/libraries/base/Data/STRef.hs index 5b8c6b7901..3636e6a8a6 100644 --- a/libraries/base/Data/STRef.hs +++ b/libraries/base/Data/STRef.hs @@ -40,7 +40,7 @@ import GHC.STRef -- "Hello, world!" -- -- Be warned that 'modifySTRef' does not apply the function strictly. This --- means if the program calls 'modifySTRef' many times, but seldomly uses the +-- means if the program calls 'modifySTRef' many times, but seldom uses the -- value, thunks will pile up in memory resulting in a space leak. This is a -- common mistake made when using an 'STRef' as a counter. For example, the -- following will leak memory and may produce a stack overflow: |