regexdot-0.12.2.0: A polymorphic, POSIX, extended regex-engine.

Safe HaskellSafe
LanguageHaskell2010

RegExDot.ConsumptionProfile

Contents

Description

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

Types

Type-synonyms

type AccumulatedConsumptionProfiles = [ConsumptionProfile] Source #

The ConsumptionProfiles of all the aggregated tails of a list of Consumers.

Data-types

data ConsumptionProfile Source #

  • A Consumer is considered to have a ConsumptionProfile 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.

Constructors

MkConsumptionProfile 

Fields

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 ConsumptionProfiles, from the specified initial value.

aggregateFromConcatenation :: [ConsumptionProfile] -> ConsumptionProfile Source #

The aggregate of the specified concatenation of ConsumptionProfiles.

Operators

(|+|) :: ConsumptionProfile -> ConsumptionProfile -> ConsumptionProfile infixr 5 Source #

The net effect of two concatenated ConsumptionProfiles.

(<>) :: ConsumptionProfile -> ConsumptionProfile -> ConsumptionProfile infixr 2 Source #

The net effect of two alternative ConsumptionProfiles.

Predicates

withinConsumptionBounds Source #

Arguments

:: 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.