input-parsers-0.3.0.2: Extension of the parsers library with more capability and efficiency

Safe Haskell | None
Language | Haskell2010

Text.Parser.Wrapper

Description

Newtype wrappers for parsers

Synopsis

- newtype Lazy (f :: Type -> Type) a = Lazy {
  - getLazy :: f a
  }
- newtype Strict (f :: Type -> Type) a = Strict {
  - getStrict :: f a
  }

# Documentation

newtype Lazy (f :: Type -> Type) a Source #

Wrapper that signifies lazy `ByteString` inputs

Constructors

Lazy |

Fields

- getLazy :: f a

#### Instances

Instances details

Alternative f => Alternative (Lazy f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods empty :: Lazy f a Source # (<|>) :: Lazy f a -> Lazy f a -> Lazy f a Source # some :: Lazy f a -> Lazy f [a] Source # many :: Lazy f a -> Lazy f [a] Source #
Applicative f => Applicative (Lazy f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods pure :: a -> Lazy f a Source # (<*>) :: Lazy f (a -> b) -> Lazy f a -> Lazy f b Source # liftA2 :: (a -> b -> c) -> Lazy f a -> Lazy f b -> Lazy f c Source # (*>) :: Lazy f a -> Lazy f b -> Lazy f b Source # (<*) :: Lazy f a -> Lazy f b -> Lazy f a Source #
Functor f => Functor (Lazy f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods fmap :: (a -> b) -> Lazy f a -> Lazy f b Source # (<$) :: a -> Lazy f b -> Lazy f a Source #
Monad f => Monad (Lazy f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods (>>=) :: Lazy f a -> (a -> Lazy f b) -> Lazy f b Source # (>>) :: Lazy f a -> Lazy f b -> Lazy f b Source # return :: a -> Lazy f a Source #
MonadPlus f => MonadPlus (Lazy f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods mzero :: Lazy f a Source # mplus :: Lazy f a -> Lazy f a -> Lazy f a Source #
DeterministicParsing (Lazy Get) Source # |
Instance details Defined in Text.Parser.Deterministic Methods (<<|>) :: Lazy Get a -> Lazy Get a -> Lazy Get a Source # takeOptional :: Lazy Get a -> Lazy Get (Maybe a) Source # takeMany :: Lazy Get a -> Lazy Get [a] Source # takeSome :: Lazy Get a -> Lazy Get [a] Source # concatAll :: Monoid a => Lazy Get a -> Lazy Get a Source # skipAll :: Lazy Get a -> Lazy Get () Source #
ConsumedInputParsing (Lazy Get) Source # |
Instance details Defined in Text.Parser.Input Methods match :: Lazy Get a -> Lazy Get (ParserInput (Lazy Get), a) Source #
InputParsing (Lazy Get) Source # |

Instance details

Defined in Text.Parser.Input

Associated Types

type ParserInput (Lazy Get) |
Instance details Defined in Text.Parser.Input type ParserInput (Lazy Get) = ByteString
type ParserPosition (Lazy Get) |
Instance details Defined in Text.Parser.Input type ParserPosition (Lazy Get) = Int

Methods

getInput :: Lazy Get (ParserInput (Lazy Get)) Source #

getSourcePos :: Lazy Get (ParserPosition (Lazy Get)) Source #

anyToken :: Lazy Get (ParserInput (Lazy Get)) Source #

take :: Int -> Lazy Get (ParserInput (Lazy Get)) Source #

satisfy :: (ParserInput (Lazy Get) -> Bool) -> Lazy Get (ParserInput (Lazy Get)) Source #

notSatisfy :: (ParserInput (Lazy Get) -> Bool) -> Lazy Get () Source #

scan :: state -> (state -> ParserInput (Lazy Get) -> Maybe state) -> Lazy Get (ParserInput (Lazy Get)) Source #

string :: ParserInput (Lazy Get) -> Lazy Get (ParserInput (Lazy Get)) Source #

takeWhile :: (ParserInput (Lazy Get) -> Bool) -> Lazy Get (ParserInput (Lazy Get)) Source #

takeWhile1 :: (ParserInput (Lazy Get) -> Bool) -> Lazy Get (ParserInput (Lazy Get)) Source #

CharParsing f => CharParsing (Lazy f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods satisfy :: (Char -> Bool) -> Lazy f Char Source # char :: Char -> Lazy f Char Source # notChar :: Char -> Lazy f Char Source # anyChar :: Lazy f Char Source # string :: String -> Lazy f String Source # text :: Text -> Lazy f Text Source #
Parsing f => Parsing (Lazy f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods try :: Lazy f a -> Lazy f a Source # (<?>) :: Lazy f a -> String -> Lazy f a Source # skipMany :: Lazy f a -> Lazy f () Source # skipSome :: Lazy f a -> Lazy f () Source # unexpected :: String -> Lazy f a Source # eof :: Lazy f () Source # notFollowedBy :: Show a => Lazy f a -> Lazy f () Source #
LookAheadParsing f => LookAheadParsing (Lazy f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods lookAhead :: Lazy f a -> Lazy f a Source #
TokenParsing f => TokenParsing (Lazy f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods someSpace :: Lazy f () Source # nesting :: Lazy f a -> Lazy f a Source # semi :: Lazy f Char Source # highlight :: Highlight -> Lazy f a -> Lazy f a Source # token :: Lazy f a -> Lazy f a Source #
Read (f a) => Read (Lazy f a) Source # |
Instance details Defined in Text.Parser.Wrapper Methods readsPrec :: Int -> ReadS (Lazy f a) Source # readList :: ReadS [Lazy f a] Source # readPrec :: ReadPrec (Lazy f a) Source # readListPrec :: ReadPrec [Lazy f a] Source #
Show (f a) => Show (Lazy f a) Source # |
Instance details Defined in Text.Parser.Wrapper Methods showsPrec :: Int -> Lazy f a -> ShowS Source # show :: Lazy f a -> String Source # showList :: [Lazy f a] -> ShowS Source #
Eq (f a) => Eq (Lazy f a) Source # |
Instance details Defined in Text.Parser.Wrapper Methods (==) :: Lazy f a -> Lazy f a -> Bool Source # (/=) :: Lazy f a -> Lazy f a -> Bool Source #
Ord (f a) => Ord (Lazy f a) Source # |
Instance details Defined in Text.Parser.Wrapper Methods compare :: Lazy f a -> Lazy f a -> Ordering Source # (<) :: Lazy f a -> Lazy f a -> Bool Source # (<=) :: Lazy f a -> Lazy f a -> Bool Source # (>) :: Lazy f a -> Lazy f a -> Bool Source # (>=) :: Lazy f a -> Lazy f a -> Bool Source # max :: Lazy f a -> Lazy f a -> Lazy f a Source # min :: Lazy f a -> Lazy f a -> Lazy f a Source #
type ParserInput (Lazy Get) Source # |
Instance details Defined in Text.Parser.Input type ParserInput (Lazy Get) = ByteString
type ParserPosition (Lazy Get) Source # |
Instance details Defined in Text.Parser.Input type ParserPosition (Lazy Get) = Int

newtype Strict (f :: Type -> Type) a Source #

Wrapper that signifies strict `ByteString` inputs

Constructors

Strict |

Fields

- getStrict :: f a

#### Instances

Instances details

Alternative f => Alternative (Strict f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods empty :: Strict f a Source # (<|>) :: Strict f a -> Strict f a -> Strict f a Source # some :: Strict f a -> Strict f [a] Source # many :: Strict f a -> Strict f [a] Source #
Applicative f => Applicative (Strict f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods pure :: a -> Strict f a Source # (<*>) :: Strict f (a -> b) -> Strict f a -> Strict f b Source # liftA2 :: (a -> b -> c) -> Strict f a -> Strict f b -> Strict f c Source # (*>) :: Strict f a -> Strict f b -> Strict f b Source # (<*) :: Strict f a -> Strict f b -> Strict f a Source #
Functor f => Functor (Strict f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods fmap :: (a -> b) -> Strict f a -> Strict f b Source # (<$) :: a -> Strict f b -> Strict f a Source #
Monad f => Monad (Strict f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods (>>=) :: Strict f a -> (a -> Strict f b) -> Strict f b Source # (>>) :: Strict f a -> Strict f b -> Strict f b Source # return :: a -> Strict f a Source #
MonadPlus f => MonadPlus (Strict f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods mzero :: Strict f a Source # mplus :: Strict f a -> Strict f a -> Strict f a Source #
DeterministicParsing (Strict Get) Source # |

Instance details

Defined in Text.Parser.Deterministic

Methods

(<<|>) :: Strict Get a -> Strict Get a -> Strict Get a Source #

takeOptional :: Strict Get a -> Strict Get (Maybe a) Source #

takeMany :: Strict Get a -> Strict Get [a] Source #

takeSome :: Strict Get a -> Strict Get [a] Source #

concatAll :: Monoid a => Strict Get a -> Strict Get a Source #

skipAll :: Strict Get a -> Strict Get () Source #

ConsumedInputParsing (Strict Get) Source # |
Instance details Defined in Text.Parser.Input Methods match :: Strict Get a -> Strict Get (ParserInput (Strict Get), a) Source #
InputParsing (Strict Get) Source # |

Instance details

Defined in Text.Parser.Input

Associated Types

type ParserInput (Strict Get) |
Instance details Defined in Text.Parser.Input type ParserInput (Strict Get) = ByteString
type ParserPosition (Strict Get) |
Instance details Defined in Text.Parser.Input type ParserPosition (Strict Get) = Int

Methods

getInput :: Strict Get (ParserInput (Strict Get)) Source #

getSourcePos :: Strict Get (ParserPosition (Strict Get)) Source #

anyToken :: Strict Get (ParserInput (Strict Get)) Source #

take :: Int -> Strict Get (ParserInput (Strict Get)) Source #

satisfy :: (ParserInput (Strict Get) -> Bool) -> Strict Get (ParserInput (Strict Get)) Source #

notSatisfy :: (ParserInput (Strict Get) -> Bool) -> Strict Get () Source #

scan :: state -> (state -> ParserInput (Strict Get) -> Maybe state) -> Strict Get (ParserInput (Strict Get)) Source #

string :: ParserInput (Strict Get) -> Strict Get (ParserInput (Strict Get)) Source #

takeWhile :: (ParserInput (Strict Get) -> Bool) -> Strict Get (ParserInput (Strict Get)) Source #

takeWhile1 :: (ParserInput (Strict Get) -> Bool) -> Strict Get (ParserInput (Strict Get)) Source #

CharParsing f => CharParsing (Strict f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods satisfy :: (Char -> Bool) -> Strict f Char Source # char :: Char -> Strict f Char Source # notChar :: Char -> Strict f Char Source # anyChar :: Strict f Char Source # string :: String -> Strict f String Source # text :: Text -> Strict f Text Source #
Parsing f => Parsing (Strict f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods try :: Strict f a -> Strict f a Source # (<?>) :: Strict f a -> String -> Strict f a Source # skipMany :: Strict f a -> Strict f () Source # skipSome :: Strict f a -> Strict f () Source # unexpected :: String -> Strict f a Source # eof :: Strict f () Source # notFollowedBy :: Show a => Strict f a -> Strict f () Source #
LookAheadParsing f => LookAheadParsing (Strict f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods lookAhead :: Strict f a -> Strict f a Source #
TokenParsing f => TokenParsing (Strict f) Source # |
Instance details Defined in Text.Parser.Wrapper Methods someSpace :: Strict f () Source # nesting :: Strict f a -> Strict f a Source # semi :: Strict f Char Source # highlight :: Highlight -> Strict f a -> Strict f a Source # token :: Strict f a -> Strict f a Source #
Read (f a) => Read (Strict f a) Source # |
Instance details Defined in Text.Parser.Wrapper Methods readsPrec :: Int -> ReadS (Strict f a) Source # readList :: ReadS [Strict f a] Source # readPrec :: ReadPrec (Strict f a) Source # readListPrec :: ReadPrec [Strict f a] Source #
Show (f a) => Show (Strict f a) Source # |
Instance details Defined in Text.Parser.Wrapper Methods showsPrec :: Int -> Strict f a -> ShowS Source # show :: Strict f a -> String Source # showList :: [Strict f a] -> ShowS Source #
Eq (f a) => Eq (Strict f a) Source # |
Instance details Defined in Text.Parser.Wrapper Methods (==) :: Strict f a -> Strict f a -> Bool Source # (/=) :: Strict f a -> Strict f a -> Bool Source #
Ord (f a) => Ord (Strict f a) Source # |

Instance details

Defined in Text.Parser.Wrapper

Methods

compare :: Strict f a -> Strict f a -> Ordering Source #

(<) :: Strict f a -> Strict f a -> Bool Source #

(<=) :: Strict f a -> Strict f a -> Bool Source #

(>) :: Strict f a -> Strict f a -> Bool Source #

(>=) :: Strict f a -> Strict f a -> Bool Source #

max :: Strict f a -> Strict f a -> Strict f a Source #

min :: Strict f a -> Strict f a -> Strict f a Source #

type ParserInput (Strict Get) Source # |
Instance details Defined in Text.Parser.Input type ParserInput (Strict Get) = ByteString
type ParserPosition (Strict Get) Source # |
Instance details Defined in Text.Parser.Input type ParserPosition (Strict Get) = Int