mono-traversable-1.0.2: Type classes for mapping, folding, and traversing monomorphic containers

Safe HaskellNone
LanguageHaskell2010

Data.MonoTraversable.Unprefixed

Description

The functions in Data.MonoTraversable are all prefixed with the letter o to avoid conflicts with their polymorphic counterparts. This module exports the same identifiers without the prefix, for all cases where the monomorphic variant loses no generality versus the polymorphic version. For example, olength is just as general as Data.Foldable.length, so we export length = length. By contrast, omap cannot fully subsume fmap or map, so we do not provide such an export.

Since: 1.0.0

Synopsis

Documentation

foldMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m Source #

Synonym for ofoldMap

Since: 1.0.0

foldr :: MonoFoldable mono => (Element mono -> b -> b) -> b -> mono -> b Source #

Synonym for ofoldr

Since: 1.0.0

foldl' :: MonoFoldable mono => (a -> Element mono -> a) -> a -> mono -> a Source #

Synonym for ofoldl'

Since: 1.0.0

toList :: MonoFoldable mono => mono -> [Element mono] Source #

Synonym for otoList

Since: 1.0.0

all :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool Source #

Synonym for oall

Since: 1.0.0

any :: MonoFoldable mono => (Element mono -> Bool) -> mono -> Bool Source #

Synonym for oany

Since: 1.0.0

null :: MonoFoldable mono => mono -> Bool Source #

Synonym for onull

Since: 1.0.0

length :: MonoFoldable mono => mono -> Int Source #

Synonym for olength

Since: 1.0.0

length64 :: MonoFoldable mono => mono -> Int64 Source #

Synonym for olength64

Since: 1.0.0

compareLength :: (MonoFoldable mono, Integral i) => mono -> i -> Ordering Source #

Synonym for ocompareLength

Since: 1.0.0

traverse_ :: (MonoFoldable mono, Applicative f) => (Element mono -> f b) -> mono -> f () Source #

Synonym for otraverse_

Since: 1.0.0

for_ :: (MonoFoldable mono, Applicative f) => mono -> (Element mono -> f b) -> f () Source #

Synonym for ofor_

Since: 1.0.0

mapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m () Source #

Synonym for omapM_

Since: 1.0.0

forM_ :: (MonoFoldable mono, Applicative m) => mono -> (Element mono -> m ()) -> m () Source #

Synonym for oforM_

Since: 1.0.0

foldlM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a Source #

Synonym for ofoldlM

Since: 1.0.0

foldMap1Ex :: (MonoFoldable mono, Semigroup m) => (Element mono -> m) -> mono -> m Source #

Synonym for ofoldMap1Ex

Since: 1.0.0

foldr1Ex :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono Source #

Synonym for ofoldr1Ex

Since: 1.0.0

foldl1Ex' :: MonoFoldable mono => (Element mono -> Element mono -> Element mono) -> mono -> Element mono Source #

Synonym for ofoldl1Ex'

Since: 1.0.0

sum :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono Source #

Synonym for osum

Since: 1.0.0

product :: (MonoFoldable mono, Num (Element mono)) => mono -> Element mono Source #

Synonym for oproduct

Since: 1.0.0

and :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool Source #

Synonym for oand

Since: 1.0.0

or :: (MonoFoldable mono, Element mono ~ Bool) => mono -> Bool Source #

Synonym for oor

Since: 1.0.0

concatMap :: (MonoFoldable mono, Monoid m) => (Element mono -> m) -> mono -> m Source #

Synonym for oconcatMap

Since: 1.0.0

elem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool Source #

Synonym for oelem

Since: 1.0.0

notElem :: (MonoFoldable mono, Eq (Element mono)) => Element mono -> mono -> Bool Source #

Synonym for onotElem

Since: 1.0.0

point :: MonoPointed mono => Element mono -> mono Source #

Synonym for opoint

Since: 1.0.0

intercalate :: (MonoFoldable mono, Monoid (Element mono)) => Element mono -> mono -> Element mono Source #

Synonym for ointercalate

Since: 1.0.0

fold :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono Source #

Synonym for ofold

Since: 1.0.0

concat :: (MonoFoldable mono, Monoid (Element mono)) => mono -> Element mono Source #

Synonym for oconcat

Since: 1.0.0

foldM :: (MonoFoldable mono, Monad m) => (a -> Element mono -> m a) -> a -> mono -> m a Source #

Synonym for ofoldM

Since: 1.0.0

sequence_ :: (Applicative m, MonoFoldable mono, Element mono ~ m ()) => mono -> m () Source #

Synonym for osequence_

Since: 1.0.0