-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Provides typeclass suitable for types admitting a partial order
--
-- This packages provides the PartialOrd typeclass suitable for types
-- admitting a partial order. The only module exposed by this package is
-- Data.PartialOrd. Along with the PartialOrd typeclass and some utility
-- functions for working with partially ordered types, it exports
-- instances for certain numeric types along with instances for lists and
-- sets.
@package partial-order
@version 0.1.2
-- | This module provides the PartialOrd typeclass suitable for
-- types admitting a partial order.
--
-- Along with the PartialOrd typeclass and some utility functions
-- for working with partially ordered types, it exports implementations
-- for the numeric types several numeric types, lists and sets.
module Data.PartialOrd
class PartialOrd a where a >= a' = a' <= a a == a' = a <= a' && a' <= a a /= a' = not (a == a') a < a' = a <= a' && (a /= a') a > a' = a' <= a && (a /= a') compare a a' = if | a == a' -> Just EQ | a <= a' -> Just LT | a >= a' -> Just GT | otherwise -> Nothing
-- | Less-than-or-equal relation.
(<=) :: PartialOrd a => a -> a -> Bool
-- | Bigger-than-or-equal relation. Defined in terms of <=.
(>=) :: PartialOrd a => a -> a -> Bool
-- | Equality relation. Defined in terms of <=.
(==) :: PartialOrd a => a -> a -> Bool
-- | Inequality relation. Defined in terms of ==.
(/=) :: PartialOrd a => a -> a -> Bool
-- | Less-than relation relation. Defined in terms of <= and
-- /=.
(<) :: PartialOrd a => a -> a -> Bool
-- | Bigger-than relation. Defined in terms of <= and /=.
(>) :: PartialOrd a => a -> a -> Bool
-- | Compare function, returning either Just an Ordering or
-- Nothing.
compare :: PartialOrd a => a -> a -> Maybe Ordering
-- | Compute the list of all elements that are not less than any other
-- element in the list.
maxima :: PartialOrd a => [a] -> [a]
-- | Compute the list of all elements that are not bigger than any other
-- element in the list.
minima :: PartialOrd a => [a] -> [a]
-- | Version of the traditional elem function using the PartialOrd notion
-- of equality.
elem :: (PartialOrd a, Foldable t) => a -> t a -> Bool
-- | Version of the traditional notElem function using the PartialOrd
-- notion of equality.
notElem :: (PartialOrd a, Foldable t) => a -> t a -> Bool
-- | Version of the traditional nub function using the PartialOrd notion of
-- equality.
nub :: PartialOrd a => [a] -> [a]
instance Data.PartialOrd.PartialOrd GHC.Types.Int
instance Data.PartialOrd.PartialOrd GHC.Integer.Type.Integer
instance Data.PartialOrd.PartialOrd GHC.Types.Double
instance Data.PartialOrd.PartialOrd GHC.Types.Float
instance GHC.Classes.Ord a => Data.PartialOrd.PartialOrd (Data.Set.Base.Set a)
instance Data.PartialOrd.PartialOrd a => Data.PartialOrd.PartialOrd [a]