Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ranges.
Synopsis
- data Range = Range {}
- rangeInvariant :: Range -> Bool
- newtype Ranges = Ranges [Range]
- rangesInvariant :: Ranges -> Bool
- overlapping :: Range -> Range -> Bool
- overlappings :: Ranges -> Ranges -> Bool
- empty :: Null a => a
- rangeToPositions :: Range -> [Int]
- rangesToPositions :: Ranges -> [Int]
- rToR :: Range -> Ranges
- rangeToRange :: Range -> Range
- minus :: Ranges -> Ranges -> Ranges
Documentation
Character ranges. The first character in the file has position 1.
Note that the to
position is considered to be outside of the
range.
rangeInvariant :: Range -> Bool Source #
The Range
invariant.
Zero or more consecutive and separated ranges.
rangesInvariant :: Ranges -> Bool Source #
The Ranges
invariant.
overlapping :: Range -> Range -> Bool Source #
True
iff the ranges overlap.
The ranges are assumed to be well-formed.
overlappings :: Ranges -> Ranges -> Bool Source #
rangeToPositions :: Range -> [Int] Source #
Converts a range to a list of positions.
rangesToPositions :: Ranges -> [Int] Source #
Converts several ranges to a list of positions.