fs-sim-0.3.0.0: Simulated file systems
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.FS.Sim.STM

Description

HasFS instance using MockFS stored in an STM variable

Synopsis

Documentation

runSimFS :: (MonadSTM m, MonadThrow m, PrimMonad m) => MockFS -> (HasFS m HandleMock -> m a) -> m (a, MockFS) Source #

simHasFS :: forall m. (MonadSTM m, MonadThrow m, PrimMonad m) => StrictTMVar m MockFS -> HasFS m HandleMock Source #

Equip m with a HasFs instance using the mock file system

simHasFS' :: (MonadSTM m, MonadThrow m, PrimMonad m) => MockFS -> m (HasFS m HandleMock) Source #

Alternative to simHasFS that creates TVars internally.