Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype IdentityV (a :: *) (g :: * -> *) = IdentityV {
- unIdentityV :: g a
- lookupIdentityV :: IdentityV a Identity -> a
- identityV :: (Applicative m, Applicative n) => ViewMorphism m n (Const g a) (IdentityV a (Const g))
- toIdentityV :: (Applicative m, Applicative n) => ViewHalfMorphism m n (Const g a) (IdentityV a (Const g))
- fromIdentityV :: (Applicative m, Applicative n) => ViewHalfMorphism m n (IdentityV a (Const g)) (Const g a)
- handleIdentityVSelector :: forall a f g m. Functor m => (forall x. x -> f x -> g x) -> m a -> IdentityV a f -> m (IdentityV a g)
- mapIdentityV :: (f a -> g a) -> IdentityV a f -> IdentityV a g
Documentation
newtype IdentityV (a :: *) (g :: * -> *) Source #
A functor-indexed container corresponding to Identity. (i.e. a single non-deletable item)
IdentityV | |
|
Instances
lookupIdentityV :: IdentityV a Identity -> a Source #
identityV :: (Applicative m, Applicative n) => ViewMorphism m n (Const g a) (IdentityV a (Const g)) Source #
toIdentityV :: (Applicative m, Applicative n) => ViewHalfMorphism m n (Const g a) (IdentityV a (Const g)) Source #
fromIdentityV :: (Applicative m, Applicative n) => ViewHalfMorphism m n (IdentityV a (Const g)) (Const g a) Source #
handleIdentityVSelector :: forall a f g m. Functor m => (forall x. x -> f x -> g x) -> m a -> IdentityV a f -> m (IdentityV a g) Source #
A gadget to "traverse" over an IdentityV
mapIdentityV :: (f a -> g a) -> IdentityV a f -> IdentityV a g Source #
Non-existentialized map; since the contained value is known