| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Barbie.Internal.Functor
- class FunctorB b where
- class GFunctorB b
- gbmapDefault :: CanDeriveGenericInstance b => (forall a. f a -> g a) -> b f -> b g
- type CanDeriveGenericInstance b = (Generic (b (Target F)), Generic (b (Target G)), GFunctorB (Rep (b (Target F))), Rep (b (Target G)) ~ Repl (Target F) (Target G) (Rep (b (Target F))))
Documentation
class FunctorB b where Source #
Barbie-types that can be mapped over. Instances of FunctorB should
satisfy the following laws:
bmapid=idbmapf .bmapg =bmap(f . g)
There is a default bmap implementation for Generic types, so
instances can derived automatically.
Minimal complete definition
gbmap
Instances
| GFunctorB (V1 *) Source # | |
| GFunctorB (U1 *) Source # | |
| (~) (* -> *) (K1 * i c) (Repl (Target F) (Target G) (K1 * i c)) => GFunctorB (K1 * i c) Source # | |
| (GFunctorB l, GFunctorB r) => GFunctorB ((:+:) * l r) Source # | |
| (GFunctorB l, GFunctorB r) => GFunctorB ((:*:) * l r) Source # | |
| GFunctorB x => GFunctorB (M1 * i c x) Source # | |
gbmapDefault :: CanDeriveGenericInstance b => (forall a. f a -> g a) -> b f -> b g Source #