Skip to content

Commit b2adee4

Browse files
committed
Add docstring to check
1 parent f97b027 commit b2adee4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Control/Monad/STM.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ instance Alternative STM where
7878
(<|>) = orElse
7979
#endif
8080

81+
-- | Check that the boolean condition is true and, if not, 'retry'.
82+
--
83+
-- In other words, @check b = unless b retry@.
84+
--
85+
-- @since 2.1.1
8186
check :: Bool -> STM ()
8287
check b = if b then return () else retry
8388
#endif

0 commit comments

Comments
 (0)