smallcheck-lens-0.1: SmallCheck lens laws

Safe HaskellNone
LanguageHaskell2010

Test.Tasty.SmallCheck.Lens.Traversal

Synopsis

Documentation

testTraversal :: forall s a. (Eq s, Show s, Show a, Serial IO a, Serial Identity a, CoSerial IO a, Serial IO s) => Traversal' s a -> TestTree Source

A Traversal' is only legal if it is a valid Setter' (see testSetter), and if the following laws hold:

  1. t pure ≡ pure
  2. fmap (t f) . t g ≡ getCompose . t (Compose . fmap f . g)