HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Moduleouroboros-consensus-4.2.1.0

Ouroboros.Consensus.Util.NormalForm.StrictTVar

  • 2 types
  • 20 values
valuefromLazyTVar :: LazyTVar m a -> StrictTVar m a
#

Create a StrictMVar from a LazyMVar

It is not guaranteed that the LazyTVar contains a value that is in WHNF, so there is no guarantee that the resulting StrictTVar contains a value that is in WHNF. This should be used with caution.

The resulting StrictTVar has a trivial invariant.

valuetoLazyTVar :: StrictTVar m a -> LazyTVar m a
#

Get the underlying TVar

Since we obviously cannot guarantee that updates to this LazyTVar will be strict, this should be used with caution.

Similarly, we can not guarantee that updates to this LazyTVar do not break the original invariant that the StrictTVar held.

valueunsafeToUncheckedStrictTVar :: StrictTVar m a -> StrictTVar m a
#

Create an unchecked reference to the given checked StrictTVar.

Note that the invariant is only guaranteed when modifying the checked TVar. Any modification to the unchecked reference might break the invariants.

Orphan instances

1 instance