Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class ProductProfunctor p => PRec p rs where
Documentation
class ProductProfunctor p => PRec p rs where Source #
Type class implementing traversal of a record, yanking individual product profunctors Record [p a b]
(though with distinct a
and b
at each position) up to p (Record as) (Record bs)
.
This is similar to the pN
functions on tuples provided by the product-profunctors
library.
type PRecContra p rs :: [*] Source #
Record fields rs
with the profunctor removed yielding the contravariant parameter. E.g. PRecContra p '[p a b] ~ '[a]
type PRecCo p rs :: [*] Source #
Record fields rs
with the profunctor removed yielding the covariant parameter. E.g. PRecContra p '[p a b] ~ '[a]
pRec :: Rec Identity rs -> p (Rec Identity (PRecContra p rs)) (Rec Identity (PRecCo p rs)) Source #
Traverse the record, transposing the profunctors p
within to the outside like traverse
does for Applicative effects.
Roughly equivalent to Record '[p a b, p c d, …] -> p (Record '[a, c, …]) (Record '[b, d, …])
Instances
ProductProfunctor p => PRec p ([] :: [Type]) Source # | |
(ProductProfunctor p, PRec p rs) => PRec p ((s :-> p a b) ': rs) Source # | |
Defined in Composite.Opaleye.ProductProfunctors type PRecContra p ((s :-> p a b) ': rs) :: [Type] Source # |