Community
Modules 25

Text.Parsec.ByteString.Lazy

provisional

Convenience definitions for working with lazy ByteStrings.

type Parser = Parsec C.ByteString ()

type GenParser t st = Parsec C.ByteString st

parseFromFile :: Parser a -> FilePath -> IO (Either ParseError a)

parseFromFile p filePath runs a lazy bytestring parser p on the input read from filePath using readFile. Returns either a ParseError (Left) or a value of type a (Right).

 main    = do{ result <- parseFromFile numbers "digits.txt"
             ; case result of
                 Left err  -> print err
                 Right xs  -> print (sum xs)
             }
Maintainer
derek.a.elkins@gmail.com
Portability
portable
Copyright
(c) Paolo Martini 2007
License
BSD-style (see the LICENSE file)
Build record and source files

Community contribution. The service has not verified this documentation. The generator reported 3 diagnostics.

Target: Linux on x86-64. Some inferred types and resolved links are not available.

Generator: aihc-haddock-858b1951-web-1

Metadata snapshot: 51a8c38adf37e9558e7835b04b20868626c044e2d2e98e3527943eabd1e09c0a

Open the dependency plan · Download the documentation model

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.