-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | QuickCheck properties for lens
--   
--   QuickCheck properties for lens.
@package lens-properties
@version 4.11.1


-- | A collection of properties that can be tested with QuickCheck, to
--   guarantee that you are working with valid <a>Lens</a>es,
--   <a>Setter</a>s, <a>Traversal</a>s, <a>Iso</a>s and <a>Prism</a>s.
module Control.Lens.Properties

-- | A <a>Lens</a> is only legal if it is a valid <a>Traversal</a> (see
--   <a>isTraversal</a> for what this means), and if the following laws
--   hold:
--   
--   <ol>
--   <li><pre>view l (set l b a) ≡ b</pre></li>
--   <li><pre>set l (view l a) a ≡ a</pre></li>
--   <li><pre>set l c (set l b a) ≡ set l c a</pre></li>
--   </ol>
isLens :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Eq a, Function a) => Lens' s a -> Property

-- | A <a>Traversal</a> is only legal if it is a valid <a>Setter</a> (see
--   <a>isSetter</a> for what makes a <a>Setter</a> valid), and the
--   following laws hold:
--   
--   <ol>
--   <li><pre>t pure ≡ pure</pre></li>
--   <li><pre>fmap (t f) . t g ≡ getCompose . t (Compose . fmap f .
--   g)</pre></li>
--   </ol>
isTraversal :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Function a) => Traversal' s a -> Property

-- | A <a>Setter</a> is only legal if the following 3 laws hold:
--   
--   <ol>
--   <li><pre>set l y (set l x a) ≡ set l y a</pre></li>
--   <li><pre>over l id ≡ id</pre></li>
--   <li><pre>over l f . over l g ≡ over l (f . g)</pre></li>
--   </ol>
isSetter :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Function a) => Setter' s a -> Property
isIso :: (Arbitrary s, Arbitrary a, CoArbitrary s, CoArbitrary a, Show s, Show a, Eq s, Eq a, Function s, Function a) => Iso' s a -> Property
isPrism :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Eq a, Function a) => Prism' s a -> Property
