This is supposed to provide a testing ground for playing with haskell while learning about how to interact with chess programmatically.
You must make sure that stack is installed on your system. stack is a toolchain for handling Haskell projects with dependencies and other required configuration. More information can be found in their docs. You can check this with:
stack --versionTo install stack run the following command:
brew install haskell-stackYou will then need to make sure that you have the correct version of ghc installed for this project which you can do by running the following from within this directory:
stack setupYou might also want to install a number of extensions for vscode to make devlopment easier:
code --install-extension haskell.haskell
code --install-extension justusadam.language-haskell
code --install-extension hoovercj.haskell-linterThe last extension will require that you also have hlint installed. This can be installed using stack:
stack install hlintYou will also have to add something to your global vscode settings. You can access these by pressing cmd+shift+P, typing in "settings" and then selecting "Preferences: Open Settings (JSON)". This is what you will want to add, replacing <user-name> with your own system name:
{
...
"haskell.hlint.executablePath": "/Users/<user-name>/.local/bin/hlint"
}The tests are all contained within ./test folder. The are written in a very similar way to how we use jest/mocha but with a tool called hspec. To run them simply use:
stack test