Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- newtype HFunctorList fs a = HFunctorList {
- getHFunctorList :: Rec (Flap a) fs
- newtype Flap a f = Flap {
- getFlap :: f a
- hflGet :: forall f fs a i. RElem f fs i => HFunctorList fs a -> f a
- hflPut :: forall f f' fs fs' a. RecElem Rec f f' fs fs' (RIndex f fs) => f' a -> HFunctorList fs a -> HFunctorList fs' a
- hflLens :: forall f f' fs fs' a s t. (RecElem Rec f f' fs fs' (RIndex f fs), RElem f fs (RIndex f fs), s ~ HFunctorList fs a, t ~ HFunctorList fs' a) => Lens s t (f a) (f' a)
- hflStrip :: forall f fs a fs' b i is. (RElem f fs i, fs' ~ RDelete f fs, RSubset fs' fs is) => (f a -> b) -> HFunctorList fs a -> (b, HFunctorList fs' a)
Documentation
newtype HFunctorList fs a Source #
A list of functors parametric over a "shared" a
, where each functor
stores a single value 'f a'.
Just a wrapper on top of Vinyl with some types swap around.
HFunctorList | |
|
Instances
Flipped apply: a single value at 'f a', but with "flipped" type arguments. Very useless - has no Functor nor Contravariant nor HFunctor instance.
Instances
FromJSON (f a) => FromJSON (Flap a f) Source # | |
ToJSON (f a) => ToJSON (Flap a f) Source # | |
Defined in StreamPatch.HFunctorList | |
(ToJSON (Flap a r), Generic (Rec (Flap a) rs), GToJSON' Value Zero (Rep (Rec (Flap a) rs)), GToJSON' Encoding Zero (Rep (Rec (Flap a) rs))) => ToJSON (Rec (Flap a) (r ': rs)) Source # | |
Storable (f a) => Storable (Flap a f) Source # | |
Defined in StreamPatch.HFunctorList | |
Generic (Flap a f) Source # | |
Show (f a) => Show (Flap a f) Source # | |
Eq (f a) => Eq (Flap a f) Source # | |
Ord (f a) => Ord (Flap a f) Source # | |
Defined in StreamPatch.HFunctorList | |
type Rep (Flap a f) Source # | |
Defined in StreamPatch.HFunctorList |
hflGet :: forall f fs a i. RElem f fs i => HFunctorList fs a -> f a Source #
Get the value at a type in an HFunctorList.
hflPut :: forall f f' fs fs' a. RecElem Rec f f' fs fs' (RIndex f fs) => f' a -> HFunctorList fs a -> HFunctorList fs' a Source #
Put a value at a type in an HFunctorList.
hflLens :: forall f f' fs fs' a s t. (RecElem Rec f f' fs fs' (RIndex f fs), RElem f fs (RIndex f fs), s ~ HFunctorList fs a, t ~ HFunctorList fs' a) => Lens s t (f a) (f' a) Source #
Get a lens to the value at a type in an HFunctorList.
hflStrip :: forall f fs a fs' b i is. (RElem f fs i, fs' ~ RDelete f fs, RSubset fs' fs is) => (f a -> b) -> HFunctorList fs a -> (b, HFunctorList fs' a) Source #
Use the value at a type in an HFunctorList, and remove it from the list.