mixed-types-num-0.5.4.0: Alternative Prelude with numeric and logic expressions typed bottom-up
Copyright(c) Michal Konecny
LicenseBSD3
Maintainermikkonecny@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Numeric.MixedTypes.Ord

Description

 
Synopsis

Comparisons in numeric order

class IsBool (OrderCompareType a b) => HasOrderAsymmetric a b where Source #

Minimal complete definition

Nothing

Associated Types

type OrderCompareType a b Source #

Methods

lessThan :: a -> b -> OrderCompareType a b Source #

default lessThan :: (OrderCompareType a b ~ Bool, a ~ b, Ord a) => a -> b -> OrderCompareType a b Source #

greaterThan :: a -> b -> OrderCompareType a b Source #

default greaterThan :: (HasOrder b a, OrderCompareType b a ~ OrderCompareType a b) => a -> b -> OrderCompareType a b Source #

leq :: a -> b -> OrderCompareType a b Source #

default leq :: (OrderCompareType a b ~ Bool, a ~ b, Ord a) => a -> b -> OrderCompareType a b Source #

geq :: a -> b -> OrderCompareType a b Source #

default geq :: (HasOrder b a, OrderCompareType b a ~ OrderCompareType a b) => a -> b -> OrderCompareType a b Source #

Instances

Instances details
HasOrderAsymmetric Double Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Double Double Source #

HasOrderAsymmetric Double Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Double Int Source #

HasOrderAsymmetric Double Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Double Integer Source #

HasOrderAsymmetric Int Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Double Source #

HasOrderAsymmetric Int Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Int Source #

HasOrderAsymmetric Int Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Integer Source #

HasOrderAsymmetric Int Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int Rational Source #

HasOrderAsymmetric Integer Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Integer Double Source #

HasOrderAsymmetric Integer Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Integer Int Source #

HasOrderAsymmetric Integer Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Integer Integer Source #

HasOrderAsymmetric Integer Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

HasOrderAsymmetric Rational Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Rational Int Source #

HasOrderAsymmetric Rational Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

HasOrderAsymmetric Rational Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

HasOrderAsymmetric () () Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType () () Source #

Methods

lessThan :: () -> () -> OrderCompareType () () Source #

greaterThan :: () -> () -> OrderCompareType () () Source #

leq :: () -> () -> OrderCompareType () () Source #

geq :: () -> () -> OrderCompareType () () Source #

(HasOrderAsymmetric Double b, CanBeErrors es) => HasOrderAsymmetric Double (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Double (CollectErrors es b) Source #

(HasOrderAsymmetric Int b, CanBeErrors es) => HasOrderAsymmetric Int (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Int (CollectErrors es b) Source #

(HasOrderAsymmetric Integer b, CanBeErrors es) => HasOrderAsymmetric Integer (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Integer (CollectErrors es b) Source #

(HasOrderAsymmetric Rational b, CanBeErrors es) => HasOrderAsymmetric Rational (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType Rational (CollectErrors es b) Source #

(HasOrderAsymmetric a Integer, CanBeErrors es) => HasOrderAsymmetric (CollectErrors es a) Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType (CollectErrors es a) Integer Source #

(HasOrderAsymmetric a Int, CanBeErrors es) => HasOrderAsymmetric (CollectErrors es a) Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType (CollectErrors es a) Int Source #

(HasOrderAsymmetric a Rational, CanBeErrors es) => HasOrderAsymmetric (CollectErrors es a) Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType (CollectErrors es a) Rational Source #

(HasOrderAsymmetric a Double, CanBeErrors es) => HasOrderAsymmetric (CollectErrors es a) Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType (CollectErrors es a) Double Source #

(HasOrderAsymmetric a b, CanBeErrors es) => HasOrderAsymmetric (CollectErrors es a) (CollectErrors es b) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

Associated Types

type OrderCompareType (CollectErrors es a) (CollectErrors es b) Source #

(>) :: HasOrderAsymmetric a b => a -> b -> OrderCompareType a b infix 4 Source #

(<) :: HasOrderAsymmetric a b => a -> b -> OrderCompareType a b infix 4 Source #

(<=) :: HasOrderAsymmetric a b => a -> b -> OrderCompareType a b infix 4 Source #

(>=) :: HasOrderAsymmetric a b => a -> b -> OrderCompareType a b infix 4 Source #

(?<=?) :: HasOrderCertainlyAsymmetric a b => a -> b -> Bool infix 4 Source #

(?<?) :: HasOrderCertainlyAsymmetric a b => a -> b -> Bool infix 4 Source #

(?>=?) :: HasOrderCertainlyAsymmetric a b => a -> b -> Bool infix 4 Source #

(?>?) :: HasOrderCertainlyAsymmetric a b => a -> b -> Bool infix 4 Source #

(!<=!) :: HasOrderCertainlyAsymmetric a b => a -> b -> Bool infix 4 Source #

(!<!) :: HasOrderCertainlyAsymmetric a b => a -> b -> Bool infix 4 Source #

(!>=!) :: HasOrderCertainlyAsymmetric a b => a -> b -> Bool infix 4 Source #

(!>!) :: HasOrderCertainlyAsymmetric a b => a -> b -> Bool infix 4 Source #

Tests

specHasOrder :: _ => T t1 -> T t2 -> T t3 -> Spec Source #

HSpec properties that each implementation of HasOrder should satisfy.

specHasOrderNotMixed :: _ => T t -> Spec Source #

HSpec properties that each implementation of HasOrder should satisfy.

Specific comparisons

class CanTestPosNeg t where Source #

Minimal complete definition

Nothing

Instances

Instances details
CanTestPosNeg Double Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

CanTestPosNeg Int Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

CanTestPosNeg Integer Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

CanTestPosNeg Rational Source # 
Instance details

Defined in Numeric.MixedTypes.Ord

(CanTestPosNeg t, CanBeErrors es) => CanTestPosNeg (CollectErrors es t) Source # 
Instance details

Defined in Numeric.MixedTypes.Ord