Maintainer | bastiaan.heeren@ou.nl |
---|---|
Stability | provisional |
Portability | portable (depends on ghc) |
Safe Haskell | None |
Language | Haskell98 |
- data CyclicTree a b
- node :: a -> [CyclicTree a b] -> CyclicTree a b
- node0 :: a -> CyclicTree a b
- node1 :: a -> CyclicTree a b -> CyclicTree a b
- node2 :: a -> CyclicTree a b -> CyclicTree a b -> CyclicTree a b
- leaf :: b -> CyclicTree a b
- label :: IsId n => n -> CyclicTree a b -> CyclicTree a b
- isNode :: CyclicTree a b -> Maybe (a, [CyclicTree a b])
- isLeaf :: CyclicTree a b -> Maybe b
- isLabel :: CyclicTree a b -> Maybe (Id, CyclicTree a b)
- replaceNode :: (a -> [CyclicTree a b] -> CyclicTree a b) -> CyclicTree a b -> CyclicTree a b
- replaceLeaf :: (b -> CyclicTree a c) -> CyclicTree a b -> CyclicTree a c
- replaceLabel :: (Id -> CyclicTree a b -> CyclicTree a b) -> CyclicTree a b -> CyclicTree a b
- shrinkTree :: CyclicTree a b -> [CyclicTree a b]
- fold :: CyclicTreeAlg a b t -> CyclicTree a b -> t
- foldUnwind :: CyclicTreeAlg a b t -> CyclicTree a b -> t
- data CyclicTreeAlg a b t
- fNode :: CyclicTreeAlg a b t -> a -> [t] -> t
- fLeaf :: CyclicTreeAlg a b t -> b -> t
- fLabel :: CyclicTreeAlg a b t -> Id -> t -> t
- fRec :: CyclicTreeAlg a b t -> Int -> t -> t
- fVar :: CyclicTreeAlg a b t -> Int -> t
- emptyAlg :: CyclicTreeAlg a b t
- monoidAlg :: Monoid m => CyclicTreeAlg a b m
Data type
data CyclicTree a b Source
BiFunctor CyclicTree Source | |
Monad (CyclicTree d) Source | |
Functor (CyclicTree d) Source | |
Applicative (CyclicTree d) Source | |
Foldable (CyclicTree d) Source | |
Traversable (CyclicTree d) Source | |
(Show a, Show b) => Show (CyclicTree a b) Source | |
(Arbitrary a, Arbitrary b) => Arbitrary (CyclicTree a b) Source | |
Fix (CyclicTree a b) Source |
Constructor functions
node :: a -> [CyclicTree a b] -> CyclicTree a b Source
node0 :: a -> CyclicTree a b Source
node1 :: a -> CyclicTree a b -> CyclicTree a b Source
node2 :: a -> CyclicTree a b -> CyclicTree a b -> CyclicTree a b Source
leaf :: b -> CyclicTree a b Source
label :: IsId n => n -> CyclicTree a b -> CyclicTree a b Source
Querying
isNode :: CyclicTree a b -> Maybe (a, [CyclicTree a b]) Source
isLeaf :: CyclicTree a b -> Maybe b Source
isLabel :: CyclicTree a b -> Maybe (Id, CyclicTree a b) Source
Replace functions
replaceNode :: (a -> [CyclicTree a b] -> CyclicTree a b) -> CyclicTree a b -> CyclicTree a b Source
replaceLeaf :: (b -> CyclicTree a c) -> CyclicTree a b -> CyclicTree a c Source
replaceLabel :: (Id -> CyclicTree a b -> CyclicTree a b) -> CyclicTree a b -> CyclicTree a b Source
shrinkTree :: CyclicTree a b -> [CyclicTree a b] Source
Fold and algebra
fold :: CyclicTreeAlg a b t -> CyclicTree a b -> t Source
foldUnwind :: CyclicTreeAlg a b t -> CyclicTree a b -> t Source
data CyclicTreeAlg a b t Source
fNode :: CyclicTreeAlg a b t -> a -> [t] -> t Source
fLeaf :: CyclicTreeAlg a b t -> b -> t Source
fLabel :: CyclicTreeAlg a b t -> Id -> t -> t Source
fRec :: CyclicTreeAlg a b t -> Int -> t -> t Source
fVar :: CyclicTreeAlg a b t -> Int -> t Source
emptyAlg :: CyclicTreeAlg a b t Source
monoidAlg :: Monoid m => CyclicTreeAlg a b m Source