Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Parses an optionally compressed file containing games encoded in PGN.
- The parsed games can optionally be validated.
- Permits the games to be filtered & their number capped.
Synopsis
- type PGNDatabase = [PGN]
- type Decompressor = String
- type MaybeMaximumGames = Maybe NGames
- parseIO :: FilePath -> Maybe Decompressor -> IsStrictlySequential -> ValidateMoves -> TextEncoding -> [Tag] -> PGNPredicate -> MaybeMaximumGames -> IO (Either String PGNDatabase)
Types
Type-synonyms
type PGNDatabase = [PGN] Source #
Self-documentation.
type Decompressor = String Source #
The name of an executable used to decompress (to stdout) the PGN-file.
type MaybeMaximumGames = Maybe NGames Source #
The optional maximum number of games to read.
Functions
:: FilePath | The PGN-file's location. |
-> Maybe Decompressor | An Optional executable by which to decompress the PGN-file. |
-> IsStrictlySequential | |
-> ValidateMoves | |
-> TextEncoding | The conversion-scheme between byte-sequences & Unicode characters. |
-> [Tag] | |
-> PGNPredicate | Used to filter entries from the database. |
-> MaybeMaximumGames | Optional maximum number of games to read from the database (after they've been filtered). |
-> IO (Either String PGNDatabase) |
Reads a PGN-database from the (optionally compressed) file-path & passes it to the parser.