Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Tree.Knuth.Forest
- data KnuthForest a
- = Fork {
- kNode :: a
- kChildren :: KnuthForest a
- kSiblings :: KnuthForest a
- | Nil
- = Fork {
- size :: KnuthForest a -> Int
- elem :: Eq a => a -> KnuthForest a -> Bool
- elemPath :: Eq a => [a] -> KnuthForest a -> Bool
- isSubforestOf :: Eq a => KnuthForest a -> KnuthForest a -> Bool
- isSubforestOf' :: Eq a => KnuthForest a -> KnuthForest a -> Bool
- isProperSubforestOf :: Eq a => KnuthForest a -> KnuthForest a -> Bool
- isProperSubforestOf' :: Eq a => KnuthForest a -> KnuthForest a -> Bool
- isSiblingOf :: Eq a => a -> KnuthForest a -> Bool
- isChildOf :: Eq a => a -> KnuthForest a -> Bool
- isDescendantOf :: Eq a => a -> KnuthForest a -> Bool
- isProperDescendantOf :: Eq a => a -> KnuthForest a -> Bool
- singleton :: a -> KnuthForest a
- delete :: Eq a => a -> KnuthForest a -> KnuthForest a
- union :: KnuthForest a -> KnuthForest a -> KnuthForest a
- intersection :: Eq a => KnuthForest a -> KnuthForest a -> KnuthForest a
- difference :: Eq a => KnuthForest a -> KnuthForest a -> KnuthForest a
- toForest :: KnuthForest a -> Forest a
- fromForest :: Forest a -> KnuthForest a
Forest
data KnuthForest a #
Constructors
Fork | |
Fields
| |
Nil |
Instances
Monad KnuthForest # | Breadth-first |
Functor KnuthForest # | |
Applicative KnuthForest # | Zippy |
Foldable KnuthForest # | Breadth-first |
Traversable KnuthForest # | |
Alternative KnuthForest # | |
MonadPlus KnuthForest # | |
Witherable KnuthForest # | |
RoseTree KnuthForest # | |
HasSingleton a (KnuthForest a) # | |
Eq a => HasDelete a (KnuthForest a) # | |
Eq a => Eq (KnuthForest a) # | |
Data a => Data (KnuthForest a) # | |
Ord a => Ord (KnuthForest a) # | Siblings before children |
Show a => Show (KnuthForest a) # | |
Generic (KnuthForest a) # | |
Semigroup (KnuthForest a) # | |
Monoid (KnuthForest a) # | |
Arbitrary a => Arbitrary (KnuthForest a) # | |
NFData a => NFData (KnuthForest a) # | |
HasUnion (KnuthForest a) # | |
Eq a => HasIntersection (KnuthForest a) # | |
Eq a => HasDifference (KnuthForest a) # | |
HasEmpty (KnuthForest a) # | |
HasSize (KnuthForest a) # | |
type Rep (KnuthForest a) # | |
type Tail (KnuthForest a) # | |
type Head (KnuthForest a) # | |
Query
size :: KnuthForest a -> Int #
elem :: Eq a => a -> KnuthForest a -> Bool #
elemPath :: Eq a => [a] -> KnuthForest a -> Bool #
isSubforestOf :: Eq a => KnuthForest a -> KnuthForest a -> Bool #
isSubforestOf' :: Eq a => KnuthForest a -> KnuthForest a -> Bool #
isProperSubforestOf :: Eq a => KnuthForest a -> KnuthForest a -> Bool #
No siblings
isProperSubforestOf' :: Eq a => KnuthForest a -> KnuthForest a -> Bool #
Depth-first
isSiblingOf :: Eq a => a -> KnuthForest a -> Bool #
isChildOf :: Eq a => a -> KnuthForest a -> Bool #
depth of one
isDescendantOf :: Eq a => a -> KnuthForest a -> Bool #
isProperDescendantOf :: Eq a => a -> KnuthForest a -> Bool #
Construction
singleton :: a -> KnuthForest a #
delete :: Eq a => a -> KnuthForest a -> KnuthForest a #
Combination
union :: KnuthForest a -> KnuthForest a -> KnuthForest a #
intersection :: Eq a => KnuthForest a -> KnuthForest a -> KnuthForest a #
difference :: Eq a => KnuthForest a -> KnuthForest a -> KnuthForest a #
Removes the possible subtree on the right, from the left.
toForest :: KnuthForest a -> Forest a #
fromForest :: Forest a -> KnuthForest a #