product-isomorphic-0.0.3.3: Weaken applicative functor on products

Copyright | 2017 Kei Hibino
License | BSD3
Maintainer | ex8k.hibino@gmail.com
Stability | experimental
Portability | unknown
Safe Haskell | None
Language | Haskell2010

Data.Functor.ProductIsomorphic.Instances

Contents

- Orphan instances

Description

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

Synopsis

- newtype WrappedFunctor f a = WrapFunctor {
  - unwrapFunctor :: f a
  }
- newtype WrappedAlter f a b = WrapAlter {
  - unWrapAlter :: Const (f a) b
  }

# Documentation

newtype WrappedFunctor f a Source #

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

Constructors

WrapFunctor |

Fields

- unwrapFunctor :: f a

#### Instances

Instances details

Alternative f => ProductIsoAlternative (WrappedFunctor f) Source # |
Instance details Defined in Data.Functor.ProductIsomorphic.Instances Methods emptyP :: WrappedFunctor f a Source # (|||) :: WrappedFunctor f a -> WrappedFunctor f a -> WrappedFunctor f a Source #
Applicative f => ProductIsoApplicative (WrappedFunctor f) Source # |
Instance details Defined in Data.Functor.ProductIsomorphic.Instances Methods pureP :: ProductConstructor a => a -> WrappedFunctor f a Source # (|*|) :: WrappedFunctor f (a -> b) -> WrappedFunctor f a -> WrappedFunctor f b Source #
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 #
Applicative f => ProductIsoEmpty (WrappedFunctor f) () Source # |
Instance details Defined in Data.Functor.ProductIsomorphic.Instances Methods pureE :: WrappedFunctor f () Source # peRight :: WrappedFunctor f (a, ()) -> WrappedFunctor f a Source # peLeft :: WrappedFunctor f ((), a) -> WrappedFunctor f a Source #

newtype WrappedAlter f a b Source #

Wrapped Const Alternative objects to make instances like Const functor.

Constructors

WrapAlter |

Fields

- unWrapAlter :: Const (f a) b

#### Instances

Instances details

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 #
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 #
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 #

# Orphan instances

Monoid a => ProductIsoApplicative (Const a :: Type -> Type) Source # |
Instance details Methods pureP :: ProductConstructor a0 => a0 -> Const a a0 Source # (|*|) :: Const a (a0 -> b) -> Const a a0 -> Const a b Source #
ProductIsoFunctor (Const a :: Type -> Type) Source # |
Instance details Methods (|$|) :: ProductConstructor (a0 -> b) => (a0 -> b) -> Const a a0 -> Const a b Source #
Monoid a => ProductIsoEmpty (Const a :: Type -> Type) () Source # |
Instance details Methods pureE :: Const a () Source # peRight :: Const a (a0, ()) -> Const a a0 Source # peLeft :: Const a ((), a0) -> Const a a0 Source #