Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

## Synopsis

- data Prod :: [* -> *] -> * -> * where
- zeroTuple :: Prod '[] a
- oneTuple :: f a -> Prod '[f] a
- fromProduct :: Product f g a -> Prod '[f, g] a
- toProduct :: Prod '[f, g] a -> Product f g a
- prod :: Prod ls a -> Prod rs a -> Prod (ls ++ rs) a
- uncurryn :: Curried (Prod fs a -> r a) -> Prod fs a -> r a
- type family l ++ r :: [k] where ...
- type family Curried t where ...

# n-tuples of functors.

data Prod :: [* -> *] -> * -> * where Source #

Product of n functors.

## Instances

(Functor f, Functor (Prod fs)) => Functor (Prod (f ': fs)) Source # | |

Functor (Prod ([] :: [* -> *])) Source # | |

(Applicative f, Applicative (Prod fs)) => Applicative (Prod (f ': fs)) Source # | Inductively defined instance: |

Defined in Data.Functor.Prod pure :: a -> Prod (f ': fs) a # (<*>) :: Prod (f ': fs) (a -> b) -> Prod (f ': fs) a -> Prod (f ': fs) b # liftA2 :: (a -> b -> c) -> Prod (f ': fs) a -> Prod (f ': fs) b -> Prod (f ': fs) c # (*>) :: Prod (f ': fs) a -> Prod (f ': fs) b -> Prod (f ': fs) b # (<*) :: Prod (f ': fs) a -> Prod (f ': fs) b -> Prod (f ': fs) a # | |

Applicative (Prod ([] :: [* -> *])) Source # | Inductively defined instance: |

(Foldable f, Foldable (Prod fs)) => Foldable (Prod (f ': fs)) Source # | |

Defined in Data.Functor.Prod fold :: Monoid m => Prod (f ': fs) m -> m # foldMap :: Monoid m => (a -> m) -> Prod (f ': fs) a -> m # foldr :: (a -> b -> b) -> b -> Prod (f ': fs) a -> b # foldr' :: (a -> b -> b) -> b -> Prod (f ': fs) a -> b # foldl :: (b -> a -> b) -> b -> Prod (f ': fs) a -> b # foldl' :: (b -> a -> b) -> b -> Prod (f ': fs) a -> b # foldr1 :: (a -> a -> a) -> Prod (f ': fs) a -> a # foldl1 :: (a -> a -> a) -> Prod (f ': fs) a -> a # toList :: Prod (f ': fs) a -> [a] # null :: Prod (f ': fs) a -> Bool # length :: Prod (f ': fs) a -> Int # elem :: Eq a => a -> Prod (f ': fs) a -> Bool # maximum :: Ord a => Prod (f ': fs) a -> a # minimum :: Ord a => Prod (f ': fs) a -> a # | |

Foldable (Prod ([] :: [* -> *])) Source # | |

Defined in Data.Functor.Prod fold :: Monoid m => Prod [] m -> m # foldMap :: Monoid m => (a -> m) -> Prod [] a -> m # foldr :: (a -> b -> b) -> b -> Prod [] a -> b # foldr' :: (a -> b -> b) -> b -> Prod [] a -> b # foldl :: (b -> a -> b) -> b -> Prod [] a -> b # foldl' :: (b -> a -> b) -> b -> Prod [] a -> b # foldr1 :: (a -> a -> a) -> Prod [] a -> a # foldl1 :: (a -> a -> a) -> Prod [] a -> a # elem :: Eq a => a -> Prod [] a -> Bool # maximum :: Ord a => Prod [] a -> a # minimum :: Ord a => Prod [] a -> a # | |

(Traversable f, Traversable (Prod fs)) => Traversable (Prod (f ': fs)) Source # | Inductively defined instance: |

Defined in Data.Functor.Prod traverse :: Applicative f0 => (a -> f0 b) -> Prod (f ': fs) a -> f0 (Prod (f ': fs) b) # sequenceA :: Applicative f0 => Prod (f ': fs) (f0 a) -> f0 (Prod (f ': fs) a) # mapM :: Monad m => (a -> m b) -> Prod (f ': fs) a -> m (Prod (f ': fs) b) # sequence :: Monad m => Prod (f ': fs) (m a) -> m (Prod (f ': fs) a) # | |

Traversable (Prod ([] :: [* -> *])) Source # | Inductively defined instance: |

(Eq1 f, Eq1 (Prod fs)) => Eq1 (Prod (f ': fs)) Source # | |

Eq1 (Prod ([] :: [* -> *])) Source # | |

(Ord1 f, Ord1 (Prod fs)) => Ord1 (Prod (f ': fs)) Source # | |

Defined in Data.Functor.Prod | |

Ord1 (Prod ([] :: [* -> *])) Source # | |

Defined in Data.Functor.Prod | |

(Show1 f, Show1 (Prod fs)) => Show1 (Prod (f ': fs)) Source # | |

Show1 (Prod ([] :: [* -> *])) Source # | |

(Alternative f, Alternative (Prod fs)) => Alternative (Prod (f ': fs)) Source # | Inductively defined instance: |

Alternative (Prod ([] :: [* -> *])) Source # | Inductively defined instance: |

(Eq1 f, Eq a, Eq1 (Prod fs)) => Eq (Prod (f ': fs) a) Source # | |

Eq a => Eq (Prod ([] :: [* -> *]) a) Source # | |

(Ord1 f, Ord a, Ord1 (Prod fs)) => Ord (Prod (f ': fs) a) Source # | |

Defined in Data.Functor.Prod compare :: Prod (f ': fs) a -> Prod (f ': fs) a -> Ordering # (<) :: Prod (f ': fs) a -> Prod (f ': fs) a -> Bool # (<=) :: Prod (f ': fs) a -> Prod (f ': fs) a -> Bool # (>) :: Prod (f ': fs) a -> Prod (f ': fs) a -> Bool # (>=) :: Prod (f ': fs) a -> Prod (f ': fs) a -> Bool # max :: Prod (f ': fs) a -> Prod (f ': fs) a -> Prod (f ': fs) a # min :: Prod (f ': fs) a -> Prod (f ': fs) a -> Prod (f ': fs) a # | |

Ord a => Ord (Prod ([] :: [* -> *]) a) Source # | |

Defined in Data.Functor.Prod | |

(Show1 f, Show a, Show1 (Prod fs)) => Show (Prod (f ': fs) a) Source # | |

Show a => Show (Prod ([] :: [* -> *]) a) Source # | |