    {-# LANGUAGE DeriveLift #-}

    module Database.Persist.Types.SourceSpan (SourceSpan (..)) where

    import Data.Text (Text)
    import Language.Haskell.TH.Syntax (Lift)

    -- | A pair of (start line/col, end line/col) 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
    data SourceSpan = SourceSpan
        { SourceSpan -> Text
    spanFile :: !Text
        , SourceSpan -> Int
    spanStartLine :: !Int
        , SourceSpan -> Int
    spanStartCol :: !Int
        , SourceSpan -> Int
    spanEndLine :: !Int
        , SourceSpan -> Int
    spanEndCol :: !Int
        }
        deriving (Int -> SourceSpan -> ShowS
    [SourceSpan] -> ShowS
    SourceSpan -> String
    (Int -> SourceSpan -> ShowS)
    -> (SourceSpan -> String)
    -> ([SourceSpan] -> ShowS)
    -> Show SourceSpan
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> SourceSpan -> ShowS
    showsPrec :: Int -> SourceSpan -> ShowS
    $cshow :: SourceSpan -> String
    show :: SourceSpan -> String
    $cshowList :: [SourceSpan] -> ShowS
    showList :: [SourceSpan] -> ShowS
    Show, SourceSpan -> SourceSpan -> Bool
    (SourceSpan -> SourceSpan -> Bool)
    -> (SourceSpan -> SourceSpan -> Bool) -> Eq SourceSpan
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: SourceSpan -> SourceSpan -> Bool
    == :: SourceSpan -> SourceSpan -> Bool
    $c/= :: SourceSpan -> SourceSpan -> Bool
    /= :: SourceSpan -> SourceSpan -> Bool
    Eq, ReadPrec [SourceSpan]
    ReadPrec SourceSpan
    Int -> ReadS SourceSpan
    ReadS [SourceSpan]
    (Int -> ReadS SourceSpan)
    -> ReadS [SourceSpan]
    -> ReadPrec SourceSpan
    -> ReadPrec [SourceSpan]
    -> Read SourceSpan
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS SourceSpan
    readsPrec :: Int -> ReadS SourceSpan
    $creadList :: ReadS [SourceSpan]
    readList :: ReadS [SourceSpan]
    $creadPrec :: ReadPrec SourceSpan
    readPrec :: ReadPrec SourceSpan
    $creadListPrec :: ReadPrec [SourceSpan]
    readListPrec :: ReadPrec [SourceSpan]
    Read, Eq SourceSpan
    Eq SourceSpan =>
    (SourceSpan -> SourceSpan -> Ordering)
    -> (SourceSpan -> SourceSpan -> Bool)
    -> (SourceSpan -> SourceSpan -> Bool)
    -> (SourceSpan -> SourceSpan -> Bool)
    -> (SourceSpan -> SourceSpan -> Bool)
    -> (SourceSpan -> SourceSpan -> SourceSpan)
    -> (SourceSpan -> SourceSpan -> SourceSpan)
    -> Ord SourceSpan
    SourceSpan -> SourceSpan -> Bool
    SourceSpan -> SourceSpan -> Ordering
    SourceSpan -> SourceSpan -> SourceSpan
    forall a.
    Eq a =>
    (a -> a -> Ordering)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> Bool)
    -> (a -> a -> a)
    -> (a -> a -> a)
    -> Ord a
    $ccompare :: SourceSpan -> SourceSpan -> Ordering
    compare :: SourceSpan -> SourceSpan -> Ordering
    $c< :: SourceSpan -> SourceSpan -> Bool
    < :: SourceSpan -> SourceSpan -> Bool
    $c<= :: SourceSpan -> SourceSpan -> Bool
    <= :: SourceSpan -> SourceSpan -> Bool
    $c> :: SourceSpan -> SourceSpan -> Bool
    > :: SourceSpan -> SourceSpan -> Bool
    $c>= :: SourceSpan -> SourceSpan -> Bool
    >= :: SourceSpan -> SourceSpan -> Bool
    $cmax :: SourceSpan -> SourceSpan -> SourceSpan
    max :: SourceSpan -> SourceSpan -> SourceSpan
    $cmin :: SourceSpan -> SourceSpan -> SourceSpan
    min :: SourceSpan -> SourceSpan -> SourceSpan
    Ord, (forall (m :: * -> *). Quote m => SourceSpan -> m Exp)
    -> (forall (m :: * -> *).
        Quote m =>
        SourceSpan -> Code m SourceSpan)
    -> Lift SourceSpan
    forall t.
    (forall (m :: * -> *). Quote m => t -> m Exp)
    -> (forall (m :: * -> *). Quote m => t -> Code m t) -> Lift t
    forall (m :: * -> *). Quote m => SourceSpan -> m Exp
    forall (m :: * -> *). Quote m => SourceSpan -> Code m SourceSpan
    $clift :: forall (m :: * -> *). Quote m => SourceSpan -> m Exp
    lift :: forall (m :: * -> *). Quote m => SourceSpan -> m Exp
    $cliftTyped :: forall (m :: * -> *). Quote m => SourceSpan -> Code m SourceSpan
    liftTyped :: forall (m :: * -> *). Quote m => SourceSpan -> Code m SourceSpan
    Lift)