Feldspar.Set
Description
General operations on sets
Documentation
A Set
is an *over-approximation* of a set of values. The class does not
care about how the set is interpreted, but it only makes sense to use
interpretations for which the operations are sound.
Instances
Set () | Approximates all sets as |
BoundedInt a => Set (Range a) | |
(Set a, Set b) => Set (a, b) | Set product |
(Set a, Set b) => Set (:> a b) | |
Type a => Set (EdgeSize role a) | |
(Set a, Set b, Set c) => Set (a, b, c) | Three-way product |
(Set a, Set b, Set c, Set d) => Set (a, b, c, d) | Four-way product |
intersections :: Set a => [a] -> a
fixedPoint :: Set a => (a -> a) -> a -> a
Take the fixed point of a monotonic function. The second argument is
an initial element. A sensible default for the initial element is
empty
.
indexedFixedPoint :: Set a => (Int -> a -> a) -> a -> (a, Int)
Much like fixedPoint
but keeps track of the number of iterations
in the fixed point iteration. Useful for defining widening operators.