persistent-2.17.1.0: Type-safe, multi-backend data serialization.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Database.Persist.Types.SourceSpan

Synopsis

- data SourceSpan = SourceSpan {
  - spanFile :: !Text
  - spanStartLine :: !Int
  - spanStartCol :: !Int
  - spanEndLine :: !Int
  - spanEndCol :: !Int
  }

# Documentation

data SourceSpan Source #

A pair of (start linecol, end linecol) coordinates. The end column will be one past the final character (i.e. the span (1,1)->(1,1) is zero characters long).

SourceSpans are 1-indexed in both lines and columns.

Conceptually identical to GHC's `RealSourceSpan`.

Since: 2.16.0.0

Constructors

SourceSpan |

Fields

- spanFile :: !Text
- spanStartLine :: !Int
- spanStartCol :: !Int
- spanEndLine :: !Int
- spanEndCol :: !Int

#### Instances

Instances details

Read SourceSpan Source # |
Instance details Defined in Database.Persist.Types.SourceSpan Methods readsPrec :: Int -> ReadS SourceSpan Source # readList :: ReadS [SourceSpan] Source # readPrec :: ReadPrec SourceSpan Source # readListPrec :: ReadPrec [SourceSpan] Source #
Show SourceSpan Source # |
Instance details Defined in Database.Persist.Types.SourceSpan Methods showsPrec :: Int -> SourceSpan -> ShowS Source # show :: SourceSpan -> String Source # showList :: [SourceSpan] -> ShowS Source #
Eq SourceSpan Source # |
Instance details Defined in Database.Persist.Types.SourceSpan Methods (==) :: SourceSpan -> SourceSpan -> Bool Source # (/=) :: SourceSpan -> SourceSpan -> Bool Source #
Ord SourceSpan Source # |

Instance details

Defined in Database.Persist.Types.SourceSpan

Methods

compare :: SourceSpan -> SourceSpan -> Ordering Source #

(<) :: SourceSpan -> SourceSpan -> Bool Source #

(<=) :: SourceSpan -> SourceSpan -> Bool Source #

(>) :: SourceSpan -> SourceSpan -> Bool Source #

(>=) :: SourceSpan -> SourceSpan -> Bool Source #

max :: SourceSpan -> SourceSpan -> SourceSpan Source #

min :: SourceSpan -> SourceSpan -> SourceSpan Source #

Lift SourceSpan Source # |
Instance details Defined in Database.Persist.Types.SourceSpan Methods lift :: Quote m => SourceSpan -> m Exp Source # liftTyped :: forall (m :: Type -> Type). Quote m => SourceSpan -> Code m SourceSpan Source #