size-based-0.1.1.0: Sized functors, for size-based enumerations

Safe HaskellNone
LanguageHaskell2010

Control.Enumerable.Count

Synopsis

Documentation

newtype Count a Source #

Counts the number of values of a all sizes. Usage: @global :: Count [Bool]

Constructors

Count 

Fields

Instances

Functor Count Source # 

Methods

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

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

Applicative Count Source # 

Methods

pure :: a -> Count a #

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

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

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

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

Alternative Count Source # 

Methods

empty :: Count a #

(<|>) :: Count a -> Count a -> Count a #

some :: Count a -> Count [a] #

many :: Count a -> Count [a] #

Sized Count Source # 
Show (Count a) Source # 

Methods

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

show :: Count a -> String #

showList :: [Count a] -> ShowS #

Semigroup (Count a) Source # 

Methods

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

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

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

Monoid (Count a) Source # 

Methods

mempty :: Count a #

mappend :: Count a -> Count a -> Count a #

mconcat :: [Count a] -> Count a #

(!!*) :: Count a -> Int -> Integer Source #

Counts the number of values of a given size, 0 if out of bounds.

(</>) :: Count a -> Count a -> Count a infixl 4 Source #