pointless-lenses-0.0.5: Pointless Lenses librarySource codeContentsIndex
Generics.Pointless.Lenses
Portabilitynon-portable
Stabilityexperimental
Maintainerhpacheco@di.uminho.pt
Description

Pointless Lenses: bidirectional lenses with point-free programming

This module defines the structure of lenses and provides Quickcheck procedures to test lens well-behavedness.

Synopsis
data Lens c a = Lens {
get :: c -> a
put :: (a, c) -> c
create :: a -> c
}
type NatLens f g = forall x. x -> Lens (Rep f x) (Rep g x)
inc_lns :: Enum a => Lens a a
dec_lns :: Enum a => Lens a a
wb :: (Eq a, Eq c) => Lens c a -> a -> c -> Bool
putget :: (Eq a, Eq c) => Lens c a -> a -> c -> Bool
getput :: Eq c => Lens c a -> c -> Bool
createget :: Eq a => Lens c a -> a -> Bool
Documentation
data Lens c a Source
The data type of lenses
Constructors
Lens
get :: c -> a
put :: (a, c) -> c
create :: a -> c
type NatLens f g = forall x. x -> Lens (Rep f x) (Rep g x)Source
The type of natural lenses. Lenses that encode bidirectional natural transformations.
inc_lns :: Enum a => Lens a aSource
Increment a number.
dec_lns :: Enum a => Lens a aSource
Decrement a number.
wb :: (Eq a, Eq c) => Lens c a -> a -> c -> BoolSource
QuickCheck procedure to test if a lens is well-behaved.
putget :: (Eq a, Eq c) => Lens c a -> a -> c -> BoolSource
QuickCheck procedure to test if a lens satisfies the PutGet law.
getput :: Eq c => Lens c a -> c -> BoolSource
QuickCheck procedure to test if a lens satisfies the GetPut law.
createget :: Eq a => Lens c a -> a -> BoolSource
QuickCheck procedure to test if a lens satisfies the CreateGet law.
Produced by Haddock version 2.7.2