Copyright | (c) Fumiaki Kinoshita 2015 |
---|---|
License | BSD3 |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Miscellaneous utilities
- type Lens' s a = forall f. Functor f => (a -> f a) -> s -> f s
- view :: ((a -> Const a a) -> s -> Const a s) -> s -> a
- views :: ((a -> Const r a) -> s -> Const r s) -> (a -> r) -> s -> r
- newtype K0 a = K0 {
- getK0 :: a
- over :: ((a -> K0 a) -> s -> K0 s) -> (a -> a) -> s -> s
- newtype Const' a x = Const' {
- getConst' :: a
- newtype Match h a x = Match {
- runMatch :: h x -> a
- newtype Comp f g a = Comp {
- getComp :: f (g a)
- comp :: Functor f => (a -> g b) -> f a -> Comp f g b
- data Nullable h x
- nullable :: r -> (h x -> r) -> Nullable h x -> r
- mapNullable :: (g x -> h y) -> Nullable g x -> Nullable h y
- newtype MergeList a = MergeList {
- getMerged :: [a]
Documentation
view :: ((a -> Const a a) -> s -> Const a s) -> s -> a Source
view
:: Lens' s a -> (a -> a) -> (s -> s)
views :: ((a -> Const r a) -> s -> Const r s) -> (a -> r) -> s -> r Source
views
:: Lens' s a -> (a -> r) -> (s -> r)
Just a value.
over :: ((a -> K0 a) -> s -> K0 s) -> (a -> a) -> s -> s Source
over
:: Lens' s a -> (a -> a) -> (s -> s)
Turn a wrapper type into one clause that returns a
.
Poly-kinded Maybe
mapNullable :: (g x -> h y) -> Nullable g x -> Nullable h y Source
Apply a function to its content.