Safe Haskell | None |
---|---|
Language | Haskell2010 |
See
Measure
Synopsis
-
class
Measure
a =>
BoundedMeasure
a
where
- maxBound :: a
- class Eq a => Measure a where
- data DataMeasureClassOverflowException = DataMeasureClassOverflowException
Documentation
class Measure a => BoundedMeasure a where Source #
A unique maximal measurement
See
BoundedMeasure
for laws.
Instances
BoundedMeasure Word8 Source # | |
Defined in Data.Measure.Class |
|
BoundedMeasure Word16 Source # | |
Defined in Data.Measure.Class |
|
BoundedMeasure Word32 Source # | |
Defined in Data.Measure.Class |
|
BoundedMeasure Word64 Source # | |
Defined in Data.Measure.Class |
|
( Bounded a, Monoid a, Ord a) => BoundedMeasure ( InstantiatedAt Ord a) Source # | |
Defined in Data.Measure.Class maxBound :: InstantiatedAt Ord a Source # |
|
( Eq a, Generic a, GBoundedMeasure ( Rep a), GMeasure ( Rep a)) => BoundedMeasure ( InstantiatedAt Generic a) Source # | |
Defined in Data.Measure.Class maxBound :: InstantiatedAt Generic a Source # |
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.
-
(
is a commutative monoidzero
,plus
) -
(
is a bounded join-semilatticezero
,max
) -
(
is a latticemin
,max
) -
lattice-ordered monoid
min
(plus
a b) (plus
a c) = a +min
b c
Note that the bounded join-semilattice precludes negative (components of) measurements.
The measurement of nothing
See
Measure
for laws.
Combine two measurements
If
a
consists of multiple measurements, this is componentwise.
See
Measure
for laws.
The lesser of two measurements
If
a
consists of multiple measurements, this is componentwise.
See
Measure
for laws.
The greater of two measurements
If
a
consists of multiple measurements, this is componentwise.
See
Measure
for laws.
Instances
Exceptions
data DataMeasureClassOverflowException Source #
An exception thrown by
plus
on overflow, since overflow violates
lattice-ordered monoid