Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- 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:
bmap
id
=id
bmap
f .bmap
g =bmap
(f . g)
There is a default bmap
implementation for Generic
types, so
instances can derived automatically.
gbmap
Instances
GFunctorB (V1 :: * -> *) Source # | |
Defined in Data.Barbie.Internal.Functor | |
GFunctorB (U1 :: * -> *) Source # | |
Defined in Data.Barbie.Internal.Functor | |
(K1 i c :: * -> *) ~ Repl (Target F) (Target G) (K1 i c :: * -> *) => GFunctorB (K1 i c :: * -> *) Source # | |
Defined in Data.Barbie.Internal.Functor | |
(GFunctorB l, GFunctorB r) => GFunctorB (l :+: r) Source # | |
Defined in Data.Barbie.Internal.Functor | |
(GFunctorB l, GFunctorB r) => GFunctorB (l :*: r) Source # | |
Defined in Data.Barbie.Internal.Functor | |
GFunctorB x => GFunctorB (M1 i c x) Source # | |
Defined in Data.Barbie.Internal.Functor |
gbmapDefault :: CanDeriveGenericInstance b => (forall a. f a -> g a) -> b f -> b g Source #