measures-0.1.0.2: An abstraction for (tuples of) measured quantities
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Measure.Class

Contents

Description

Synopsis

Documentation

class Measure a ⇒ BoundedMeasure a where Source #

A unique maximal measurement

Methods

maxBound ∷ a Source #

A unique maximal measurement

See BoundedMeasure for laws.

Instances

Instances details
BoundedMeasure Word16 Source # 
Instance details

Defined in Data.Measure.Class

Methods

maxBoundWord16 Source #

BoundedMeasure Word32 Source # 
Instance details

Defined in Data.Measure.Class

Methods

maxBoundWord32 Source #

BoundedMeasure Word64 Source # 
Instance details

Defined in Data.Measure.Class

Methods

maxBoundWord64 Source #

BoundedMeasure Word8 Source # 
Instance details

Defined in Data.Measure.Class

Methods

maxBoundWord8 Source #

(Eq a, Generic a, GBoundedMeasure (Rep a), GMeasure (Rep a)) ⇒ BoundedMeasure (InstantiatedAt Generic a) Source # 
Instance details

Defined in Data.Measure.Class

(Bounded a, Monoid a, Ord a) ⇒ BoundedMeasure (InstantiatedAt Ord a) Source # 
Instance details

Defined in Data.Measure.Class

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 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 Word8 Source #

plus throws DataMeasureClassOverflowException

Instance details

Defined in Data.Measure.Class

Methods

zeroWord8 Source #

plusWord8Word8Word8 Source #

minWord8Word8Word8 Source #

maxWord8Word8Word8 Source #

Measure Natural Source # 
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 ⇒ Semigroup (InstantiatedAt Measure a) Source #

The (zero, plus) monoid

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

(Monoid a, Ord a) ⇒ Measure (InstantiatedAt Ord a) Source # 
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 #

(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