Safe Haskell | None |
---|---|
Language | Haskell2010 |
Possibly infinite sets of integers (but with finitely many consecutive segments). Used for checking guard coverage in int/nat cases in the treeless compiler.
Documentation
Represents a set of integers.
Invariants:
- All cannot be the argument to Below
or Above
- at most one IntsBelow
- at most one IntsAbove
- if `Below lo` and `Below hi`, then `lo < hi`
- if `Below lo .. (Some xs)` then `all (> lo) xs`
- if `Above hi .. (Some xs)` then `all (< hi - 1) xs`
toFiniteList :: IntSet -> Maybe [Integer] Source #
If finite, return the list of elements.