mediabus-0.3.2.1: Multimedia streaming on top of Conduit

Safe HaskellNone
LanguageHaskell2010

Data.MediaBus.Basics.OrderedBy

Description

Value level Order. Sometimes values stored in e.g. Sets have an Ord instance, which does not represent the desired order. In that case use this product type to pass a value along with the value to be for comparison by the Eq and Ord instances.

Synopsis

Documentation

data OrderedBy cmp a Source #

A wrapper around a payload value paired with a value to be used when comparing that payload value.

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 #