    {-# LANGUAGE DeriveDataTypeable #-}
    module Language.JavaScript.Parser.SrcLocation (
      TokenPosn(..)
      , tokenPosnEmpty
      ) where

    import Data.Data

    -- | `TokenPosn' records the location of a token in the input text.  It has three
    -- fields: the address (number of characters preceding the token), line number
    -- and column of a token within the file.
    -- Note: The lexer assumes the usual eight character tab stops.

    data TokenPosn = TokenPn !Int -- address (number of characters preceding the token)
                             !Int -- line number
                             !Int -- column
            deriving (TokenPosn -> TokenPosn -> Bool
    (TokenPosn -> TokenPosn -> Bool)
    -> (TokenPosn -> TokenPosn -> Bool) -> Eq TokenPosn
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: TokenPosn -> TokenPosn -> Bool
    == :: TokenPosn -> TokenPosn -> Bool
    $c/= :: TokenPosn -> TokenPosn -> Bool
    /= :: TokenPosn -> TokenPosn -> Bool
    Eq,Int -> TokenPosn -> ShowS
    [TokenPosn] -> ShowS
    TokenPosn -> String
    (Int -> TokenPosn -> ShowS)
    -> (TokenPosn -> String)
    -> ([TokenPosn] -> ShowS)
    -> Show TokenPosn
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> TokenPosn -> ShowS
    showsPrec :: Int -> TokenPosn -> ShowS
    $cshow :: TokenPosn -> String
    show :: TokenPosn -> String
    $cshowList :: [TokenPosn] -> ShowS
    showList :: [TokenPosn] -> ShowS
    Show, ReadPrec [TokenPosn]
    ReadPrec TokenPosn
    Int -> ReadS TokenPosn
    ReadS [TokenPosn]
    (Int -> ReadS TokenPosn)
    -> ReadS [TokenPosn]
    -> ReadPrec TokenPosn
    -> ReadPrec [TokenPosn]
    -> Read TokenPosn
    forall a.
    (Int -> ReadS a)
    -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
    $creadsPrec :: Int -> ReadS TokenPosn
    readsPrec :: Int -> ReadS TokenPosn
    $creadList :: ReadS [TokenPosn]
    readList :: ReadS [TokenPosn]
    $creadPrec :: ReadPrec TokenPosn
    readPrec :: ReadPrec TokenPosn
    $creadListPrec :: ReadPrec [TokenPosn]
    readListPrec :: ReadPrec [TokenPosn]
    Read, Typeable TokenPosn
    Typeable TokenPosn =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> TokenPosn -> c TokenPosn)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c TokenPosn)
    -> (TokenPosn -> Constr)
    -> (TokenPosn -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c TokenPosn))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TokenPosn))
    -> ((forall b. Data b => b -> b) -> TokenPosn -> TokenPosn)
    -> (forall r r'.
        (r -> r' -> r)
        -> r -> (forall d. Data d => d -> r') -> TokenPosn -> r)
    -> (forall r r'.
        (r' -> r -> r)
        -> r -> (forall d. Data d => d -> r') -> TokenPosn -> r)
    -> (forall u. (forall d. Data d => d -> u) -> TokenPosn -> [u])
    -> (forall u.
        Int -> (forall d. Data d => d -> u) -> TokenPosn -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn)
    -> Data TokenPosn
    TokenPosn -> Constr
    TokenPosn -> DataType
    (forall b. Data b => b -> b) -> TokenPosn -> TokenPosn
    forall a.
    Typeable a =>
    (forall (c :: * -> *).
     (forall d b. Data d => c (d -> b) -> d -> c b)
     -> (forall g. g -> c g) -> a -> c a)
    -> (forall (c :: * -> *).
        (forall b r. Data b => c (b -> r) -> c r)
        -> (forall r. r -> c r) -> Constr -> c a)
    -> (a -> Constr)
    -> (a -> DataType)
    -> (forall (t :: * -> *) (c :: * -> *).
        Typeable t =>
        (forall d. Data d => c (t d)) -> Maybe (c a))
    -> (forall (t :: * -> * -> *) (c :: * -> *).
        Typeable t =>
        (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
    -> ((forall b. Data b => b -> b) -> a -> a)
    -> (forall r r'.
        (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall r r'.
        (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
    -> (forall u. (forall d. Data d => d -> u) -> a -> [u])
    -> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
    -> (forall (m :: * -> *).
        Monad m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> (forall (m :: * -> *).
        MonadPlus m =>
        (forall d. Data d => d -> m d) -> a -> m a)
    -> Data a
    forall u. Int -> (forall d. Data d => d -> u) -> TokenPosn -> u
    forall u. (forall d. Data d => d -> u) -> TokenPosn -> [u]
    forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> TokenPosn -> r
    forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> TokenPosn -> r
    forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn
    forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn
    forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c TokenPosn
    forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> TokenPosn -> c TokenPosn
    forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c TokenPosn)
    forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TokenPosn)
    $cgfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> TokenPosn -> c TokenPosn
    gfoldl :: forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> TokenPosn -> c TokenPosn
    $cgunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c TokenPosn
    gunfold :: forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c TokenPosn
    $ctoConstr :: TokenPosn -> Constr
    toConstr :: TokenPosn -> Constr
    $cdataTypeOf :: TokenPosn -> DataType
    dataTypeOf :: TokenPosn -> DataType
    $cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c TokenPosn)
    dataCast1 :: forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c TokenPosn)
    $cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TokenPosn)
    dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TokenPosn)
    $cgmapT :: (forall b. Data b => b -> b) -> TokenPosn -> TokenPosn
    gmapT :: (forall b. Data b => b -> b) -> TokenPosn -> TokenPosn
    $cgmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> TokenPosn -> r
    gmapQl :: forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> TokenPosn -> r
    $cgmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> TokenPosn -> r
    gmapQr :: forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> TokenPosn -> r
    $cgmapQ :: forall u. (forall d. Data d => d -> u) -> TokenPosn -> [u]
    gmapQ :: forall u. (forall d. Data d => d -> u) -> TokenPosn -> [u]
    $cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TokenPosn -> u
    gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TokenPosn -> u
    $cgmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn
    gmapM :: forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn
    $cgmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn
    gmapMp :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn
    $cgmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn
    gmapMo :: forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> TokenPosn -> m TokenPosn
    Data, Typeable)

    tokenPosnEmpty :: TokenPosn
    tokenPosnEmpty :: TokenPosn
    tokenPosnEmpty = Int -> Int -> Int -> TokenPosn
    TokenPn Int
    0 Int
    0 Int
    0