ouroboros-consensus-test-0.3.1.0: Tests of the consensus layer
Safe HaskellNone
LanguageHaskell2010

Test.Util.FS.Sim.Error

Description

Deprecated: Use System.FS.Sim.Error from fs-sim

Synopsis

Simulate Errors monad

runSimErrorFS ∷ (MonadSTM m, MonadThrow m) ⇒ MockFSErrors → (StrictTVar m ErrorsHasFS m HandleMock → m a) → m (a, MockFS) #

withErrorsMonadSTM m ⇒ StrictTVar m ErrorsErrors → m a → m a #

Streams

newtype Stream a #

Constructors

Stream 

Fields

Instances

Instances details
Functor Stream 
Instance details

Defined in System.FS.Sim.Error

Methods

fmap ∷ (a → b) → Stream a → Stream b Source #

(<$) ∷ a → Stream b → Stream a Source #

Show a ⇒ Show (Stream a) 
Instance details

Defined in System.FS.Sim.Error

Methods

showsPrecIntStream a → ShowS Source #

showStream a → String Source #

showList ∷ [Stream a] → ShowS Source #

Semigroup (Stream a) 
Instance details

Defined in System.FS.Sim.Error

Methods

(<>)Stream a → Stream a → Stream a Source #

sconcatNonEmpty (Stream a) → Stream a Source #

stimesIntegral b ⇒ b → Stream a → Stream a Source #

Monoid (Stream a) 
Instance details

Defined in System.FS.Sim.Error

Methods

memptyStream a Source #

mappendStream a → Stream a → Stream a Source #

mconcat ∷ [Stream a] → Stream a Source #

always ∷ a → Stream a #

mkStream ∷ [Maybe a] → Stream a #

mkStreamGenInt → Gen a → Gen (Stream a) #

nullStream a → Bool #

runStreamStream a → (Maybe a, Stream a) #

Generating partial reads/writes

newtype Partial #

Constructors

Partial Word64 

Instances

Instances details
Show Partial 
Instance details

Defined in System.FS.Sim.Error

Arbitrary Partial 
Instance details

Defined in System.FS.Sim.Error

Methods

arbitrary ∷ Gen Partial

shrinkPartial → [Partial]

Generating corruption for hPutSome

data PutCorruption #

Instances

Instances details
Show PutCorruption 
Instance details

Defined in System.FS.Sim.Error

Arbitrary PutCorruption 
Instance details

Defined in System.FS.Sim.Error

Error streams for HasFS

genErrorsBoolBool → Gen Errors #