ral-0.1: Random access lists
Safe Haskell Safe-Inferred
Language Haskell2010

Data.RAList.Tree

Synopsis

Documentation

newtype Leaf a Source #

A Leaf is isomorphic to Identity , but we reimplement it here to have domain specific type. The short constructor name is a bonus.

Constructors

Lf a

Instances

Instances details
Functor Leaf Source #
Instance details

Defined in Data.RAList.Tree.Internal

Foldable Leaf Source #
Instance details

Defined in Data.RAList.Tree.Internal

Traversable Leaf Source #
Instance details

Defined in Data.RAList.Tree.Internal

Distributive Leaf Source #
Instance details

Defined in Data.RAList.Tree.Internal

Representable Leaf Source #
Instance details

Defined in Data.RAList.Tree.Internal

Associated Types

type Rep Leaf Source #

Traversable1 Leaf Source #
Instance details

Defined in Data.RAList.Tree.Internal

Methods

traverse1 :: Apply f => (a -> f b) -> Leaf a -> f ( Leaf b) Source #

sequence1 :: Apply f => Leaf (f b) -> f ( Leaf b) Source #

Foldable1 Leaf Source #
Instance details

Defined in Data.RAList.Tree.Internal

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

Defined in Data.RAList.Tree.Internal

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

Defined in Data.RAList.Tree.Internal

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

Defined in Data.RAList.Tree.Internal

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

Defined in Data.RAList.Tree.Internal

Methods

rnf :: Leaf a -> () Source #

Hashable a => Hashable ( Leaf a) Source #
Instance details

Defined in Data.RAList.Tree.Internal

type Rep Leaf Source #
Instance details

Defined in Data.RAList.Tree.Internal

type Rep Leaf = ()

data Node f a Source #

Node is a product of two f . This way we can form a perfect binary tree.

Constructors

Nd (f a) (f a)

Instances

Instances details
Functor f => Functor ( Node f) Source #
Instance details

Defined in Data.RAList.Tree.Internal

Methods

fmap :: (a -> b) -> Node f a -> Node f b Source #

(<$) :: a -> Node f b -> Node f a Source #

Foldable f => Foldable ( Node f) Source #
Instance details

Defined in Data.RAList.Tree.Internal

Traversable f => Traversable ( Node f) Source #
Instance details

Defined in Data.RAList.Tree.Internal

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Node f a -> f0 ( Node f b) Source #

sequenceA :: Applicative f0 => Node f (f0 a) -> f0 ( Node f a) Source #

mapM :: Monad m => (a -> m b) -> Node f a -> m ( Node f b) Source #

sequence :: Monad m => Node f (m a) -> m ( Node f a) Source #

Distributive f => Distributive ( Node f) Source #
Instance details

Defined in Data.RAList.Tree.Internal

Methods

distribute :: Functor f0 => f0 ( Node f a) -> Node f (f0 a) Source #

collect :: Functor f0 => (a -> Node f b) -> f0 a -> Node f (f0 b) Source #

distributeM :: Monad m => m ( Node f a) -> Node f (m a) Source #

collectM :: Monad m => (a -> Node f b) -> m a -> Node f (m b) Source #

Representable f => Representable ( Node f) Source #
Instance details

Defined in Data.RAList.Tree.Internal

Associated Types

type Rep ( Node f) Source #

Traversable1 f => Traversable1 ( Node f) Source #
Instance details

Defined in Data.RAList.Tree.Internal

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Node f a -> f0 ( Node f b) Source #

sequence1 :: Apply f0 => Node f (f0 b) -> f0 ( Node f b) Source #

Foldable1 f => Foldable1 ( Node f) Source #
Instance details

Defined in Data.RAList.Tree.Internal

Eq (f a) => Eq ( Node f a) Source #
Instance details

Defined in Data.RAList.Tree.Internal

Ord (f a) => Ord ( Node f a) Source #
Instance details

Defined in Data.RAList.Tree.Internal

Show (f a) => Show ( Node f a) Source #
Instance details

Defined in Data.RAList.Tree.Internal

NFData (f a) => NFData ( Node f a) Source #
Instance details

Defined in Data.RAList.Tree.Internal

Methods

rnf :: Node f a -> () Source #

Hashable (f a) => Hashable ( Node f a) Source #
Instance details

Defined in Data.RAList.Tree.Internal

type Rep ( Node f) Source #
Instance details

Defined in Data.RAList.Tree.Internal

type Rep ( Node f) = Dir ( Rep f)

data Dir a Source #

Direction in Node .

Constructors

L a
R a

Instances

Instances details
Functor Dir Source #
Instance details

Defined in Data.RAList.Tree.Internal

Methods

fmap :: (a -> b) -> Dir a -> Dir b Source #

(<$) :: a -> Dir b -> Dir a Source #

Foldable Dir Source #
Instance details

Defined in Data.RAList.Tree.Internal

Traversable Dir Source #
Instance details

Defined in Data.RAList.Tree.Internal

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

Defined in Data.RAList.Tree.Internal

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

Defined in Data.RAList.Tree.Internal

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

Defined in Data.RAList.Tree.Internal