Copyright | (c) Michael Szvetits 2023 |
---|---|
License | BSD-3-Clause (see the file LICENSE) |
Maintainer | typedbyte@qualified.name |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Types and functions for exceptions that can occur when manipulating chess games.
Synopsis
- data ChessException
- fieldOccupied :: PlacedPiece t -> ChessException
- pieceMissing :: PlacedPiece t -> ChessException
- unexpectedPiece :: PlacedPiece t -> ChessException
- assumeRight :: Alternative f => Either e a -> f a
Documentation
data ChessException Source #
Represents errors that can occur when manipulating chess games.
fieldOccupied :: PlacedPiece t -> ChessException Source #
Smart constructor for FieldOccupied
.
pieceMissing :: PlacedPiece t -> ChessException Source #
Smart constructor for PieceMissing
.
unexpectedPiece :: PlacedPiece t -> ChessException Source #
Smart constructor for UnexpectedPiece
.
assumeRight :: Alternative f => Either e a -> f a Source #