Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t
- type Lens' s a = Lens s s a a
- lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b
- type Getting r s a = (a -> Const r a) -> s -> Const r s
- type Getter s a = forall r. Getting r s a
- view :: Getting a s a -> s -> a
- to :: (s -> a) -> Getting r s a
- type ASetter s t a b = (a -> Id b) -> s -> Id t
- type ASetter' s a = ASetter s s a a
- set :: Lens s t a b -> b -> s -> t
- over :: ASetter s t a b -> (a -> b) -> s -> t
- modify :: Lens s t a b -> (a -> (b, r)) -> s -> (t, r)
- bit :: Bits a => Int -> Lens' a Bool
- byte :: (Integral a, Bits a) => Int -> Lens' a Word8