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

Safe HaskellNone
LanguageHaskell2010

Data.Tree.Hash

Contents

Synopsis

Documentation

data HashTree a Source #

Constructors

HashTree 

Fields

Instances

Foldable HashTree Source # 

Methods

fold :: Monoid m => HashTree m -> m #

foldMap :: Monoid m => (a -> m) -> HashTree a -> m #

foldr :: (a -> b -> b) -> b -> HashTree a -> b #

foldr' :: (a -> b -> b) -> b -> HashTree a -> b #

foldl :: (b -> a -> b) -> b -> HashTree a -> b #

foldl' :: (b -> a -> b) -> b -> HashTree a -> b #

foldr1 :: (a -> a -> a) -> HashTree a -> a #

foldl1 :: (a -> a -> a) -> HashTree a -> a #

toList :: HashTree a -> [a] #

null :: HashTree a -> Bool #

length :: HashTree a -> Int #

elem :: Eq a => a -> HashTree a -> Bool #

maximum :: Ord a => HashTree a -> a #

minimum :: Ord a => HashTree a -> a #

sum :: Num a => HashTree a -> a #

product :: Num a => HashTree a -> a #

Foldable1 HashTree Source # 

Methods

fold1 :: Semigroup m => HashTree m -> m #

foldMap1 :: Semigroup m => (a -> m) -> HashTree a -> m #

toNonEmpty :: HashTree a -> NonEmpty a #

RoseTree HashTree Source # 

Methods

(@->) :: Head (HashTree a) -> Tail (HashTree a) -> HashTree a Source #

HasSingleton a (HashTree a) Source # 

Methods

singleton :: a -> HashTree a #

Eq a => Eq (HashTree a) Source # 

Methods

(==) :: HashTree a -> HashTree a -> Bool #

(/=) :: HashTree a -> HashTree a -> Bool #

(Eq a, Hashable a, Data a) => Data (HashTree a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashTree a -> c (HashTree a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HashTree a) #

toConstr :: HashTree a -> Constr #

dataTypeOf :: HashTree a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HashTree a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HashTree a)) #

gmapT :: (forall b. Data b => b -> b) -> HashTree a -> HashTree a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashTree a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashTree a -> r #

gmapQ :: (forall d. Data d => d -> u) -> HashTree a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HashTree a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashTree a -> m (HashTree a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashTree a -> m (HashTree a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashTree a -> m (HashTree a) #

Show a => Show (HashTree a) Source # 

Methods

showsPrec :: Int -> HashTree a -> ShowS #

show :: HashTree a -> String #

showList :: [HashTree a] -> ShowS #

Generic (HashTree a) Source # 

Associated Types

type Rep (HashTree a) :: * -> * #

Methods

from :: HashTree a -> Rep (HashTree a) x #

to :: Rep (HashTree a) x -> HashTree a #

(Eq a, Hashable a) => Semigroup (HashTree a) Source # 

Methods

(<>) :: HashTree a -> HashTree a -> HashTree a #

sconcat :: NonEmpty (HashTree a) -> HashTree a #

stimes :: Integral b => b -> HashTree a -> HashTree a #

(Eq a, Hashable a, Arbitrary a) => Arbitrary (HashTree a) Source # 

Methods

arbitrary :: Gen (HashTree a) #

shrink :: HashTree a -> [HashTree a] #

NFData a => NFData (HashTree a) Source # 

Methods

rnf :: HashTree a -> () #

Hashable a => Hashable (HashTree a) Source # 

Methods

hashWithSalt :: Int -> HashTree a -> Int #

hash :: HashTree a -> Int #

HasSize (HashTree a) Source # 

Methods

size :: HashTree a -> Int #

type Rep (HashTree a) Source # 
type Rep (HashTree a) = D1 (MetaData "HashTree" "Data.Tree.Hash" "rose-trees-0.0.4.4-J5VMBnbNq6E6urmcHMQdNe" False) (C1 (MetaCons "HashTree" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "sNode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a)) (S1 (MetaSel (Just Symbol "sChildren") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (HashSet (HashTree a))))))
type Tail (HashTree a) Source # 
type Tail (HashTree a) = HashSet (HashTree a)
type Head (HashTree a) Source # 
type Head (HashTree a) = a

Query

elem :: Eq a => a -> HashTree a -> Bool Source #

set-like alias for isDescendantOf.

elemPath :: Eq a => [a] -> HashTree a -> Bool Source #

isChildOf :: Eq a => a -> HashTree a -> Bool Source #

isSubtreeOf :: (Eq a, Hashable a) => HashTree a -> HashTree a -> Bool Source #

Heirarchical analogue to subseteq.

isSubtreeOf' :: (Eq a, Hashable a) => HashTree a -> HashTree a -> Bool Source #

Bottom-up version

isProperSubtreeOf' :: (Eq a, Hashable a) => HashTree a -> HashTree a -> Bool Source #

Bottom-up version

eqHead :: Eq a => HashTree a -> HashTree a -> Bool Source #

Construction

delete :: (Eq a, Hashable a) => a -> HashTree a -> Maybe (HashTree a) Source #

Filtering

filter :: (Eq a, Hashable a) => (a -> Bool) -> HashTree a -> Maybe (HashTree a) Source #

Mapping

map :: (Eq b, Hashable b) => (a -> b) -> HashTree a -> HashTree b Source #

mapMaybe :: (Eq b, Hashable b) => (a -> Maybe b) -> HashTree a -> Maybe (HashTree b) Source #

fromTree :: (Hashable a, Eq a) => Tree a -> HashTree a Source #