recursion-schemes-5.2.3: Representing common recursion patterns as higher-order functions

Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.Functor.Base

Description

Base Functors for standard types not already expressed as a fixed point.

Synopsis

- data ListF a b
  - = Nil
  - | Cons a b
- data NonEmptyF a b = NonEmptyF {
  - head :: a
  - tail :: Maybe b
  }
- data TreeF a b = NodeF a (ForestF a b)
- type ForestF a b = [b]

# Documentation

data ListF a b Source #

Base functor of `[]`.

Constructors

Nil |
Cons a b |

#### Instances

Instances details

Bifoldable ListF Source # |
Instance details Defined in Data.Functor.Base Methods bifold :: Monoid m => ListF m m -> m Source # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> ListF a b -> m Source # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> ListF a b -> c Source # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> ListF a b -> c Source #
Bifunctor ListF Source # |
Instance details Defined in Data.Functor.Base Methods bimap :: (a -> b) -> (c -> d) -> ListF a c -> ListF b d Source # first :: (a -> b) -> ListF a c -> ListF b c Source # second :: (b -> c) -> ListF a b -> ListF a c Source #
Bitraversable ListF Source # |
Instance details Defined in Data.Functor.Base Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> ListF a b -> f (ListF c d) Source #
Eq2 ListF Source # |
Instance details Defined in Data.Functor.Base Methods liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> ListF a c -> ListF b d -> Bool Source #
Ord2 ListF Source # |
Instance details Defined in Data.Functor.Base Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> ListF a c -> ListF b d -> Ordering Source #
Read2 ListF Source # |

Instance details

Defined in Data.Functor.Base

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (ListF a b) Source #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [ListF a b] Source #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (ListF a b) Source #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [ListF a b] Source #

Show2 ListF Source # |
Instance details Defined in Data.Functor.Base Methods liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> ListF a b -> ShowS Source # liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [ListF a b] -> ShowS Source #
Generic1 (ListF a :: Type -> Type) Source # |

Instance details

Defined in Data.Functor.Base

Associated Types

type Rep1 (ListF a :: Type -> Type) |

Instance details

Defined in Data.Functor.Base

type Rep1 (ListF a :: Type -> Type) = D1 ('MetaData "ListF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "Nil" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cons" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

Methods

from1 :: ListF a a0 -> Rep1 (ListF a) a0 Source #

to1 :: Rep1 (ListF a) a0 -> ListF a a0 Source #

Eq a => Eq1 (ListF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftEq :: (a0 -> b -> Bool) -> ListF a a0 -> ListF a b -> Bool Source #
Ord a => Ord1 (ListF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftCompare :: (a0 -> b -> Ordering) -> ListF a a0 -> ListF a b -> Ordering Source #
Read a => Read1 (ListF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (ListF a a0) Source # liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [ListF a a0] Source # liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (ListF a a0) Source # liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [ListF a a0] Source #
Show a => Show1 (ListF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> ListF a a0 -> ShowS Source # liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [ListF a a0] -> ShowS Source #
Functor (ListF a) Source # |
Instance details Defined in Data.Functor.Base Methods fmap :: (a0 -> b) -> ListF a a0 -> ListF a b Source # (<$) :: a0 -> ListF a b -> ListF a a0 Source #
Foldable (ListF a) Source # |

Instance details

Defined in Data.Functor.Base

Methods

fold :: Monoid m => ListF a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> ListF a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> ListF a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> ListF a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> ListF a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> ListF a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> ListF a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> ListF a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> ListF a a0 -> a0 Source #

toList :: ListF a a0 -> [a0] Source #

null :: ListF a a0 -> Bool Source #

length :: ListF a a0 -> Int Source #

elem :: Eq a0 => a0 -> ListF a a0 -> Bool Source #

maximum :: Ord a0 => ListF a a0 -> a0 Source #

minimum :: Ord a0 => ListF a a0 -> a0 Source #

sum :: Num a0 => ListF a a0 -> a0 Source #

product :: Num a0 => ListF a a0 -> a0 Source #

Traversable (ListF a) Source # |
Instance details Defined in Data.Functor.Base Methods traverse :: Applicative f => (a0 -> f b) -> ListF a a0 -> f (ListF a b) Source # sequenceA :: Applicative f => ListF a (f a0) -> f (ListF a a0) Source # mapM :: Monad m => (a0 -> m b) -> ListF a a0 -> m (ListF a b) Source # sequence :: Monad m => ListF a (m a0) -> m (ListF a a0) Source #
Generic (ListF a b) Source # |

Instance details

Defined in Data.Functor.Base

Associated Types

type Rep (ListF a b) |

Instance details

Defined in Data.Functor.Base

type Rep (ListF a b) = D1 ('MetaData "ListF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "Nil" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cons" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)))

Methods

from :: ListF a b -> Rep (ListF a b) x Source #

to :: Rep (ListF a b) x -> ListF a b Source #

(Read a, Read b) => Read (ListF a b) Source # |
Instance details Defined in Data.Functor.Base Methods readsPrec :: Int -> ReadS (ListF a b) Source # readList :: ReadS [ListF a b] Source # readPrec :: ReadPrec (ListF a b) Source # readListPrec :: ReadPrec [ListF a b] Source #
(Show a, Show b) => Show (ListF a b) Source # |
Instance details Defined in Data.Functor.Base Methods showsPrec :: Int -> ListF a b -> ShowS Source # show :: ListF a b -> String Source # showList :: [ListF a b] -> ShowS Source #
(Eq a, Eq b) => Eq (ListF a b) Source # |
Instance details Defined in Data.Functor.Base Methods (==) :: ListF a b -> ListF a b -> Bool Source # (/=) :: ListF a b -> ListF a b -> Bool Source #
(Ord a, Ord b) => Ord (ListF a b) Source # |

Instance details

Defined in Data.Functor.Base

Methods

compare :: ListF a b -> ListF a b -> Ordering Source #

(<) :: ListF a b -> ListF a b -> Bool Source #

(<=) :: ListF a b -> ListF a b -> Bool Source #

(>) :: ListF a b -> ListF a b -> Bool Source #

(>=) :: ListF a b -> ListF a b -> Bool Source #

max :: ListF a b -> ListF a b -> ListF a b Source #

min :: ListF a b -> ListF a b -> ListF a b Source #

type Rep1 (ListF a :: Type -> Type) Source # |

Instance details

Defined in Data.Functor.Base

type Rep1 (ListF a :: Type -> Type) = D1 ('MetaData "ListF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "Nil" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cons" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))

type Rep (ListF a b) Source # |

Instance details

Defined in Data.Functor.Base

type Rep (ListF a b) = D1 ('MetaData "ListF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "Nil" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Cons" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 b)))

data NonEmptyF a b Source #

Base Functor for `NonEmpty`

Constructors

NonEmptyF |

Fields

- head :: a
- tail :: Maybe b

#### Instances

Instances details

Bifoldable NonEmptyF Source # |
Instance details Defined in Data.Functor.Base Methods bifold :: Monoid m => NonEmptyF m m -> m Source # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> NonEmptyF a b -> m Source # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> NonEmptyF a b -> c Source # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> NonEmptyF a b -> c Source #
Bifunctor NonEmptyF Source # |
Instance details Defined in Data.Functor.Base Methods bimap :: (a -> b) -> (c -> d) -> NonEmptyF a c -> NonEmptyF b d Source # first :: (a -> b) -> NonEmptyF a c -> NonEmptyF b c Source # second :: (b -> c) -> NonEmptyF a b -> NonEmptyF a c Source #
Bitraversable NonEmptyF Source # |
Instance details Defined in Data.Functor.Base Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> NonEmptyF a b -> f (NonEmptyF c d) Source #
Eq2 NonEmptyF Source # |
Instance details Defined in Data.Functor.Base Methods liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> NonEmptyF a c -> NonEmptyF b d -> Bool Source #
Ord2 NonEmptyF Source # |
Instance details Defined in Data.Functor.Base Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> NonEmptyF a c -> NonEmptyF b d -> Ordering Source #
Read2 NonEmptyF Source # |

Instance details

Defined in Data.Functor.Base

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (NonEmptyF a b) Source #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [NonEmptyF a b] Source #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (NonEmptyF a b) Source #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [NonEmptyF a b] Source #

Show2 NonEmptyF Source # |
Instance details Defined in Data.Functor.Base Methods liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> NonEmptyF a b -> ShowS Source # liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [NonEmptyF a b] -> ShowS Source #
Generic1 (NonEmptyF a :: Type -> Type) Source # |

Instance details

Defined in Data.Functor.Base

Associated Types

type Rep1 (NonEmptyF a :: Type -> Type) |

Instance details

Defined in Data.Functor.Base

type Rep1 (NonEmptyF a :: Type -> Type) = D1 ('MetaData "NonEmptyF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "NonEmptyF" 'PrefixI 'True) (S1 ('MetaSel ('Just "head") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "tail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))

Methods

from1 :: NonEmptyF a a0 -> Rep1 (NonEmptyF a) a0 Source #

to1 :: Rep1 (NonEmptyF a) a0 -> NonEmptyF a a0 Source #

Eq a => Eq1 (NonEmptyF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftEq :: (a0 -> b -> Bool) -> NonEmptyF a a0 -> NonEmptyF a b -> Bool Source #
Ord a => Ord1 (NonEmptyF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftCompare :: (a0 -> b -> Ordering) -> NonEmptyF a a0 -> NonEmptyF a b -> Ordering Source #
Read a => Read1 (NonEmptyF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (NonEmptyF a a0) Source # liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [NonEmptyF a a0] Source # liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (NonEmptyF a a0) Source # liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [NonEmptyF a a0] Source #
Show a => Show1 (NonEmptyF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> NonEmptyF a a0 -> ShowS Source # liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [NonEmptyF a a0] -> ShowS Source #
Functor (NonEmptyF a) Source # |
Instance details Defined in Data.Functor.Base Methods fmap :: (a0 -> b) -> NonEmptyF a a0 -> NonEmptyF a b Source # (<$) :: a0 -> NonEmptyF a b -> NonEmptyF a a0 Source #
Foldable (NonEmptyF a) Source # |

Instance details

Defined in Data.Functor.Base

Methods

fold :: Monoid m => NonEmptyF a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> NonEmptyF a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> NonEmptyF a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> NonEmptyF a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> NonEmptyF a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> NonEmptyF a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> NonEmptyF a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> NonEmptyF a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> NonEmptyF a a0 -> a0 Source #

toList :: NonEmptyF a a0 -> [a0] Source #

null :: NonEmptyF a a0 -> Bool Source #

length :: NonEmptyF a a0 -> Int Source #

elem :: Eq a0 => a0 -> NonEmptyF a a0 -> Bool Source #

maximum :: Ord a0 => NonEmptyF a a0 -> a0 Source #

minimum :: Ord a0 => NonEmptyF a a0 -> a0 Source #

sum :: Num a0 => NonEmptyF a a0 -> a0 Source #

product :: Num a0 => NonEmptyF a a0 -> a0 Source #

Traversable (NonEmptyF a) Source # |
Instance details Defined in Data.Functor.Base Methods traverse :: Applicative f => (a0 -> f b) -> NonEmptyF a a0 -> f (NonEmptyF a b) Source # sequenceA :: Applicative f => NonEmptyF a (f a0) -> f (NonEmptyF a a0) Source # mapM :: Monad m => (a0 -> m b) -> NonEmptyF a a0 -> m (NonEmptyF a b) Source # sequence :: Monad m => NonEmptyF a (m a0) -> m (NonEmptyF a a0) Source #
Generic (NonEmptyF a b) Source # |

Instance details

Defined in Data.Functor.Base

Associated Types

type Rep (NonEmptyF a b) |

Instance details

Defined in Data.Functor.Base

type Rep (NonEmptyF a b) = D1 ('MetaData "NonEmptyF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "NonEmptyF" 'PrefixI 'True) (S1 ('MetaSel ('Just "head") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "tail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe b))))

Methods

from :: NonEmptyF a b -> Rep (NonEmptyF a b) x Source #

to :: Rep (NonEmptyF a b) x -> NonEmptyF a b Source #

(Read a, Read b) => Read (NonEmptyF a b) Source # |
Instance details Defined in Data.Functor.Base Methods readsPrec :: Int -> ReadS (NonEmptyF a b) Source # readList :: ReadS [NonEmptyF a b] Source # readPrec :: ReadPrec (NonEmptyF a b) Source # readListPrec :: ReadPrec [NonEmptyF a b] Source #
(Show a, Show b) => Show (NonEmptyF a b) Source # |
Instance details Defined in Data.Functor.Base Methods showsPrec :: Int -> NonEmptyF a b -> ShowS Source # show :: NonEmptyF a b -> String Source # showList :: [NonEmptyF a b] -> ShowS Source #
(Eq a, Eq b) => Eq (NonEmptyF a b) Source # |
Instance details Defined in Data.Functor.Base Methods (==) :: NonEmptyF a b -> NonEmptyF a b -> Bool Source # (/=) :: NonEmptyF a b -> NonEmptyF a b -> Bool Source #
(Ord a, Ord b) => Ord (NonEmptyF a b) Source # |

Instance details

Defined in Data.Functor.Base

Methods

compare :: NonEmptyF a b -> NonEmptyF a b -> Ordering Source #

(<) :: NonEmptyF a b -> NonEmptyF a b -> Bool Source #

(<=) :: NonEmptyF a b -> NonEmptyF a b -> Bool Source #

(>) :: NonEmptyF a b -> NonEmptyF a b -> Bool Source #

(>=) :: NonEmptyF a b -> NonEmptyF a b -> Bool Source #

max :: NonEmptyF a b -> NonEmptyF a b -> NonEmptyF a b Source #

min :: NonEmptyF a b -> NonEmptyF a b -> NonEmptyF a b Source #

type Rep1 (NonEmptyF a :: Type -> Type) Source # |

Instance details

Defined in Data.Functor.Base

type Rep1 (NonEmptyF a :: Type -> Type) = D1 ('MetaData "NonEmptyF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "NonEmptyF" 'PrefixI 'True) (S1 ('MetaSel ('Just "head") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "tail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Maybe)))

type Rep (NonEmptyF a b) Source # |

Instance details

Defined in Data.Functor.Base

type Rep (NonEmptyF a b) = D1 ('MetaData "NonEmptyF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "NonEmptyF" 'PrefixI 'True) (S1 ('MetaSel ('Just "head") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "tail") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe b))))

data TreeF a b Source #

Base functor for `Tree`.

Constructors

NodeF a (ForestF a b) |

#### Instances

Instances details

Bifoldable TreeF Source # |
Instance details Defined in Data.Functor.Base Methods bifold :: Monoid m => TreeF m m -> m Source # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> TreeF a b -> m Source # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> TreeF a b -> c Source # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> TreeF a b -> c Source #
Bifunctor TreeF Source # |
Instance details Defined in Data.Functor.Base Methods bimap :: (a -> b) -> (c -> d) -> TreeF a c -> TreeF b d Source # first :: (a -> b) -> TreeF a c -> TreeF b c Source # second :: (b -> c) -> TreeF a b -> TreeF a c Source #
Bitraversable TreeF Source # |
Instance details Defined in Data.Functor.Base Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> TreeF a b -> f (TreeF c d) Source #
Eq2 TreeF Source # |
Instance details Defined in Data.Functor.Base Methods liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> TreeF a c -> TreeF b d -> Bool Source #
Ord2 TreeF Source # |
Instance details Defined in Data.Functor.Base Methods liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> TreeF a c -> TreeF b d -> Ordering Source #
Read2 TreeF Source # |

Instance details

Defined in Data.Functor.Base

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (TreeF a b) Source #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [TreeF a b] Source #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (TreeF a b) Source #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [TreeF a b] Source #

Show2 TreeF Source # |
Instance details Defined in Data.Functor.Base Methods liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> TreeF a b -> ShowS Source # liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [TreeF a b] -> ShowS Source #
Generic1 (TreeF a :: Type -> Type) Source # |

Instance details

Defined in Data.Functor.Base

Associated Types

type Rep1 (TreeF a :: Type -> Type) |

Instance details

Defined in Data.Functor.Base

type Rep1 (TreeF a :: Type -> Type) = D1 ('MetaData "TreeF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "NodeF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))

Methods

from1 :: TreeF a a0 -> Rep1 (TreeF a) a0 Source #

to1 :: Rep1 (TreeF a) a0 -> TreeF a a0 Source #

Eq a => Eq1 (TreeF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftEq :: (a0 -> b -> Bool) -> TreeF a a0 -> TreeF a b -> Bool Source #
Ord a => Ord1 (TreeF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftCompare :: (a0 -> b -> Ordering) -> TreeF a a0 -> TreeF a b -> Ordering Source #
Read a => Read1 (TreeF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (TreeF a a0) Source # liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [TreeF a a0] Source # liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (TreeF a a0) Source # liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [TreeF a a0] Source #
Show a => Show1 (TreeF a) Source # |
Instance details Defined in Data.Functor.Base Methods liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> TreeF a a0 -> ShowS Source # liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [TreeF a a0] -> ShowS Source #
Functor (TreeF a) Source # |
Instance details Defined in Data.Functor.Base Methods fmap :: (a0 -> b) -> TreeF a a0 -> TreeF a b Source # (<$) :: a0 -> TreeF a b -> TreeF a a0 Source #
Foldable (TreeF a) Source # |

Instance details

Defined in Data.Functor.Base

Methods

fold :: Monoid m => TreeF a m -> m Source #

foldMap :: Monoid m => (a0 -> m) -> TreeF a a0 -> m Source #

foldMap' :: Monoid m => (a0 -> m) -> TreeF a a0 -> m Source #

foldr :: (a0 -> b -> b) -> b -> TreeF a a0 -> b Source #

foldr' :: (a0 -> b -> b) -> b -> TreeF a a0 -> b Source #

foldl :: (b -> a0 -> b) -> b -> TreeF a a0 -> b Source #

foldl' :: (b -> a0 -> b) -> b -> TreeF a a0 -> b Source #

foldr1 :: (a0 -> a0 -> a0) -> TreeF a a0 -> a0 Source #

foldl1 :: (a0 -> a0 -> a0) -> TreeF a a0 -> a0 Source #

toList :: TreeF a a0 -> [a0] Source #

null :: TreeF a a0 -> Bool Source #

length :: TreeF a a0 -> Int Source #

elem :: Eq a0 => a0 -> TreeF a a0 -> Bool Source #

maximum :: Ord a0 => TreeF a a0 -> a0 Source #

minimum :: Ord a0 => TreeF a a0 -> a0 Source #

sum :: Num a0 => TreeF a a0 -> a0 Source #

product :: Num a0 => TreeF a a0 -> a0 Source #

Traversable (TreeF a) Source # |
Instance details Defined in Data.Functor.Base Methods traverse :: Applicative f => (a0 -> f b) -> TreeF a a0 -> f (TreeF a b) Source # sequenceA :: Applicative f => TreeF a (f a0) -> f (TreeF a a0) Source # mapM :: Monad m => (a0 -> m b) -> TreeF a a0 -> m (TreeF a b) Source # sequence :: Monad m => TreeF a (m a0) -> m (TreeF a a0) Source #
Generic (TreeF a b) Source # |

Instance details

Defined in Data.Functor.Base

Associated Types

type Rep (TreeF a b) |

Instance details

Defined in Data.Functor.Base

type Rep (TreeF a b) = D1 ('MetaData "TreeF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "NodeF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ForestF a b))))

Methods

from :: TreeF a b -> Rep (TreeF a b) x Source #

to :: Rep (TreeF a b) x -> TreeF a b Source #

(Read a, Read b) => Read (TreeF a b) Source # |
Instance details Defined in Data.Functor.Base Methods readsPrec :: Int -> ReadS (TreeF a b) Source # readList :: ReadS [TreeF a b] Source # readPrec :: ReadPrec (TreeF a b) Source # readListPrec :: ReadPrec [TreeF a b] Source #
(Show a, Show b) => Show (TreeF a b) Source # |
Instance details Defined in Data.Functor.Base Methods showsPrec :: Int -> TreeF a b -> ShowS Source # show :: TreeF a b -> String Source # showList :: [TreeF a b] -> ShowS Source #
(Eq a, Eq b) => Eq (TreeF a b) Source # |
Instance details Defined in Data.Functor.Base Methods (==) :: TreeF a b -> TreeF a b -> Bool Source # (/=) :: TreeF a b -> TreeF a b -> Bool Source #
(Ord a, Ord b) => Ord (TreeF a b) Source # |

Instance details

Defined in Data.Functor.Base

Methods

compare :: TreeF a b -> TreeF a b -> Ordering Source #

(<) :: TreeF a b -> TreeF a b -> Bool Source #

(<=) :: TreeF a b -> TreeF a b -> Bool Source #

(>) :: TreeF a b -> TreeF a b -> Bool Source #

(>=) :: TreeF a b -> TreeF a b -> Bool Source #

max :: TreeF a b -> TreeF a b -> TreeF a b Source #

min :: TreeF a b -> TreeF a b -> TreeF a b Source #

type Rep1 (TreeF a :: Type -> Type) Source # |

Instance details

Defined in Data.Functor.Base

type Rep1 (TreeF a :: Type -> Type) = D1 ('MetaData "TreeF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "NodeF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 [])))

type Rep (TreeF a b) Source # |

Instance details

Defined in Data.Functor.Base

type Rep (TreeF a b) = D1 ('MetaData "TreeF" "Data.Functor.Base" "recursion-schemes-5.2.3-K3D9dDpBcte1cy2ppH5E3C" 'False) (C1 ('MetaCons "NodeF" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ForestF a b))))

type ForestF a b = [b] Source #