Safe Haskell | None |
---|
- isLens :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Eq a, Function a) => Simple Lens s a -> Property
- isTraversal :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Function a) => Simple Traversal s a -> Property
- isSetter :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Function a) => Simple 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) => Simple Iso s a -> Property
- isPrism :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Eq a, Function a) => Simple Prism s a -> Property
Documentation
isLens :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Eq a, Function a) => Simple Lens s a -> PropertySource
A Lens
is only legal if it is a valid Traversal
(see isTraversal
for
what this means), and if the following laws hold:
view l (set l b a) ≡ b
set l (view l a) a ≡ a
set l c (set l b a) ≡ set l c a
isTraversal :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Function a) => Simple Traversal s a -> PropertySource
isSetter :: (Arbitrary s, Arbitrary a, CoArbitrary a, Show s, Show a, Eq s, Function a) => Simple Setter s a -> PropertySource
A Setter
is only legal if the following 3 laws hold:
set l y (set l x a) ≡ set l y a
over l id ≡ id
over l f . over l g ≡ over l (f . g)