Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
A variant of Traversable
for Knot
s
Synopsis
- class (KFunctor k, KFoldable k) => KTraversable k where
- sequenceK :: Applicative f => Tree k (ContainedK f p) -> f (Tree k p)
- newtype ContainedK f p (k :: Knot) = MkContainedK {
- runContainedK :: f (p k)
- _ContainedK :: Iso (Tree (ContainedK f0 p0) k0) (Tree (ContainedK f1 p1) k1) (f0 (Tree p0 k0)) (f1 (Tree p1 k1))
- traverseK :: (Applicative f, KTraversable k) => (forall n. KWitness k n -> Tree p n -> f (Tree q n)) -> Tree k p -> f (Tree k q)
- traverseK1 :: (KTraversable k, KNodesConstraint k ((~) n)) => Traversal (Tree k p) (Tree k q) (Tree p n) (Tree q n)
Documentation
class (KFunctor k, KFoldable k) => KTraversable k where Source #
A variant of Traversable
for Knot
s
sequenceK :: Applicative f => Tree k (ContainedK f p) -> f (Tree k p) Source #
KTraversable
variant of sequenceA
Instances
newtype ContainedK f p (k :: Knot) Source #
MkContainedK | |
|
_ContainedK :: Iso (Tree (ContainedK f0 p0) k0) (Tree (ContainedK f1 p1) k1) (f0 (Tree p0 k0)) (f1 (Tree p1 k1)) Source #
An Iso
for the ContainedK
newtype
traverseK :: (Applicative f, KTraversable k) => (forall n. KWitness k n -> Tree p n -> f (Tree q n)) -> Tree k p -> f (Tree k q) Source #
KTraversable
variant of traverse
traverseK1 :: (KTraversable k, KNodesConstraint k ((~) n)) => Traversal (Tree k p) (Tree k q) (Tree p n) (Tree q n) Source #
KTraversable
variant of traverse
for Knot
s with a single node type.
It is a valid Traversal
as it avoids using RankNTypes
.