From 04d6433158d95658684cf419c4ba5725d2aa539e Mon Sep 17 00:00:00 2001 From: "syd@cs-syd.eu" Date: Wed, 2 Sep 2020 23:42:29 -0400 Subject: Update Lock.hs with more documentation to make sure that the Boolean return value is clear. [skip ci] --- libraries/base/GHC/IO/Handle/Lock.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/base/GHC/IO/Handle/Lock.hs b/libraries/base/GHC/IO/Handle/Lock.hs index 18319e1d29..919d680ff7 100644 --- a/libraries/base/GHC/IO/Handle/Lock.hs +++ b/libraries/base/GHC/IO/Handle/Lock.hs @@ -52,6 +52,8 @@ hLock h mode = void $ lockImpl h "hLock" mode True -- | Non-blocking version of 'hLock'. -- +-- Returns 'True' if taking the lock was successful and 'False' otherwise. +-- -- @since 4.10.0.0 hTryLock :: Handle -> LockMode -> IO Bool hTryLock h mode = lockImpl h "hTryLock" mode False -- cgit v1.2.1