Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
A ConsumptionProfile
is composed from both a capacity to consume, & an ability to discriminate based on the specific data.
The former is described by consumptionBounds
& the latter by both hasSpecificRequirement
& canConsumeAnything
.
Synopsis
- type AccumulatedConsumptionProfiles = [ConsumptionProfile]
- data ConsumptionProfile = MkConsumptionProfile {}
- zero :: ConsumptionProfile
- accumulateFrom :: ConsumptionProfile -> [ConsumptionProfile] -> AccumulatedConsumptionProfiles
- aggregateFromConcatenation :: [ConsumptionProfile] -> ConsumptionProfile
- (|+|) :: ConsumptionProfile -> ConsumptionProfile -> ConsumptionProfile
- (<>) :: ConsumptionProfile -> ConsumptionProfile -> ConsumptionProfile
- withinConsumptionBounds :: DataLength -> ConsumptionProfile -> Bool
Types
Type-synonyms
type AccumulatedConsumptionProfiles = [ConsumptionProfile] Source #
The ConsumptionProfile
s of all the aggregated tails of a list of Consumer
s.
Data-types
data ConsumptionProfile Source #
- A
Consumer
is considered to have aConsumptionProfile
composed from both a capacity to consume, & an ability to discriminate. - Whilst
hasSpecificRequirement
&canConsumeAnything
look like opposites, they can assume independent values; the instance can be both, but only be neither when empty.
MkConsumptionProfile | |
|
Instances
Eq ConsumptionProfile Source # | |
Defined in RegExDot.ConsumptionProfile (==) :: ConsumptionProfile -> ConsumptionProfile -> Bool # (/=) :: ConsumptionProfile -> ConsumptionProfile -> Bool # | |
Read ConsumptionProfile Source # | |
Defined in RegExDot.ConsumptionProfile | |
Show ConsumptionProfile Source # | |
Defined in RegExDot.ConsumptionProfile showsPrec :: Int -> ConsumptionProfile -> ShowS # show :: ConsumptionProfile -> String # showList :: [ConsumptionProfile] -> ShowS # | |
SelfValidator ConsumptionProfile Source # | |
Defined in RegExDot.ConsumptionProfile getErrors :: ConsumptionProfile -> [String] # isValid :: ConsumptionProfile -> Bool # |
Constants
zero :: ConsumptionProfile Source #
Both minimum & maximum set to zero; which can be used as the initial value when accumulating the sum of a list.
Functions
accumulateFrom :: ConsumptionProfile -> [ConsumptionProfile] -> AccumulatedConsumptionProfiles Source #
Accumulate the specified list of ConsumptionProfile
s, from the specified initial value.
aggregateFromConcatenation :: [ConsumptionProfile] -> ConsumptionProfile Source #
The aggregate of the specified concatenation of ConsumptionProfile
s.
Operators
(|+|) :: ConsumptionProfile -> ConsumptionProfile -> ConsumptionProfile infixr 5 Source #
The net effect of two concatenated ConsumptionProfile
s.
(<>) :: ConsumptionProfile -> ConsumptionProfile -> ConsumptionProfile infixr 2 Source #
The net effect of two alternative ConsumptionProfile
s.
Predicates
withinConsumptionBounds Source #
:: DataLength | The actual quantity of data consumed. |
-> ConsumptionProfile | The bounds within which data-consumption is required to fall. |
-> Bool |
Predicate, which is True
if the specified data-length, falls within the specified ConsumptionBounds
.