smallcheck-lens-0.1: SmallCheck lens laws

Safe HaskellNone
LanguageHaskell2010

Test.Tasty.SmallCheck.Lens.Setter

Synopsis

Documentation

testSetter :: (Eq s, Show s, Show a, Serial IO a, Serial Identity a, CoSerial IO a, Serial IO s) => ASetter' s a -> TestTree Source

A Setter is only legal if the following laws hold:

  1. set l y (set l x a) ≡ set l y a
  2. over l id ≡ id
  3. over l f . over l g ≡ over l (f . g)