Copyright | 2017 Kei Hibino |
---|---|
License | BSD3 |
Maintainer | ex8k.hibino@gmail.com |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
This module defines functor interfaces which morphed functions are restricted to products.
- class ProductIsoFunctor f where
- class ProductIsoFunctor f => ProductIsoApplicative f where
- class ProductIsoApplicative f => ProductIsoAlternative f where
- class ProductIsoApplicative f => ProductIsoEmpty f e where
- peRightR :: ProductIsoEmpty f e => f a -> f (a, e)
- peLeftR :: ProductIsoEmpty f e => f a -> f (e, a)
ProductIso classes
class ProductIsoFunctor f where Source #
Restricted functor on products.
(|$|) :: ProductConstructor (a -> b) => (a -> b) -> f a -> f b infixl 4 Source #
Functor f => ProductIsoFunctor (WrappedFunctor f) Source # | |
ProductIsoFunctor (WrappedAlter f a) Source # | |
class ProductIsoFunctor f => ProductIsoApplicative f where Source #
Restricted applicative functor on products.
pureP :: ProductConstructor a => a -> f a Source #
Applicative f => ProductIsoApplicative (WrappedFunctor f) Source # | |
Alternative f => ProductIsoApplicative (WrappedAlter f a) Source # | |
class ProductIsoApplicative f => ProductIsoAlternative f where Source #
Restricted alternative on products.
Empty element
class ProductIsoApplicative f => ProductIsoEmpty f e where Source #
Empty element of product operator
Applicative f => ProductIsoEmpty (WrappedFunctor f) () Source # | |
Alternative f => ProductIsoEmpty (WrappedAlter f a) () Source # | |
peRightR :: ProductIsoEmpty f e => f a -> f (a, e) Source #
peRight and peRightR should have isomorphic law.
peRight . peRightR == peRightR . peRight == id
peLeftR :: ProductIsoEmpty f e => f a -> f (e, a) Source #
peLeft and peLeftR should have isomorphic law.
peLeft . peLeftR == peLeftR . peLeft == id