Copyright | (c) Dominik Schrempf 2019 |
---|---|
License | GPL-3 |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Creation date: Thu Feb 14 13:30:37 2019.
Tools involving input, output, and parsing.
Synopsis
- readGZFile :: FilePath -> IO ByteString
- writeGZFile :: FilePath -> ByteString -> IO ()
- io :: (MonadLogger m, MonadIO m) => String -> ByteString -> Maybe FilePath -> m ()
- runParserOnFile :: Parsec e ByteString a -> FilePath -> IO (Either (ParseErrorBundle ByteString e) a)
- parseFileWith :: ShowErrorComponent e => Parsec e ByteString a -> FilePath -> IO a
- parseIOWith :: ShowErrorComponent e => Parsec e ByteString a -> IO a
- parseFileOrIOWith :: ShowErrorComponent e => Parsec e ByteString a -> Maybe FilePath -> IO a
- parseStringWith :: ShowErrorComponent e => String -> Parsec e ByteString a -> String -> a
- parseByteStringWith :: ShowErrorComponent e => String -> Parsec e ByteString a -> ByteString -> a
Input, output.
readGZFile :: FilePath -> IO ByteString Source #
Read file. If file path ends with ".gz", assume gzipped file and decompress before read.
writeGZFile :: FilePath -> ByteString -> IO () Source #
Write file. If file path ends with ".gz", assume gzipped file and compress before write.
io :: (MonadLogger m, MonadIO m) => String -> ByteString -> Maybe FilePath -> m () Source #
Write a result with a given name to file or standard output.
Parsing.
runParserOnFile :: Parsec e ByteString a -> FilePath -> IO (Either (ParseErrorBundle ByteString e) a) Source #
Parse a possibly gzipped file.
:: ShowErrorComponent e | |
=> Parsec e ByteString a | The parser. |
-> FilePath | |
-> IO a |
Parse a possibly gzipped file and extract the result.
:: ShowErrorComponent e | |
=> Parsec e ByteString a | The parser. |
-> IO a |
Parse standard input.
:: ShowErrorComponent e | |
=> Parsec e ByteString a | The parser. |
-> Maybe FilePath | If no file path is given, standard input is used. |
-> IO a |
Parse a possibly gzipped file, or standard input, and extract the result.
:: ShowErrorComponent e | |
=> String | Name of string. |
-> Parsec e ByteString a | Parser. |
-> String | Input. |
-> a |
Parse a String
and extract the result.
:: ShowErrorComponent e | |
=> String | Name of byte string. |
-> Parsec e ByteString a | Parser. |
-> ByteString | Input. |
-> a |
Parse a ByteString
and extract the result.