Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
A 0-indexed, half-open interval of integers, defined by start & end indices.
Instances
Semigroup Range Source # | |
Generic Range Source # | |
Show Range Source # | |
NFData Range Source # | |
Defined in Source.Range | |
Eq Range Source # | |
Ord Range Source # | |
Hashable Range Source # | |
Defined in Source.Range | |
Lower Range Source # | |
Defined in Source.Range lowerBound :: Range # | |
ToJSON Range Source # | |
type Rep Range Source # | |
Defined in Source.Range type Rep Range = D1 ('MetaData "Range" "Source.Range" "semantic-source-0.2.0.1-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.