bishbosh-0.1.4.0: Plays chess.
Safe HaskellNone
LanguageHaskell2010

BishBosh.ContextualNotation.PGNDatabase

Description

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

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

parseIO Source #

Arguments

:: 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.