Safe Haskell | None |
---|---|
Language | Haskell2010 |
- module Text.Parsec.Combinator
- module Text.Parsec.Prim
- module Text.Parsec.Pos
- type Parser source result = source -> Either SomethingBad result
- data ParseError :: *
- type SomethingBad = [(SourcePos, String)]
- type Tokens t = [(SourcePos, t)]
- runTokenParser :: Stream a Identity t => ParsecT a () Identity b -> Parser a b
- mkError :: ParseError -> Either SomethingBad b
- sourceToken :: (Show t, Stream (Tokens t) m (SourcePos, t)) => (t -> Maybe a) -> ParsecT [(SourcePos, t)] u m a
- manyBetween :: (Monad m, Stream s m t) => ParsecT s u m open -> ParsecT s u m close -> ParsecT s u m p -> ParsecT s u m [p]
- (>+>) :: Parser a b -> Parser b c -> Parser a c
- (<+<) :: Parser b c -> Parser a b -> Parser a c
- sya :: (Ord p, Eq o) => (a -> Maybe o) -> (o -> Bool) -> (o -> p) -> [a] -> [a]
- ignoreUnderscores :: String -> String
- tryRead :: Monad m => ReadS a -> String -> m a
- tryReads :: (Monad m, Read a) => String -> m a
- tryReadDecimal :: String -> Maybe Rational
- tryReadRational :: String -> Maybe Rational
- tryReadHex :: String -> Maybe Rational
- tryReadUUID :: String -> Maybe UUID
- tryReadVersion :: String -> Maybe Version
- tryReadDateTime :: String -> Maybe (Maybe ZonedTime)
- tryReadDate :: String -> Maybe (Maybe Day)
- tryReadTime :: String -> Maybe (Maybe TimeOfDay)
- tryReadBool :: String -> Maybe Bool
- tryReadLink :: String -> Maybe String
Documentation
module Text.Parsec.Combinator
module Text.Parsec.Prim
module Text.Parsec.Pos
type Parser source result = source -> Either SomethingBad result Source
data ParseError :: *
type SomethingBad = [(SourcePos, String)] Source
mkError :: ParseError -> Either SomethingBad b Source
sourceToken :: (Show t, Stream (Tokens t) m (SourcePos, t)) => (t -> Maybe a) -> ParsecT [(SourcePos, t)] u m a Source
manyBetween :: (Monad m, Stream s m t) => ParsecT s u m open -> ParsecT s u m close -> ParsecT s u m p -> ParsecT s u m [p] Source
:: (Ord p, Eq o) | |
=> (a -> Maybe o) | Determine operator |
-> (o -> Bool) | Is left precedence? |
-> (o -> p) | Precedence of given operator |
-> [a] | The input stream (infix notation) |
-> [a] | The output stream (postfix notation) |
Infix to postfix notation (an implementation of the Shunting-Yard-Algorithm)
ignoreUnderscores :: String -> String Source
tryReadDecimal :: String -> Maybe Rational Source
tryReadRational :: String -> Maybe Rational Source
tryReadHex :: String -> Maybe Rational Source
tryReadUUID :: String -> Maybe UUID Source
tryReadVersion :: String -> Maybe Version Source
tryReadBool :: String -> Maybe Bool Source
tryReadLink :: String -> Maybe String Source