sdp-0.2.0.1: Simple Data Processing
Copyright(c) Andrey Mulik 2019
LicenseBSD-style
Maintainerwork.a.mulik@gmail.com
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

SDP.Comparing

Description

SDP.Comparing provide common comparators and combinators.

Synopsis

Exports

module Data.Ord

module Data.Eq

Type synonyms

type Equal e = e -> e -> Bool Source #

Equal is just synonym of (e -> e -> Bool).

type Compare e = e -> e -> Ordering Source #

Compare is just synonym of (e -> e -> Ordering).

Common comparators

(<=>) :: Ord o => Compare o infixl 4 Source #

Spaceship operator - infix version of compare.

eqfst :: Eq e => Equal (e, s) Source #

Compare tuples by first elements.

eqsnd :: Eq e => Equal (f, e) Source #

Compare tuples by second elements.

cmpfst :: Ord o => Compare (o, s) Source #

Compare tuples by first elements.

cmpsnd :: Ord o => Compare (f, o) Source #

Compare tuples by second elements.

invertcmp :: Compare e -> Compare e Source #

Common compare combinator