Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Defines the commands a user can issue.
Synopsis
- data Command x y
- commandPrefix :: Char
- printTag :: String
- restartTag :: String
- setTag :: String
- usageMessage :: String
- readsCommand :: String -> Either String (Command x y, String)
- showsCommand :: Command x y -> ShowS
- autoComplete :: ShowS
Types
Data-types
The sum-type of commands that a user may issue.
Hint | Request a move-suggestion. |
Print PrintObject | Print the requested static data. |
Quit | Terminate this application. |
Report ReportObject | Report on the requested dynamic data. |
Resign | Admit defeat. |
Restart | Abandon the current game, & start afresh. |
RollBack (Maybe NPlies) | Roll-back the optionally specified number of plies. |
Save | Persist the current game-state. |
Set SetObject | I.E. mutate a configuration-value. |
Swap | Swap options between the two sides; which causes the players to swap sides. |
Constants
commandPrefix :: Char Source #
Used to distinguish a command from a move.
restartTag :: String Source #
Input-format.
usageMessage :: String Source #
A message defining the syntax of the available commands.
Functions
showsCommand :: Command x y -> ShowS Source #
Shows a command.
autoComplete :: ShowS Source #
Replace the first word of the specified string with the name of a command of which it is an unambiguous case-insensitive prefix.