product-isomorphic-0.0.3.4: Weaken applicative functor on products
Copyright2017 Kei Hibino
LicenseBSD3
Maintainerex8k.hibino@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Functor.ProductIsomorphic.Class

Description

This module defines functor interfaces which morphed functions are restricted to products.

Synopsis

ProductIso classes

class ProductIsoFunctor f where Source #

Restricted functor on products.

Methods

(|$|) :: ProductConstructor (a -> b) => (a -> b) -> f a -> f b infixl 4 Source #

Instances

Instances details
Functor f => ProductIsoFunctor (WrappedFunctor f) Source # 
Instance details

Defined in Data.Functor.ProductIsomorphic.Instances

Methods

(|$|) :: ProductConstructor (a -> b) => (a -> b) -> WrappedFunctor f a -> WrappedFunctor f b Source #

ProductIsoFunctor (Const a :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.ProductIsomorphic.Instances

Methods

(|$|) :: ProductConstructor (a0 -> b) => (a0 -> b) -> Const a a0 -> Const a b Source #

ProductIsoFunctor (WrappedAlter f a) Source # 
Instance details

Defined in Data.Functor.ProductIsomorphic.Instances

Methods

(|$|) :: ProductConstructor (a0 -> b) => (a0 -> b) -> WrappedAlter f a a0 -> WrappedAlter f a b Source #

class ProductIsoFunctor f => ProductIsoApplicative f where Source #

Restricted applicative functor on products.

Methods

pureP :: ProductConstructor a => a -> f a Source #

(|*|) :: f (a -> b) -> f a -> f b infixl 4 Source #

Instances

Instances details
Applicative f => ProductIsoApplicative (WrappedFunctor f) Source # 
Instance details

Defined in Data.Functor.ProductIsomorphic.Instances

Monoid a => ProductIsoApplicative (Const a :: Type -> Type) Source # 
Instance details

Defined in Data.Functor.ProductIsomorphic.Instances

Methods

pureP :: ProductConstructor a0 => a0 -> Const a a0 Source #

(|*|) :: Const a (a0 -> b) -> Const a a0 -> Const a b Source #

Alternative f => ProductIsoApplicative (WrappedAlter f a) Source # 
Instance details

Defined in Data.Functor.ProductIsomorphic.Instances

Methods

pureP :: ProductConstructor a0 => a0 -> WrappedAlter f a a0 Source #

(|*|) :: WrappedAlter f a (a0 -> b) -> WrappedAlter f a a0 -> WrappedAlter f a b Source #

class ProductIsoApplicative f => ProductIsoAlternative f where Source #

Restricted alternative on products.

Methods

emptyP :: f a Source #

(|||) :: f a -> f a -> f a infixl 3 Source #

Empty element

class ProductIsoApplicative f => ProductIsoEmpty f e where Source #

Empty element of product operator

Methods

pureE :: f e Source #

peRight :: f (a, e) -> f a Source #

peLeft :: f (e, a) -> f a Source #

Instances

Instances details
Applicative f => ProductIsoEmpty (WrappedFunctor f) () Source # 
Instance details

Defined in Data.Functor.ProductIsomorphic.Instances

Monoid a => ProductIsoEmpty (Const a :: Type -> Type) () Source # 
Instance details

Defined in Data.Functor.ProductIsomorphic.Instances

Methods

pureE :: Const a () Source #

peRight :: Const a (a0, ()) -> Const a a0 Source #

peLeft :: Const a ((), a0) -> Const a a0 Source #

Alternative f => ProductIsoEmpty (WrappedAlter f a) () Source # 
Instance details

Defined in Data.Functor.ProductIsomorphic.Instances

Methods

pureE :: WrappedAlter f a () Source #

peRight :: WrappedAlter f a (a0, ()) -> WrappedAlter f a a0 Source #

peLeft :: WrappedAlter f a ((), a0) -> WrappedAlter f a a0 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