    {-# LANGUAGE CPP #-}
    {-# LANGUAGE DefaultSignatures #-}
    {-# LANGUAGE FlexibleContexts #-}
    {-# LANGUAGE FlexibleInstances #-}
    {-# LANGUAGE UndecidableInstances #-}
    {-# LANGUAGE TypeFamilies #-}
    {-# LANGUAGE TypeOperators #-}

    #if defined (__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 802
    {-# LANGUAGE TypeSynonymInstances #-}
    #endif

    -- | Parsers that can consume and return a prefix of their input.

    module Text.Parser.Input (InputParsing(..), InputCharParsing(..), ConsumedInputParsing(..),
                              Lazy(..), Strict(..)) where

    import Control.Applicative (Alternative ((<|>), empty))
    import Control.Monad (MonadPlus, void)
    import Control.Monad.Trans.Class (lift)
    import Control.Monad.Trans.Identity (IdentityT(..))
    import Control.Monad.Trans.Reader (ReaderT(..), mapReaderT)
    import qualified Control.Monad.Trans.Writer.Lazy as Lazy (WriterT)
    import qualified Control.Monad.Trans.Writer.Strict as Strict (WriterT)
    import qualified Control.Monad.Trans.State.Lazy as Lazy (StateT)
    import qualified Control.Monad.Trans.State.Strict as Strict (StateT)
    import qualified Control.Monad.Trans.RWS.Lazy as Lazy (RWST)
    import qualified Control.Monad.Trans.RWS.Strict as Strict (RWST)
    import Data.ByteString (ByteString)
    import qualified Data.ByteString as ByteString
    import qualified Data.ByteString.Lazy as Lazy
    import Data.Ord (Down)
    import Text.ParserCombinators.ReadP (ReadP)
    import qualified Text.ParserCombinators.ReadP as ReadP

    import Text.Parser.Char (CharParsing)
    import Text.Parser.Combinators (count, eof, notFollowedBy, try, unexpected)
    import Text.Parser.LookAhead (LookAheadParsing, lookAhead)
    import qualified Text.Parser.Char as Char

    import qualified Data.Monoid.Factorial as Factorial
    import qualified Data.Monoid.Null as Null
    import qualified Data.Monoid.Textual as Textual
    import qualified Data.Semigroup.Cancellative as Cancellative
    import Data.Monoid.Factorial (FactorialMonoid)
    import Data.Monoid.Textual (TextualMonoid)
    import Data.Semigroup.Cancellative (LeftReductive)

    #ifdef MIN_VERSION_attoparsec
    import Data.Text (Text)
    import qualified Data.ByteString.Char8 as ByteString.Char8
    import qualified Data.Text as Text

    import qualified Data.Attoparsec.ByteString as Attoparsec
    import qualified Data.Attoparsec.ByteString.Char8 as Attoparsec.Char8
    import qualified Data.Attoparsec.Text as Attoparsec.Text
    #endif

    #ifdef MIN_VERSION_parsec
    import Text.Parsec (ParsecT)
    import qualified Text.Parsec as Parsec
    #endif

    #ifdef MIN_VERSION_binary
    import qualified Data.Binary.Get as Binary
    #endif

    import Text.Parser.Input.Position (fromEnd, fromStart)
    import Text.Parser.Internal (mapLazyWriterT, mapStrictWriterT,
                                 mapLazyStateT, mapStrictStateT,
                                 mapLazyRWST, mapStrictRWST)
    import Text.Parser.Wrapper (Lazy(..), Strict(..))

    import Prelude hiding (take, takeWhile)

    -- | Methods for parsing monoidal inputs
    class LookAheadParsing m => InputParsing m where
       -- | The type of the input stream that the parser @m@ expects to parse.
       type ParserInput m
       type ParserPosition m
       -- | Always sucessful parser that returns the entire remaining input without consuming it.
       getInput :: m (ParserInput m)
       -- | Retrieve the 'Position' reached by the parser in the input source.
       getSourcePos :: m (ParserPosition m)

       -- | A parser that accepts any single atomic prefix of the input stream.
       --
       -- > anyToken == satisfy (const True)
       -- > anyToken == take 1
       anyToken :: m (ParserInput m)
       -- | A parser that accepts exactly the given number of input atoms.
       --
       -- > take n == count n anyToken
       take :: Int -> m (ParserInput m)
       -- | A parser that accepts an input atom only if it satisfies the given predicate.
       satisfy :: (ParserInput m -> Bool) -> m (ParserInput m)
       -- | A parser that succeeds exactly when satisfy doesn't, equivalent to
       -- 'Text.Parser.Combinators.notFollowedBy' @.@ 'satisfy'
       notSatisfy :: (ParserInput m -> Bool) -> m ()

       -- | A stateful scanner. The predicate modifies a state argument, and each transformed state is passed to successive
       -- invocations of the predicate on each token of the input until one returns 'Nothing' or the input ends.
       --
       -- This parser does not fail.  It will return an empty string if the predicate returns 'Nothing' on the first
       -- character.
       --
       -- /Note/: Because this parser does not fail, do not use it with combinators such as 'Control.Applicative.many',
       -- because such parsers loop until a failure occurs.  Careless use will thus result in an infinite loop.
       scan :: state -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
       -- | A parser that consumes and returns the given prefix of the input.
       string :: ParserInput m -> m (ParserInput m)

       -- | A parser accepting the longest sequence of input atoms that match the given predicate; an optimized version of
       -- 'concat' @.@ 'Control.Applicative.many' @.@ 'satisfy'.
       --
       -- /Note/: Because this parser does not fail, do not use it with combinators such as 'Control.Applicative.many',
       -- because such parsers loop until a failure occurs.  Careless use will thus result in an infinite loop.
       takeWhile :: (ParserInput m -> Bool) -> m (ParserInput m)
       -- | A parser accepting the longest non-empty sequence of input atoms that match the given predicate; an optimized
       -- version of 'concat' @.@ 'Control.Applicative.some' @.@ 'satisfy'.
       takeWhile1 :: (ParserInput m -> Bool) -> m (ParserInput m)

       type ParserPosition m = Down Int
       default getSourcePos :: (FactorialMonoid (ParserInput m), Functor m, ParserPosition m ~ Down Int)
                            => m (ParserPosition m)
       getSourcePos = Int -> Down Int
    fromEnd (Int -> Down Int)
    -> (ParserInput m -> Int) -> ParserInput m -> Down Int
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ParserInput m -> Int
    forall m. Factorial m => m -> Int
    Factorial.length (ParserInput m -> Down Int) -> m (ParserInput m) -> m (Down Int)
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
       anyToken = Int -> m (ParserInput m)
    forall (m :: * -> *). InputParsing m => Int -> m (ParserInput m)
    take Int
    1
       default satisfy :: Monad m => (ParserInput m -> Bool) -> m (ParserInput m)
       satisfy ParserInput m -> Bool
    predicate = m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    anyToken m (ParserInput m)
    -> (ParserInput m -> m (ParserInput m)) -> m (ParserInput m)
    forall a b. m a -> (a -> m b) -> m b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= \ParserInput m
    x-> if ParserInput m -> Bool
    predicate ParserInput m
    x then ParserInput m -> m (ParserInput m)
    forall a. a -> m a
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure ParserInput m
    x else m (ParserInput m)
    forall a. m a
    forall (f :: * -> *) a. Alternative f => f a
    empty
       notSatisfy ParserInput m -> Bool
    predicate = m () -> m ()
    forall a. m a -> m a
    forall (m :: * -> *) a. Parsing m => m a -> m a
    try (m (ParserInput m) -> m ()
    forall (f :: * -> *) a. Functor f => f a -> f ()
    void (m (ParserInput m) -> m ()) -> m (ParserInput m) -> m ()
    forall a b. (a -> b) -> a -> b
    $ (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    satisfy ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool) -> m (ParserInput m)
    forall a b. (a -> b) -> a -> b
    $ Bool -> Bool
    not (Bool -> Bool) -> (ParserInput m -> Bool) -> ParserInput m -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ParserInput m -> Bool
    predicate) m () -> m () -> m ()
    forall a. m a -> m a -> m a
    forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
    <|> m ()
    forall (m :: * -> *). Parsing m => m ()
    eof
       default string :: (Monad m, LeftReductive (ParserInput m), FactorialMonoid (ParserInput m), Show (ParserInput m))
                      => ParserInput m -> m (ParserInput m)
       string ParserInput m
    s = do i <- m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
                     if s `Cancellative.isPrefixOf` i
                        then take (Factorial.length s)
                        else unexpected ("string " <> show s)
       default scan :: (Monad m, FactorialMonoid (ParserInput m)) =>
                       state -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
       scan state
    state state -> ParserInput m -> Maybe state
    f = do i <- m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
                         let (prefix, _suffix, _state) = Factorial.spanMaybe' state f i
                         take (Factorial.length prefix)
       default takeWhile :: (Monad m, FactorialMonoid (ParserInput m)) => (ParserInput m -> Bool) -> m (ParserInput m)
       takeWhile ParserInput m -> Bool
    predicate = do i <- m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
                                take (Factorial.length $ Factorial.takeWhile predicate i)
       default takeWhile1 :: (Monad m, FactorialMonoid (ParserInput m)) => (ParserInput m -> Bool) -> m (ParserInput m)
       takeWhile1 ParserInput m -> Bool
    predicate = do x <- (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile ParserInput m -> Bool
    predicate
                                 if Null.null x then unexpected "takeWhile1" else pure x

    -- | Methods for parsing textual monoid inputs
    class (CharParsing m, InputParsing m) => InputCharParsing m where
       -- | Specialization of 'satisfy' on textual inputs, accepting an input character only if it satisfies the given
       -- predicate, and returning the input atom that represents the character. Equivalent to @fmap singleton
       -- . Char.satisfy@
       satisfyCharInput :: (Char -> Bool) -> m (ParserInput m)
       -- | A parser that succeeds exactly when satisfy doesn't, equivalent to @notFollowedBy . Char.satisfy@
       notSatisfyChar :: (Char -> Bool) -> m ()

       -- | Stateful scanner like `scan`, but specialized for 'TextualMonoid' inputs.
       scanChars :: state -> (state -> Char -> Maybe state) -> m (ParserInput m)

       -- | Specialization of 'takeWhile' on 'TextualMonoid' inputs, accepting the longest sequence of input characters that
       -- match the given predicate; an optimized version of @fmap fromString  . many . Char.satisfy@.
       --
       -- /Note/: Because this parser does not fail, do not use it with combinators such as 'Control.Applicative.many',
       -- because such parsers loop until a failure occurs.  Careless use will thus result in an infinite loop.
       takeCharsWhile :: (Char -> Bool) -> m (ParserInput m)
       -- | Specialization of 'takeWhile1' on 'TextualMonoid' inputs, accepting the longest sequence of input characters
       -- that match the given predicate; an optimized version of @fmap fromString  . some . Char.satisfy@.
       takeCharsWhile1 :: (Char -> Bool) -> m (ParserInput m)

       notSatisfyChar = m Char -> m ()
    forall a. Show a => m a -> m ()
    forall (m :: * -> *) a. (Parsing m, Show a) => m a -> m ()
    notFollowedBy (m Char -> m ())
    -> ((Char -> Bool) -> m Char) -> (Char -> Bool) -> m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m Char
    forall (m :: * -> *). CharParsing m => (Char -> Bool) -> m Char
    Char.satisfy
       default scanChars :: (Monad m, TextualMonoid (ParserInput m)) =>
                            state -> (state -> Char -> Maybe state) -> m (ParserInput m)
       scanChars state
    state state -> Char -> Maybe state
    f = do i <- m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
                              let (prefix, _suffix, _state) = Textual.spanMaybe' state (const $ const Nothing) f i
                              take (Factorial.length prefix)
       default takeCharsWhile :: (Monad m, TextualMonoid (ParserInput m)) => (Char -> Bool) -> m (ParserInput m)
       takeCharsWhile Char -> Bool
    predicate = do i <- m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
                                     take (Factorial.length $ Textual.takeWhile_ False predicate i)
       default takeCharsWhile1 :: (Monad m, TextualMonoid (ParserInput m)) => (Char -> Bool) -> m (ParserInput m)
       takeCharsWhile1 Char -> Bool
    predicate = do x <- (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile Char -> Bool
    predicate
                                      if Null.null x then unexpected "takeCharsWhile1" else pure x

    -- | Parsers that keep track of the consumed input.
    class InputParsing m => ConsumedInputParsing m where
       -- | Return both the result of a parse and the portion of the input that the argument parser consumed.
       match :: m a -> m (ParserInput m, a)

    instance InputParsing ReadP where
       type ParserInput ReadP = String
       getInput :: ReadP (ParserInput ReadP)
    getInput = ReadP String
    ReadP (ParserInput ReadP)
    ReadP.look
       take :: Int -> ReadP (ParserInput ReadP)
    take Int
    n = Int -> ReadP Char -> ReadP String
    forall (m :: * -> *) a. Applicative m => Int -> m a -> m [a]
    count Int
    n ReadP Char
    ReadP.get
       anyToken :: ReadP (ParserInput ReadP)
    anyToken = Char -> String
    forall a. a -> [a]
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Char -> String) -> ReadP Char -> ReadP String
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> ReadP Char
    ReadP.get
       satisfy :: (ParserInput ReadP -> Bool) -> ReadP (ParserInput ReadP)
    satisfy ParserInput ReadP -> Bool
    predicate = Char -> String
    forall a. a -> [a]
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Char -> String) -> ReadP Char -> ReadP String
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Char -> Bool) -> ReadP Char
    ReadP.satisfy (String -> Bool
    ParserInput ReadP -> Bool
    predicate (String -> Bool) -> (Char -> String) -> Char -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Char -> String
    forall a. a -> [a]
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure)
       string :: ParserInput ReadP -> ReadP (ParserInput ReadP)
    string = String -> ReadP String
    ParserInput ReadP -> ReadP (ParserInput ReadP)
    ReadP.string

    instance InputCharParsing ReadP where
       satisfyCharInput :: (Char -> Bool) -> ReadP (ParserInput ReadP)
    satisfyCharInput Char -> Bool
    predicate = Char -> String
    forall a. a -> [a]
    forall (f :: * -> *) a. Applicative f => a -> f a
    pure (Char -> String) -> ReadP Char -> ReadP String
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Char -> Bool) -> ReadP Char
    ReadP.satisfy Char -> Bool
    predicate

    instance ConsumedInputParsing ReadP where
       match :: forall a. ReadP a -> ReadP (ParserInput ReadP, a)
    match = ReadP a -> ReadP (String, a)
    ReadP a -> ReadP (ParserInput ReadP, a)
    forall a. ReadP a -> ReadP (String, a)
    ReadP.gather

    instance (Monad m, InputParsing m) => InputParsing (IdentityT m) where
       type ParserInput (IdentityT m) = ParserInput m
       type ParserPosition (IdentityT m) = ParserPosition m
       getInput :: IdentityT m (ParserInput (IdentityT m))
    getInput = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
       getSourcePos :: IdentityT m (ParserPosition (IdentityT m))
    getSourcePos = m (ParserPosition m) -> IdentityT m (ParserPosition m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT m (ParserPosition m)
    forall (m :: * -> *). InputParsing m => m (ParserPosition m)
    getSourcePos
       anyToken :: IdentityT m (ParserInput (IdentityT m))
    anyToken = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    anyToken
       take :: Int -> IdentityT m (ParserInput (IdentityT m))
    take = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m (ParserInput m) -> IdentityT m (ParserInput m))
    -> (Int -> m (ParserInput m)) -> Int -> IdentityT m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> m (ParserInput m)
    forall (m :: * -> *). InputParsing m => Int -> m (ParserInput m)
    take
       satisfy :: (ParserInput (IdentityT m) -> Bool)
    -> IdentityT m (ParserInput (IdentityT m))
    satisfy = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m (ParserInput m) -> IdentityT m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> IdentityT m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    satisfy
       notSatisfy :: (ParserInput (IdentityT m) -> Bool) -> IdentityT m ()
    notSatisfy = m () -> IdentityT m ()
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m () -> IdentityT m ())
    -> ((ParserInput m -> Bool) -> m ())
    -> (ParserInput m -> Bool)
    -> IdentityT m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m ()
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m ()
    notSatisfy
       scan :: forall state.
    state
    -> (state -> ParserInput (IdentityT m) -> Maybe state)
    -> IdentityT m (ParserInput (IdentityT m))
    scan state
    state state -> ParserInput (IdentityT m) -> Maybe state
    f = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall state.
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputParsing m =>
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    scan state
    state state -> ParserInput m -> Maybe state
    state -> ParserInput (IdentityT m) -> Maybe state
    f)
       string :: ParserInput (IdentityT m)
    -> IdentityT m (ParserInput (IdentityT m))
    string = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m (ParserInput m) -> IdentityT m (ParserInput m))
    -> (ParserInput m -> m (ParserInput m))
    -> ParserInput m
    -> IdentityT m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ParserInput m -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    ParserInput m -> m (ParserInput m)
    string
       takeWhile :: (ParserInput (IdentityT m) -> Bool)
    -> IdentityT m (ParserInput (IdentityT m))
    takeWhile = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m (ParserInput m) -> IdentityT m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> IdentityT m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile
       takeWhile1 :: (ParserInput (IdentityT m) -> Bool)
    -> IdentityT m (ParserInput (IdentityT m))
    takeWhile1 = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m (ParserInput m) -> IdentityT m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> IdentityT m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile1

    instance (MonadPlus m, InputCharParsing m) => InputCharParsing (IdentityT m) where
       satisfyCharInput :: (Char -> Bool) -> IdentityT m (ParserInput (IdentityT m))
    satisfyCharInput = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m (ParserInput m) -> IdentityT m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> IdentityT m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    satisfyCharInput
       notSatisfyChar :: (Char -> Bool) -> IdentityT m ()
    notSatisfyChar = m () -> IdentityT m ()
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m () -> IdentityT m ())
    -> ((Char -> Bool) -> m ()) -> (Char -> Bool) -> IdentityT m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m ()
    forall (m :: * -> *). InputCharParsing m => (Char -> Bool) -> m ()
    notSatisfyChar
       scanChars :: forall state.
    state
    -> (state -> Char -> Maybe state)
    -> IdentityT m (ParserInput (IdentityT m))
    scanChars state
    state state -> Char -> Maybe state
    f = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall state.
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputCharParsing m =>
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    scanChars state
    state state -> Char -> Maybe state
    f)
       takeCharsWhile :: (Char -> Bool) -> IdentityT m (ParserInput (IdentityT m))
    takeCharsWhile = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m (ParserInput m) -> IdentityT m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> IdentityT m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile
       takeCharsWhile1 :: (Char -> Bool) -> IdentityT m (ParserInput (IdentityT m))
    takeCharsWhile1 = m (ParserInput m) -> IdentityT m (ParserInput m)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m (ParserInput m) -> IdentityT m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> IdentityT m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile1

    instance (Monad m, ConsumedInputParsing m) => ConsumedInputParsing (IdentityT m) where
      match :: forall a.
    IdentityT m a -> IdentityT m (ParserInput (IdentityT m), a)
    match (IdentityT m a
    p) = m (ParserInput m, a) -> IdentityT m (ParserInput m, a)
    forall {k} (f :: k -> *) (a :: k). f a -> IdentityT f a
    IdentityT (m a -> m (ParserInput m, a)
    forall a. m a -> m (ParserInput m, a)
    forall (m :: * -> *) a.
    ConsumedInputParsing m =>
    m a -> m (ParserInput m, a)
    match m a
    p)

    instance (MonadPlus m, InputParsing m) => InputParsing (ReaderT e m) where
       type ParserInput (ReaderT e m) = ParserInput m
       type ParserPosition (ReaderT e m) = ParserPosition m
       getInput :: ReaderT e m (ParserInput (ReaderT e m))
    getInput = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
       getSourcePos :: ReaderT e m (ParserPosition (ReaderT e m))
    getSourcePos = m (ParserPosition m) -> ReaderT e m (ParserPosition m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserPosition m)
    forall (m :: * -> *). InputParsing m => m (ParserPosition m)
    getSourcePos
       anyToken :: ReaderT e m (ParserInput (ReaderT e m))
    anyToken = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    anyToken
       take :: Int -> ReaderT e m (ParserInput (ReaderT e m))
    take = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> ReaderT e m (ParserInput m))
    -> (Int -> m (ParserInput m)) -> Int -> ReaderT e m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> m (ParserInput m)
    forall (m :: * -> *). InputParsing m => Int -> m (ParserInput m)
    take
       satisfy :: (ParserInput (ReaderT e m) -> Bool)
    -> ReaderT e m (ParserInput (ReaderT e m))
    satisfy = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> ReaderT e m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> ReaderT e m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    satisfy
       notSatisfy :: (ParserInput (ReaderT e m) -> Bool) -> ReaderT e m ()
    notSatisfy = m () -> ReaderT e m ()
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> ReaderT e m ())
    -> ((ParserInput m -> Bool) -> m ())
    -> (ParserInput m -> Bool)
    -> ReaderT e m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m ()
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m ()
    notSatisfy
       scan :: forall state.
    state
    -> (state -> ParserInput (ReaderT e m) -> Maybe state)
    -> ReaderT e m (ParserInput (ReaderT e m))
    scan state
    state state -> ParserInput (ReaderT e m) -> Maybe state
    f = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall state.
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputParsing m =>
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    scan state
    state state -> ParserInput m -> Maybe state
    state -> ParserInput (ReaderT e m) -> Maybe state
    f)
       string :: ParserInput (ReaderT e m)
    -> ReaderT e m (ParserInput (ReaderT e m))
    string = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> ReaderT e m (ParserInput m))
    -> (ParserInput m -> m (ParserInput m))
    -> ParserInput m
    -> ReaderT e m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ParserInput m -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    ParserInput m -> m (ParserInput m)
    string
       takeWhile :: (ParserInput (ReaderT e m) -> Bool)
    -> ReaderT e m (ParserInput (ReaderT e m))
    takeWhile = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> ReaderT e m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> ReaderT e m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile
       takeWhile1 :: (ParserInput (ReaderT e m) -> Bool)
    -> ReaderT e m (ParserInput (ReaderT e m))
    takeWhile1 = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> ReaderT e m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> ReaderT e m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile1

    instance (MonadPlus m, InputCharParsing m) => InputCharParsing (ReaderT e m) where
       satisfyCharInput :: (Char -> Bool) -> ReaderT e m (ParserInput (ReaderT e m))
    satisfyCharInput = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> ReaderT e m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> ReaderT e m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    satisfyCharInput
       notSatisfyChar :: (Char -> Bool) -> ReaderT e m ()
    notSatisfyChar = m () -> ReaderT e m ()
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> ReaderT e m ())
    -> ((Char -> Bool) -> m ()) -> (Char -> Bool) -> ReaderT e m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m ()
    forall (m :: * -> *). InputCharParsing m => (Char -> Bool) -> m ()
    notSatisfyChar
       scanChars :: forall state.
    state
    -> (state -> Char -> Maybe state)
    -> ReaderT e m (ParserInput (ReaderT e m))
    scanChars state
    state state -> Char -> Maybe state
    f = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall state.
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputCharParsing m =>
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    scanChars state
    state state -> Char -> Maybe state
    f)
       takeCharsWhile :: (Char -> Bool) -> ReaderT e m (ParserInput (ReaderT e m))
    takeCharsWhile = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> ReaderT e m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> ReaderT e m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile
       takeCharsWhile1 :: (Char -> Bool) -> ReaderT e m (ParserInput (ReaderT e m))
    takeCharsWhile1 = m (ParserInput m) -> ReaderT e m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> ReaderT e m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> ReaderT e m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> ReaderT e m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile1

    instance (MonadPlus m, ConsumedInputParsing m) => ConsumedInputParsing (ReaderT e m) where
      match :: forall a.
    ReaderT e m a -> ReaderT e m (ParserInput (ReaderT e m), a)
    match = (m a -> m (ParserInput m, a))
    -> ReaderT e m a -> ReaderT e m (ParserInput m, a)
    forall (m :: * -> *) a (n :: * -> *) b r.
    (m a -> n b) -> ReaderT r m a -> ReaderT r n b
    mapReaderT m a -> m (ParserInput m, a)
    forall a. m a -> m (ParserInput m, a)
    forall (m :: * -> *) a.
    ConsumedInputParsing m =>
    m a -> m (ParserInput m, a)
    match

    instance (MonadPlus m, InputParsing m, Monoid w) => InputParsing (Lazy.WriterT w m) where
       type ParserInput (Lazy.WriterT w m) = ParserInput m
       type ParserPosition (Lazy.WriterT w m) = ParserPosition m
       getInput :: WriterT w m (ParserInput (WriterT w m))
    getInput = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
       getSourcePos :: WriterT w m (ParserPosition (WriterT w m))
    getSourcePos = m (ParserPosition m) -> WriterT w m (ParserPosition m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserPosition m)
    forall (m :: * -> *). InputParsing m => m (ParserPosition m)
    getSourcePos
       anyToken :: WriterT w m (ParserInput (WriterT w m))
    anyToken = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    anyToken
       take :: Int -> WriterT w m (ParserInput (WriterT w m))
    take = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> (Int -> m (ParserInput m)) -> Int -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> m (ParserInput m)
    forall (m :: * -> *). InputParsing m => Int -> m (ParserInput m)
    take
       satisfy :: (ParserInput (WriterT w m) -> Bool)
    -> WriterT w m (ParserInput (WriterT w m))
    satisfy = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    satisfy
       notSatisfy :: (ParserInput (WriterT w m) -> Bool) -> WriterT w m ()
    notSatisfy = m () -> WriterT w m ()
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> WriterT w m ())
    -> ((ParserInput m -> Bool) -> m ())
    -> (ParserInput m -> Bool)
    -> WriterT w m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m ()
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m ()
    notSatisfy
       scan :: forall state.
    state
    -> (state -> ParserInput (WriterT w m) -> Maybe state)
    -> WriterT w m (ParserInput (WriterT w m))
    scan state
    state state -> ParserInput (WriterT w m) -> Maybe state
    f = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall state.
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputParsing m =>
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    scan state
    state state -> ParserInput m -> Maybe state
    state -> ParserInput (WriterT w m) -> Maybe state
    f)
       string :: ParserInput (WriterT w m)
    -> WriterT w m (ParserInput (WriterT w m))
    string = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> (ParserInput m -> m (ParserInput m))
    -> ParserInput m
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ParserInput m -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    ParserInput m -> m (ParserInput m)
    string
       takeWhile :: (ParserInput (WriterT w m) -> Bool)
    -> WriterT w m (ParserInput (WriterT w m))
    takeWhile = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile
       takeWhile1 :: (ParserInput (WriterT w m) -> Bool)
    -> WriterT w m (ParserInput (WriterT w m))
    takeWhile1 = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile1

    instance (MonadPlus m, InputCharParsing m, Monoid w) => InputCharParsing (Lazy.WriterT w m) where
       satisfyCharInput :: (Char -> Bool) -> WriterT w m (ParserInput (WriterT w m))
    satisfyCharInput = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    satisfyCharInput
       notSatisfyChar :: (Char -> Bool) -> WriterT w m ()
    notSatisfyChar = m () -> WriterT w m ()
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> WriterT w m ())
    -> ((Char -> Bool) -> m ()) -> (Char -> Bool) -> WriterT w m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m ()
    forall (m :: * -> *). InputCharParsing m => (Char -> Bool) -> m ()
    notSatisfyChar
       scanChars :: forall state.
    state
    -> (state -> Char -> Maybe state)
    -> WriterT w m (ParserInput (WriterT w m))
    scanChars state
    state state -> Char -> Maybe state
    f = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall state.
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputCharParsing m =>
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    scanChars state
    state state -> Char -> Maybe state
    f)
       takeCharsWhile :: (Char -> Bool) -> WriterT w m (ParserInput (WriterT w m))
    takeCharsWhile = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile
       takeCharsWhile1 :: (Char -> Bool) -> WriterT w m (ParserInput (WriterT w m))
    takeCharsWhile1 = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile1

    instance (MonadPlus m, ConsumedInputParsing m, Monoid w) => ConsumedInputParsing (Lazy.WriterT w m) where
      match :: forall a.
    WriterT w m a -> WriterT w m (ParserInput (WriterT w m), a)
    match = (m a -> m (ParserInput m, a))
    -> WriterT w m a -> WriterT w m (ParserInput m, a)
    forall (m :: * -> *) a b w.
    Applicative m =>
    (m a -> m b) -> WriterT w m a -> WriterT w m b
    mapLazyWriterT m a -> m (ParserInput m, a)
    forall a. m a -> m (ParserInput m, a)
    forall (m :: * -> *) a.
    ConsumedInputParsing m =>
    m a -> m (ParserInput m, a)
    match

    instance (MonadPlus m, InputParsing m, Monoid w) => InputParsing (Strict.WriterT w m) where
       type ParserInput (Strict.WriterT w m) = ParserInput m
       type ParserPosition (Strict.WriterT w m) = ParserPosition m
       getInput :: WriterT w m (ParserInput (WriterT w m))
    getInput = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
       getSourcePos :: WriterT w m (ParserPosition (WriterT w m))
    getSourcePos = m (ParserPosition m) -> WriterT w m (ParserPosition m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserPosition m)
    forall (m :: * -> *). InputParsing m => m (ParserPosition m)
    getSourcePos
       anyToken :: WriterT w m (ParserInput (WriterT w m))
    anyToken = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    anyToken
       take :: Int -> WriterT w m (ParserInput (WriterT w m))
    take = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> (Int -> m (ParserInput m)) -> Int -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> m (ParserInput m)
    forall (m :: * -> *). InputParsing m => Int -> m (ParserInput m)
    take
       satisfy :: (ParserInput (WriterT w m) -> Bool)
    -> WriterT w m (ParserInput (WriterT w m))
    satisfy = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    satisfy
       notSatisfy :: (ParserInput (WriterT w m) -> Bool) -> WriterT w m ()
    notSatisfy = m () -> WriterT w m ()
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> WriterT w m ())
    -> ((ParserInput m -> Bool) -> m ())
    -> (ParserInput m -> Bool)
    -> WriterT w m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m ()
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m ()
    notSatisfy
       scan :: forall state.
    state
    -> (state -> ParserInput (WriterT w m) -> Maybe state)
    -> WriterT w m (ParserInput (WriterT w m))
    scan state
    state state -> ParserInput (WriterT w m) -> Maybe state
    f = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall state.
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputParsing m =>
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    scan state
    state state -> ParserInput m -> Maybe state
    state -> ParserInput (WriterT w m) -> Maybe state
    f)
       string :: ParserInput (WriterT w m)
    -> WriterT w m (ParserInput (WriterT w m))
    string = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> (ParserInput m -> m (ParserInput m))
    -> ParserInput m
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ParserInput m -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    ParserInput m -> m (ParserInput m)
    string
       takeWhile :: (ParserInput (WriterT w m) -> Bool)
    -> WriterT w m (ParserInput (WriterT w m))
    takeWhile = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile
       takeWhile1 :: (ParserInput (WriterT w m) -> Bool)
    -> WriterT w m (ParserInput (WriterT w m))
    takeWhile1 = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile1

    instance (MonadPlus m, InputCharParsing m, Monoid w) => InputCharParsing (Strict.WriterT w m) where
       satisfyCharInput :: (Char -> Bool) -> WriterT w m (ParserInput (WriterT w m))
    satisfyCharInput = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    satisfyCharInput
       notSatisfyChar :: (Char -> Bool) -> WriterT w m ()
    notSatisfyChar = m () -> WriterT w m ()
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> WriterT w m ())
    -> ((Char -> Bool) -> m ()) -> (Char -> Bool) -> WriterT w m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m ()
    forall (m :: * -> *). InputCharParsing m => (Char -> Bool) -> m ()
    notSatisfyChar
       scanChars :: forall state.
    state
    -> (state -> Char -> Maybe state)
    -> WriterT w m (ParserInput (WriterT w m))
    scanChars state
    state state -> Char -> Maybe state
    f = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall state.
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputCharParsing m =>
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    scanChars state
    state state -> Char -> Maybe state
    f)
       takeCharsWhile :: (Char -> Bool) -> WriterT w m (ParserInput (WriterT w m))
    takeCharsWhile = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile
       takeCharsWhile1 :: (Char -> Bool) -> WriterT w m (ParserInput (WriterT w m))
    takeCharsWhile1 = m (ParserInput m) -> WriterT w m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> WriterT w m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> WriterT w m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> WriterT w m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile1

    instance (MonadPlus m, ConsumedInputParsing m, Monoid w) => ConsumedInputParsing (Strict.WriterT w m) where
      match :: forall a.
    WriterT w m a -> WriterT w m (ParserInput (WriterT w m), a)
    match = (m a -> m (ParserInput m, a))
    -> WriterT w m a -> WriterT w m (ParserInput m, a)
    forall (m :: * -> *) a b w.
    Applicative m =>
    (m a -> m b) -> WriterT w m a -> WriterT w m b
    mapStrictWriterT m a -> m (ParserInput m, a)
    forall a. m a -> m (ParserInput m, a)
    forall (m :: * -> *) a.
    ConsumedInputParsing m =>
    m a -> m (ParserInput m, a)
    match

    instance (MonadPlus m, InputParsing m) => InputParsing (Lazy.StateT s m) where
       type ParserInput (Lazy.StateT s m) = ParserInput m
       type ParserPosition (Lazy.StateT s m) = ParserPosition m
       getInput :: StateT s m (ParserInput (StateT s m))
    getInput = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
       getSourcePos :: StateT s m (ParserPosition (StateT s m))
    getSourcePos = m (ParserPosition m) -> StateT s m (ParserPosition m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserPosition m)
    forall (m :: * -> *). InputParsing m => m (ParserPosition m)
    getSourcePos
       anyToken :: StateT s m (ParserInput (StateT s m))
    anyToken = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    anyToken
       take :: Int -> StateT s m (ParserInput (StateT s m))
    take = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> (Int -> m (ParserInput m)) -> Int -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> m (ParserInput m)
    forall (m :: * -> *). InputParsing m => Int -> m (ParserInput m)
    take
       satisfy :: (ParserInput (StateT s m) -> Bool)
    -> StateT s m (ParserInput (StateT s m))
    satisfy = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    satisfy
       notSatisfy :: (ParserInput (StateT s m) -> Bool) -> StateT s m ()
    notSatisfy = m () -> StateT s m ()
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> StateT s m ())
    -> ((ParserInput m -> Bool) -> m ())
    -> (ParserInput m -> Bool)
    -> StateT s m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m ()
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m ()
    notSatisfy
       scan :: forall state.
    state
    -> (state -> ParserInput (StateT s m) -> Maybe state)
    -> StateT s m (ParserInput (StateT s m))
    scan state
    state state -> ParserInput (StateT s m) -> Maybe state
    f = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall state.
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputParsing m =>
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    scan state
    state state -> ParserInput m -> Maybe state
    state -> ParserInput (StateT s m) -> Maybe state
    f)
       string :: ParserInput (StateT s m) -> StateT s m (ParserInput (StateT s m))
    string = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> (ParserInput m -> m (ParserInput m))
    -> ParserInput m
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ParserInput m -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    ParserInput m -> m (ParserInput m)
    string
       takeWhile :: (ParserInput (StateT s m) -> Bool)
    -> StateT s m (ParserInput (StateT s m))
    takeWhile = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile
       takeWhile1 :: (ParserInput (StateT s m) -> Bool)
    -> StateT s m (ParserInput (StateT s m))
    takeWhile1 = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile1

    instance (MonadPlus m, InputCharParsing m) => InputCharParsing (Lazy.StateT s m) where
       satisfyCharInput :: (Char -> Bool) -> StateT s m (ParserInput (StateT s m))
    satisfyCharInput = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    satisfyCharInput
       notSatisfyChar :: (Char -> Bool) -> StateT s m ()
    notSatisfyChar = m () -> StateT s m ()
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> StateT s m ())
    -> ((Char -> Bool) -> m ()) -> (Char -> Bool) -> StateT s m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m ()
    forall (m :: * -> *). InputCharParsing m => (Char -> Bool) -> m ()
    notSatisfyChar
       scanChars :: forall state.
    state
    -> (state -> Char -> Maybe state)
    -> StateT s m (ParserInput (StateT s m))
    scanChars state
    state state -> Char -> Maybe state
    f = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall state.
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputCharParsing m =>
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    scanChars state
    state state -> Char -> Maybe state
    f)
       takeCharsWhile :: (Char -> Bool) -> StateT s m (ParserInput (StateT s m))
    takeCharsWhile = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile
       takeCharsWhile1 :: (Char -> Bool) -> StateT s m (ParserInput (StateT s m))
    takeCharsWhile1 = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile1

    instance (MonadPlus m, ConsumedInputParsing m) => ConsumedInputParsing (Lazy.StateT s m) where
      match :: forall a. StateT s m a -> StateT s m (ParserInput (StateT s m), a)
    match = (m a -> m (ParserInput m, a))
    -> StateT s m a -> StateT s m (ParserInput m, a)
    forall (m :: * -> *) a b w.
    Applicative m =>
    (m a -> m b) -> StateT w m a -> StateT w m b
    mapLazyStateT m a -> m (ParserInput m, a)
    forall a. m a -> m (ParserInput m, a)
    forall (m :: * -> *) a.
    ConsumedInputParsing m =>
    m a -> m (ParserInput m, a)
    match

    instance (MonadPlus m, InputParsing m) => InputParsing (Strict.StateT s m) where
       type ParserInput (Strict.StateT s m) = ParserInput m
       type ParserPosition (Strict.StateT s m) = ParserPosition m
       getInput :: StateT s m (ParserInput (StateT s m))
    getInput = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
       getSourcePos :: StateT s m (ParserPosition (StateT s m))
    getSourcePos = m (ParserPosition m) -> StateT s m (ParserPosition m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserPosition m)
    forall (m :: * -> *). InputParsing m => m (ParserPosition m)
    getSourcePos
       anyToken :: StateT s m (ParserInput (StateT s m))
    anyToken = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    anyToken
       take :: Int -> StateT s m (ParserInput (StateT s m))
    take = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> (Int -> m (ParserInput m)) -> Int -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> m (ParserInput m)
    forall (m :: * -> *). InputParsing m => Int -> m (ParserInput m)
    take
       satisfy :: (ParserInput (StateT s m) -> Bool)
    -> StateT s m (ParserInput (StateT s m))
    satisfy = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    satisfy
       notSatisfy :: (ParserInput (StateT s m) -> Bool) -> StateT s m ()
    notSatisfy = m () -> StateT s m ()
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> StateT s m ())
    -> ((ParserInput m -> Bool) -> m ())
    -> (ParserInput m -> Bool)
    -> StateT s m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m ()
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m ()
    notSatisfy
       scan :: forall state.
    state
    -> (state -> ParserInput (StateT s m) -> Maybe state)
    -> StateT s m (ParserInput (StateT s m))
    scan state
    state state -> ParserInput (StateT s m) -> Maybe state
    f = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall state.
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputParsing m =>
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    scan state
    state state -> ParserInput m -> Maybe state
    state -> ParserInput (StateT s m) -> Maybe state
    f)
       string :: ParserInput (StateT s m) -> StateT s m (ParserInput (StateT s m))
    string = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> (ParserInput m -> m (ParserInput m))
    -> ParserInput m
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ParserInput m -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    ParserInput m -> m (ParserInput m)
    string
       takeWhile :: (ParserInput (StateT s m) -> Bool)
    -> StateT s m (ParserInput (StateT s m))
    takeWhile = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile
       takeWhile1 :: (ParserInput (StateT s m) -> Bool)
    -> StateT s m (ParserInput (StateT s m))
    takeWhile1 = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile1

    instance (MonadPlus m, InputCharParsing m) => InputCharParsing (Strict.StateT s m) where
       satisfyCharInput :: (Char -> Bool) -> StateT s m (ParserInput (StateT s m))
    satisfyCharInput = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    satisfyCharInput
       notSatisfyChar :: (Char -> Bool) -> StateT s m ()
    notSatisfyChar = m () -> StateT s m ()
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> StateT s m ())
    -> ((Char -> Bool) -> m ()) -> (Char -> Bool) -> StateT s m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m ()
    forall (m :: * -> *). InputCharParsing m => (Char -> Bool) -> m ()
    notSatisfyChar
       scanChars :: forall state.
    state
    -> (state -> Char -> Maybe state)
    -> StateT s m (ParserInput (StateT s m))
    scanChars state
    state state -> Char -> Maybe state
    f = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall state.
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputCharParsing m =>
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    scanChars state
    state state -> Char -> Maybe state
    f)
       takeCharsWhile :: (Char -> Bool) -> StateT s m (ParserInput (StateT s m))
    takeCharsWhile = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile
       takeCharsWhile1 :: (Char -> Bool) -> StateT s m (ParserInput (StateT s m))
    takeCharsWhile1 = m (ParserInput m) -> StateT s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> StateT s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> StateT s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> StateT s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile1

    instance (MonadPlus m, ConsumedInputParsing m) => ConsumedInputParsing (Strict.StateT s m) where
      match :: forall a. StateT s m a -> StateT s m (ParserInput (StateT s m), a)
    match = (m a -> m (ParserInput m, a))
    -> StateT s m a -> StateT s m (ParserInput m, a)
    forall (m :: * -> *) a b s.
    Applicative m =>
    (m a -> m b) -> StateT s m a -> StateT s m b
    mapStrictStateT m a -> m (ParserInput m, a)
    forall a. m a -> m (ParserInput m, a)
    forall (m :: * -> *) a.
    ConsumedInputParsing m =>
    m a -> m (ParserInput m, a)
    match

    instance (MonadPlus m, InputParsing m, Monoid w) => InputParsing (Lazy.RWST r w s m) where
       type ParserInput (Lazy.RWST r w s m) = ParserInput m
       type ParserPosition (Lazy.RWST r w s m) = ParserPosition m
       getInput :: RWST r w s m (ParserInput (RWST r w s m))
    getInput = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
       getSourcePos :: RWST r w s m (ParserPosition (RWST r w s m))
    getSourcePos = m (ParserPosition m) -> RWST r w s m (ParserPosition m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserPosition m)
    forall (m :: * -> *). InputParsing m => m (ParserPosition m)
    getSourcePos
       anyToken :: RWST r w s m (ParserInput (RWST r w s m))
    anyToken = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    anyToken
       take :: Int -> RWST r w s m (ParserInput (RWST r w s m))
    take = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> (Int -> m (ParserInput m))
    -> Int
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> m (ParserInput m)
    forall (m :: * -> *). InputParsing m => Int -> m (ParserInput m)
    take
       satisfy :: (ParserInput (RWST r w s m) -> Bool)
    -> RWST r w s m (ParserInput (RWST r w s m))
    satisfy = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    satisfy
       notSatisfy :: (ParserInput (RWST r w s m) -> Bool) -> RWST r w s m ()
    notSatisfy = m () -> RWST r w s m ()
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> RWST r w s m ())
    -> ((ParserInput m -> Bool) -> m ())
    -> (ParserInput m -> Bool)
    -> RWST r w s m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m ()
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m ()
    notSatisfy
       scan :: forall state.
    state
    -> (state -> ParserInput (RWST r w s m) -> Maybe state)
    -> RWST r w s m (ParserInput (RWST r w s m))
    scan state
    state state -> ParserInput (RWST r w s m) -> Maybe state
    f = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall state.
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputParsing m =>
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    scan state
    state state -> ParserInput m -> Maybe state
    state -> ParserInput (RWST r w s m) -> Maybe state
    f)
       string :: ParserInput (RWST r w s m)
    -> RWST r w s m (ParserInput (RWST r w s m))
    string = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> (ParserInput m -> m (ParserInput m))
    -> ParserInput m
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ParserInput m -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    ParserInput m -> m (ParserInput m)
    string
       takeWhile :: (ParserInput (RWST r w s m) -> Bool)
    -> RWST r w s m (ParserInput (RWST r w s m))
    takeWhile = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile
       takeWhile1 :: (ParserInput (RWST r w s m) -> Bool)
    -> RWST r w s m (ParserInput (RWST r w s m))
    takeWhile1 = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile1

    instance (MonadPlus m, InputCharParsing m, Monoid w) => InputCharParsing (Lazy.RWST r w s m) where
       satisfyCharInput :: (Char -> Bool) -> RWST r w s m (ParserInput (RWST r w s m))
    satisfyCharInput = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    satisfyCharInput
       notSatisfyChar :: (Char -> Bool) -> RWST r w s m ()
    notSatisfyChar = m () -> RWST r w s m ()
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> RWST r w s m ())
    -> ((Char -> Bool) -> m ()) -> (Char -> Bool) -> RWST r w s m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m ()
    forall (m :: * -> *). InputCharParsing m => (Char -> Bool) -> m ()
    notSatisfyChar
       scanChars :: forall state.
    state
    -> (state -> Char -> Maybe state)
    -> RWST r w s m (ParserInput (RWST r w s m))
    scanChars state
    state state -> Char -> Maybe state
    f = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall state.
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputCharParsing m =>
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    scanChars state
    state state -> Char -> Maybe state
    f)
       takeCharsWhile :: (Char -> Bool) -> RWST r w s m (ParserInput (RWST r w s m))
    takeCharsWhile = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile
       takeCharsWhile1 :: (Char -> Bool) -> RWST r w s m (ParserInput (RWST r w s m))
    takeCharsWhile1 = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile1

    instance (MonadPlus m, ConsumedInputParsing m, Monoid w) => ConsumedInputParsing (Lazy.RWST r w s m) where
      match :: forall a.
    RWST r w s m a -> RWST r w s m (ParserInput (RWST r w s m), a)
    match = (m a -> m (ParserInput m, a))
    -> RWST r w s m a -> RWST r w s m (ParserInput m, a)
    forall (m :: * -> *) a b r w s.
    Applicative m =>
    (m a -> m b) -> RWST r w s m a -> RWST r w s m b
    mapLazyRWST m a -> m (ParserInput m, a)
    forall a. m a -> m (ParserInput m, a)
    forall (m :: * -> *) a.
    ConsumedInputParsing m =>
    m a -> m (ParserInput m, a)
    match

    instance (MonadPlus m, InputParsing m, Monoid w) => InputParsing (Strict.RWST r w s m) where
       type ParserInput (Strict.RWST r w s m) = ParserInput m
       type ParserPosition (Strict.RWST r w s m) = ParserPosition m
       getInput :: RWST r w s m (ParserInput (RWST r w s m))
    getInput = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    getInput
       getSourcePos :: RWST r w s m (ParserPosition (RWST r w s m))
    getSourcePos = m (ParserPosition m) -> RWST r w s m (ParserPosition m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserPosition m)
    forall (m :: * -> *). InputParsing m => m (ParserPosition m)
    getSourcePos
       anyToken :: RWST r w s m (ParserInput (RWST r w s m))
    anyToken = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift m (ParserInput m)
    forall (m :: * -> *). InputParsing m => m (ParserInput m)
    anyToken
       take :: Int -> RWST r w s m (ParserInput (RWST r w s m))
    take = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> (Int -> m (ParserInput m))
    -> Int
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int -> m (ParserInput m)
    forall (m :: * -> *). InputParsing m => Int -> m (ParserInput m)
    take
       satisfy :: (ParserInput (RWST r w s m) -> Bool)
    -> RWST r w s m (ParserInput (RWST r w s m))
    satisfy = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    satisfy
       notSatisfy :: (ParserInput (RWST r w s m) -> Bool) -> RWST r w s m ()
    notSatisfy = m () -> RWST r w s m ()
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> RWST r w s m ())
    -> ((ParserInput m -> Bool) -> m ())
    -> (ParserInput m -> Bool)
    -> RWST r w s m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m ()
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m ()
    notSatisfy
       scan :: forall state.
    state
    -> (state -> ParserInput (RWST r w s m) -> Maybe state)
    -> RWST r w s m (ParserInput (RWST r w s m))
    scan state
    state state -> ParserInput (RWST r w s m) -> Maybe state
    f = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall state.
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputParsing m =>
    state
    -> (state -> ParserInput m -> Maybe state) -> m (ParserInput m)
    scan state
    state state -> ParserInput m -> Maybe state
    state -> ParserInput (RWST r w s m) -> Maybe state
    f)
       string :: ParserInput (RWST r w s m)
    -> RWST r w s m (ParserInput (RWST r w s m))
    string = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> (ParserInput m -> m (ParserInput m))
    -> ParserInput m
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . ParserInput m -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    ParserInput m -> m (ParserInput m)
    string
       takeWhile :: (ParserInput (RWST r w s m) -> Bool)
    -> RWST r w s m (ParserInput (RWST r w s m))
    takeWhile = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile
       takeWhile1 :: (ParserInput (RWST r w s m) -> Bool)
    -> RWST r w s m (ParserInput (RWST r w s m))
    takeWhile1 = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((ParserInput m -> Bool) -> m (ParserInput m))
    -> (ParserInput m -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (ParserInput m -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputParsing m =>
    (ParserInput m -> Bool) -> m (ParserInput m)
    takeWhile1

    instance (MonadPlus m, InputCharParsing m, Monoid w) => InputCharParsing (Strict.RWST r w s m) where
       satisfyCharInput :: (Char -> Bool) -> RWST r w s m (ParserInput (RWST r w s m))
    satisfyCharInput = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    satisfyCharInput
       notSatisfyChar :: (Char -> Bool) -> RWST r w s m ()
    notSatisfyChar = m () -> RWST r w s m ()
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m () -> RWST r w s m ())
    -> ((Char -> Bool) -> m ()) -> (Char -> Bool) -> RWST r w s m ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m ()
    forall (m :: * -> *). InputCharParsing m => (Char -> Bool) -> m ()
    notSatisfyChar
       scanChars :: forall state.
    state
    -> (state -> Char -> Maybe state)
    -> RWST r w s m (ParserInput (RWST r w s m))
    scanChars state
    state state -> Char -> Maybe state
    f = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall state.
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    forall (m :: * -> *) state.
    InputCharParsing m =>
    state -> (state -> Char -> Maybe state) -> m (ParserInput m)
    scanChars state
    state state -> Char -> Maybe state
    f)
       takeCharsWhile :: (Char -> Bool) -> RWST r w s m (ParserInput (RWST r w s m))
    takeCharsWhile = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile
       takeCharsWhile1 :: (Char -> Bool) -> RWST r w s m (ParserInput (RWST r w s m))
    takeCharsWhile1 = m (ParserInput m) -> RWST r w s m (ParserInput m)
    forall (m :: * -> *) a. Monad m => m a -> RWST r w s m a
    forall (t :: (* -> *) -> * -> *) (m :: * -> *) a.
    (MonadTrans t, Monad m) =>
    m a -> t m a
    lift (m (ParserInput m) -> RWST r w s m (ParserInput m))
    -> ((Char -> Bool) -> m (ParserInput m))
    -> (Char -> Bool)
    -> RWST r w s m (ParserInput m)
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> m (ParserInput m)
    forall (m :: * -> *).
    InputCharParsing m =>
    (Char -> Bool) -> m (ParserInput m)
    takeCharsWhile1

    instance (MonadPlus m, ConsumedInputParsing m, Monoid w) => ConsumedInputParsing (Strict.RWST r w s m) where
      match :: forall a.
    RWST r w s m a -> RWST r w s m (ParserInput (RWST r w s m), a)
    match = (m a -> m (ParserInput m, a))
    -> RWST r w s m a -> RWST r w s m (ParserInput m, a)
    forall (m :: * -> *) a b r w s.
    Applicative m =>
    (m a -> m b) -> RWST r w s m a -> RWST r w s m b
    mapStrictRWST m a -> m (ParserInput m, a)
    forall a. m a -> m (ParserInput m, a)
    forall (m :: * -> *) a.
    ConsumedInputParsing m =>
    m a -> m (ParserInput m, a)
    match

    #ifdef MIN_VERSION_attoparsec
    instance InputParsing Attoparsec.Parser where
       type ParserInput Attoparsec.Parser = ByteString
       getInput :: Parser (ParserInput Parser)
    getInput = Parser ByteString ByteString -> Parser ByteString ByteString
    forall a. Parser ByteString a -> Parser ByteString a
    forall (m :: * -> *) a. LookAheadParsing m => m a -> m a
    lookAhead Parser ByteString ByteString
    Attoparsec.takeByteString
       anyToken :: Parser (ParserInput Parser)
    anyToken = Int -> Parser ByteString ByteString
    Attoparsec.take Int
    1
       take :: Int -> Parser (ParserInput Parser)
    take = Int -> Parser ByteString ByteString
    Int -> Parser (ParserInput Parser)
    Attoparsec.take
       satisfy :: (ParserInput Parser -> Bool) -> Parser (ParserInput Parser)
    satisfy ParserInput Parser -> Bool
    predicate = (Word8 -> ByteString)
    -> (ByteString -> Bool) -> Parser ByteString ByteString
    forall a. (Word8 -> a) -> (a -> Bool) -> Parser a
    Attoparsec.satisfyWith Word8 -> ByteString
    ByteString.singleton ByteString -> Bool
    ParserInput Parser -> Bool
    predicate
       string :: ParserInput Parser -> Parser (ParserInput Parser)
    string = ByteString -> Parser ByteString ByteString
    ParserInput Parser -> Parser (ParserInput Parser)
    Attoparsec.string
       takeWhile :: (ParserInput Parser -> Bool) -> Parser (ParserInput Parser)
    takeWhile ParserInput Parser -> Bool
    predicate = (Word8 -> Bool) -> Parser ByteString ByteString
    Attoparsec.takeWhile (ByteString -> Bool
    ParserInput Parser -> Bool
    predicate (ByteString -> Bool) -> (Word8 -> ByteString) -> Word8 -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Word8 -> ByteString
    ByteString.singleton)
       takeWhile1 :: (ParserInput Parser -> Bool) -> Parser (ParserInput Parser)
    takeWhile1 ParserInput Parser -> Bool
    predicate = (Word8 -> Bool) -> Parser ByteString ByteString
    Attoparsec.takeWhile1 (ByteString -> Bool
    ParserInput Parser -> Bool
    predicate (ByteString -> Bool) -> (Word8 -> ByteString) -> Word8 -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Word8 -> ByteString
    ByteString.singleton)
       scan :: forall state.
    state
    -> (state -> ParserInput Parser -> Maybe state)
    -> Parser (ParserInput Parser)
    scan state
    state state -> ParserInput Parser -> Maybe state
    f = state
    -> (state -> Word8 -> Maybe state) -> Parser ByteString ByteString
    forall s.
    s -> (s -> Word8 -> Maybe s) -> Parser ByteString ByteString
    Attoparsec.scan state
    state state -> Word8 -> Maybe state
    f'
          where f' :: state -> Word8 -> Maybe state
    f' state
    s Word8
    byte = state -> ParserInput Parser -> Maybe state
    f state
    s (Word8 -> ByteString
    ByteString.singleton Word8
    byte)

    instance InputCharParsing Attoparsec.Parser where
       satisfyCharInput :: (Char -> Bool) -> Parser (ParserInput Parser)
    satisfyCharInput Char -> Bool
    predicate = Char -> ByteString
    ByteString.Char8.singleton (Char -> ByteString)
    -> Parser ByteString Char -> Parser ByteString ByteString
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Char -> Bool) -> Parser ByteString Char
    Attoparsec.Char8.satisfy Char -> Bool
    predicate
       scanChars :: forall state.
    state
    -> (state -> Char -> Maybe state) -> Parser (ParserInput Parser)
    scanChars = state
    -> (state -> Char -> Maybe state) -> Parser ByteString ByteString
    state
    -> (state -> Char -> Maybe state) -> Parser (ParserInput Parser)
    forall s.
    s -> (s -> Char -> Maybe s) -> Parser ByteString ByteString
    Attoparsec.Char8.scan
       takeCharsWhile :: (Char -> Bool) -> Parser (ParserInput Parser)
    takeCharsWhile = (Char -> Bool) -> Parser ByteString ByteString
    (Char -> Bool) -> Parser (ParserInput Parser)
    Attoparsec.Char8.takeWhile
       takeCharsWhile1 :: (Char -> Bool) -> Parser (ParserInput Parser)
    takeCharsWhile1 = (Char -> Bool) -> Parser ByteString ByteString
    (Char -> Bool) -> Parser (ParserInput Parser)
    Attoparsec.Char8.takeWhile1

    instance ConsumedInputParsing Attoparsec.Parser where
       match :: forall a. Parser a -> Parser (ParserInput Parser, a)
    match = Parser a -> Parser (ByteString, a)
    Parser a -> Parser ByteString (ParserInput Parser, a)
    forall a. Parser a -> Parser (ByteString, a)
    Attoparsec.match

    instance InputParsing Attoparsec.Text.Parser where
       type ParserInput Attoparsec.Text.Parser = Text
       getInput :: Parser (ParserInput Parser)
    getInput = Parser Text Text -> Parser Text Text
    forall a. Parser Text a -> Parser Text a
    forall (m :: * -> *) a. LookAheadParsing m => m a -> m a
    lookAhead Parser Text Text
    Attoparsec.Text.takeText
       anyToken :: Parser (ParserInput Parser)
    anyToken = Int -> Parser Text Text
    Attoparsec.Text.take Int
    1
       take :: Int -> Parser (ParserInput Parser)
    take = Int -> Parser Text Text
    Int -> Parser (ParserInput Parser)
    Attoparsec.Text.take
       satisfy :: (ParserInput Parser -> Bool) -> Parser (ParserInput Parser)
    satisfy ParserInput Parser -> Bool
    predicate = (Char -> Text) -> (Text -> Bool) -> Parser Text Text
    forall a. (Char -> a) -> (a -> Bool) -> Parser a
    Attoparsec.Text.satisfyWith Char -> Text
    Text.singleton Text -> Bool
    ParserInput Parser -> Bool
    predicate
       string :: ParserInput Parser -> Parser (ParserInput Parser)
    string = Text -> Parser Text Text
    ParserInput Parser -> Parser (ParserInput Parser)
    Attoparsec.Text.string
       takeWhile :: (ParserInput Parser -> Bool) -> Parser (ParserInput Parser)
    takeWhile ParserInput Parser -> Bool
    predicate = (Char -> Bool) -> Parser Text Text
    Attoparsec.Text.takeWhile (Text -> Bool
    ParserInput Parser -> Bool
    predicate (Text -> Bool) -> (Char -> Text) -> Char -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Char -> Text
    Text.singleton)
       takeWhile1 :: (ParserInput Parser -> Bool) -> Parser (ParserInput Parser)
    takeWhile1 ParserInput Parser -> Bool
    predicate = (Char -> Bool) -> Parser Text Text
    Attoparsec.Text.takeWhile1 (Text -> Bool
    ParserInput Parser -> Bool
    predicate (Text -> Bool) -> (Char -> Text) -> Char -> Bool
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Char -> Text
    Text.singleton)
       scan :: forall state.
    state
    -> (state -> ParserInput Parser -> Maybe state)
    -> Parser (ParserInput Parser)
    scan state
    state state -> ParserInput Parser -> Maybe state
    f = state -> (state -> Char -> Maybe state) -> Parser Text Text
    forall s. s -> (s -> Char -> Maybe s) -> Parser Text Text
    Attoparsec.Text.scan state
    state state -> Char -> Maybe state
    f'
          where f' :: state -> Char -> Maybe state
    f' state
    s Char
    c = state -> ParserInput Parser -> Maybe state
    f state
    s (Char -> Text
    Text.singleton Char
    c)

    instance InputCharParsing Attoparsec.Text.Parser where
       satisfyCharInput :: (Char -> Bool) -> Parser (ParserInput Parser)
    satisfyCharInput Char -> Bool
    predicate = Char -> Text
    Text.singleton (Char -> Text) -> Parser Text Char -> Parser Text Text
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (Char -> Bool) -> Parser Text Char
    Attoparsec.Text.satisfy Char -> Bool
    predicate
       scanChars :: forall state.
    state
    -> (state -> Char -> Maybe state) -> Parser (ParserInput Parser)
    scanChars = state -> (state -> Char -> Maybe state) -> Parser Text Text
    state
    -> (state -> Char -> Maybe state) -> Parser (ParserInput Parser)
    forall s. s -> (s -> Char -> Maybe s) -> Parser Text Text
    Attoparsec.Text.scan
       takeCharsWhile :: (Char -> Bool) -> Parser (ParserInput Parser)
    takeCharsWhile = (Char -> Bool) -> Parser Text Text
    (Char -> Bool) -> Parser (ParserInput Parser)
    Attoparsec.Text.takeWhile
       takeCharsWhile1 :: (Char -> Bool) -> Parser (ParserInput Parser)
    takeCharsWhile1 = (Char -> Bool) -> Parser Text Text
    (Char -> Bool) -> Parser (ParserInput Parser)
    Attoparsec.Text.takeWhile1

    instance ConsumedInputParsing Attoparsec.Text.Parser where
       match :: forall a. Parser a -> Parser (ParserInput Parser, a)
    match = Parser a -> Parser (Text, a)
    Parser a -> Parser Text (ParserInput Parser, a)
    forall a. Parser a -> Parser (Text, a)
    Attoparsec.Text.match
    #endif

    #ifdef MIN_VERSION_parsec
    instance (FactorialMonoid s, LeftReductive s, Show s, Parsec.Stream s m t, Show t) => InputParsing (ParsecT s u m) where
       type ParserInput (ParsecT s u m) = s
       getInput :: ParsecT s u m (ParserInput (ParsecT s u m))
    getInput = ParsecT s u m s
    ParsecT s u m (ParserInput (ParsecT s u m))
    forall (m :: * -> *) s u. Monad m => ParsecT s u m s
    Parsec.getInput
       anyToken :: ParsecT s u m (ParserInput (ParsecT s u m))
    anyToken = do rest <- ParsecT s u m s
    forall (m :: * -> *) s u. Monad m => ParsecT s u m s
    Parsec.getInput
                     case Factorial.splitPrimePrefix rest
                       of Just (s
    x, s
    rest') -> s
    x s -> ParsecT s u m () -> ParsecT s u m s
    forall a b. a -> ParsecT s u m b -> ParsecT s u m a
    forall (f :: * -> *) a b. Functor f => a -> f b -> f a
    <$ s -> ParsecT s u m ()
    forall (m :: * -> *) s u. Monad m => s -> ParsecT s u m ()
    Parsec.setInput s
    rest'
                          Maybe (s, s)
    Nothing -> String -> ParsecT s u m s
    forall s u (m :: * -> *) a. String -> ParsecT s u m a
    Parsec.parserFail String
    "anyToken"
       take :: Int -> ParsecT s u m (ParserInput (ParsecT s u m))
    take Int
    n = do rest <- ParsecT s u m s
    forall (m :: * -> *) s u. Monad m => ParsecT s u m s
    Parsec.getInput
                   case Factorial.splitAt n rest
                     of (s
    prefix, s
    suffix) | s -> Int
    forall m. Factorial m => m -> Int
    Factorial.length s
    prefix Int -> Int -> Bool
    forall a. Eq a => a -> a -> Bool
    == Int
    n -> s
    prefix s -> ParsecT s u m () -> ParsecT s u m s
    forall a b. a -> ParsecT s u m b -> ParsecT s u m a
    forall (f :: * -> *) a b. Functor f => a -> f b -> f a
    <$ s -> ParsecT s u m ()
    forall (m :: * -> *) s u. Monad m => s -> ParsecT s u m ()
    Parsec.setInput s
    suffix
                        (s, s)
    _ -> String -> ParsecT s u m s
    forall s u (m :: * -> *) a. String -> ParsecT s u m a
    Parsec.parserFail (String
    "take " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ Int -> String
    forall a. Show a => a -> String
    show Int
    n)

    instance (TextualMonoid s, Show s, Parsec.Stream s m Char) => InputCharParsing (ParsecT s u m) where
       satisfyCharInput :: (Char -> Bool) -> ParsecT s u m (ParserInput (ParsecT s u m))
    satisfyCharInput = (Char -> s) -> ParsecT s u m Char -> ParsecT s u m s
    forall a b. (a -> b) -> ParsecT s u m a -> ParsecT s u m b
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    fmap Char -> s
    forall t. TextualMonoid t => Char -> t
    Textual.singleton (ParsecT s u m Char -> ParsecT s u m s)
    -> ((Char -> Bool) -> ParsecT s u m Char)
    -> (Char -> Bool)
    -> ParsecT s u m s
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . (Char -> Bool) -> ParsecT s u m Char
    forall s (m :: * -> *) u.
    Stream s m Char =>
    (Char -> Bool) -> ParsecT s u m Char
    Parsec.satisfy
    #endif

    #ifdef MIN_VERSION_binary
    instance InputParsing (Lazy Binary.Get) where
       type ParserInput (Lazy Binary.Get) = Lazy.ByteString
       type ParserPosition (Lazy Binary.Get) = Int
       getInput :: Lazy Get (ParserInput (Lazy Get))
    getInput = Get ByteString -> Lazy Get ByteString
    forall (f :: * -> *) a. f a -> Lazy f a
    Lazy (Get ByteString -> Get ByteString
    forall a. Get a -> Get a
    Binary.lookAhead Get ByteString
    Binary.getRemainingLazyByteString)
       getSourcePos :: Lazy Get (ParserPosition (Lazy Get))
    getSourcePos = Get Int -> Lazy Get Int
    forall (f :: * -> *) a. f a -> Lazy f a
    Lazy (Int -> Int
    fromStart (Int -> Int) -> (Int64 -> Int) -> Int64 -> Int
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int64 -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int64 -> Int) -> Get Int64 -> Get Int
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Get Int64
    Binary.bytesRead)
       anyToken :: Lazy Get (ParserInput (Lazy Get))
    anyToken = Get ByteString -> Lazy Get ByteString
    forall (f :: * -> *) a. f a -> Lazy f a
    Lazy (Int64 -> Get ByteString
    Binary.getLazyByteString Int64
    1)
       take :: Int -> Lazy Get (ParserInput (Lazy Get))
    take Int
    n = Get ByteString -> Lazy Get ByteString
    forall (f :: * -> *) a. f a -> Lazy f a
    Lazy (Int64 -> Get ByteString
    Binary.getLazyByteString (Int64 -> Get ByteString) -> Int64 -> Get ByteString
    forall a b. (a -> b) -> a -> b
    $ Int -> Int64
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    n)

    instance InputParsing (Strict Binary.Get) where
       type ParserInput (Strict Binary.Get) = ByteString
       type ParserPosition (Strict Binary.Get) = Int
       getInput :: Strict Get (ParserInput (Strict Get))
    getInput = Get ByteString -> Strict Get ByteString
    forall (f :: * -> *) a. f a -> Strict f a
    Strict (ByteString -> ByteString
    Lazy.toStrict (ByteString -> ByteString) -> Get ByteString -> Get ByteString
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Get ByteString -> Get ByteString
    forall a. Get a -> Get a
    Binary.lookAhead Get ByteString
    Binary.getRemainingLazyByteString)
       getSourcePos :: Strict Get (ParserPosition (Strict Get))
    getSourcePos = Get Int -> Strict Get Int
    forall (f :: * -> *) a. f a -> Strict f a
    Strict (Int -> Int
    fromStart (Int -> Int) -> (Int64 -> Int) -> Int64 -> Int
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . Int64 -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int64 -> Int) -> Get Int64 -> Get Int
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> Get Int64
    Binary.bytesRead)
       anyToken :: Strict Get (ParserInput (Strict Get))
    anyToken = Get ByteString -> Strict Get ByteString
    forall (f :: * -> *) a. f a -> Strict f a
    Strict (Int -> Get ByteString
    Binary.getByteString Int
    1)
       take :: Int -> Strict Get (ParserInput (Strict Get))
    take Int
    n = Get ByteString -> Strict Get ByteString
    forall (f :: * -> *) a. f a -> Strict f a
    Strict (Int -> Get ByteString
    Binary.getByteString Int
    n)

    instance ConsumedInputParsing (Lazy Binary.Get) where
      match :: forall a. Lazy Get a -> Lazy Get (ParserInput (Lazy Get), a)
    match (Lazy Get a
    p) = Get (ParserInput (Lazy Get), a)
    -> Lazy Get (ParserInput (Lazy Get), a)
    forall (f :: * -> *) a. f a -> Lazy f a
    Lazy (Get (ParserInput (Lazy Get), a)
     -> Lazy Get (ParserInput (Lazy Get), a))
    -> Get (ParserInput (Lazy Get), a)
    -> Lazy Get (ParserInput (Lazy Get), a)
    forall a b. (a -> b) -> a -> b
    $ do input <- Get ByteString -> Get ByteString
    forall a. Get a -> Get a
    Binary.lookAhead Get ByteString
    Binary.getRemainingLazyByteString
                                 pos <- Binary.bytesRead
                                 result <- p
                                 pos' <- Binary.bytesRead
                                 pure (Lazy.take (pos' - pos) input, result)

    instance ConsumedInputParsing (Strict Binary.Get) where
      match :: forall a. Strict Get a -> Strict Get (ParserInput (Strict Get), a)
    match (Strict Get a
    p) = Get (ParserInput (Strict Get), a)
    -> Strict Get (ParserInput (Strict Get), a)
    forall (f :: * -> *) a. f a -> Strict f a
    Strict (Get (ParserInput (Strict Get), a)
     -> Strict Get (ParserInput (Strict Get), a))
    -> Get (ParserInput (Strict Get), a)
    -> Strict Get (ParserInput (Strict Get), a)
    forall a b. (a -> b) -> a -> b
    $ do input <- Get ByteString -> Get ByteString
    forall a. Get a -> Get a
    Binary.lookAhead Get ByteString
    Binary.getRemainingLazyByteString
                                     pos <- Binary.bytesRead
                                     result <- p
                                     pos' <- Binary.bytesRead
                                     pure (Lazy.toStrict (Lazy.take (pos' - pos) input), result)
    #endif