- collection :: Stream s m Word8 => ParsecT s u m (Collection, [Warning])
- clipDate :: PartialDate -> PartialDate
- data PropertyType
- properties :: GameType -> PropertyType -> [String]
- extraProperties :: GameType -> PropertyType -> [String]
- data Property = Property {}
- data Warning
- = DuplicatePropertyOmitted Property
- | SquareSizeSpecifiedAsRectangle SourcePos
- | DanglingEscapeCharacterOmitted SourcePos
- | PropValueForNonePropertyOmitted Property
- | UnknownPropertyPreserved String
- | PointSpecifiedAsPointRange Property
- | DuplicatePointsOmitted Property [Point]
- | InvalidDatesClipped (Set PartialDate)
- | AnnotationWithNoMoveOmitted Property
- | ExtraGameInfoOmitted Property
- | NestedRootPropertyOmitted Property
- | MovelessAnnotationOmitted Property
- | DuplicateSetupOperationsOmitted [Point]
- | ExtraPositionalJudgmentOmitted (Judgment, Emphasis)
- | DuplicateMarkupOmitted (Mark, Point)
- | ExtraPropertyValuesOmitted Property
- | DuplicateLabelOmitted (Point, String)
- | UnknownNumberingIgnored Integer
- data ErrorType
- data Error
- = KnownError { }
- | UnknownError { }
Documentation
collection :: Stream s m Word8 => ParsecT s u m (Collection, [Warning])Source
Parse a Word8
stream into an SGF collection. A collection is a list of
games; the documentation for Game
has more details. There are generally
two kinds of errors in SGF files: recoverable ones (which will be
accumulated in the [Warning
] return) and unrecoverable ones (which will
result in parse errors).
clipDate :: PartialDate -> PartialDateSource
Clip to a valid, representable date. Years are clipped to the 0000-9999 range; months are clipped to the 1-12 range, and days are clipped to the 1-<number of days in the given month> range (accounting for leap years in the case of February).
If a parsed date is changed by this function, a warning is emitted.
data PropertyType Source
Types of properties, as given in the SGF specification.
properties :: GameType -> PropertyType -> [String]Source
All properties of each type listed in the SGF specification.
extraProperties :: GameType -> PropertyType -> [String]Source
Just the properties associated with specific games.
Property | |
|
Warnings signify recoverable errors.