folds-0.7: Beautiful Folding

Safe HaskellNone
LanguageHaskell98

Data.Fold.Internal

Synopsis

Documentation

data SnocList a Source

Reversed '[]'

Constructors

Snoc (SnocList a) a 
Nil 

data Maybe' a Source

Strict Maybe

Constructors

Nothing' 
Just' !a 

Instances

maybe' :: b -> (a -> b) -> Maybe' a -> b Source

data Pair' a b Source

Strict Pair

Constructors

Pair' !a !b 

Instances

(Eq a, Eq b) => Eq (Pair' a b) Source 
(Data a, Data b) => Data (Pair' a b) Source 
(Ord a, Ord b) => Ord (Pair' a b) Source 
(Read a, Read b) => Read (Pair' a b) Source 
(Show a, Show b) => Show (Pair' a b) Source 
(Monoid a, Monoid b) => Monoid (Pair' a b) Source 

newtype N a s Source

A reified Monoid.

Constructors

N 

Fields

runN :: a
 

Instances

Eq a => Eq (N a s) Source 
(Data a, Data s) => Data (N a s) Source 
Ord a => Ord (N a s) Source 
Read a => Read (N a s) Source 
Show a => Show (N a s) Source 
Reifies * s (a -> a -> a, a) => Monoid (N a s) Source 

newtype S a s Source

A reified Semigroup.

Constructors

S 

Fields

runS :: a
 

Instances

Eq a => Eq (S a s) Source 
(Data a, Data s) => Data (S a s) Source 
Ord a => Ord (S a s) Source 
Read a => Read (S a s) Source 
Show a => Show (S a s) Source 
Reifies * s (a -> a -> a) => Semigroup (S a s) Source 

data Tree a Source

The shape of a foldMap

Constructors

Zero 
One a 
Two (Tree a) (Tree a) 

newtype An a Source

Constructors

An a 

Instances

data Box a Source

Constructors

Box a 

Instances

newtype FreeMonoid a Source

Constructors

FreeMonoid 

Fields

runFreeMonoid :: forall m. Monoid m => (a -> m) -> m
 

foldDeRef :: forall f a. (MuRef1 f, Bifoldable (DeRef1 f)) => f a -> FreeMonoid a Source

foldDeRef1 :: forall f a. (MuRef1 f, Bifoldable1 (DeRef1 f)) => f a -> FreeSemigroup a Source