Safe Haskell | None |
---|---|
Language | Haskell98 |
- newtype Tree m a = Tree {}
- data Node m a = Node {
- nodeValue :: a
- nodeChildren :: [Tree m a]
- fromNode :: Applicative m => Node m a -> Tree m a
- unfold :: Monad m => (a -> [a]) -> a -> Tree m a
- unfoldForest :: Monad m => (a -> [a]) -> a -> [Tree m a]
- expand :: Monad m => (a -> [a]) -> Tree m a -> Tree m a
- prune :: Monad m => Tree m a -> Tree m a
- render :: Monad m => Tree m String -> m String
Documentation
An effectful tree, each node in the tree can have an effect before it is produced.
MMonad Tree Source # | |
MonadTrans Tree Source # | |
Distributive Tree Source # | |
MonadBase b m => MonadBase b (Tree m) Source # | |
MonadWriter w m => MonadWriter w (Tree m) Source # | |
MonadState s m => MonadState s (Tree m) Source # | |
MonadReader r m => MonadReader r (Tree m) Source # | |
MonadError e m => MonadError e (Tree m) Source # | |
Monad m => Monad (Tree m) Source # | |
Functor m => Functor (Tree m) Source # | |
Monad m => Applicative (Tree m) Source # | |
Show1 m => Show1 (Tree m) Source # | |
MonadIO m => MonadIO (Tree m) Source # | |
MonadPlus m => Alternative (Tree m) Source # | |
MonadPlus m => MonadPlus (Tree m) Source # | |
MonadCatch m => MonadCatch (Tree m) Source # | |
MonadThrow m => MonadThrow (Tree m) Source # | |
PrimMonad m => PrimMonad (Tree m) Source # | |
MonadResource m => MonadResource (Tree m) Source # | |
MFunctor * Tree Source # | |
(Show1 m, Show a) => Show (Tree m a) Source # | |
type Transformer f Tree m Source # | |
type PrimState (Tree m) Source # | |
A node in an effectful tree, as well as its unevaluated children.
Node | |
|
unfold :: Monad m => (a -> [a]) -> a -> Tree m a Source #
Create a tree from a value and an unfolding function.
unfoldForest :: Monad m => (a -> [a]) -> a -> [Tree m a] Source #
Create a forest from a value and an unfolding function.