Hets - the Heterogeneous Tool Set

Copyright(c) Keith Wansbrough 200 and Uni Bremen 2005
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellSafe

Common.Partial

Description

Support for partial orders

Synopsis

Documentation

type POrder a = a -> a -> Maybe Ordering Source #

the partial order relation type

totalOrder :: Ord a => POrder a Source #

equivBy :: POrder a -> [a] -> [[a]] Source #

split a list of elements into equivalence classes

minimalBy :: POrder a -> [a] -> ([a], [a]) Source #

split a set into the minimal elements and the remaining elements

rankBy :: POrder a -> [a] -> [[a]] Source #

split a set into ranks of elements, minimal first

class Partial a where Source #

A partial-ordering class.

Methods

pCmp :: POrder a Source #

(<=?) :: a -> a -> Bool Source #

equiv :: Partial a => [a] -> [[a]] Source #

minimal :: Partial a => [a] -> ([a], [a]) Source #

rank :: Partial a => [a] -> [[a]] Source #