dbvar-2021.8.23: Mutable variables that are written to disk using delta encodings.
Safe Haskell None
Language Haskell2010

Test.DBVar

Synopsis

Documentation

genUpdates :: Delta da => Gen ( Base da) -> GenDelta da -> Gen ( Updates da) Source #

Randomly generate a sequence of updates

prop_StoreUpdates Source #

Arguments

:: ( Monad m, Delta da, Eq ( Base da), Buildable da, Show ( Base da))
=> ( forall b. m b -> PropertyM IO b)

Function to embed the monad in IO

-> Store m da

Store that is to be tested.

-> Gen ( Base da)

Generator for the initial value.

-> GenDelta da

Generator for deltas.

-> PropertyM IO ()

Test whether updateS and loadS behave as expected.

TODO: Shrinking of the update sequence.

type GenDelta da = Base da -> Gen da Source #

Given a value, generate a random delta starting from this value.

newtype Updates da Source #

A sequence of updates and values after updating. The update that is applied *last* appears in the list *first*.

Constructors

Updates [( Base da, da)]