Skip to content

Commit 43f544b

Browse files
committed
Added haddocs to castStrictTVar
1 parent 54e8aa1 commit 43f544b

File tree

1 file changed

+5
-0
lines changed
  • strict-stm/src/Control/Concurrent/Class/MonadSTM/Strict

1 file changed

+5
-0
lines changed

strict-stm/src/Control/Concurrent/Class/MonadSTM/Strict/TVar.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ traceTVarIO :: MonadTraceSTM m
5656
-> m ()
5757
traceTVarIO StrictTVar {tvar} = Lazy.traceTVarIO tvar
5858

59+
-- | Cast the monad if both use the same representation of `TVar`s.
60+
--
61+
-- This function is useful for monad transformers stacks if the `TVar` is used
62+
-- in different monad stacks.
63+
--
5964
castStrictTVar :: LazyTVar m ~ LazyTVar n
6065
=> StrictTVar m a -> StrictTVar n a
6166
castStrictTVar StrictTVar {tvar} = StrictTVar {tvar}

0 commit comments

Comments
 (0)