product-isomorphic-0.0.3.1: Weaken applicative functor on products

Copyright2017 Kei Hibino
LicenseBSD3
Maintainerex8k.hibino@gmail.com
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Data.Functor.ProductIsomorphic.Instances

Contents

Description

This module defines functor instances morphed functions are restricted to products.

Synopsis

Documentation

newtype WrappedFunctor f a #

Wrapped functor type to make instances of product-iso functors.

Constructors

WrapFunctor 

Fields

newtype WrappedAlter f a b #

Wrapped Const Alternative objects to make instances like Const functor.

Constructors

WrapAlter 

Fields

Instances

Alternative f => ProductIsoApplicative (WrappedAlter f a) # 

Methods

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

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

ProductIsoFunctor (WrappedAlter f a) # 

Methods

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

Alternative f => ProductIsoEmpty (WrappedAlter f a) () # 

Methods

pureE :: WrappedAlter f a () #

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

peLeft :: WrappedAlter f a ((), a) -> WrappedAlter f a a #

Orphan instances

Monoid a => ProductIsoApplicative (Const * a) # 

Methods

pureP :: ProductConstructor a => a -> Const * a a #

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

ProductIsoFunctor (Const * a) # 

Methods

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

Monoid a => ProductIsoEmpty (Const * a) () # 

Methods

pureE :: Const * a () #

peRight :: Const * a (a, ()) -> Const * a a #

peLeft :: Const * a ((), a) -> Const * a a #