Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
A 0-indexed, half-open interval of integers, defined by start & end indices.
Instances
Eq Range Source # | |
Ord Range Source # | |
Show Range Source # | |
Generic Range Source # | |
Semigroup Range Source # | |
NFData Range Source # | |
Defined in Source.Range | |
Hashable Range Source # | |
Defined in Source.Range | |
Lower Range Source # | |
Defined in Source.Range lowerBound :: Range | |
type Rep Range Source # | |
Defined in Source.Range type Rep Range = D1 (MetaData "Range" "Source.Range" "semantic-source-0.0.0.0-inplace" False) (C1 (MetaCons "Range" PrefixI True) (S1 (MetaSel (Just "start") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Just "end") SourceUnpack SourceStrict DecidedStrict) (Rec0 Int))) |
point :: Int -> Range Source #
Construct a Range
with a given value for both its start and end indices.
rangeLength :: Range -> Int Source #
Return the length of the range.