symmetric-properties-0.1.0.0: Monoids for sameness and uniqueness.

Safe HaskellSafe
LanguageHaskell2010

Data.Monoid.Unique

Description

Monoidal witness that all items in a bag are unique.

Synopsis

Documentation

data Unique a Source #

Monoid under every element being unique.

Constructors

AllUnique (Set a) 
Duplicated a 

Instances

Eq a => Eq (Unique a) Source # 

Methods

(==) :: Unique a -> Unique a -> Bool #

(/=) :: Unique a -> Unique a -> Bool #

Ord a => Ord (Unique a) Source # 

Methods

compare :: Unique a -> Unique a -> Ordering #

(<) :: Unique a -> Unique a -> Bool #

(<=) :: Unique a -> Unique a -> Bool #

(>) :: Unique a -> Unique a -> Bool #

(>=) :: Unique a -> Unique a -> Bool #

max :: Unique a -> Unique a -> Unique a #

min :: Unique a -> Unique a -> Unique a #

Show a => Show (Unique a) Source # 

Methods

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

show :: Unique a -> String #

showList :: [Unique a] -> ShowS #

Ord a => Monoid (Unique a) Source # 

Methods

mempty :: Unique a #

mappend :: Unique a -> Unique a -> Unique a #

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

singletonUnique :: a -> Unique a Source #

Inject a single item into Unique.

allUnique :: (Ord a, Foldable f) => f a -> Bool Source #

Is every element of this foldable unique?