Bounded -package:foundation
base Prelude Data.Bounded Data.Enum GHC.Enum,
protolude Protolude Protolude.Base,
relude Relude.Enum,
rio RIO.Prelude.Types,
base-prelude BasePrelude,
classy-prelude ClassyPrelude,
numeric-prelude NumericPrelude NumericPrelude.Base,
Cabal-syntax Distribution.Compat.Prelude,
basic-prelude CorePrelude,
basement Basement.Compat.Base Basement.Imports,
numhask NumHask.Prelude,
clash-prelude Clash.HaskellPrelude,
ghc-lib-parser GHC.Prelude.Basic,
prelude-compat Prelude2010,
ghc-internal GHC.Internal.Enum,
quaalude Essentials,
xmonad-contrib XMonad.Config.Prime,
constrained-categories Control.Category.Constrained.Prelude Control.Category.Hask,
copilot-language Copilot.Language.Prelude,
incipit-base Incipit.Base,
cabal-install-solver Distribution.Solver.Compat.Prelude,
verset Verset,
yesod-paginator Yesod.Paginator.Prelude,
distribution-opensuse OpenSuse.Prelude,
hledger-web Hledger.Web.Import 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 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.
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 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.
Class for structures that can handle bounded stream of values i.e.
there is exists
Int value that sets an upper limit on the
number of values that can be handled by structure. Exact meaning of
this limit may depend on the carrier type.
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?