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
- signed :: (Num a, CharParser k p) => p a -> p a
- fractionHex :: (Num a, CharParser k p) => p digitSep -> p (a, Int, a)
- fractionDec :: (Num a, CharParser k p) => p digitSep -> p (a, Int, a)
- char' :: CharParser k p => Char -> p Char
- notChar :: CharParser k p => Char -> p Char
- anyChar :: CharP k Char
- 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
- 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
- string :: CharParser k p => Text -> p Text
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 '_')`.
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 '_')`.
hexadecimal :: Num a => CharP k a Source #
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.
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 (a, Int, a) Source #
Parse a hexadecimal fraction, returning (coefficient, 2, exponent), corresponding to coefficient * 2^exponent. Digits can be separated by separator, e.g. `optional (char '_')`.
fractionDec :: (Num a, CharParser k p) => p digitSep -> p (a, Int, a) Source #
Parse a decimal fraction, returning (coefficient, 10, exponent), corresponding to coefficient * 10^exponent. Digits can be separated by separator, e.g. `optional (char '_')`.
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.
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