mediabus-0.3.0.0: Multimedia streaming on top of Conduit

Safe HaskellNone
LanguageHaskell2010

Data.MediaBus.Basics.OrderedBy

Description

Value level Order. Sometimes values are stored in e.g. Sets and the default Ord instance isn't what we want. In that case it would be great to pass the comparison as an explicit function.

Synopsis

Documentation

data OrderedBy cmp a Source #

A wrapper around a value (to be compared) and a function to the value that shall be compared against.

Constructors

MkOrderedBy cmp a 

Instances

Eq cmp => Eq (OrderedBy cmp a) Source # 

Methods

(==) :: OrderedBy cmp a -> OrderedBy cmp a -> Bool #

(/=) :: OrderedBy cmp a -> OrderedBy cmp a -> Bool #

Ord cmp => Ord (OrderedBy cmp a) Source # 

Methods

compare :: OrderedBy cmp a -> OrderedBy cmp a -> Ordering #

(<) :: OrderedBy cmp a -> OrderedBy cmp a -> Bool #

(<=) :: OrderedBy cmp a -> OrderedBy cmp a -> Bool #

(>) :: OrderedBy cmp a -> OrderedBy cmp a -> Bool #

(>=) :: OrderedBy cmp a -> OrderedBy cmp a -> Bool #

max :: OrderedBy cmp a -> OrderedBy cmp a -> OrderedBy cmp a #

min :: OrderedBy cmp a -> OrderedBy cmp a -> OrderedBy cmp a #