-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | TH parser generator for splitting bytestring into fixed-width fields -- @package parsergen @version 0.2.0.7 -- | Based on Data.Attoparsec.Zepto by Bryan O'Sullivan 2011 -- -- A tiny, highly specialized combinator parser for ByteString -- strings. Designed to split bytestrings into fields with fixed widths. -- -- unsafe versions of the functions do not perform checks that there is -- enough data left in the bytestring module ParserGen.Parser -- | A simple parser. -- -- This monad is strict in its state, and the monadic bind operator -- (>>=) evaluates each result to weak head normal form -- before passing it along. data Parser a -- | Run a parser. parse :: Parser a -> ByteString -> Either String a ensureBytesLeft :: Int -> Parser () -- | Indicate whether the end of the input has been reached. atEnd :: Parser Bool -- | Match a string exactly. string :: ByteString -> Parser () anyChar :: Parser Char word8 :: Word8 -> Parser () -- | Consume n bytes of input. take :: Int -> Parser ByteString -- | Consume n bytes of input without checking if it's available unsafeTake :: Int -> Parser ByteString -- | Skip n bytes of input skip :: Int -> Parser () -- | Skip n bytes of input without checking if it's available unsafeSkip :: Int -> Parser () -- | Consume input while the predicate returns True. takeWhile :: (Word8 -> Bool) -> Parser ByteString instance Alternative Parser instance Monoid (Parser a) instance Applicative Parser instance MonadPlus Parser instance Monad Parser instance Functor Parser -- | Parsing and unparsing for commonly used datatypes module ParserGen.Common unsafeDecimalX :: Int -> Parser Int -- | This is a template-haskell based version of unsafeDecimalX -- which generates a fast, unrolled loop unsafeDecimalXTH :: Int -> Q Exp putDecimalX :: Int -> Int -> ByteString unsafeDecimalXS :: Int -> Parser Int unsafeDecimalXSTH :: Int -> Q Exp putDecimalXS :: Int -> Int -> ByteString -- | Can keep up to 12 characters from 0..9, A..Z newtype AlphaNum AlphaNum :: Int64 -> AlphaNum unAlphaNum :: AlphaNum -> Int64 unsafeAlphaNum :: Int -> Parser AlphaNum putAlphaNum :: AlphaNum -> ByteString instance Show AlphaNum instance Eq AlphaNum instance Enum AlphaNum module ParserGen.Gen genDataTypeFromFile :: FilePath -> Q [Dec] genParserFromFile :: FilePath -> Q [Dec] genWidthFromFile :: FilePath -> Q [Dec] genDataTypeFromFile' :: FilePath -> Q [Dec] genParserFromFile' :: FilePath -> Q [Dec] genWidthFromFile' :: FilePath -> Q [Dec] module ParserGen.Repack genRepackFromFile :: FilePath -> Q [Dec] instance Show RepackCmd module ParserGen