Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- digitByte :: CharParser k p => Int -> p Word8
- integer :: (Num a, CharParser k p) => p sep -> Int -> p a
- integer' :: (Num a, CharParser k p) => p sep -> Int -> p (a, Int)
- decimal :: Num a => CharP k a
- octal :: Num a => CharP k a
- hexadecimal :: Num a => CharP k a
- digit :: CharParser k p => Int -> p Word
- sign :: (CharParser k f, Num a) => f (a -> a)
- signed :: (Num a, CharParser k p) => p a -> p a
- fractionHex :: (Num a, CharParser k p) => p digitSep -> p (Either a (a, Int, a))
- fractionDec :: (Num a, CharParser k p) => p digitSep -> p (Either a (a, Int, a))
- char' :: CharParser k p => Char -> p Char
- notChar :: CharParser k p => Char -> p Char
- anyChar :: CharP k Char
- anyAsciiByte :: CharP k Word8
- alphaNumChar :: CharP k Char
- digitChar :: CharParser k p => Int -> p Char
- letterChar :: CharP k Char
- lowerChar :: CharP k Char
- upperChar :: CharP k Char
- symbolChar :: CharP k Char
- categoryChar :: CharParser k p => GeneralCategory -> p Char
- punctuationChar :: CharP k Char
- spaceChar :: CharP k Char
- asciiChar :: CharP k Char
- satisfy :: CharParser k p => (Char -> Bool) -> p Char
- asciiSatisfy :: CharParser k p => (Word8 -> Bool) -> p Word8
- skipChars :: CharParser k p => Int -> p ()
- takeChars :: CharParser k p => Int -> p k
- skipCharsWhile :: CharParser k p => (Char -> Bool) -> p ()
- takeCharsWhile :: CharParser k p => (Char -> Bool) -> p k
- skipCharsWhile1 :: CharParser k p => (Char -> Bool) -> p ()
- takeCharsWhile1 :: CharParser k p => (Char -> Bool) -> p k
- scanChars :: CharParser k p => (s -> Char -> Maybe s) -> s -> p s
- scanChars1 :: CharParser k p => (s -> Char -> Maybe s) -> s -> p s
- string :: CharParser k p => String -> p k
Documentation
digitByte :: CharParser k p => Int -> p Word8 Source #
Parse a digit byte for the given base. Bases 2 to 36 are supported.
integer :: (Num a, CharParser k p) => p sep -> Int -> p a Source #
Parse an integer of the given base. Bases 2 to 36 are supported. Digits can be separated by separator, e.g. `optional (char '_')`. Signs are not parsed by this combinator.
integer' :: (Num a, CharParser k p) => p sep -> Int -> p (a, Int) Source #
Parse an integer of the given base. Returns the integer and the number of digits. Bases 2 to 36 are supported. Digits can be separated by separator, e.g. `optional (char '_')`. Signs are not parsed by this combinator.
decimal :: Num a => CharP k a Source #
Parses a decimal integer. Signs are not parsed by this combinator.
octal :: Num a => CharP k a Source #
Parses an octal integer. Signs are not parsed by this combinator.
hexadecimal :: Num a => CharP k a Source #
Parses a hexadecimal integer. Signs are not parsed by this combinator.
digit :: CharParser k p => Int -> p Word Source #
Parse a single digit of the given base and return its value. Bases 2 to 36 are supported.
sign :: (CharParser k f, Num a) => f (a -> a) Source #
Parse plus or minus sign
signed :: (Num a, CharParser k p) => p a -> p a Source #
Parse a number with a plus or minus sign.
fractionHex :: (Num a, CharParser k p) => p digitSep -> p (Either a (a, Int, a)) Source #
Parse a hexadecimal fraction, e.g., co.ffeep123, returning (mantissa, 2, exponent), corresponding to mantissa * 2^exponent. Digits can be separated by separator, e.g. `optional (char '_')`. Signs are not parsed by this combinator.
fractionDec :: (Num a, CharParser k p) => p digitSep -> p (Either a (a, Int, a)) Source #
Parse a decimal fraction, e.g., 123.456e-78, returning (mantissa, 10, exponent), corresponding to mantissa * 10^exponent. Digits can be separated by separator, e.g. `optional (char '_')`. Signs are not parsed by this combinator.
anyAsciiByte :: CharP k Word8 Source #
Parse an arbitrary ASCII byte.
alphaNumChar :: CharP k Char Source #
Parse an alphanumeric character, including Unicode.
digitChar :: CharParser k p => Int -> p Char Source #
Parse a digit character of the given base. Bases 2 to 36 are supported.
letterChar :: CharP k Char Source #
Parse a letter character, including Unicode.
symbolChar :: CharP k Char Source #
Parse a symbol character, including Unicode.
categoryChar :: CharParser k p => GeneralCategory -> p Char Source #
Parse a character belonging to the given Unicode category
punctuationChar :: CharP k Char Source #
Parse a punctuation character, including Unicode.
satisfy :: CharParser k p => (Char -> Bool) -> p Char Source #
Parse a single character with the given predicate
asciiSatisfy :: CharParser k p => (Word8 -> Bool) -> p Word8 Source #
Parse a single character within the ASCII charset with the given predicate
skipChars :: CharParser k p => Int -> p () Source #
Skip the next n characters
takeChars :: CharParser k p => Int -> p k Source #
Take the next n characters and advance the position by n characters
skipCharsWhile :: CharParser k p => (Char -> Bool) -> p () Source #
Skip char while predicate is true
takeCharsWhile :: CharParser k p => (Char -> Bool) -> p k Source #
Take chars while predicate is true
skipCharsWhile1 :: CharParser k p => (Char -> Bool) -> p () Source #
Skip at least one char while predicate is true
takeCharsWhile1 :: CharParser k p => (Char -> Bool) -> p k Source #
Take at least one byte while predicate is true
scanChars1 :: CharParser k p => (s -> Char -> Maybe s) -> s -> p s Source #
string :: CharParser k p => String -> p k Source #
Parse a string