    {-# LANGUAGE  MagicHash,
                  UnboxedTuples,
                  ScopedTypeVariables #-}

    module UU.Scanner.GenTokenParser where

    import GHC.Base
    import UU.Parsing.Interface(IsParser(pCostSym, pSym), (<$>))
    import UU.Scanner.GenToken(GenToken(..))
    import UU.Scanner.Position(Pos, noPos)

    pCostReserved'          :: IsParser p (GenToken key tp val)
                            => Int -> key -> p (GenToken key tp val)
    pCostReserved' :: Int -> key -> p (GenToken key tp val)
    pCostReserved' (I# c :: Int#
    c) key :: key
    key
                            =  let tok :: GenToken key tp val
    tok = key -> Pos -> GenToken key tp val
    forall key tp val. key -> Pos -> GenToken key tp val
    Reserved key
    key Pos
    noPos
                               in  Int#
    -> GenToken key tp val
    -> GenToken key tp val
    -> p (GenToken key tp val)
    forall (p :: * -> *) s. IsParser p s => Int# -> s -> s -> p s
    pCostSym Int#
    c GenToken key tp val
    forall tp val. GenToken key tp val
    tok GenToken key tp val
    forall tp val. GenToken key tp val
    tok

    pReserved'              :: IsParser p (GenToken key tp val)
                            => key -> p (GenToken key tp val)
    pReserved' :: key -> p (GenToken key tp val)
    pReserved' key :: key
    key          =  let tok :: GenToken key tp val
    tok = key -> Pos -> GenToken key tp val
    forall key tp val. key -> Pos -> GenToken key tp val
    Reserved key
    key Pos
    noPos
                               in  GenToken key tp val -> p (GenToken key tp val)
    forall (p :: * -> *) s. IsParser p s => s -> p s
    pSym GenToken key tp val
    forall tp val. GenToken key tp val
    tok

    pCostValToken'          :: IsParser p (GenToken key tp val)
                            => Int -> tp -> val -> p (GenToken key tp val)
    pCostValToken' :: Int -> tp -> val -> p (GenToken key tp val)
    pCostValToken' (I# c :: Int#
    c) tp :: tp
    tp val :: val
    val
                            =  let tok :: GenToken key tp val
    tok = tp -> val -> Pos -> GenToken key tp val
    forall key tp val. tp -> val -> Pos -> GenToken key tp val
    ValToken tp
    tp val
    val Pos
    noPos
                               in  Int#
    -> GenToken key tp val
    -> GenToken key tp val
    -> p (GenToken key tp val)
    forall (p :: * -> *) s. IsParser p s => Int# -> s -> s -> p s
    pCostSym Int#
    c GenToken key tp val
    forall key. GenToken key tp val
    tok GenToken key tp val
    forall key. GenToken key tp val
    tok

    pValToken'              :: IsParser p (GenToken key tp val)
                            => tp -> val -> p (GenToken key tp val)
    pValToken' :: tp -> val -> p (GenToken key tp val)
    pValToken' tp :: tp
    tp val :: val
    val       =  let tok :: GenToken key tp val
    tok = tp -> val -> Pos -> GenToken key tp val
    forall key tp val. tp -> val -> Pos -> GenToken key tp val
    ValToken tp
    tp val
    val Pos
    noPos
                               in  GenToken key tp val -> p (GenToken key tp val)
    forall (p :: * -> *) s. IsParser p s => s -> p s
    pSym GenToken key tp val
    forall key. GenToken key tp val
    tok

    pCostReserved           :: IsParser p (GenToken key tp val)
                            => Int -> key -> p Pos
    pCostReserved :: Int -> key -> p Pos
    pCostReserved c :: Int
    c key :: key
    key     =  let getPos :: GenToken key tp val -> Pos
    getPos x :: GenToken key tp val
    x = case GenToken key tp val
    x of
                                    Reserved _   p :: Pos
    p -> Pos
    p
                                    ValToken _ _ p :: Pos
    p -> Pos
    p
                               in GenToken key tp val -> Pos
    forall key tp val. GenToken key tp val -> Pos
    getPos (GenToken key tp val -> Pos) -> p (GenToken key tp val) -> p Pos
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Int -> key -> p (GenToken key tp val)
    forall (p :: * -> *) key tp val.
    IsParser p (GenToken key tp val) =>
    Int -> key -> p (GenToken key tp val)
    pCostReserved' Int
    c key
    key

    pCostValToken           :: IsParser p (GenToken key tp val)
                            => Int -> tp -> val -> p (val,Pos)
    pCostValToken :: Int -> tp -> val -> p (val, Pos)
    pCostValToken c :: Int
    c tp :: tp
    tp val :: val
    val  =  let getVal :: GenToken key tp a -> (a, Pos)
    getVal x :: GenToken key tp a
    x = case GenToken key tp a
    x of
                                    ValToken _ v :: a
    v p :: Pos
    p -> (a
    v,Pos
    p)
                                    _              -> [Char] -> (a, Pos)
    forall a. HasCallStack => [Char] -> a
    error "pValToken: cannot get value of Reserved"
                               in GenToken key tp val -> (val, Pos)
    forall key tp a. GenToken key tp a -> (a, Pos)
    getVal (GenToken key tp val -> (val, Pos))
    -> p (GenToken key tp val) -> p (val, Pos)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Int -> tp -> val -> p (GenToken key tp val)
    forall (p :: * -> *) key tp val.
    IsParser p (GenToken key tp val) =>
    Int -> tp -> val -> p (GenToken key tp val)
    pCostValToken' Int
    c tp
    tp val
    val

    pReserved               :: IsParser p (GenToken key tp val)
                            => key -> p Pos
    pReserved :: key -> p Pos
    pReserved               =  Int -> key -> p Pos
    forall (p :: * -> *) key tp val.
    IsParser p (GenToken key tp val) =>
    Int -> key -> p Pos
    pCostReserved 5

    pValToken               :: IsParser p (GenToken key tp val)
                            => tp -> val -> p (val,Pos)
    pValToken :: tp -> val -> p (val, Pos)
    pValToken               =  Int -> tp -> val -> p (val, Pos)
    forall (p :: * -> *) key tp val.
    IsParser p (GenToken key tp val) =>
    Int -> tp -> val -> p (val, Pos)
    pCostValToken 5

    pValTokenNoPos          :: IsParser p (GenToken key tp val)
                            => tp -> val -> p val
    pValTokenNoPos :: tp -> val -> p val
    pValTokenNoPos tp :: tp
    tp val :: val
    val   =  (val, Pos) -> val
    forall a b. (a, b) -> a
    fst ((val, Pos) -> val) -> p (val, Pos) -> p val
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> tp -> val -> p (val, Pos)
    forall (p :: * -> *) key tp val.
    IsParser p (GenToken key tp val) =>
    tp -> val -> p (val, Pos)
    pValToken tp
    tp val
    val