    module Data.Monoid.HT (cycle, (<>), when, ) where

    import Data.Monoid (Monoid, mappend, mempty, )
    import Data.Function (fix, )

    import Prelude (Bool)

    {- |
    Generalization of 'Data.List.cycle' to any monoid.
    -}
    cycle :: Monoid m => m -> m
    cycle :: m -> m
    cycle x :: m
    x =
       (m -> m) -> m
    forall a. (a -> a) -> a
    fix (m -> m -> m
    forall a. Monoid a => a -> a -> a
    mappend m
    x)

    infixr 6 <>

    {- |
    Infix synonym for 'mappend'.
    -}
    (<>) :: Monoid m => m -> m -> m
    <> :: m -> m -> m
    (<>) = m -> m -> m
    forall a. Monoid a => a -> a -> a
    mappend

    when :: Monoid m => Bool -> m -> m
    when :: Bool -> m -> m
    when b :: Bool
    b m :: m
    m = if Bool
    b then m
    m else m
    forall a. Monoid a => a
    mempty