License | BSD-style (see the file LICENSE) |
---|---|
Maintainer | sjoerd@w3future.com |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe |
Language | Haskell98 |
- class (Profunctor p, GenericUnitProfunctor p, GenericProductProfunctor p) => GenericRecordProfunctor p
- class (GenericRecordProfunctor p, GenericSumProfunctor p) => GenericNonEmptyProfunctor p
- class (GenericNonEmptyProfunctor p, GenericEmptyProfunctor p) => GenericProfunctor p
- class Profunctor p => GenericUnitProfunctor p where
- class Profunctor p => GenericProductProfunctor p where
- class Profunctor p => GenericSumProfunctor p where
- class Profunctor p => GenericEmptyProfunctor p where
- newtype Zip f a b = Zip {
- runZip :: a -> a -> f b
- absurd :: V1 a -> b
- e1 :: (f a -> b) -> (g a -> b) -> (f :+: g) a -> b
- fst1 :: (f :*: g) a -> f a
- snd1 :: (f :*: g) a -> g a
Documentation
class (Profunctor p, GenericUnitProfunctor p, GenericProductProfunctor p) => GenericRecordProfunctor p Source #
A generic function using a GenericRecordProfunctor
works on any data type
with exactly one constructor, a.k.a. records,
with multiple fields (mult
) or no fields (unit
).
GenericRecordProfunctor
is similar to ProductProfuctor
from the
product-profunctor package, but using types from GHC.Generics.
class (GenericRecordProfunctor p, GenericSumProfunctor p) => GenericNonEmptyProfunctor p Source #
A generic function using a GenericNonEmptyProfunctor
works on any data
type with at least one constructor.
class (GenericNonEmptyProfunctor p, GenericEmptyProfunctor p) => GenericProfunctor p Source #
A generic function using a GenericProfunctor
works on any
algebraic data type, including those with no constructors and constants.
class Profunctor p => GenericUnitProfunctor p where Source #
Applicative f => GenericUnitProfunctor (Star f) Source # | |
Functor f => GenericUnitProfunctor (Costar f) Source # | |
GenericUnitProfunctor (Tagged *) Source # | |
Applicative f => GenericUnitProfunctor (Zip f) Source # | |
GenericUnitProfunctor (Ctor *) Source # | |
GenericUnitProfunctor ((->) LiftedRep LiftedRep) Source # | |
Applicative f => GenericUnitProfunctor (Joker * * f) Source # | |
Divisible f => GenericUnitProfunctor (Clown * * f) Source # | |
(GenericUnitProfunctor p, GenericUnitProfunctor q) => GenericUnitProfunctor (Product * * p q) Source # | |
(Applicative f, GenericUnitProfunctor p) => GenericUnitProfunctor (Tannen * * * f p) Source # | |
(Functor f, Applicative g, Profunctor p, GenericUnitProfunctor p) => GenericUnitProfunctor (Biff * * * * p f g) Source # | |
class Profunctor p => GenericProductProfunctor p where Source #
Applicative f => GenericProductProfunctor (Star f) Source # | |
Functor f => GenericProductProfunctor (Costar f) Source # | |
GenericProductProfunctor (Tagged *) Source # | |
Applicative f => GenericProductProfunctor (Zip f) Source # | |
GenericProductProfunctor (Ctor *) Source # | |
GenericProductProfunctor ((->) LiftedRep LiftedRep) Source # | |
Applicative f => GenericProductProfunctor (Joker * * f) Source # | |
Divisible f => GenericProductProfunctor (Clown * * f) Source # | |
(GenericProductProfunctor p, GenericProductProfunctor q) => GenericProductProfunctor (Product * * p q) Source # | |
(Applicative f, GenericProductProfunctor p) => GenericProductProfunctor (Tannen * * * f p) Source # | |
(Functor f, Applicative g, Profunctor p, GenericProductProfunctor p) => GenericProductProfunctor (Biff * * * * p f g) Source # | |
class Profunctor p => GenericSumProfunctor p where Source #
Applicative f => GenericSumProfunctor (Star f) Source # | |
Alternative f => GenericSumProfunctor (Zip f) Source # | |
GenericSumProfunctor (Ctor *) Source # | |
GenericSumProfunctor ((->) LiftedRep LiftedRep) Source # | |
Alternative f => GenericSumProfunctor (Joker * * f) Source # | |
Decidable f => GenericSumProfunctor (Clown * * f) Source # | |
(GenericSumProfunctor p, GenericSumProfunctor q) => GenericSumProfunctor (Product * * p q) Source # | |
(Applicative f, GenericSumProfunctor p) => GenericSumProfunctor (Tannen * * * f p) Source # | |
class Profunctor p => GenericEmptyProfunctor p where Source #
Applicative f => GenericEmptyProfunctor (Star f) Source # | |
Alternative f => GenericEmptyProfunctor (Zip f) Source # | |
GenericEmptyProfunctor (Ctor *) Source # | |
GenericEmptyProfunctor ((->) LiftedRep LiftedRep) Source # | |
Alternative f => GenericEmptyProfunctor (Joker * * f) Source # | |
Decidable f => GenericEmptyProfunctor (Clown * * f) Source # | |
(GenericEmptyProfunctor p, GenericEmptyProfunctor q) => GenericEmptyProfunctor (Product * * p q) Source # | |
(Applicative f, GenericEmptyProfunctor p) => GenericEmptyProfunctor (Tannen * * * f p) Source # | |
Functor f => Profunctor (Zip f) Source # | |
Alternative f => GenericEmptyProfunctor (Zip f) Source # | |
Alternative f => GenericSumProfunctor (Zip f) Source # | |
Applicative f => GenericProductProfunctor (Zip f) Source # | |
Applicative f => GenericUnitProfunctor (Zip f) Source # | |