Standard test spec for properties lenses for valid values
Example usage:
lensSpec ((_2) :: Lens (Int, Int) (Int, Int) Int Int):: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulegenvalidity-sydtest-lens-1.0.0.0Haskell2010
Standard test Specs for optics
Standard test spec for properties lenses for valid values
Example usage:
lensSpec ((_2) :: Lens (Int, Int) (Int, Int) Int Int)Standard test spec for properties lenses for arbitrary values
Example usage:
lensSpecOnArbitrary ((_2) :: Lens (Rational, Rational) (Rational, Rational) Rational Rational)Standard test spec for properties lenses for values generated by given generators
Example usage:
lensSpecOnGen
((_2) :: Lens (Rational, Rational) (Rational, Rational) Rational Rational)
(abs <$> genValid)
"positive valid doubles"
(filter (0.0 >=) . shrinkValid)
((,) <$> (negate . abs <$> genValid) <*> (negate . abs <$> genValid))
"tuples of negative valid doubles"
(const [])A property combinator for the first lens law:
view l (set l v s) ≡ vExample usage:
lensLaw1 ((_2) :: Lens (Rational, Rational) (Rational, Rational) Rational Rational) genValid shrinkValid genValid shrinkValidA property combinator for the second lens law:
set l (view l s) s ≡ sExample usage:
lensLaw2 ((_2) :: Lens (Rational, Rational) (Rational, Rational) Rational Rational) genValid shrinkValidA property combinator for the third lens law:
set l v' (set l v s) ≡ set l v' sExample usage:
lensLaw3 ((_2) :: Lens (Rational, Rational) (Rational, Rational) Rational Rational) genValid shrinkValid genValid shrinkValidA property combinator to test whether getting values via a lens on valid values produces valid values.
Example Usage:
lensGettingProducesValid ((_2) :: Lens (Int, Int) (Int, Int) Int Int)A property combinator to test whether getting values via a lens on arbitrary values produces valid values.
Example Usage:
lensGettingProducesValidOnArbitrary ((_2) :: Lens (Rational, Rational) (Rational, Rational) Rational Rational)A property combinator to test whether getting values generated by given a generator via a lens on values generated by a given generator produces valid values.
isValid (view l s)Example Usage:
lensGettingProducesValidOnGen ((_2) :: Lens (Rational, Rational) (Rational, Rational) Rational Rational) genValid shrinkValidA property combinator to test whether setting valid values via a lens on valid values produces valid values.
Example usage:
lensSettingProducesValid ((_2) :: Lens (Int, Int) (Int, Int) Int Int)A property combinator to test whether setting arbitrary values via a lens on arbitrary values produces valid values.
Example usage:
lensSettingProducesValidOnArbitrary ((_2) :: Lens (Rational, Rational) (Rational, Rational) Rational Rational)A property combinator to test whether setting values generated by given a generator via a lens on values generated by a given generator produces valid values.
isValid (set l b s)Example usage:
lensSettingProducesValidOnGen ((_2) :: Lens (Rational, Rational) (Rational, Rational) Rational Rational) genValid shrinkValid genValid shrinkValid