[commit: ghc] master: Various documentation improvements (df449e1)

git at git.haskell.org git at git.haskell.org
Wed Feb 14 22:07:14 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/df449e1744d59eef7f41e09196629bc01815e984/ghc

>---------------------------------------------------------------

commit df449e1744d59eef7f41e09196629bc01815e984
Author: Sergey Vinokurov <serg.foo at gmail.com>
Date:   Wed Feb 7 21:10:17 2018 +0000

    Various documentation improvements
    
     * Fix missing code example in changelog for 8.4.1
    
     * List 'setEnv' as opposite of 'getEnv'
    
       It seems best to direct users to use 'System.Environment.setEnv'
       rather than 'System.Posix.Env.putEnv'. This is due to 'setEnv' being
       located in the same module as 'getEnv' and my virtue of working on
       Windows platform, whereas 'putEnv' does not have that quality because
       it's part of the 'unix' package.
    
     * Reflect in docs the fact that 'readMVar' is not a composition of
       'takeMVVar' and 'putMVar' any more


>---------------------------------------------------------------

df449e1744d59eef7f41e09196629bc01815e984
 docs/users_guide/8.4.1-notes.rst          | 2 +-
 libraries/base/Control/Concurrent/MVar.hs | 4 ++--
 libraries/base/GHC/MVar.hs                | 2 +-
 libraries/base/System/Environment.hs      | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/docs/users_guide/8.4.1-notes.rst b/docs/users_guide/8.4.1-notes.rst
index 963e8d9..305f962 100644
--- a/docs/users_guide/8.4.1-notes.rst
+++ b/docs/users_guide/8.4.1-notes.rst
@@ -182,7 +182,7 @@ Compiler
     ``error``: ::
 
       instance Show (Empty a) where
-        showsPrec = "Void showsPrec"
+        showsPrec = error "Void showsPrec"
 
     Now, they emit code that inspects the argument. That is, if the argument
     diverges, then showing it will also diverge: ::
diff --git a/libraries/base/Control/Concurrent/MVar.hs b/libraries/base/Control/Concurrent/MVar.hs
index 393fca8..fa99361 100644
--- a/libraries/base/Control/Concurrent/MVar.hs
+++ b/libraries/base/Control/Concurrent/MVar.hs
@@ -41,8 +41,8 @@
 -- atomic operations such as reading from multiple variables: use 'STM'
 -- instead.
 --
--- In particular, the "bigger" functions in this module ('readMVar',
--- 'swapMVar', 'withMVar', 'modifyMVar_' and 'modifyMVar') are simply
+-- In particular, the "bigger" functions in this module ('swapMVar',
+-- 'withMVar', 'modifyMVar_' and 'modifyMVar') are simply
 -- the composition of a 'takeMVar' followed by a 'putMVar' with
 -- exception safety.
 -- These only have atomicity guarantees if all other threads
diff --git a/libraries/base/GHC/MVar.hs b/libraries/base/GHC/MVar.hs
index f334ddb..aa59002 100644
--- a/libraries/base/GHC/MVar.hs
+++ b/libraries/base/GHC/MVar.hs
@@ -90,7 +90,7 @@ takeMVar :: MVar a -> IO a
 takeMVar (MVar mvar#) = IO $ \ s# -> takeMVar# mvar# s#
 
 -- |Atomically read the contents of an 'MVar'.  If the 'MVar' is
--- currently empty, 'readMVar' will wait until its full.
+-- currently empty, 'readMVar' will wait until it is full.
 -- 'readMVar' is guaranteed to receive the next 'putMVar'.
 --
 -- 'readMVar' is multiple-wakeup, so when multiple readers are
diff --git a/libraries/base/System/Environment.hs b/libraries/base/System/Environment.hs
index 343b772..5604ca2 100644
--- a/libraries/base/System/Environment.hs
+++ b/libraries/base/System/Environment.hs
@@ -123,8 +123,8 @@ basename f = go f f
 
 
 -- | Computation 'getEnv' @var@ returns the value
--- of the environment variable @var at . For the inverse, POSIX users
--- can use 'System.Posix.Env.putEnv'.
+-- of the environment variable @var at . For the inverse, the
+-- `System.Environment.setEnv` function can be used.
 --
 -- This computation may fail with:
 --



More information about the ghc-commits mailing list