magma-0.5.0.0: magma is an algebraic structure.

Safe HaskellSafe
LanguageHaskell2010

Data.Magma

Synopsis

Documentation

class Magma a where Source #

Methods

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

Instances
Magma () Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: () -> () -> () Source #

Magma All Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: All -> All -> All Source #

Magma Any Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: Any -> Any -> Any Source #

Ord a => Magma (Min a) Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: Min a -> Min a -> Min a Source #

Ord a => Magma (Max a) Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: Max a -> Max a -> Max a Source #

Monoid m => Magma (WrappedMonoid m) Source # 
Instance details

Defined in Data.Magma

Magma (First a) Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: First a -> First a -> First a Source #

Magma (Last a) Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: Last a -> Last a -> Last a Source #

Magma a => Magma (Dual a) Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: Dual a -> Dual a -> Dual a Source #

Magma (Endo a) Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: Endo a -> Endo a -> Endo a Source #

Num a => Magma (Sum a) Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: Sum a -> Sum a -> Sum a Source #

Num a => Magma (Product a) Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: Product a -> Product a -> Product a Source #

Magma (BinaryTree a) Source # 
Instance details

Defined in Data.Magma

(Magma a, Magma b) => Magma (a, b) Source # 
Instance details

Defined in Data.Magma

Methods

(<>) :: (a, b) -> (a, b) -> (a, b) Source #

data BinaryTree a Source #

Constructors

Leaf a 
Node (BinaryTree a) (BinaryTree a) 
Instances
Monad BinaryTree Source # 
Instance details

Defined in Data.Magma

Methods

(>>=) :: BinaryTree a -> (a -> BinaryTree b) -> BinaryTree b #

(>>) :: BinaryTree a -> BinaryTree b -> BinaryTree b #

return :: a -> BinaryTree a #

fail :: String -> BinaryTree a #

Functor BinaryTree Source # 
Instance details

Defined in Data.Magma

Methods

fmap :: (a -> b) -> BinaryTree a -> BinaryTree b #

(<$) :: a -> BinaryTree b -> BinaryTree a #

Applicative BinaryTree Source # 
Instance details

Defined in Data.Magma

Methods

pure :: a -> BinaryTree a #

(<*>) :: BinaryTree (a -> b) -> BinaryTree a -> BinaryTree b #

liftA2 :: (a -> b -> c) -> BinaryTree a -> BinaryTree b -> BinaryTree c #

(*>) :: BinaryTree a -> BinaryTree b -> BinaryTree b #

(<*) :: BinaryTree a -> BinaryTree b -> BinaryTree a #

Foldable BinaryTree Source # 
Instance details

Defined in Data.Magma

Methods

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

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

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

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

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

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

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

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

toList :: BinaryTree a -> [a] #

null :: BinaryTree a -> Bool #

length :: BinaryTree a -> Int #

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

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

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

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

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

Traversable BinaryTree Source # 
Instance details

Defined in Data.Magma

Methods

traverse :: Applicative f => (a -> f b) -> BinaryTree a -> f (BinaryTree b) #

sequenceA :: Applicative f => BinaryTree (f a) -> f (BinaryTree a) #

mapM :: Monad m => (a -> m b) -> BinaryTree a -> m (BinaryTree b) #

sequence :: Monad m => BinaryTree (m a) -> m (BinaryTree a) #

Eq a => Eq (BinaryTree a) Source # 
Instance details

Defined in Data.Magma

Methods

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

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

Ord a => Ord (BinaryTree a) Source # 
Instance details

Defined in Data.Magma

Read a => Read (BinaryTree a) Source # 
Instance details

Defined in Data.Magma

Show a => Show (BinaryTree a) Source # 
Instance details

Defined in Data.Magma

NFData a => NFData (BinaryTree a) Source # 
Instance details

Defined in Data.Magma

Methods

rnf :: BinaryTree a -> () #

Magma (BinaryTree a) Source # 
Instance details

Defined in Data.Magma

cataBinaryTree :: (a -> r) -> (r -> r -> r) -> BinaryTree a -> r Source #

anaBinaryTree :: (b -> Either a (b, b)) -> b -> BinaryTree a Source #

foldMap :: Magma m => (a -> m) -> BinaryTree a -> m Source #

_Leaf :: forall p f a. (Choice p, Applicative f) => p a (f a) -> p (BinaryTree a) (f (BinaryTree a)) Source #

_Leaf :: Prism' (BinaryTree a) a

_Node :: forall p f a. (Choice p, Applicative f) => p (BinaryTree a, BinaryTree a) (f (BinaryTree a, BinaryTree a)) -> p (BinaryTree a) (f (BinaryTree a)) Source #

_Node :: Prism' (BinaryTree a) (BinaryTree a, BinaryTree a)

nodeLeft :: Applicative f => (BinaryTree a -> f (BinaryTree a)) -> BinaryTree a -> f (BinaryTree a) Source #

nodeLeft :: Traversal' (BinaryTree a) (BinaryTree a)

nodeRight :: Applicative f => (BinaryTree a -> f (BinaryTree a)) -> BinaryTree a -> f (BinaryTree a) Source #

nodeRight :: Traversal' (BinaryTree a) (BinaryTree a)