Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
Instances
Instances
class Profunctor p => Attoparsec p where Source #
word8, anyWord8, satisfy, skip, peekWord8, peekWord8', peekWord8Class', unsafePeekWord8Class', string, skipWhile, take, scan, runScanner, takeWhile, takeWhile1, takeByteString, endOfInput, atEnd, assert, parseOrPrint
word8 :: Word8 -> p x Word8 Source #
anyWord8 :: p Word8 Word8 Source #
notWord8 :: Word8 -> p Word8 Word8 Source #
satisfy :: (Word8 -> Bool) -> p Word8 Word8 Source #
skip :: (Word8 -> Bool) -> p Word8 () Source #
peekWord8 :: p (Maybe Word8) (Maybe Word8) Source #
peekWord8' :: p Word8 Word8 Source #
peekWord8Class' :: (Word8 -> Bool) -> p Bool Bool Source #
Get the value of a predicate on the lookahead.
This extra method allows the unparser not to worry about knowing the exact value of a lookahead.
unsafePeekWord8Class' :: p (Class Word8) Word8 Source #
Get a representative of a character class a lookahead belongs to.
Care must be taken not to learn more about the resulting character than the class it belongs to.
string :: ByteString -> p x ByteString Source #
skipWhile :: (Word8 -> Bool) -> p ByteString () Source #
take :: Int -> p ByteString ByteString Source #
scan :: s -> (s -> Word8 -> Maybe s) -> p ByteString ByteString Source #
runScanner :: s -> (s -> Word8 -> Maybe s) -> p ByteString (ByteString, s) Source #
takeWhile :: (Word8 -> Bool) -> p ByteString ByteString Source #
takeWhile1 :: (Word8 -> Bool) -> p ByteString ByteString Source #
takeTill :: (Word8 -> Bool) -> p ByteString ByteString Source #
takeByteString :: p ByteString ByteString Source #
(<?>) :: p b a -> String -> p b a Source #
endOfInput :: p x () Source #
assert :: String -> (x -> Bool) -> p x () Source #
As a parser, do nothing (return ()
); as a printer, fail if the
predicate is not satisfied, with the given error message.
parseOrPrint :: Parser a -> (a -> Printer' ()) -> p a a Source #