Module Data.Monoid

Library with some useful Monoid instances.

Version: April 2025

Summary of exported operations:

Exported datatypes:


newtype All

Boolean monoid under (&&)

Constructor:

  • All :: Bool -> All

    Fields:

    • getAll :: Bool

newtype Any

Boolean monoid under (||)

Constructor:

  • Any :: Bool -> Any

    Fields:

    • getAny :: Bool

newtype Sum

Monoid under addition.

Constructor:

  • Sum :: a -> Sum a

    Fields:

    • getSum :: a

newtype Product

Monoid under multiplication.

Constructor:

  • Product :: a -> Product a

    Fields:

    • getProduct :: a

newtype First

Maybe monoid returning the leftmost Just value.

Constructor:

  • First :: (Maybe a) -> First a

    Fields:

    • getFirst :: (Maybe a)

newtype Last

Maybe monoid returning the rightmost Just value.

Constructor:

  • Last :: (Maybe a) -> Last a

    Fields:

    • getLast :: (Maybe a)

Exported operations: