hedgehog-lens-0.1.0.0: Hedgehog properties for lens laws.

Hedgehog.Lens

Synopsis

# Documentation

Arguments

 :: Monad m => (Show large, Eq large) => (Show small, Eq small) => Gen large -> Gen small -> Prism' large small Prism signifying that the small type is a subset of the large type -> PropertyT m ()

Checks whether a prism respects the well-formedness laws:

1) Get-Set Prism Law 2) Set-Get Prism Law

Arguments

 :: Monad m => (Show large, Eq large) => (Show small, Eq small) => Gen large -> Gen small -> Lens' large small Lens signifying that the small type is a constituent part of the large type -> PropertyT m ()

Checks whether a lens respects the well-formedness laws:

1) Get-Put Lens Law 2) Put-Get Lens Law 3) Put-Put Lens Law

Arguments

 :: Monad m => (Show a, Eq a) => (Show b, Eq b) => Gen a -> Gen b -> Iso' a b Isomorphism signifying that types a and b are basically the same thing -> PropertyT m ()

Checks whether an isomorphism respects the well-formedness laws:

1) Set-Get Iso Law 2) Get-Set Iso Law

Arguments

 :: Monad m => (Show large, Eq large) => (Show small, Eq small) => Prism' large small Prism signifying that the small type is a subset of the large type -> large -> small -> PropertyT m ()

Assert that a prism matches for a particular set of values: A review of the small value should produce the large value, and a preview of the large value should produce the small value.