Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
type family ElementIndex (struct :: Tree a) (idx :: [Nat]) :: a where ... Source #
ElementIndex (Leaf x) '[] = x | |
ElementIndex (Node xs) (n ': ns) = ElementIndex (Index xs n) ns |
access :: Monad m => Struct e tp -> List Natural idx -> (e (ElementIndex tp idx) -> m (a, e (ElementIndex tp idx))) -> m (a, Struct e tp) Source #
accessElement :: Monad m => Struct e tp -> List Natural idx -> (e (ElementIndex tp idx) -> m (a, e ntp)) -> m (a, Struct e (Insert tp idx (Leaf ntp))) Source #
elementIndex :: Struct e tp -> List Natural idx -> e (ElementIndex tp idx) Source #
mapIndexM :: Monad m => (forall idx. List Natural idx -> e (ElementIndex tps idx) -> m (e' (ElementIndex tps idx))) -> Struct e tps -> m (Struct e' tps) Source #
flattenIndex :: Monad m => (forall idx. List Natural idx -> e (ElementIndex tps idx) -> m a) -> ([a] -> m a) -> Struct e tps -> m a Source #