Bounded -package:stm-conduit

The Bounded class is used to name the upper and lower limits of a type. Ord is not a superclass of Bounded since types that are not totally ordered may also have upper and lower bounds. The Bounded class may be derived for any enumeration type; minBound is the first constructor listed in the data declaration and maxBound is the last. Bounded may also be derived for single-constructor datatypes whose constituent types are in Bounded.
The Bounded class.
The Bounded class is used to name the upper and lower limits of a type. Ord is not a superclass of Bounded since types that are not totally ordered may also have upper and lower bounds. The Bounded class may be derived for any enumeration type; minBound is the first constructor listed in the data declaration and maxBound is the last. Bounded may also be derived for single-constructor datatypes whose constituent types are in Bounded.
The functions in this module are explict about the maximum number of bytes they require.
Deprecated: Use bounded instead
Types to represent ℤ/nℤ. ℤ/nℤ is a finite field and is defined as the set of natural number: {0, 1, ..., n − 1}.
Searching unbounded intervals within bounded integral types for the boundary of an upward-closed set, using a combination of exponential and binary search.
This library provides a strict, immutable, thread-safe, single-ended, bounded queue. When the insert limit is reached and a cons is attempted, this BQueue automatically drops old entries off its end. Thus, writes always succeed and never block. This data structure is intended as a "sliding window" over some stream of data, where we wish old entries to be naturally forgotten. Since this is an immutable data structure and not a concurrent queue, we provide instances for the usual useful typeclasses with which one can perform analysis over the entire "window". This module is intended to be imported qualified:
import qualified Data.Queue.Bounded as BQ
Apply the given pattern a number of times restricted by given lower and upper bounds, collecting the results
>>> match (bounded 2 5 "cat") "catcatcat"
[["cat","cat","cat"]]

>>> match (bounded 2 5 "cat") "cat"
[]

>>> match (bounded 2 5 "cat") "catcatcatcatcatcat"
[]
bounded could be implemented naively as follows:
bounded m n p = do
x <- choice (map pure [m..n])
count x p
Store a bounded number of messages, specified by the Int argument
A shorthand for bounded' optMinus.
A version of values with a limited number of values in each inner list. If the list corresponds to a Part which is larger than the bound it evenly distributes the values across the enumeration of the Part.
A builder primitive that always results in sequence of bytes that is no longer than a pre-determined bound.
A join-semilattice with an identity element bottom for \/. Laws
x \/ bottom ≡ x
Corollary
x /\ bottom
≡⟨ identity ⟩
(x /\ bottom) \/ bottom
≡⟨ absorption ⟩
bottom
A meet-semilattice with an identity element top for /\. Laws
x /\ top ≡ x
Corollary
x \/ top
≡⟨ identity ⟩
(x \/ top) /\ top
≡⟨ absorption ⟩
top
A location inside a mutable byte array with the bound of the array. Is it cheaper to just get the bound using the size of the array whenever needed?
Lattices with both bounds
x /\ bottom == x
x \/ top = x