| Copyright | 2017 Kei Hibino |
|---|---|
| License | BSD3 |
| Maintainer | ex8k.hibino@gmail.com |
| Stability | experimental |
| Portability | unknown |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Functor.ProductIsomorphic.Class
Contents
Description
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 #
Restricted functor on products.
Minimal complete definition
Methods
(|$|) :: ProductConstructor (a -> b) => (a -> b) -> f a -> f b infixl 4 #
Instances
| Functor f => ProductIsoFunctor (WrappedFunctor f) # | |
| ProductIsoFunctor (WrappedAlter f a) # | |
class ProductIsoFunctor f => ProductIsoApplicative f where #
Restricted applicative functor on products.
Instances
| Applicative f => ProductIsoApplicative (WrappedFunctor f) # | |
| Alternative f => ProductIsoApplicative (WrappedAlter f a) # | |
class ProductIsoApplicative f => ProductIsoAlternative f where #
Restricted alternative on products.
Instances
| Alternative f => ProductIsoAlternative (WrappedFunctor f) # | |
Empty element
class ProductIsoApplicative f => ProductIsoEmpty f e where #
Empty element of product operator
Instances
| Applicative f => ProductIsoEmpty (WrappedFunctor f) () # | |
| Alternative f => ProductIsoEmpty (WrappedAlter f a) () # | |
peRightR :: ProductIsoEmpty f e => f a -> f (a, e) #
peRight and peRightR should have isomorphic law.
peRight . peRightR == peRightR . peRight == id
peLeftR :: ProductIsoEmpty f e => f a -> f (e, a) #
peLeft and peLeftR should have isomorphic law.
peLeft . peLeftR == peLeftR . peLeft == id