rose-trees-0.0.3: A collection of rose tree structures.

Safe HaskellNone
LanguageHaskell2010

Data.Tree.Set

Contents

Synopsis

Documentation

data SetTree a Source

Constructors

SetTree 

Fields

sNode :: a
 
sChildren :: Set (SetTree a)
 

Instances

Foldable SetTree Source 
Foldable1 SetTree Source 
RoseTree SetTree Source 
HasSingleton a (SetTree a) Source 
Eq a => Eq (SetTree a) Source 
(Data a, Ord a) => Data (SetTree a) Source 
Ord a => Ord (SetTree a) Source 
Show a => Show (SetTree a) Source 
Generic (SetTree a) Source 
NFData a => NFData (SetTree a) Source 
HasSize (SetTree a) Source 
(Ord a, Arbitrary a) => Arbitrary (SetTree a) Source 
type Rep (SetTree a) Source 
type Tail (SetTree a) = Set (SetTree a) Source 
type Head (SetTree a) = a Source 

Query

elem :: Eq a => a -> SetTree a -> Bool Source

set-like alias for isDescendantOf.

isChildOf :: Eq a => a -> SetTree a -> Bool Source

isDescendantOf :: Eq a => a -> SetTree a -> Bool Source

isSubtreeOf :: Eq a => SetTree a -> SetTree a -> Bool Source

Heirarchical analogue to subseteq.

isSubtreeOf' :: Eq a => SetTree a -> SetTree a -> Bool Source

Bottom-up version

isProperSubtreeOf' :: Eq a => SetTree a -> SetTree a -> Bool Source

Bottom-up version

eqHead :: Eq a => SetTree a -> SetTree a -> Bool Source

Construction

delete :: Eq a => a -> SetTree a -> Maybe (SetTree a) Source

Filtering

filter :: Eq a => (a -> Bool) -> SetTree a -> Maybe (SetTree a) Source

Mapping

map :: Ord b => (a -> b) -> SetTree a -> SetTree b Source

mapMaybe :: Eq b => (a -> Maybe b) -> SetTree a -> Maybe (SetTree b) Source