measures-0.1.0.1: An abstraction for (tuples of) measured quantities
Safe Haskell None
Language Haskell2010

Data.Measure.Class

Contents

Description

Synopsis

Documentation

class Eq a => Measure a where Source #

Core combinators for a possibly-multidimensional measurement

a is a fixed set of measurements of a single object. It is not the measurements from multiple objects.

Note that the bounded join-semilattice precludes negative (components of) measurements.

Methods

zero :: a Source #

The measurement of nothing

See Measure for laws.

plus :: a -> a -> a Source #

Combine two measurements

If a consists of multiple measurements, this is componentwise.

See Measure for laws.

min :: a -> a -> a Source #

The lesser of two measurements

If a consists of multiple measurements, this is componentwise.

See Measure for laws.

max :: a -> a -> a Source #

The greater of two measurements

If a consists of multiple measurements, this is componentwise.

See Measure for laws.

Instances

Instances details
Measure Natural Source #
Instance details

Defined in Data.Measure.Class

Measure Word8 Source #

plus throws DataMeasureClassOverflowException

Instance details

Defined in Data.Measure.Class

Measure Word16 Source #

plus throws DataMeasureClassOverflowException

Instance details

Defined in Data.Measure.Class

Measure Word32 Source #

plus throws DataMeasureClassOverflowException

Instance details

Defined in Data.Measure.Class

Measure Word64 Source #

plus throws DataMeasureClassOverflowException

Instance details

Defined in Data.Measure.Class

Measure a => Semigroup ( InstantiatedAt Measure a) Source #

The ( zero , plus ) monoid

Instance details

Defined in Data.Measure.Class

Measure a => Monoid ( InstantiatedAt Measure a) Source #

The ( zero , plus ) monoid

Instance details

Defined in Data.Measure.Class

( Measure a, Measure b) => Measure (a, b) Source #
Instance details

Defined in Data.Measure.Class

Methods

zero :: (a, b) Source #

plus :: (a, b) -> (a, b) -> (a, b) Source #

min :: (a, b) -> (a, b) -> (a, b) Source #

max :: (a, b) -> (a, b) -> (a, b) Source #

( Monoid a, Ord a) => Measure ( InstantiatedAt Ord a) Source #
Instance details

Defined in Data.Measure.Class

( Eq a, Generic a, GMeasure ( Rep a)) => Measure ( InstantiatedAt Generic a) Source #
Instance details

Defined in Data.Measure.Class

( Measure a, Measure b, Measure c) => Measure (a, b, c) Source #
Instance details

Defined in Data.Measure.Class

Methods

zero :: (a, b, c) Source #

plus :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

min :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

max :: (a, b, c) -> (a, b, c) -> (a, b, c) Source #

( Measure a, Measure b, Measure c, Measure d) => Measure (a, b, c, d) Source #
Instance details

Defined in Data.Measure.Class

Methods

zero :: (a, b, c, d) Source #

plus :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

min :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

max :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source #

( Measure a, Measure b, Measure c, Measure d, Measure e) => Measure (a, b, c, d, e) Source #
Instance details

Defined in Data.Measure.Class

Methods

zero :: (a, b, c, d, e) Source #

plus :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

min :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

max :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

( Measure a, Measure b, Measure c, Measure d, Measure e, Measure f) => Measure (a, b, c, d, e, f) Source #
Instance details

Defined in Data.Measure.Class

Methods

zero :: (a, b, c, d, e, f) Source #

plus :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

min :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

max :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) Source #

( Measure a, Measure b, Measure c, Measure d, Measure e, Measure f, Measure g) => Measure (a, b, c, d, e, f, g) Source #
Instance details

Defined in Data.Measure.Class

Methods

zero :: (a, b, c, d, e, f, g) Source #

plus :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

min :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

max :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) Source #

Exceptions