-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Various trie implementations in Haskell -- -- Please see the README on Github at -- https://github.com/athanclark/rose-trees#readme @package rose-trees @version 0.0.4.5 module Data.Tree.Hash data HashTree a HashTree :: !a -> !HashSet (HashTree a) -> HashTree a [sNode] :: HashTree a -> !a [sChildren] :: HashTree a -> !HashSet (HashTree a) -- | set-like alias for isDescendantOf. elem :: Eq a => a -> HashTree a -> Bool elemPath :: Eq a => [a] -> HashTree a -> Bool size :: HashTree a -> Int isChildOf :: Eq a => a -> HashTree a -> Bool isDescendantOf :: Eq a => a -> HashTree a -> Bool -- | Heirarchical analogue to subseteq. isSubtreeOf :: (Eq a, Hashable a) => HashTree a -> HashTree a -> Bool -- | Bottom-up version isSubtreeOf' :: (Eq a, Hashable a) => HashTree a -> HashTree a -> Bool isProperSubtreeOf :: (Eq a, Hashable a) => HashTree a -> HashTree a -> Bool -- | Bottom-up version isProperSubtreeOf' :: (Eq a, Hashable a) => HashTree a -> HashTree a -> Bool eqHead :: Eq a => HashTree a -> HashTree a -> Bool insertChild :: (Eq a, Hashable a) => HashTree a -> HashTree a -> HashTree a delete :: (Eq a, Hashable a) => a -> HashTree a -> Maybe (HashTree a) singleton :: a -> HashTree a filter :: (Eq a, Hashable a) => (a -> Bool) -> HashTree a -> Maybe (HashTree a) map :: (Eq b, Hashable b) => (a -> b) -> HashTree a -> HashTree b mapMaybe :: (Eq b, Hashable b) => (a -> Maybe b) -> HashTree a -> Maybe (HashTree b) toTree :: HashTree a -> Tree a fromTree :: (Hashable a, Eq a) => Tree a -> HashTree a instance (Data.Data.Data a, Data.Hashable.Class.Hashable a, GHC.Classes.Eq a) => Data.Data.Data (Data.Tree.Hash.HashTree a) instance GHC.Generics.Generic (Data.Tree.Hash.HashTree a) instance Data.Foldable.Foldable Data.Tree.Hash.HashTree instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Tree.Hash.HashTree a) instance GHC.Show.Show a => GHC.Show.Show (Data.Tree.Hash.HashTree a) instance Data.Hashable.Class.Hashable a => Data.Hashable.Class.Hashable (Data.Tree.Hash.HashTree a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Data.Tree.Hash.HashTree a) instance (GHC.Classes.Eq a, Data.Hashable.Class.Hashable a, Test.QuickCheck.Arbitrary.Arbitrary a) => Test.QuickCheck.Arbitrary.Arbitrary (Data.Tree.Hash.HashTree a) instance Data.Semigroup.Foldable.Class.Foldable1 Data.Tree.Hash.HashTree instance Data.Set.Class.HasSize (Data.Tree.Hash.HashTree a) instance Data.Set.Class.HasSingleton a (Data.Tree.Hash.HashTree a) instance (GHC.Classes.Eq a, Data.Hashable.Class.Hashable a) => GHC.Base.Semigroup (Data.Tree.Hash.HashTree a) module Data.Tree.Knuth.Forest data KnuthForest a Fork :: a -> KnuthForest a -> KnuthForest a -> KnuthForest a [kNode] :: KnuthForest a -> a [kChildren] :: KnuthForest a -> KnuthForest a [kSiblings] :: KnuthForest a -> KnuthForest a Nil :: KnuthForest a 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 -- | No siblings isProperSubforestOf :: Eq a => KnuthForest a -> KnuthForest a -> Bool -- | Depth-first isProperSubforestOf' :: Eq a => KnuthForest a -> KnuthForest a -> Bool isSiblingOf :: Eq a => a -> KnuthForest a -> Bool -- | depth of one 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 -- | Removes the possible subtree on the right, from the left. difference :: Eq a => KnuthForest a -> KnuthForest a -> KnuthForest a toForest :: KnuthForest a -> Forest a fromForest :: Forest a -> KnuthForest a instance Data.Data.Data a => Data.Data.Data (Data.Tree.Knuth.Forest.KnuthForest a) instance GHC.Generics.Generic (Data.Tree.Knuth.Forest.KnuthForest a) instance Data.Traversable.Traversable Data.Tree.Knuth.Forest.KnuthForest instance GHC.Base.Functor Data.Tree.Knuth.Forest.KnuthForest instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Tree.Knuth.Forest.KnuthForest a) instance GHC.Show.Show a => GHC.Show.Show (Data.Tree.Knuth.Forest.KnuthForest a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Data.Tree.Knuth.Forest.KnuthForest a) instance Test.QuickCheck.Arbitrary.Arbitrary a => Test.QuickCheck.Arbitrary.Arbitrary (Data.Tree.Knuth.Forest.KnuthForest a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.Tree.Knuth.Forest.KnuthForest a) instance GHC.Base.Applicative Data.Tree.Knuth.Forest.KnuthForest instance GHC.Base.Alternative Data.Tree.Knuth.Forest.KnuthForest instance GHC.Base.Monad Data.Tree.Knuth.Forest.KnuthForest instance GHC.Base.MonadPlus Data.Tree.Knuth.Forest.KnuthForest instance GHC.Base.Semigroup (Data.Tree.Knuth.Forest.KnuthForest a) instance GHC.Base.Monoid (Data.Tree.Knuth.Forest.KnuthForest a) instance Data.Foldable.Foldable Data.Tree.Knuth.Forest.KnuthForest instance Data.Witherable.Class.Filterable Data.Tree.Knuth.Forest.KnuthForest instance Data.Set.Class.HasUnion (Data.Tree.Knuth.Forest.KnuthForest a) instance GHC.Classes.Eq a => Data.Set.Class.HasIntersection (Data.Tree.Knuth.Forest.KnuthForest a) instance GHC.Classes.Eq a => Data.Set.Class.HasDifference (Data.Tree.Knuth.Forest.KnuthForest a) instance Data.Set.Class.HasSize (Data.Tree.Knuth.Forest.KnuthForest a) instance Data.Set.Class.HasEmpty (Data.Tree.Knuth.Forest.KnuthForest a) instance Data.Set.Class.HasSingleton a (Data.Tree.Knuth.Forest.KnuthForest a) instance GHC.Classes.Eq a => Data.Set.Class.HasDelete a (Data.Tree.Knuth.Forest.KnuthForest a) -- | An implementation of left-child, right-sibling binary trees. module Data.Tree.Knuth newtype KnuthTree a KnuthTree :: (a, KnuthForest a) -> KnuthTree a [unKnuthTree] :: KnuthTree a -> (a, KnuthForest a) firstTree :: KnuthForest a -> Maybe (KnuthTree a) size :: KnuthTree a -> Int elem :: Eq a => a -> KnuthTree a -> Bool elemPath :: Eq a => [a] -> KnuthTree a -> Bool isSubtreeOf :: Eq a => KnuthTree a -> KnuthTree a -> Bool -- | Bottom-up depth-first isSubtreeOf' :: Eq a => KnuthTree a -> KnuthTree a -> Bool isProperSubtreeOf :: Eq a => KnuthTree a -> KnuthTree a -> Bool -- | Bottom-up depth-first isProperSubtreeOf' :: Eq a => KnuthTree a -> KnuthTree a -> Bool isChildOf :: Eq a => a -> KnuthTree a -> Bool isDescendantOf :: Eq a => a -> KnuthTree a -> Bool isProperDescendantOf :: Eq a => a -> KnuthTree a -> Bool singleton :: a -> KnuthTree a delete :: Eq a => a -> KnuthTree a -> Maybe (KnuthTree a) union :: KnuthTree a -> KnuthTree a -> KnuthTree a intersection :: Eq a => KnuthTree a -> KnuthTree a -> Maybe (KnuthTree a) difference :: Eq a => KnuthTree a -> KnuthTree a -> Maybe (KnuthTree a) toTree :: KnuthTree a -> Tree a fromTree :: Tree a -> KnuthTree a instance Data.Data.Data a => Data.Data.Data (Data.Tree.Knuth.KnuthTree a) instance GHC.Generics.Generic (Data.Tree.Knuth.KnuthTree a) instance Data.Traversable.Traversable Data.Tree.Knuth.KnuthTree instance Data.Foldable.Foldable Data.Tree.Knuth.KnuthTree instance GHC.Base.Functor Data.Tree.Knuth.KnuthTree instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Tree.Knuth.KnuthTree a) instance GHC.Show.Show a => GHC.Show.Show (Data.Tree.Knuth.KnuthTree a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Data.Tree.Knuth.KnuthTree a) instance Test.QuickCheck.Arbitrary.Arbitrary a => Test.QuickCheck.Arbitrary.Arbitrary (Data.Tree.Knuth.KnuthTree a) instance GHC.Base.Applicative Data.Tree.Knuth.KnuthTree instance GHC.Base.Monad Data.Tree.Knuth.KnuthTree instance GHC.Base.Semigroup (Data.Tree.Knuth.KnuthTree a) instance Data.Set.Class.HasSize (Data.Tree.Knuth.KnuthTree a) instance Data.Set.Class.HasSingleton a (Data.Tree.Knuth.KnuthTree a) instance Data.Set.Class.HasUnion (Data.Tree.Knuth.KnuthTree a) module Data.Tree.Set data SetTree a SetTree :: a -> !Set (SetTree a) -> SetTree a [sNode] :: SetTree a -> a [sChildren] :: SetTree a -> !Set (SetTree a) -- | set-like alias for isDescendantOf. elem :: Eq a => a -> SetTree a -> Bool elemPath :: Eq a => [a] -> SetTree a -> Bool size :: SetTree a -> Int isChildOf :: Eq a => a -> SetTree a -> Bool isDescendantOf :: Eq a => a -> SetTree a -> Bool -- | Heirarchical analogue to subseteq. isSubtreeOf :: Eq a => SetTree a -> SetTree a -> Bool -- | Bottom-up version isSubtreeOf' :: Eq a => SetTree a -> SetTree a -> Bool isProperSubtreeOf :: Eq a => SetTree a -> SetTree a -> Bool -- | Bottom-up version isProperSubtreeOf' :: Eq a => SetTree a -> SetTree a -> Bool eqHead :: Eq a => SetTree a -> SetTree a -> Bool insertChild :: Ord a => SetTree a -> SetTree a -> SetTree a delete :: Eq a => a -> SetTree a -> Maybe (SetTree a) singleton :: a -> SetTree a filter :: Eq a => (a -> Bool) -> SetTree a -> Maybe (SetTree a) map :: Ord b => (a -> b) -> SetTree a -> SetTree b mapMaybe :: Eq b => (a -> Maybe b) -> SetTree a -> Maybe (SetTree b) toTree :: SetTree a -> Tree a fromTree :: Ord a => Tree a -> SetTree a instance (Data.Data.Data a, GHC.Classes.Ord a) => Data.Data.Data (Data.Tree.Set.SetTree a) instance GHC.Generics.Generic (Data.Tree.Set.SetTree a) instance Data.Foldable.Foldable Data.Tree.Set.SetTree instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.Tree.Set.SetTree a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Tree.Set.SetTree a) instance GHC.Show.Show a => GHC.Show.Show (Data.Tree.Set.SetTree a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Data.Tree.Set.SetTree a) instance (GHC.Classes.Ord a, Test.QuickCheck.Arbitrary.Arbitrary a) => Test.QuickCheck.Arbitrary.Arbitrary (Data.Tree.Set.SetTree a) instance Data.Semigroup.Foldable.Class.Foldable1 Data.Tree.Set.SetTree instance GHC.Classes.Ord a => GHC.Base.Semigroup (Data.Tree.Set.SetTree a) instance Data.Set.Class.HasSize (Data.Tree.Set.SetTree a) instance Data.Set.Class.HasSingleton a (Data.Tree.Set.SetTree a) module Data.Tree.Rose type family Head (x :: *) :: * type family Tail (y :: *) :: * class RoseTree (c :: * -> *) (@->) :: RoseTree c => Head (c a) -> Tail (c a) -> c a infixr 9 @-> instance Data.Tree.Rose.RoseTree Data.Tree.Tree instance Data.Tree.Rose.RoseTree Data.Tree.Knuth.Forest.KnuthForest instance Data.Tree.Rose.RoseTree Data.Tree.Knuth.KnuthTree instance Data.Tree.Rose.RoseTree Data.Tree.Set.SetTree instance Data.Tree.Rose.RoseTree Data.Tree.Hash.HashTree