| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Data.Loc.Types
Description
For convenience, this module exports only the important types from Loc
Documentation
Stands for location, consists of a Line and a Column
You can think of a Loc like a caret position in a text editor.
Following the normal convention for text editors and such, line
and column numbers start with 1.
A Span consists of a start location (start) and an end location (end)
The end location must be greater than the start location; in other words, empty or backwards spans are not permitted.
Construct and combine spans using fromTo, fromToMay, +, and -.
A SpanOrLoc consists of a start location and an end location
The end location must be greater than or equal to the start location; in other words, backwards spans are not permitted.
If the start and end location are the same, then the value is a SpanOrLoc.
If they differ, then the value is a SpanOrLoc.
Instances
| Show SpanOrLoc Source # | |
| Eq SpanOrLoc Source # | |
| Ord SpanOrLoc Source # | |
A set of non-overlapping, non-abutting Spans
You may also think of an Area like a span that can be empty or have “gaps.”
Construct and combine areas using mempty, spanArea, fromTo, +, and -.